changeset 7356:4b8e606f8afb

Merge
author lana
date Wed, 17 Apr 2013 21:48:04 -0700
parents bb098a221d85 (current diff) 674880648db4 (diff)
children 10ad4a4330bc
files src/macosx/classes/sun/lwawt/LWWindowPeer.java src/share/classes/java/time/chrono/HijrahDeviationReader.java src/share/classes/java/time/format/DateTimeBuilder.java src/share/classes/java/time/format/DateTimeFormatStyleProvider.java src/share/classes/java/time/temporal/Adjusters.java src/share/classes/java/time/temporal/Queries.java src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java src/share/native/java/lang/ResourceBundle.c src/solaris/classes/sun/awt/X11/XWindowPeer.java test/java/time/tck/java/time/TestChronology.java test/java/time/tck/java/time/chrono/TestChronoLocalDate.java test/java/time/tck/java/time/chrono/TestChronoLocalDateTime.java test/java/time/tck/java/time/chrono/TestHijrahChronology.java test/java/time/tck/java/time/chrono/TestJapaneseChronology.java test/java/time/tck/java/time/chrono/TestMinguoChronology.java test/java/time/tck/java/time/chrono/TestThaiBuddhistChronology.java test/java/time/tck/java/time/temporal/TCKDateTimeAdjusters.java test/java/time/tck/java/time/temporal/TestChronoLocalDate.java test/java/time/tck/java/time/temporal/TestChronoLocalDateTime.java test/java/time/tck/java/time/temporal/TestChronoZonedDateTime.java test/java/time/test/java/time/temporal/TestDateTimeAdjusters.java test/java/time/test/java/time/temporal/TestJapaneseChronoImpl.java test/java/time/test/java/time/temporal/TestThaiBuddhistChronoImpl.java test/java/util/ComparatorsTest.java
diffstat 865 files changed, 57583 insertions(+), 22173 deletions(-) [+]
line wrap: on
line diff
--- a/make/java/java/FILES_c.gmk	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/java/java/FILES_c.gmk	Wed Apr 17 21:48:04 2013 -0700
@@ -48,7 +48,6 @@
 	Proxy.c \
 	RandomAccessFile.c \
 	RandomAccessFile_md.c \
-	ResourceBundle.c \
 	Runtime.c \
 	SecurityManager.c \
 	Shutdown.c \
--- a/make/java/java/Makefile	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/java/java/Makefile	Wed Apr 17 21:48:04 2013 -0700
@@ -313,6 +313,12 @@
 CAL_PROPS = calendars.properties
 
 #
+# Rule to copy Hijrah-umalqura calendar properties file.
+#
+HIJRAH_UMALQURA_PROPS = hijrah-config-umalqura.properties
+
+
+#
 # Rule to copy tzmappings file on Windows
 #
 ifeq ($(PLATFORM), windows)
@@ -324,7 +330,7 @@
 	$(call chmod-file, 444)
 endif
 
-build: $(LIBDIR)/$(PROPS) $(LIBDIR)/$(CAL_PROPS) $(TZMAP)
+build: $(LIBDIR)/$(PROPS) $(LIBDIR)/$(CAL_PROPS) $(LIBDIR)/$(HIJRAH_UMALQURA_PROPS) $(TZMAP)
 
 $(LIBDIR)/$(PROPS): $(PLATFORM_SRC)/lib/$(PROPS)
 	$(install-file)
@@ -332,6 +338,9 @@
 $(LIBDIR)/$(CAL_PROPS): $(SHARE_SRC)/lib/$(CAL_PROPS)
 	$(install-file)
 
+$(LIBDIR)/$(HIJRAH_UMALQURA_PROPS): $(SHARE_SRC)/lib/$(HIJRAH_UMALQURA_PROPS)
+	$(install-file)
+
 clean:: 
 	$(RM) -r $(LIBDIR)/$(PROPS) $(TZMAP)
 
--- a/make/java/java/mapfile-vers	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/java/java/mapfile-vers	Wed Apr 17 21:48:04 2013 -0700
@@ -134,7 +134,6 @@
 		Java_java_lang_ClassLoader_00024NativeLibrary_load;
 		Java_java_lang_ClassLoader_00024NativeLibrary_unload;
 		Java_java_lang_ClassLoader_00024NativeLibrary_findBuiltinLib;
-		Java_java_lang_ClassLoader_getCaller; 
 		Java_java_lang_ClassLoader_registerNatives;
 		Java_java_lang_Compiler_registerNatives;
 		Java_java_lang_Double_longBitsToDouble;
@@ -217,7 +216,7 @@
 		Java_java_lang_Throwable_fillInStackTrace;
                 Java_java_lang_Throwable_getStackTraceDepth;
                 Java_java_lang_Throwable_getStackTraceElement;
-		Java_java_lang_UNIXProcess_initIDs;
+		Java_java_lang_UNIXProcess_init;
 		Java_java_lang_UNIXProcess_waitForProcessExit;
 		Java_java_lang_UNIXProcess_forkAndExec;
 		Java_java_lang_UNIXProcess_destroyProcess;
@@ -233,7 +232,6 @@
 		Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2;
 		Java_java_security_AccessController_getStackAccessControlContext;
 		Java_java_security_AccessController_getInheritedAccessControlContext;
-		Java_java_util_ResourceBundle_getClassContext;
 		Java_java_util_TimeZone_getSystemTimeZoneID;
 		Java_java_util_TimeZone_getSystemGMTOffsetID;
 		Java_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8;
--- a/make/java/java/reorder-i586	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/java/java/reorder-i586	Wed Apr 17 21:48:04 2013 -0700
@@ -73,7 +73,6 @@
 # Test Sleep
 # Test IntToString
 # Test LoadToolkit
-text: .text%Java_java_util_ResourceBundle_getClassContext;
 text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
 text: .text%JNU_GetEnv;
 text: .text%Java_java_io_UnixFileSystem_checkAccess;
--- a/make/java/java/reorder-sparc	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/java/java/reorder-sparc	Wed Apr 17 21:48:04 2013 -0700
@@ -78,7 +78,6 @@
 # Test Sleep
 # Test IntToString
 # Test LoadToolkit
-text: .text%Java_java_util_ResourceBundle_getClassContext;
 text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
 text: .text%JNU_GetEnv;
 text: .text%Java_java_io_UnixFileSystem_checkAccess;
--- a/make/java/java/reorder-sparcv9	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/java/java/reorder-sparcv9	Wed Apr 17 21:48:04 2013 -0700
@@ -74,7 +74,6 @@
 # Test Sleep
 # Test IntToString
 # Test LoadToolkit
-text: .text%Java_java_util_ResourceBundle_getClassContext;
 text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
 text: .text%JNU_GetEnv;
 text: .text%Java_java_io_UnixFileSystem_checkAccess;
--- a/make/java/text/base/FILES_java.gmk	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/java/text/base/FILES_java.gmk	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -105,5 +105,7 @@
         sun/text/resources/CollationData.java \
 	\
         sun/text/resources/FormatData.java \
+        sun/text/resources/JavaTimeSupplementary.java \
         sun/text/resources/en/FormatData_en.java \
-        sun/text/resources/en/FormatData_en_US.java
+        sun/text/resources/en/FormatData_en_US.java \
+        sun/text/resources/en/JavaTimeSupplementary_en.java \
--- a/make/java/util/FILES_java.gmk	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/java/util/FILES_java.gmk	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 FILES_java = \
         sun/util/resources/LocaleData.java \
         sun/util/resources/OpenListResourceBundle.java \
+        sun/util/resources/ParallelListResourceBundle.java \
         sun/util/resources/LocaleNamesBundle.java \
         sun/util/resources/TimeZoneNamesBundle.java \
         sun/util/resources/TimeZoneNames.java \
--- a/make/sun/font/FILES_c.gmk	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/sun/font/FILES_c.gmk	Wed Apr 17 21:48:04 2013 -0700
@@ -106,7 +106,21 @@
         OpenTypeLayoutEngine.cpp \
         ThaiLayoutEngine.cpp \
         ScriptAndLanguageTags.cpp \
-        FontInstanceAdapter.cpp
+        FontInstanceAdapter.cpp \
+        ContextualGlyphInsertionProc2.cpp \
+        ContextualGlyphSubstProc2.cpp \
+        GXLayoutEngine2.cpp \
+        IndicRearrangementProcessor2.cpp \
+        LigatureSubstProc2.cpp \
+        MorphTables2.cpp \
+        NonContextualGlyphSubstProc2.cpp \
+        SegmentArrayProcessor2.cpp \
+        SegmentSingleProcessor2.cpp \
+        SimpleArrayProcessor2.cpp \
+        SingleTableProcessor2.cpp \
+        StateTableProcessor2.cpp \
+        SubtableProcessor2.cpp \
+        TrimmedArrayProcessor2.cpp
 
 
 ifeq ($(PLATFORM),windows)
--- a/make/sun/splashscreen/Makefile	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/sun/splashscreen/Makefile	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -83,21 +83,17 @@
 				  -framework JavaNativeFoundation
 else ifneq ($(PLATFORM), windows)
   CFLAGS += -DWITH_X11
-  ifeq ($(PLATFORM), macosx))
-    OTHER_LDLIBS += -liconv
-    CPPFLAGS += -I$(OPENWIN_HOME)/include \
-                -I$(OPENWIN_HOME)/include/X11/extensions
-    OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -pthread
-  else
-    CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
-    OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpthread
-  endif
+  CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
+  OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpthread
 else # PLATFORM
   CFLAGS += -DWITH_WIN32
   OTHER_LDLIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib /DELAYLOAD:user32.dll
 #$(JVMLIB) $(OBJDIR)/../../jpeg/$(OBJDIRNAME)/jpeg$(SUFFIX).lib
 endif # PLATFORM
 
+# Add giflib include path for all platforms
+CPPFLAGS += -I$(SHARE_SRC)/native/sun/awt/giflib
+
 #
 # Add to ambient vpath to get files in a subdirectory
 #
--- a/make/sun/text/FILES_java.gmk	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/sun/text/FILES_java.gmk	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -227,5 +227,54 @@
                 sun/util/resources/sv/TimeZoneNames_sv.java \
 		sun/util/resources/zh/TimeZoneNames_zh_CN.java \
 		sun/util/resources/zh/TimeZoneNames_zh_TW.java \
-		sun/util/resources/zh/TimeZoneNames_zh_HK.java
+		sun/util/resources/zh/TimeZoneNames_zh_HK.java \
+                \
+                sun/text/resources/ar/JavaTimeSupplementary_ar.java \
+                sun/text/resources/be/JavaTimeSupplementary_be.java \
+                sun/text/resources/bg/JavaTimeSupplementary_bg.java \
+                sun/text/resources/ca/JavaTimeSupplementary_ca.java \
+                sun/text/resources/cs/JavaTimeSupplementary_cs.java \
+                sun/text/resources/da/JavaTimeSupplementary_da.java \
+                sun/text/resources/de/JavaTimeSupplementary_de.java \
+                sun/text/resources/el/JavaTimeSupplementary_el.java \
+                sun/text/resources/en/JavaTimeSupplementary_en_GB.java \
+                sun/text/resources/en/JavaTimeSupplementary_en_SG.java \
+                sun/text/resources/es/JavaTimeSupplementary_es.java \
+                sun/text/resources/et/JavaTimeSupplementary_et.java \
+                sun/text/resources/fi/JavaTimeSupplementary_fi.java \
+                sun/text/resources/fr/JavaTimeSupplementary_fr.java \
+                sun/text/resources/ga/JavaTimeSupplementary_ga.java \
+                sun/text/resources/hi/JavaTimeSupplementary_hi_IN.java \
+                sun/text/resources/hr/JavaTimeSupplementary_hr.java \
+                sun/text/resources/hu/JavaTimeSupplementary_hu.java \
+                sun/text/resources/is/JavaTimeSupplementary_is.java \
+                sun/text/resources/it/JavaTimeSupplementary_it.java \
+                sun/text/resources/iw/JavaTimeSupplementary_iw.java \
+                sun/text/resources/iw/JavaTimeSupplementary_iw_IL.java \
+                sun/text/resources/ja/JavaTimeSupplementary_ja.java \
+                sun/text/resources/ko/JavaTimeSupplementary_ko.java \
+                sun/text/resources/lt/JavaTimeSupplementary_lt.java \
+                sun/text/resources/lv/JavaTimeSupplementary_lv.java \
+                sun/text/resources/mk/JavaTimeSupplementary_mk.java \
+                sun/text/resources/ms/JavaTimeSupplementary_ms.java \
+                sun/text/resources/mt/JavaTimeSupplementary_mt.java \
+                sun/text/resources/nl/JavaTimeSupplementary_nl.java \
+                sun/text/resources/no/JavaTimeSupplementary_no.java \
+                sun/text/resources/pl/JavaTimeSupplementary_pl.java \
+                sun/text/resources/pt/JavaTimeSupplementary_pt.java \
+                sun/text/resources/pt/JavaTimeSupplementary_pt_PT.java \
+                sun/text/resources/ro/JavaTimeSupplementary_ro.java \
+                sun/text/resources/ru/JavaTimeSupplementary_ru.java \
+                sun/text/resources/sk/JavaTimeSupplementary_sk.java \
+                sun/text/resources/sl/JavaTimeSupplementary_sl.java \
+                sun/text/resources/sq/JavaTimeSupplementary_sq.java \
+                sun/text/resources/sr/JavaTimeSupplementary_sr.java \
+                sun/text/resources/sr/JavaTimeSupplementary_sr_Latn.java \
+                sun/text/resources/sv/JavaTimeSupplementary_sv.java \
+                sun/text/resources/th/JavaTimeSupplementary_th.java \
+                sun/text/resources/tr/JavaTimeSupplementary_tr.java \
+                sun/text/resources/uk/JavaTimeSupplementary_uk.java \
+                sun/text/resources/vi/JavaTimeSupplementary_vi.java \
+                sun/text/resources/zh/JavaTimeSupplementary_zh.java \
+                sun/text/resources/zh/JavaTimeSupplementary_zh_TW.java
 
--- a/make/sun/tzdb/Makefile	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/sun/tzdb/Makefile	Wed Apr 17 21:48:04 2013 -0700
@@ -42,7 +42,6 @@
 # Time zone data file creation
 #
 TZDATA_DIR := ../javazic/tzdata
-TZDATA_VER := $(subst tzdata,,$(shell $(GREP) '^tzdata' $(TZDATA_DIR)/VERSION))
 TZFILE := \
     africa antarctica asia australasia europe northamerica \
     pacificnew southamerica backward etcetera \
@@ -50,9 +49,7 @@
 
 TZFILES := $(addprefix $(TZDATA_DIR)/,$(TZFILE))
 
-
-
-TZDB_JAR = tzdb.jar
+TZDB_DAT = $(LIBDIR)/tzdb.dat
 
 #
 # Rules
@@ -62,13 +59,12 @@
 #
 # Add to the build rule
 #
-build: $(LIBDIR)/$(TZDB_JAR)
+build: $(TZDB_DAT)
 
-$(LIBDIR)/$(TZDB_JAR): $(TZFILES)
+$(TZDB_DAT): $(TZFILES)
 	$(prep-target)
-	echo build tzdb from version $(TZDATA_VER)
 	$(BOOT_JAVA_CMD) -jar $(BUILDTOOLJARDIR)/tzdb.jar \
-	  -version $(TZDATA_VER) -srcdir $(TZDATA_DIR) -dstdir $(LIBDIR) $(TZFILE)
+	  -srcdir $(TZDATA_DIR) -dstfile $(TZDB_DAT) $(TZFILE)
 
 clean clobber::
-	$(RM) $(LIBDIR)/$(TZDB_JAR)
+	$(RM) $(TZDB_DAT)
--- a/make/tools/src/build/tools/cldrconverter/AbstractLDMLHandler.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/tools/src/build/tools/cldrconverter/AbstractLDMLHandler.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
 
 package build.tools.cldrconverter;
 
+import build.tools.cldrconverter.CLDRConverter.DraftType;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
@@ -88,7 +89,7 @@
         }
         String draftValue = attributes.getValue("draft");
         if (draftValue != null) {
-            return CLDRConverter.draftType > CLDRConverter.DRAFT_MAP.get(draftValue);
+            return DraftType.getDefault().ordinal() > DraftType.forKeyword(draftValue).ordinal();
         }
         return false;
     }
--- a/make/tools/src/build/tools/cldrconverter/Bundle.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/tools/src/build/tools/cldrconverter/Bundle.java	Wed Apr 17 21:48:04 2013 -0700
@@ -266,6 +266,9 @@
             handleMultipleInheritance(myMap, parentsMap, calendarPrefix + "DayNarrows");
             handleMultipleInheritance(myMap, parentsMap, calendarPrefix + "AmPmMarkers");
             handleMultipleInheritance(myMap, parentsMap, calendarPrefix + "narrow.AmPmMarkers");
+            handleMultipleInheritance(myMap, parentsMap, calendarPrefix + "QuarterNames");
+            handleMultipleInheritance(myMap, parentsMap, calendarPrefix + "QuarterAbbreviations");
+            handleMultipleInheritance(myMap, parentsMap, calendarPrefix + "QuarterNarrows");
 
             adjustEraNames(myMap, calendarType);
 
@@ -484,25 +487,33 @@
         for (String k : patternKeys) {
             if (myMap.containsKey(calendarPrefix + k)) {
                 int len = patternKeys.length;
-                List<String> rawPatterns = new ArrayList<>();
-                List<String> patterns = new ArrayList<>();
+                List<String> rawPatterns = new ArrayList<>(len);
+                List<String> patterns = new ArrayList<>(len);
                 for (int i = 0; i < len; i++) {
                     String key = calendarPrefix + patternKeys[i];
                     String pattern = (String) myMap.remove(key);
                     if (pattern == null) {
                         pattern = (String) parentsMap.remove(key);
                     }
+                    rawPatterns.add(i, pattern);
                     if (pattern != null) {
-                        rawPatterns.add(i, pattern);
                         patterns.add(i, translateDateFormatLetters(calendarType, pattern));
+                    } else {
+                        patterns.add(i, null);
                     }
                 }
+                // If patterns is empty or has any nulls, discard patterns.
                 if (patterns.isEmpty()) {
                     return;
                 }
+                for (String p : patterns) {
+                    if (p == null) {
+                        return;
+                    }
+                }
                 String key = calendarPrefix + name;
                 if (!rawPatterns.equals(patterns)) {
-                    myMap.put("cldr." + key, rawPatterns.toArray(new String[len]));
+                    myMap.put("java.time." + key, rawPatterns.toArray(new String[len]));
                 }
                 myMap.put(key, patterns.toArray(new String[len]));
                 break;
--- a/make/tools/src/build/tools/cldrconverter/CLDRConverter.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/tools/src/build/tools/cldrconverter/CLDRConverter.java	Wed Apr 17 21:48:04 2013 -0700
@@ -68,25 +68,43 @@
     static MetaZonesParseHandler handlerMetaZones;
     private static BundleGenerator bundleGenerator;
 
-    static int draftType;
-    private static final String DRAFT_UNCONFIRMED = "unconfirmed";
-    private static final String DRAFT_PROVISIONAL = "provisional";
-    private static final String DRAFT_CONTRIBUTED = "contributed";
-    private static final String DRAFT_APPROVED = "approved";
-    private static final String DRAFT_TRUE = "true";
-    private static final String DRAFT_FALSE = "false";
-    private static final String DRAFT_DEFAULT = DRAFT_APPROVED;
-    static final Map<String, Integer> DRAFT_MAP = new HashMap<>();
+    static enum DraftType {
+        UNCONFIRMED,
+        PROVISIONAL,
+        CONTRIBUTED,
+        APPROVED;
+
+        private static final Map<String, DraftType> map = new HashMap<>();
+        static {
+            for (DraftType dt : values()) {
+                map.put(dt.getKeyword(), dt);
+            }
+        }
+        static private DraftType defaultType = CONTRIBUTED;
+
+        private final String keyword;
+
+        private DraftType() {
+            keyword = this.name().toLowerCase(Locale.ROOT);
 
-    static {
-        DRAFT_MAP.put(DRAFT_UNCONFIRMED, 0);
-        DRAFT_MAP.put(DRAFT_PROVISIONAL, 1);
-        DRAFT_MAP.put(DRAFT_CONTRIBUTED, 2);
-        DRAFT_MAP.put(DRAFT_APPROVED, 3);
-        DRAFT_MAP.put(DRAFT_TRUE, 0);
-        DRAFT_MAP.put(DRAFT_FALSE, 2);
-        draftType = DRAFT_MAP.get(DRAFT_DEFAULT);
-    };
+        }
+
+        static DraftType forKeyword(String keyword) {
+            return map.get(keyword);
+        }
+
+        static DraftType getDefault() {
+            return defaultType;
+        }
+
+        static void setDefault(String keyword) {
+            defaultType = Objects.requireNonNull(forKeyword(keyword));
+        }
+
+        String getKeyword() {
+            return keyword;
+        }
+    }
 
     static boolean USE_UTF8 = false;
     private static boolean verbose;
@@ -106,7 +124,7 @@
                     case "-draft":
                         String draftDataType = args[++i];
                         try {
-                            draftType = DRAFT_MAP.get(draftDataType);
+                            DraftType.setDefault(draftDataType);
                         } catch (NullPointerException e) {
                             severe("Error: incorrect draft value: %s%n", draftDataType);
                             System.exit(1);
@@ -525,7 +543,7 @@
         "standalone.MonthNames",
         "MonthAbbreviations",
         "standalone.MonthAbbreviations",
-        "MonthNarrow",
+        "MonthNarrows",
         "standalone.MonthNarrows",
         "DayNames",
         "standalone.DayNames",
@@ -533,6 +551,12 @@
         "standalone.DayAbbreviations",
         "DayNarrows",
         "standalone.DayNarrows",
+        "QuarterNames",
+        "standalone.QuarterNames",
+        "QuarterAbbreviations",
+        "standalone.QuarterAbbreviations",
+        "QuarterNarrows",
+        "standalone.QuarterNarrows",
         "AmPmMarkers",
         "narrow.AmPmMarkers",
         "long.Eras",
@@ -560,7 +584,7 @@
             String prefix = calendarType.keyElementName();
             for (String element : FORMAT_DATA_ELEMENTS) {
                 String key = prefix + element;
-                copyIfPresent(map, "cldr." + key, formatData);
+                copyIfPresent(map, "java.time." + key, formatData);
                 copyIfPresent(map, key, formatData);
             }
         }
--- a/make/tools/src/build/tools/cldrconverter/LDMLParseHandler.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/tools/src/build/tools/cldrconverter/LDMLParseHandler.java	Wed Apr 17 21:48:04 2013 -0700
@@ -356,6 +356,44 @@
                 }
             }
             break;
+        case "quarterContext":
+            {
+                // for FormatData
+                // need to keep stand-alone and format, to allow for inheritance in CLDR
+                String type = attributes.getValue("type");
+                if ("stand-alone".equals(type) || "format".equals(type)) {
+                    pushKeyContainer(qName, attributes, type);
+                } else {
+                    pushIgnoredContainer(qName);
+                }
+            }
+            break;
+        case "quarterWidth":
+            {
+                // for FormatData
+                // keep info about the context type so we can sort out inheritance later
+                String prefix = (currentCalendarType == null) ? "" : currentCalendarType.keyElementName();
+                switch (attributes.getValue("type")) {
+                case "wide":
+                    pushStringArrayEntry(qName, attributes, prefix + "QuarterNames/" + getContainerKey(), 4);
+                    break;
+                case "abbreviated":
+                    pushStringArrayEntry(qName, attributes, prefix + "QuarterAbbreviations/" + getContainerKey(), 4);
+                    break;
+                case "narrow":
+                    pushStringArrayEntry(qName, attributes, prefix + "QuarterNarrows/" + getContainerKey(), 4);
+                    break;
+                default:
+                    pushIgnoredContainer(qName);
+                    break;
+                }
+            }
+            break;
+        case "quarter":
+            // for FormatData
+            // add to string array entry of quarterWidth element
+            pushStringArrayElement(qName, attributes, Integer.parseInt(attributes.getValue("type")) - 1);
+            break;
 
         //
         // Time zone names
--- a/make/tools/src/build/tools/tzdb/TzdbZoneRulesCompiler.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/make/tools/src/build/tools/tzdb/TzdbZoneRulesCompiler.java	Wed Apr 17 21:48:04 2013 -0700
@@ -58,12 +58,12 @@
 
 import static build.tools.tzdb.Utils.*;
 
-import java.io.BufferedReader;
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.text.ParsePosition;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -71,132 +71,131 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
+import java.util.NoSuchElementException;
+import java.util.Scanner;
 import java.util.SortedMap;
-import java.util.StringTokenizer;
 import java.util.TreeMap;
-import java.util.TreeSet;
-import java.util.jar.JarOutputStream;
-import java.util.zip.ZipEntry;
 import java.util.regex.Matcher;
+import java.util.regex.MatchResult;
 import java.util.regex.Pattern;
 
 /**
- * A builder that can read the TZDB time-zone files and build {@code ZoneRules} instances.
+ * A compiler that reads a set of TZDB time-zone files and builds a single
+ * combined TZDB data file.
  *
  * @since 1.8
  */
 public final class TzdbZoneRulesCompiler {
 
-    private static final Matcher YEAR = Pattern.compile("(?i)(?<min>min)|(?<max>max)|(?<only>only)|(?<year>[0-9]+)").matcher("");
-    private static final Matcher MONTH = Pattern.compile("(?i)(jan)|(feb)|(mar)|(apr)|(may)|(jun)|(jul)|(aug)|(sep)|(oct)|(nov)|(dec)").matcher("");
-    private static final Matcher DOW = Pattern.compile("(?i)(mon)|(tue)|(wed)|(thu)|(fri)|(sat)|(sun)").matcher("");
-    private static final Matcher TIME = Pattern.compile("(?<neg>-)?+(?<hour>[0-9]{1,2})(:(?<minute>[0-5][0-9]))?+(:(?<second>[0-5][0-9]))?+").matcher("");
+    public static void main(String[] args) {
+        new TzdbZoneRulesCompiler().compile(args);
+    }
 
-    /**
-     * Constant for MJD 1972-01-01.
-     */
-    private static final long MJD_1972_01_01 = 41317L;
-
-    /**
-     * Reads a set of TZDB files and builds a single combined data file.
-     *
-     * @param args  the arguments
-     */
-    public static void main(String[] args) {
+    private void compile(String[] args) {
         if (args.length < 2) {
             outputHelp();
             return;
         }
-
-        // parse args
+        Path srcDir = null;
+        Path dstFile = null;
         String version = null;
-        File baseSrcDir = null;
-        File dstDir = null;
-        boolean verbose = false;
-
-        // parse options
+        // parse args/options
         int i;
         for (i = 0; i < args.length; i++) {
             String arg = args[i];
-            if (arg.startsWith("-") == false) {
+            if (!arg.startsWith("-")) {
                 break;
             }
             if ("-srcdir".equals(arg)) {
-                if (baseSrcDir == null && ++i < args.length) {
-                    baseSrcDir = new File(args[i]);
+                if (srcDir == null && ++i < args.length) {
+                    srcDir = Paths.get(args[i]);
                     continue;
                 }
-            } else if ("-dstdir".equals(arg)) {
-                if (dstDir == null && ++i < args.length) {
-                    dstDir = new File(args[i]);
-                    continue;
-                }
-            } else if ("-version".equals(arg)) {
-                if (version == null && ++i < args.length) {
-                    version = args[i];
+            } else if ("-dstfile".equals(arg)) {
+                if (dstFile == null && ++i < args.length) {
+                    dstFile = Paths.get(args[i]);
                     continue;
                 }
             } else if ("-verbose".equals(arg)) {
-                if (verbose == false) {
+                if (!verbose) {
                     verbose = true;
                     continue;
                 }
-            } else if ("-help".equals(arg) == false) {
+            } else if (!"-help".equals(arg)) {
                 System.out.println("Unrecognised option: " + arg);
             }
             outputHelp();
             return;
         }
-
         // check source directory
-        if (baseSrcDir == null) {
-            System.out.println("Source directory must be specified using -srcdir: " + baseSrcDir);
-            return;
+        if (srcDir == null) {
+            System.err.println("Source directory must be specified using -srcdir");
+            System.exit(1);
         }
-        if (baseSrcDir.isDirectory() == false) {
-            System.out.println("Source does not exist or is not a directory: " + baseSrcDir);
-            return;
+        if (!Files.isDirectory(srcDir)) {
+            System.err.println("Source does not exist or is not a directory: " + srcDir);
+            System.exit(1);
         }
-        dstDir = (dstDir != null ? dstDir : baseSrcDir);
-
         // parse source file names
-        List<String> srcFileNames = Arrays.asList(Arrays.copyOfRange(args, i, args.length));
-        if (srcFileNames.isEmpty()) {
-            System.out.println("Source filenames not specified, using default set");
-            System.out.println("(africa antarctica asia australasia backward etcetera europe northamerica southamerica)");
-            srcFileNames = Arrays.asList("africa", "antarctica", "asia", "australasia", "backward",
-                    "etcetera", "europe", "northamerica", "southamerica");
+        if (i == args.length) {
+            i = 0;
+            args = new String[] {"africa", "antarctica", "asia", "australasia", "europe",
+                                 "northamerica","southamerica", "backward", "etcetera" };
+            System.out.println("Source filenames not specified, using default set ( ");
+            for (String name : args) {
+                System.out.printf(name + " ");
+            }
+            System.out.println(")");
         }
-
-        // find source directories to process
-        List<File> srcDirs = new ArrayList<>();
-        if (version != null) {
-            //  if the "version" specified, as in jdk repo, the "baseSrcDir" is
-            //  the "srcDir" that contains the tzdb data.
-            srcDirs.add(baseSrcDir);
-        } else {
-            File[] dirs = baseSrcDir.listFiles();
-            for (File dir : dirs) {
-                if (dir.isDirectory() && dir.getName().matches("[12][0-9]{3}[A-Za-z0-9._-]+")) {
-                    srcDirs.add(dir);
-                }
+        // source files in this directory
+        List<Path> srcFiles = new ArrayList<>();
+        for (; i < args.length; i++) {
+            Path file = srcDir.resolve(args[i]);
+            if (Files.exists(file)) {
+                srcFiles.add(file);
+            } else {
+                System.err.println("Source directory does not contain source file: " + args[i]);
+                System.exit(1);
             }
         }
-        if (srcDirs.isEmpty()) {
-            System.out.println("Source directory contains no valid source folders: " + baseSrcDir);
-            return;
+        // check destination file
+        if (dstFile == null) {
+            dstFile = srcDir.resolve("tzdb.dat");
+        } else {
+            Path parent = dstFile.getParent();
+            if (parent != null && !Files.exists(parent)) {
+                System.err.println("Destination directory does not exist: " + parent);
+                System.exit(1);
+            }
         }
-        // check destination directory
-        if (dstDir.exists() == false && dstDir.mkdirs() == false) {
-            System.out.println("Destination directory could not be created: " + dstDir);
-            return;
+        try {
+            // get tzdb source version
+            Matcher m = Pattern.compile("tzdata(?<ver>[0-9]{4}[A-z])")
+                               .matcher(new String(Files.readAllBytes(srcDir.resolve("VERSION")),
+                                                   "ISO-8859-1"));
+            if (m.find()) {
+                version = m.group("ver");
+            } else {
+                System.exit(1);
+                System.err.println("Source directory does not contain file: VERSION");
+            }
+            printVerbose("Compiling TZDB version " + version);
+            // parse source files
+            for (Path file : srcFiles) {
+                printVerbose("Parsing file: " + file);
+                parseFile(file);
+            }
+            // build zone rules
+            printVerbose("Building rules");
+            buildZoneRules();
+            // output to file
+            printVerbose("Outputting tzdb file: " + dstFile);
+            outputFile(dstFile, version, builtZones, links);
+        } catch (Exception ex) {
+            System.out.println("Failed: " + ex.toString());
+            ex.printStackTrace();
+            System.exit(1);
         }
-        if (dstDir.isDirectory() == false) {
-            System.out.println("Destination is not a directory: " + dstDir);
-            return;
-        }
-        process(srcDirs, srcFileNames, dstDir, version, verbose);
         System.exit(0);
     }
 
@@ -206,145 +205,35 @@
     private static void outputHelp() {
         System.out.println("Usage: TzdbZoneRulesCompiler <options> <tzdb source filenames>");
         System.out.println("where options include:");
-        System.out.println("   -srcdir <directory>   Where to find source directories (required)");
-        System.out.println("   -dstdir <directory>   Where to output generated files (default srcdir)");
-        System.out.println("   -version <version>    Specify the version, such as 2009a (optional)");
+        System.out.println("   -srcdir  <directory>  Where to find tzdb source directory (required)");
+        System.out.println("   -dstfile <file>       Where to output generated file (default srcdir/tzdb.dat)");
         System.out.println("   -help                 Print this usage message");
         System.out.println("   -verbose              Output verbose information during compilation");
-        System.out.println(" There must be one directory for each version in srcdir");
-        System.out.println(" Each directory must have the name of the version, such as 2009a");
-        System.out.println(" Each directory must contain the unpacked tzdb files, such as asia or europe");
-        System.out.println(" Directories must match the regex [12][0-9][0-9][0-9][A-Za-z0-9._-]+");
-        System.out.println(" There will be one jar file for each version and one combined jar in dstdir");
-        System.out.println(" If the version is specified, only that version is processed");
-    }
-
-    /**
-     * Process to create the jar files.
-     */
-    private static void process(List<File> srcDirs, List<String> srcFileNames, File dstDir, String version, boolean verbose) {
-        // build actual jar files
-        Map<String, SortedMap<String, ZoneRules>> allBuiltZones = new TreeMap<>();
-        Set<String> allRegionIds = new TreeSet<String>();
-        Set<ZoneRules> allRules = new HashSet<ZoneRules>();
-        Map<String, Map<String, String>> allLinks = new TreeMap<>();
-
-        for (File srcDir : srcDirs) {
-            // source files in this directory
-            List<File> srcFiles = new ArrayList<>();
-            for (String srcFileName : srcFileNames) {
-                File file = new File(srcDir, srcFileName);
-                if (file.exists()) {
-                    srcFiles.add(file);
-                }
-            }
-            if (srcFiles.isEmpty()) {
-                continue;  // nothing to process
-            }
-
-            // compile
-            String loopVersion = (srcDirs.size() == 1 && version != null)
-                                 ? version : srcDir.getName();
-            TzdbZoneRulesCompiler compiler = new TzdbZoneRulesCompiler(loopVersion, srcFiles, verbose);
-            try {
-                // compile
-                compiler.compile();
-                SortedMap<String, ZoneRules> builtZones = compiler.getZones();
-
-                // output version-specific file
-                File dstFile = version == null ? new File(dstDir, "tzdb" + loopVersion + ".jar")
-                                               : new File(dstDir, "tzdb.jar");
-                if (verbose) {
-                    System.out.println("Outputting file: " + dstFile);
-                }
-                outputFile(dstFile, loopVersion, builtZones, compiler.links);
-
-                // create totals
-                allBuiltZones.put(loopVersion, builtZones);
-                allRegionIds.addAll(builtZones.keySet());
-                allRules.addAll(builtZones.values());
-                allLinks.put(loopVersion, compiler.links);
-            } catch (Exception ex) {
-                System.out.println("Failed: " + ex.toString());
-                ex.printStackTrace();
-                System.exit(1);
-            }
-        }
-
-        // output merged file
-        if (version == null) {
-            File dstFile = new File(dstDir, "tzdb-all.jar");
-            if (verbose) {
-                System.out.println("Outputting combined file: " + dstFile);
-            }
-            outputFile(dstFile, allBuiltZones, allRegionIds, allRules, allLinks);
-        }
+        System.out.println(" The source directory must contain the unpacked tzdb files, such as asia or europe");
     }
 
     /**
      * Outputs the file.
      */
-    private static void outputFile(File dstFile,
-                                   String version,
-                                   SortedMap<String, ZoneRules> builtZones,
-                                   Map<String, String> links) {
-        Map<String, SortedMap<String, ZoneRules>> loopAllBuiltZones = new TreeMap<>();
-        loopAllBuiltZones.put(version, builtZones);
-        Set<String> loopAllRegionIds = new TreeSet<String>(builtZones.keySet());
-        Set<ZoneRules> loopAllRules = new HashSet<ZoneRules>(builtZones.values());
-        Map<String, Map<String, String>> loopAllLinks = new TreeMap<>();
-        loopAllLinks.put(version, links);
-        outputFile(dstFile, loopAllBuiltZones, loopAllRegionIds, loopAllRules, loopAllLinks);
-    }
-
-    /**
-     * Outputs the file.
-     */
-    private static void outputFile(File dstFile,
-                                   Map<String, SortedMap<String, ZoneRules>> allBuiltZones,
-                                   Set<String> allRegionIds,
-                                   Set<ZoneRules> allRules,
-                                   Map<String, Map<String, String>> allLinks) {
-        try (JarOutputStream jos = new JarOutputStream(new FileOutputStream(dstFile))) {
-            outputTZEntry(jos, allBuiltZones, allRegionIds, allRules, allLinks);
-        } catch (Exception ex) {
-            System.out.println("Failed: " + ex.toString());
-            ex.printStackTrace();
-            System.exit(1);
-        }
-    }
-
-    /**
-     * Outputs the timezone entry in the JAR file.
-     */
-    private static void outputTZEntry(JarOutputStream jos,
-                                      Map<String, SortedMap<String, ZoneRules>> allBuiltZones,
-                                      Set<String> allRegionIds,
-                                      Set<ZoneRules> allRules,
-                                      Map<String, Map<String, String>> allLinks) {
-        // this format is not publicly specified
-        try {
-            jos.putNextEntry(new ZipEntry("TZDB.dat"));
-            DataOutputStream out = new DataOutputStream(jos);
-
+    private void outputFile(Path dstFile, String version,
+                            SortedMap<String, ZoneRules> builtZones,
+                            Map<String, String> links) {
+        try (DataOutputStream out = new DataOutputStream(Files.newOutputStream(dstFile))) {
             // file version
             out.writeByte(1);
             // group
             out.writeUTF("TZDB");
             // versions
-            String[] versionArray = allBuiltZones.keySet().toArray(new String[allBuiltZones.size()]);
-            out.writeShort(versionArray.length);
-            for (String version : versionArray) {
-                out.writeUTF(version);
-            }
+            out.writeShort(1);
+            out.writeUTF(version);
             // regions
-            String[] regionArray = allRegionIds.toArray(new String[allRegionIds.size()]);
+            String[] regionArray = builtZones.keySet().toArray(new String[builtZones.size()]);
             out.writeShort(regionArray.length);
             for (String regionId : regionArray) {
                 out.writeUTF(regionId);
             }
-            // rules
-            List<ZoneRules> rulesList = new ArrayList<>(allRules);
+            // rules  -- hashset -> remove the dup
+            List<ZoneRules> rulesList = new ArrayList<>(new HashSet<>(builtZones.values()));
             out.writeShort(rulesList.size());
             ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
             for (ZoneRules rules : rulesList) {
@@ -357,27 +246,22 @@
                 out.write(bytes);
             }
             // link version-region-rules
-            for (String version : allBuiltZones.keySet()) {
-                out.writeShort(allBuiltZones.get(version).size());
-                for (Map.Entry<String, ZoneRules> entry : allBuiltZones.get(version).entrySet()) {
-                     int regionIndex = Arrays.binarySearch(regionArray, entry.getKey());
-                     int rulesIndex = rulesList.indexOf(entry.getValue());
-                     out.writeShort(regionIndex);
-                     out.writeShort(rulesIndex);
-                }
+            out.writeShort(builtZones.size());
+            for (Map.Entry<String, ZoneRules> entry : builtZones.entrySet()) {
+                 int regionIndex = Arrays.binarySearch(regionArray, entry.getKey());
+                 int rulesIndex = rulesList.indexOf(entry.getValue());
+                 out.writeShort(regionIndex);
+                 out.writeShort(rulesIndex);
             }
             // alias-region
-            for (String version : allLinks.keySet()) {
-                out.writeShort(allLinks.get(version).size());
-                for (Map.Entry<String, String> entry : allLinks.get(version).entrySet()) {
-                     int aliasIndex = Arrays.binarySearch(regionArray, entry.getKey());
-                     int regionIndex = Arrays.binarySearch(regionArray, entry.getValue());
-                     out.writeShort(aliasIndex);
-                     out.writeShort(regionIndex);
-                }
+            out.writeShort(links.size());
+            for (Map.Entry<String, String> entry : links.entrySet()) {
+                 int aliasIndex = Arrays.binarySearch(regionArray, entry.getKey());
+                 int regionIndex = Arrays.binarySearch(regionArray, entry.getValue());
+                 out.writeShort(aliasIndex);
+                 out.writeShort(regionIndex);
             }
             out.flush();
-            jos.closeEntry();
         } catch (Exception ex) {
             System.out.println("Failed: " + ex.toString());
             ex.printStackTrace();
@@ -385,76 +269,30 @@
         }
     }
 
-    //-----------------------------------------------------------------------
+    private static final Pattern YEAR = Pattern.compile("(?i)(?<min>min)|(?<max>max)|(?<only>only)|(?<year>[0-9]+)");
+    private static final Pattern MONTH = Pattern.compile("(?i)(jan)|(feb)|(mar)|(apr)|(may)|(jun)|(jul)|(aug)|(sep)|(oct)|(nov)|(dec)");
+    private static final Matcher DOW = Pattern.compile("(?i)(mon)|(tue)|(wed)|(thu)|(fri)|(sat)|(sun)").matcher("");
+    private static final Matcher TIME = Pattern.compile("(?<neg>-)?+(?<hour>[0-9]{1,2})(:(?<minute>[0-5][0-9]))?+(:(?<second>[0-5][0-9]))?+").matcher("");
+
     /** The TZDB rules. */
     private final Map<String, List<TZDBRule>> rules = new HashMap<>();
 
     /** The TZDB zones. */
     private final Map<String, List<TZDBZone>> zones = new HashMap<>();
+
     /** The TZDB links. */
-
     private final Map<String, String> links = new HashMap<>();
 
     /** The built zones. */
     private final SortedMap<String, ZoneRules> builtZones = new TreeMap<>();
 
-
-    /** The version to produce. */
-    private final String version;
-
-    /** The source files. */
-
-    private final List<File> sourceFiles;
-
-    /** The version to produce. */
-    private final boolean verbose;
-
-    /**
-     * Creates an instance if you want to invoke the compiler manually.
-     *
-     * @param version  the version, such as 2009a, not null
-     * @param sourceFiles  the list of source files, not empty, not null
-     * @param verbose  whether to output verbose messages
-     */
-    public TzdbZoneRulesCompiler(String version, List<File> sourceFiles, boolean verbose) {
-        this.version = version;
-        this.sourceFiles = sourceFiles;
-        this.verbose = verbose;
-    }
+    /** Whether to output verbose messages. */
+    private boolean verbose;
 
     /**
-     * Compile the rules file.
-     * <p>
-     * Use {@link #getZones()} to retrieve the parsed data.
-     *
-     * @throws Exception if an error occurs
+     * private contructor
      */
-    public void compile() throws Exception {
-        printVerbose("Compiling TZDB version " + version);
-        parseFiles();
-        buildZoneRules();
-        printVerbose("Compiled TZDB version " + version);
-    }
-
-    /**
-     * Gets the parsed zone rules.
-     *
-     * @return the parsed zone rules, not null
-     */
-    public SortedMap<String, ZoneRules> getZones() {
-        return builtZones;
-    }
-
-    /**
-     * Parses the source files.
-     *
-     * @throws Exception if an error occurs
-     */
-    private void parseFiles() throws Exception {
-        for (File file : sourceFiles) {
-            printVerbose("Parsing file: " + file);
-            parseFile(file);
-        }
+    private TzdbZoneRulesCompiler() {
     }
 
     /**
@@ -463,14 +301,14 @@
      * @param file  the file being read, not null
      * @throws Exception if an error occurs
      */
-    private void parseFile(File file) throws Exception {
+    private void parseFile(Path file) throws Exception {
         int lineNumber = 1;
         String line = null;
-        BufferedReader in = null;
         try {
-            in = new BufferedReader(new FileReader(file));
+            List<String> lines = Files.readAllLines(file, StandardCharsets.ISO_8859_1);
             List<TZDBZone> openZone = null;
-            for ( ; (line = in.readLine()) != null; lineNumber++) {
+            for (; lineNumber < lines.size(); lineNumber++) {
+                line = lines.get(lineNumber);
                 int index = line.indexOf('#');  // remove comments (doesn't handle # in quotes)
                 if (index >= 0) {
                     line = line.substring(0, index);
@@ -478,41 +316,43 @@
                 if (line.trim().length() == 0) {  // ignore blank lines
                     continue;
                 }
-                StringTokenizer st = new StringTokenizer(line, " \t");
-                if (openZone != null && Character.isWhitespace(line.charAt(0)) && st.hasMoreTokens()) {
-                    if (parseZoneLine(st, openZone)) {
+                Scanner s = new Scanner(line);
+                if (openZone != null && Character.isWhitespace(line.charAt(0)) && s.hasNext()) {
+                    if (parseZoneLine(s, openZone)) {
                         openZone = null;
                     }
                 } else {
-                    if (st.hasMoreTokens()) {
-                        String first = st.nextToken();
+                    if (s.hasNext()) {
+                        String first = s.next();
                         if (first.equals("Zone")) {
-                            if (st.countTokens() < 3) {
+                            openZone = new ArrayList<>();
+                            try {
+                                zones.put(s.next(), openZone);
+                                if (parseZoneLine(s, openZone)) {
+                                    openZone = null;
+                                }
+                            } catch (NoSuchElementException x) {
                                 printVerbose("Invalid Zone line in file: " + file + ", line: " + line);
                                 throw new IllegalArgumentException("Invalid Zone line");
                             }
-                            openZone = new ArrayList<>();
-                            zones.put(st.nextToken(), openZone);
-                            if (parseZoneLine(st, openZone)) {
-                                openZone = null;
-                            }
                         } else {
                             openZone = null;
                             if (first.equals("Rule")) {
-                                if (st.countTokens() < 9) {
+                                try {
+                                    parseRuleLine(s);
+                                } catch (NoSuchElementException x) {
                                     printVerbose("Invalid Rule line in file: " + file + ", line: " + line);
                                     throw new IllegalArgumentException("Invalid Rule line");
                                 }
-                                parseRuleLine(st);
-
                             } else if (first.equals("Link")) {
-                                if (st.countTokens() < 2) {
+                                try {
+                                    String realId = s.next();
+                                    String aliasId = s.next();
+                                    links.put(aliasId, realId);
+                                } catch (NoSuchElementException x) {
                                     printVerbose("Invalid Link line in file: " + file + ", line: " + line);
                                     throw new IllegalArgumentException("Invalid Link line");
                                 }
-                                String realId = st.nextToken();
-                                String aliasId = st.nextToken();
-                                links.put(aliasId, realId);
 
                             } else {
                                 throw new IllegalArgumentException("Unknown line");
@@ -522,52 +362,44 @@
                 }
             }
         } catch (Exception ex) {
-            throw new Exception("Failed while processing file '" + file + "' on line " + lineNumber + " '" + line + "'", ex);
-        } finally {
-            try {
-                if (in != null) {
-                    in.close();
-                }
-            } catch (Exception ex) {
-                // ignore NPE and IOE
-            }
+            throw new Exception("Failed while parsing file '" + file + "' on line " + lineNumber + " '" + line + "'", ex);
         }
     }
 
     /**
      * Parses a Rule line.
      *
-     * @param st  the tokenizer, not null
+     * @param s  the line scanner, not null
      */
-    private void parseRuleLine(StringTokenizer st) {
+    private void parseRuleLine(Scanner s) {
         TZDBRule rule = new TZDBRule();
-        String name = st.nextToken();
+        String name = s.next();
         if (rules.containsKey(name) == false) {
             rules.put(name, new ArrayList<TZDBRule>());
         }
         rules.get(name).add(rule);
-        rule.startYear = parseYear(st.nextToken(), 0);
-        rule.endYear = parseYear(st.nextToken(), rule.startYear);
+        rule.startYear = parseYear(s, 0);
+        rule.endYear = parseYear(s, rule.startYear);
         if (rule.startYear > rule.endYear) {
             throw new IllegalArgumentException("Year order invalid: " + rule.startYear + " > " + rule.endYear);
         }
-        parseOptional(st.nextToken());  // type is unused
-        parseMonthDayTime(st, rule);
-        rule.savingsAmount = parsePeriod(st.nextToken());
-        rule.text = parseOptional(st.nextToken());
+        parseOptional(s.next());  // type is unused
+        parseMonthDayTime(s, rule);
+        rule.savingsAmount = parsePeriod(s.next());
+        rule.text = parseOptional(s.next());
     }
 
     /**
      * Parses a Zone line.
      *
-     * @param st  the tokenizer, not null
+     * @param s  the line scanner, not null
      * @return true if the zone is complete
      */
-    private boolean parseZoneLine(StringTokenizer st, List<TZDBZone> zoneList) {
+    private boolean parseZoneLine(Scanner s, List<TZDBZone> zoneList) {
         TZDBZone zone = new TZDBZone();
         zoneList.add(zone);
-        zone.standardOffset = parseOffset(st.nextToken());
-        String savingsRule = parseOptional(st.nextToken());
+        zone.standardOffset = parseOffset(s.next());
+        String savingsRule = parseOptional(s.next());
         if (savingsRule == null) {
             zone.fixedSavingsSecs = 0;
             zone.savingsRule = null;
@@ -580,11 +412,11 @@
                 zone.savingsRule = savingsRule;
             }
         }
-        zone.text = st.nextToken();
-        if (st.hasMoreTokens()) {
-            zone.year = Integer.parseInt(st.nextToken());
-            if (st.hasMoreTokens()) {
-                parseMonthDayTime(st, zone);
+        zone.text = s.next();
+        if (s.hasNext()) {
+            zone.year = Integer.parseInt(s.next());
+            if (s.hasNext()) {
+                parseMonthDayTime(s, zone);
             }
             return false;
         } else {
@@ -595,13 +427,13 @@
     /**
      * Parses a Rule line.
      *
-     * @param st  the tokenizer, not null
+     * @param s  the line scanner, not null
      * @param mdt  the object to parse into, not null
      */
-    private void parseMonthDayTime(StringTokenizer st, TZDBMonthDayTime mdt) {
-        mdt.month = parseMonth(st.nextToken());
-        if (st.hasMoreTokens()) {
-            String dayRule = st.nextToken();
+    private void parseMonthDayTime(Scanner s, TZDBMonthDayTime mdt) {
+        mdt.month = parseMonth(s);
+        if (s.hasNext()) {
+            String dayRule = s.next();
             if (dayRule.startsWith("last")) {
                 mdt.dayOfMonth = -1;
                 mdt.dayOfWeek = parseDayOfWeek(dayRule.substring(4));
@@ -621,8 +453,8 @@
                 }
                 mdt.dayOfMonth = Integer.parseInt(dayRule);
             }
-            if (st.hasMoreTokens()) {
-                String timeStr = st.nextToken();
+            if (s.hasNext()) {
+                String timeStr = s.next();
                 int secsOfDay = parseSecs(timeStr);
                 if (secsOfDay == 86400) {
                     mdt.endOfDay = true;
@@ -635,30 +467,43 @@
         }
     }
 
-    private int parseYear(String str, int defaultYear) {
-        if (YEAR.reset(str).matches()) {
-            if (YEAR.group("min") != null) {
-                //return YEAR_MIN_VALUE;
+    private int parseYear(Scanner s, int defaultYear) {
+        if (s.hasNext(YEAR)) {
+            s.next(YEAR);
+            MatchResult mr = s.match();
+            if (mr.group(1) != null) {
                 return 1900;  // systemv has min
-            } else if (YEAR.group("max") != null) {
+            } else if (mr.group(2) != null) {
                 return YEAR_MAX_VALUE;
-            } else if (YEAR.group("only") != null) {
+            } else if (mr.group(3) != null) {
                 return defaultYear;
             }
-            return Integer.parseInt(YEAR.group("year"));
+            return Integer.parseInt(mr.group(4));
+            /*
+            if (mr.group("min") != null) {
+                //return YEAR_MIN_VALUE;
+                return 1900;  // systemv has min
+            } else if (mr.group("max") != null) {
+                return YEAR_MAX_VALUE;
+            } else if (mr.group("only") != null) {
+                return defaultYear;
+            }
+            return Integer.parseInt(mr.group("year"));
+            */
         }
-        throw new IllegalArgumentException("Unknown year: " + str);
+        throw new IllegalArgumentException("Unknown year: " + s.next());
     }
 
-    private int parseMonth(String str) {
-        if (MONTH.reset(str).matches()) {
+    private int parseMonth(Scanner s) {
+        if (s.hasNext(MONTH)) {
+            s.next(MONTH);
             for (int moy = 1; moy < 13; moy++) {
-                if (MONTH.group(moy) != null) {
+                if (s.match().group(moy) != null) {
                     return moy;
                 }
             }
         }
-        throw new IllegalArgumentException("Unknown month: " + str);
+        throw new IllegalArgumentException("Unknown month: " + s.next());
     }
 
     private int parseDayOfWeek(String str) {
@@ -729,7 +574,6 @@
         }
     }
 
-    //-----------------------------------------------------------------------
     /**
      * Build the rules, zones and links into real zones.
      *
@@ -744,8 +588,7 @@
             for (TZDBZone tzdbZone : tzdbZones) {
                 bld = tzdbZone.addToBuilder(bld, rules);
             }
-            ZoneRules buildRules = bld.toRules(zoneId);
-            builtZones.put(zoneId, buildRules);
+            builtZones.put(zoneId, bld.toRules(zoneId));
         }
 
         // build aliases
@@ -758,25 +601,25 @@
                 printVerbose("Relinking alias " + aliasId + " to " + realId);
                 realRules = builtZones.get(realId);
                 if (realRules == null) {
-                    throw new IllegalArgumentException("Alias '" + aliasId + "' links to invalid zone '" + realId + "' for '" + version + "'");
+                    throw new IllegalArgumentException("Alias '" + aliasId + "' links to invalid zone '" + realId);
                 }
                 links.put(aliasId, realId);
-
             }
             builtZones.put(aliasId, realRules);
         }
-
         // remove UTC and GMT
-        //builtZones.remove("UTC");
-        //builtZones.remove("GMT");
-        //builtZones.remove("GMT0");
+        // builtZones.remove("UTC");
+        // builtZones.remove("GMT");
+        // builtZones.remove("GMT0");
         builtZones.remove("GMT+0");
         builtZones.remove("GMT-0");
         links.remove("GMT+0");
         links.remove("GMT-0");
+        // remove ROC, which is not supported in j.u.tz
+        builtZones.remove("ROC");
+        links.remove("ROC");
     }
 
-    //-----------------------------------------------------------------------
     /**
      * Prints a verbose message.
      *
@@ -788,7 +631,6 @@
         }
     }
 
-    //-----------------------------------------------------------------------
     /**
      * Class representing a month-day-time in the TZDB file.
      */
@@ -893,5 +735,4 @@
             return ldt;
         }
     }
-
 }
--- a/makefiles/CopyFiles.gmk	Wed Apr 17 21:32:11 2013 -0700
+++ b/makefiles/CopyFiles.gmk	Wed Apr 17 21:48:04 2013 -0700
@@ -174,6 +174,13 @@
 
 COPY_FILES += $(LIBDIR)/calendars.properties
 
+$(LIBDIR)/hijrah-config-umalqura.properties: $(CALENDARS_SRC)/hijrah-config-umalqura.properties
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	$(CP) $< $@
+
+COPY_FILES += $(LIBDIR)/hijrah-config-umalqura.properties
+
 ##########################################################################################
 
 ifeq ($(OPENJDK_TARGET_OS),windows)
--- a/makefiles/CreateJars.gmk	Wed Apr 17 21:32:11 2013 -0700
+++ b/makefiles/CreateJars.gmk	Wed Apr 17 21:48:04 2013 -0700
@@ -73,11 +73,6 @@
 
 ##########################################################################################
 
-$(IMAGES_OUTPUTDIR)/lib/tzdb.jar: $(JDK_OUTPUTDIR)/lib/tzdb.jar
-	$(install-file)
-
-##########################################################################################
-
 LOCALEDATA_INCLUDE_LOCALES := ar be bg ca cs da de el es et fi fr ga hi hr hu in is it \
                               iw ja ko lt lv mk ms mt nl no pl pt ro ru sk sl sq sr sv \
                               th tr uk vi zh
--- a/makefiles/GendataTZDB.gmk	Wed Apr 17 21:32:11 2013 -0700
+++ b/makefiles/GendataTZDB.gmk	Wed Apr 17 21:48:04 2013 -0700
@@ -29,16 +29,13 @@
 # Time zone data file creation
 #
 TZDATA_DIR := $(JDK_TOPDIR)/make/sun/javazic/tzdata
-TZDATA_VER := $(subst tzdata,,$(shell $(GREP) '^tzdata' $(TZDATA_DIR)/VERSION))
 TZDATA_TZFILE := africa antarctica asia australasia europe northamerica pacificnew southamerica backward etcetera gmt jdk11_backward
 TZDATA_TZFILES := $(addprefix $(TZDATA_DIR)/,$(TZDATA_TZFILE))
 
-GENDATA_TZDB_DST := $(JDK_OUTPUTDIR)/lib
-GENDATA_TZDB_JAR := tzdb.jar
+GENDATA_TZDB_DAT := $(JDK_OUTPUTDIR)/lib/tzdb.dat
 
-$(GENDATA_TZDB_DST)/$(GENDATA_TZDB_JAR) : $(TZDATA_TZFILES)
-	$(RM) $(GENDATA_TZDB_DST)/$(GENDATA_TZDB_JAR)
-	echo building tzdb from version $(TZDATA_VER)
-	$(TOOL_TZDB) -version $(TZDATA_VER) -srcdir $(TZDATA_DIR) -dstdir $(GENDATA_TZDB_DST) $(TZDATA_TZFILE)
+$(GENDATA_TZDB_DAT) : $(TZDATA_TZFILES)
+	$(RM) $(GENDATA_TZDB_DAT)
+	$(TOOL_TZDB) -srcdir $(TZDATA_DIR) -dstfile $(GENDATA_TZDB_DAT) $(TZDATA_TZFILE)
 
-GENDATA_TZDB += $(GENDATA_TZDB_DST)/$(GENDATA_TZDB_JAR)
+GENDATA_TZDB += $(GENDATA_TZDB_DAT)
--- a/makefiles/mapfiles/libjava/mapfile-vers	Wed Apr 17 21:32:11 2013 -0700
+++ b/makefiles/mapfiles/libjava/mapfile-vers	Wed Apr 17 21:48:04 2013 -0700
@@ -134,7 +134,6 @@
 		Java_java_lang_ClassLoader_00024NativeLibrary_load;
 		Java_java_lang_ClassLoader_00024NativeLibrary_unload;
 		Java_java_lang_ClassLoader_00024NativeLibrary_findBuiltinLib;
-		Java_java_lang_ClassLoader_getCaller; 
 		Java_java_lang_ClassLoader_registerNatives;
 		Java_java_lang_Compiler_registerNatives;
 		Java_java_lang_Double_longBitsToDouble;
@@ -217,7 +216,7 @@
 		Java_java_lang_Throwable_fillInStackTrace;
                 Java_java_lang_Throwable_getStackTraceDepth;
                 Java_java_lang_Throwable_getStackTraceElement;
-		Java_java_lang_UNIXProcess_initIDs;
+		Java_java_lang_UNIXProcess_init;
 		Java_java_lang_UNIXProcess_waitForProcessExit;
 		Java_java_lang_UNIXProcess_forkAndExec;
 		Java_java_lang_UNIXProcess_destroyProcess;
@@ -233,7 +232,6 @@
 		Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2;
 		Java_java_security_AccessController_getStackAccessControlContext;
 		Java_java_security_AccessController_getInheritedAccessControlContext;
-		Java_java_util_ResourceBundle_getClassContext;
 		Java_java_util_TimeZone_getSystemTimeZoneID;
 		Java_java_util_TimeZone_getSystemGMTOffsetID;
 		Java_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8;
--- a/makefiles/mapfiles/libjava/reorder-sparc	Wed Apr 17 21:32:11 2013 -0700
+++ b/makefiles/mapfiles/libjava/reorder-sparc	Wed Apr 17 21:48:04 2013 -0700
@@ -78,7 +78,6 @@
 # Test Sleep
 # Test IntToString
 # Test LoadToolkit
-text: .text%Java_java_util_ResourceBundle_getClassContext;
 text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
 text: .text%JNU_GetEnv;
 text: .text%Java_java_io_UnixFileSystem_checkAccess;
--- a/makefiles/mapfiles/libjava/reorder-sparcv9	Wed Apr 17 21:32:11 2013 -0700
+++ b/makefiles/mapfiles/libjava/reorder-sparcv9	Wed Apr 17 21:48:04 2013 -0700
@@ -74,7 +74,6 @@
 # Test Sleep
 # Test IntToString
 # Test LoadToolkit
-text: .text%Java_java_util_ResourceBundle_getClassContext;
 text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
 text: .text%JNU_GetEnv;
 text: .text%Java_java_io_UnixFileSystem_checkAccess;
--- a/makefiles/mapfiles/libjava/reorder-x86	Wed Apr 17 21:32:11 2013 -0700
+++ b/makefiles/mapfiles/libjava/reorder-x86	Wed Apr 17 21:48:04 2013 -0700
@@ -73,7 +73,6 @@
 # Test Sleep
 # Test IntToString
 # Test LoadToolkit
-text: .text%Java_java_util_ResourceBundle_getClassContext;
 text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
 text: .text%JNU_GetEnv;
 text: .text%Java_java_io_UnixFileSystem_checkAccess;
--- a/makefiles/profile-includes.txt	Wed Apr 17 21:32:11 2013 -0700
+++ b/makefiles/profile-includes.txt	Wed Apr 17 21:48:04 2013 -0700
@@ -66,6 +66,7 @@
     ext/sunec.jar \
     ext/sunjce_provider.jar \
     ext/sunpkcs11.jar \
+    hijrah-config-umalqura.properties \
     jce.jar \
     jsse.jar \
     logging.properties \
@@ -80,7 +81,7 @@
     security/java.security \
     security/local_policy.jar \
     security/trusted.libraries \
-    tzdb.jar
+    tzdb.dat
 
 PROFILE_1_JRE_OTHER_FILES := \
     COPYRIGHT \
@@ -100,9 +101,7 @@
     resources.jar \
     rt.jar \
     security/US_export_policy.jar \
-    security/local_policy.jar \
-    tzdb.jar
-
+    security/local_policy.jar
 
 PROFILE_2_JRE_BIN_FILES := \
     rmid$(EXE_SUFFIX) \
--- a/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Wed Apr 17 21:48:04 2013 -0700
@@ -170,7 +170,7 @@
             setTitle(((Dialog) getTarget()).getTitle());
         }
 
-        setAlwaysOnTop(getTarget().isAlwaysOnTop());
+        updateAlwaysOnTopState();
         updateMinimumSize();
 
         final Shape shape = getTarget().getShape();
@@ -357,8 +357,8 @@
     }
 
     @Override
-    public void setAlwaysOnTop(boolean value) {
-        platformWindow.setAlwaysOnTop(value);
+    public void updateAlwaysOnTopState() {
+        platformWindow.setAlwaysOnTop(getTarget().isAlwaysOnTop());
     }
 
     @Override
--- a/src/macosx/classes/sun/lwawt/macosx/CFileDialog.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/macosx/classes/sun/lwawt/macosx/CFileDialog.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -180,7 +180,7 @@
     }
 
     @Override
-    public void setAlwaysOnTop(boolean alwaysOnTop) {
+    public void updateAlwaysOnTopState() {
     }
 
     @Override
--- a/src/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -87,7 +87,7 @@
     }
 
     // 1.6 peer method
-    public void setAlwaysOnTop(boolean value) {
+    public void updateAlwaysOnTopState() {
         // no-op, since we just show the native print dialog
     }
 
--- a/src/share/classes/com/sun/crypto/provider/CipherCore.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/crypto/provider/CipherCore.java	Wed Apr 17 21:48:04 2013 -0700
@@ -426,17 +426,13 @@
            }
         }
         try {
-            params = AlgorithmParameters.getInstance(algName, "SunJCE");
+            params = AlgorithmParameters.getInstance(algName,
+                    SunJCE.getInstance());
+            params.init(spec);
         } catch (NoSuchAlgorithmException nsae) {
             // should never happen
             throw new RuntimeException("Cannot find " + algName +
                 " AlgorithmParameters implementation in SunJCE provider");
-        } catch (NoSuchProviderException nspe) {
-            // should never happen
-            throw new RuntimeException("Cannot find SunJCE provider");
-        }
-        try {
-            params.init(spec);
         } catch (InvalidParameterSpecException ipse) {
             // should never happen
             throw new RuntimeException(spec.getClass() + " not supported");
--- a/src/share/classes/com/sun/crypto/provider/CipherWithWrappingSpi.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/crypto/provider/CipherWithWrappingSpi.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -169,7 +169,8 @@
 
         try {
             KeyFactory keyFactory =
-                KeyFactory.getInstance(encodedKeyAlgorithm, "SunJCE");
+                KeyFactory.getInstance(encodedKeyAlgorithm,
+                    SunJCE.getInstance());
             X509EncodedKeySpec keySpec = new X509EncodedKeySpec(encodedKey);
             key = keyFactory.generatePublic(keySpec);
         } catch (NoSuchAlgorithmException nsae) {
@@ -191,8 +192,6 @@
             }
         } catch (InvalidKeySpecException ikse) {
             // Should never happen.
-        } catch (NoSuchProviderException nspe) {
-            // Should never happen.
         }
 
         return key;
@@ -215,7 +214,8 @@
 
         try {
             KeyFactory keyFactory =
-                KeyFactory.getInstance(encodedKeyAlgorithm, "SunJCE");
+                KeyFactory.getInstance(encodedKeyAlgorithm,
+                    SunJCE.getInstance());
             PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(encodedKey);
             return keyFactory.generatePrivate(keySpec);
         } catch (NoSuchAlgorithmException nsae) {
@@ -237,8 +237,6 @@
             }
         } catch (InvalidKeySpecException ikse) {
             // Should never happen.
-        } catch (NoSuchProviderException nspe) {
-            // Should never happen.
         }
 
         return key;
--- a/src/share/classes/com/sun/crypto/provider/ConstructKeys.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/crypto/provider/ConstructKeys.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
 import java.security.PrivateKey;
 import java.security.KeyFactory;
 import java.security.InvalidKeyException;
-import java.security.NoSuchProviderException;
 import java.security.NoSuchAlgorithmException;
 import java.security.spec.PKCS8EncodedKeySpec;
 import java.security.spec.X509EncodedKeySpec;
@@ -66,7 +65,8 @@
 
         try {
             KeyFactory keyFactory =
-                KeyFactory.getInstance(encodedKeyAlgorithm, "SunJCE");
+                KeyFactory.getInstance(encodedKeyAlgorithm,
+                    SunJCE.getInstance());
             X509EncodedKeySpec keySpec = new X509EncodedKeySpec(encodedKey);
             key = keyFactory.generatePublic(keySpec);
         } catch (NoSuchAlgorithmException nsae) {
@@ -94,8 +94,6 @@
                 new InvalidKeyException("Cannot construct public key");
             ike.initCause(ikse);
             throw ike;
-        } catch (NoSuchProviderException nspe) {
-            // Should never happen.
         }
 
         return key;
@@ -118,7 +116,8 @@
 
         try {
             KeyFactory keyFactory =
-                KeyFactory.getInstance(encodedKeyAlgorithm, "SunJCE");
+                KeyFactory.getInstance(encodedKeyAlgorithm,
+                    SunJCE.getInstance());
             PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(encodedKey);
             return keyFactory.generatePrivate(keySpec);
         } catch (NoSuchAlgorithmException nsae) {
@@ -146,8 +145,6 @@
                 new InvalidKeyException("Cannot construct private key");
             ike.initCause(ikse);
             throw ike;
-        } catch (NoSuchProviderException nspe) {
-            // Should never happen.
         }
 
         return key;
--- a/src/share/classes/com/sun/crypto/provider/DESedeWrapCipher.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/crypto/provider/DESedeWrapCipher.java	Wed Apr 17 21:48:04 2013 -0700
@@ -389,17 +389,13 @@
         if (iv != null) {
             String algo = cipherKey.getAlgorithm();
             try {
-                params = AlgorithmParameters.getInstance(algo, "SunJCE");
+                params = AlgorithmParameters.getInstance(algo,
+                    SunJCE.getInstance());
+                params.init(new IvParameterSpec(iv));
             } catch (NoSuchAlgorithmException nsae) {
                 // should never happen
                 throw new RuntimeException("Cannot find " + algo +
                     " AlgorithmParameters implementation in SunJCE provider");
-            } catch (NoSuchProviderException nspe) {
-                // should never happen
-                throw new RuntimeException("Cannot find SunJCE provider");
-            }
-            try {
-                params.init(new IvParameterSpec(iv));
             } catch (InvalidParameterSpecException ipse) {
                 // should never happen
                 throw new RuntimeException("IvParameterSpec not supported");
--- a/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java	Wed Apr 17 21:48:04 2013 -0700
@@ -151,7 +151,8 @@
                 dhParamSpec = new DHParameterSpec(dsaParamSpec.getP(),
                                                   dsaParamSpec.getG());
             }
-            algParams = AlgorithmParameters.getInstance("DH", "SunJCE");
+            algParams = AlgorithmParameters.getInstance("DH",
+                    SunJCE.getInstance());
             algParams.init(dhParamSpec);
         } catch (InvalidParameterSpecException e) {
             // this should never happen
@@ -159,11 +160,7 @@
         } catch (NoSuchAlgorithmException e) {
             // this should never happen, because we provide it
             throw new RuntimeException(e.getMessage());
-        } catch (NoSuchProviderException e) {
-            // this should never happen, because we provide it
-            throw new RuntimeException(e.getMessage());
         }
-
         return algParams;
     }
 }
--- a/src/share/classes/com/sun/crypto/provider/KeyProtector.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/crypto/provider/KeyProtector.java	Wed Apr 17 21:48:04 2013 -0700
@@ -81,8 +81,6 @@
     // key protector
     private char[] password;
 
-    private static final Provider PROV = Security.getProvider("SunJCE");
-
     KeyProtector(char[] password) {
         if (password == null) {
            throw new IllegalArgumentException("password can't be null");
@@ -119,7 +117,7 @@
         // wrap encrypted private key in EncryptedPrivateKeyInfo
         // (as defined in PKCS#8)
         AlgorithmParameters pbeParams =
-            AlgorithmParameters.getInstance("PBE", PROV);
+            AlgorithmParameters.getInstance("PBE", SunJCE.getInstance());
         pbeParams.init(pbeSpec);
 
         AlgorithmId encrAlg = new AlgorithmId
@@ -299,7 +297,7 @@
 
         PBEWithMD5AndTripleDESCipher cipherSpi;
         cipherSpi = new PBEWithMD5AndTripleDESCipher();
-        cipher = new CipherForKeyProtector(cipherSpi, PROV,
+        cipher = new CipherForKeyProtector(cipherSpi, SunJCE.getInstance(),
                                            "PBEWithMD5AndTripleDES");
         cipher.init(Cipher.ENCRYPT_MODE, sKey, pbeSpec);
         return new SealedObjectForKeyProtector(key, cipher);
@@ -330,8 +328,9 @@
             }
             PBEWithMD5AndTripleDESCipher cipherSpi;
             cipherSpi = new PBEWithMD5AndTripleDESCipher();
-            Cipher cipher = new CipherForKeyProtector(cipherSpi, PROV,
-                                                   "PBEWithMD5AndTripleDES");
+            Cipher cipher = new CipherForKeyProtector(cipherSpi,
+                                                      SunJCE.getInstance(),
+                                                      "PBEWithMD5AndTripleDES");
             cipher.init(Cipher.DECRYPT_MODE, skey, params);
             return (Key)soForKeyProtector.getObject(cipher);
         } catch (NoSuchAlgorithmException ex) {
--- a/src/share/classes/com/sun/crypto/provider/PBECipherCore.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/crypto/provider/PBECipherCore.java	Wed Apr 17 21:48:04 2013 -0700
@@ -169,16 +169,12 @@
         PBEParameterSpec pbeSpec = new PBEParameterSpec(salt, iCount);
         try {
             params = AlgorithmParameters.getInstance("PBEWithMD5And" +
-                (algo.equalsIgnoreCase("DES")? "DES":"TripleDES"), "SunJCE");
+                (algo.equalsIgnoreCase("DES")? "DES":"TripleDES"),
+                    SunJCE.getInstance());
+            params.init(pbeSpec);
         } catch (NoSuchAlgorithmException nsae) {
             // should never happen
             throw new RuntimeException("SunJCE called, but not configured");
-        } catch (NoSuchProviderException nspe) {
-            // should never happen
-            throw new RuntimeException("SunJCE called, but not configured");
-        }
-        try {
-            params.init(pbeSpec);
         } catch (InvalidParameterSpecException ipse) {
             // should never happen
             throw new RuntimeException("PBEParameterSpec not supported");
--- a/src/share/classes/com/sun/crypto/provider/PBES1Core.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/crypto/provider/PBES1Core.java	Wed Apr 17 21:48:04 2013 -0700
@@ -169,16 +169,12 @@
         PBEParameterSpec pbeSpec = new PBEParameterSpec(salt, iCount);
         try {
             params = AlgorithmParameters.getInstance("PBEWithMD5And" +
-                (algo.equalsIgnoreCase("DES")? "DES":"TripleDES"), "SunJCE");
+                (algo.equalsIgnoreCase("DES")? "DES":"TripleDES"),
+                SunJCE.getInstance());
+            params.init(pbeSpec);
         } catch (NoSuchAlgorithmException nsae) {
             // should never happen
             throw new RuntimeException("SunJCE called, but not configured");
-        } catch (NoSuchProviderException nspe) {
-            // should never happen
-            throw new RuntimeException("SunJCE called, but not configured");
-        }
-        try {
-            params.init(pbeSpec);
         } catch (InvalidParameterSpecException ipse) {
             // should never happen
             throw new RuntimeException("PBEParameterSpec not supported");
--- a/src/share/classes/com/sun/crypto/provider/PBES2Core.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/crypto/provider/PBES2Core.java	Wed Apr 17 21:48:04 2013 -0700
@@ -25,11 +25,9 @@
 
 package com.sun.crypto.provider;
 
-import java.io.UnsupportedEncodingException;
 import java.security.*;
 import java.security.spec.*;
 import javax.crypto.*;
-import javax.crypto.interfaces.*;
 import javax.crypto.spec.*;
 
 /**
@@ -145,16 +143,12 @@
         }
         PBEParameterSpec pbeSpec = new PBEParameterSpec(salt, iCount, ivSpec);
         try {
-            params = AlgorithmParameters.getInstance(pbeAlgo, "SunJCE");
+            params = AlgorithmParameters.getInstance(pbeAlgo,
+                SunJCE.getInstance());
+            params.init(pbeSpec);
         } catch (NoSuchAlgorithmException nsae) {
             // should never happen
             throw new RuntimeException("SunJCE called, but not configured");
-        } catch (NoSuchProviderException nspe) {
-            // should never happen
-            throw new RuntimeException("SunJCE called, but not configured");
-        }
-        try {
-            params.init(pbeSpec);
         } catch (InvalidParameterSpecException ipse) {
             // should never happen
             throw new RuntimeException("PBEParameterSpec not supported");
--- a/src/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,6 @@
 import java.security.KeyRep;
 import java.security.GeneralSecurityException;
 import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
 import java.security.spec.InvalidKeySpecException;
 import javax.crypto.Mac;
 import javax.crypto.SecretKey;
@@ -102,21 +101,16 @@
         int keyLength = keySpec.getKeyLength();
         if (keyLength == 0) {
             throw new InvalidKeySpecException("Key length not found");
-        } else if (keyLength == 0) {
+        } else if (keyLength < 0) {
             throw new InvalidKeySpecException("Key length is negative");
         }
         try {
-            this.prf = Mac.getInstance(prfAlgo, "SunJCE");
+            this.prf = Mac.getInstance(prfAlgo, SunJCE.getInstance());
         } catch (NoSuchAlgorithmException nsae) {
             // not gonna happen; re-throw just in case
             InvalidKeySpecException ike = new InvalidKeySpecException();
             ike.initCause(nsae);
             throw ike;
-        } catch (NoSuchProviderException nspe) {
-            // Again, not gonna happen; re-throw just in case
-            InvalidKeySpecException ike = new InvalidKeySpecException();
-            ike.initCause(nspe);
-            throw ike;
         }
         this.key = deriveKey(prf, passwdBytes, salt, iterCount, keyLength);
     }
--- a/src/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,6 @@
 
 package com.sun.crypto.provider;
 
-import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.security.*;
 import java.security.spec.*;
@@ -232,14 +231,13 @@
         }
         PBEParameterSpec pbeSpec = new PBEParameterSpec(salt, iCount);
         try {
-            params = AlgorithmParameters.getInstance(pbeAlgo, "SunJCE");
-        } catch (GeneralSecurityException gse) {
+            params = AlgorithmParameters.getInstance(pbeAlgo,
+                SunJCE.getInstance());
+            params.init(pbeSpec);
+        } catch (NoSuchAlgorithmException nsae) {
             // should never happen
             throw new RuntimeException(
                 "SunJCE provider is not configured properly");
-        }
-        try {
-            params.init(pbeSpec);
         } catch (InvalidParameterSpecException ipse) {
             // should never happen
             throw new RuntimeException("PBEParameterSpec not supported");
--- a/src/share/classes/com/sun/crypto/provider/RSACipher.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/crypto/provider/RSACipher.java	Wed Apr 17 21:48:04 2013 -0700
@@ -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
@@ -178,16 +178,14 @@
         if (spec != null) {
             try {
                 AlgorithmParameters params =
-                    AlgorithmParameters.getInstance("OAEP", "SunJCE");
+                    AlgorithmParameters.getInstance("OAEP",
+                        SunJCE.getInstance());
                 params.init(spec);
                 return params;
             } catch (NoSuchAlgorithmException nsae) {
                 // should never happen
                 throw new RuntimeException("Cannot find OAEP " +
                     " AlgorithmParameters implementation in SunJCE provider");
-            } catch (NoSuchProviderException nspe) {
-                // should never happen
-                throw new RuntimeException("Cannot find SunJCE provider");
             } catch (InvalidParameterSpecException ipse) {
                 // should never happen
                 throw new RuntimeException("OAEPParameterSpec not supported");
--- a/src/share/classes/com/sun/crypto/provider/SealedObjectForKeyProtector.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/crypto/provider/SealedObjectForKeyProtector.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,14 +46,15 @@
         AlgorithmParameters params = null;
         if (super.encodedParams != null) {
             try {
-                params = AlgorithmParameters.getInstance("PBE", "SunJCE");
+                params = AlgorithmParameters.getInstance("PBE",
+                    SunJCE.getInstance());
                 params.init(super.encodedParams);
-            } catch (NoSuchProviderException nspe) {
-                // eat.
             } catch (NoSuchAlgorithmException nsae) {
-                //eat.
-            } catch (IOException ioe) {
-                //eat.
+                throw new RuntimeException(
+                    "SunJCE provider is not configured properly");
+            } catch (IOException io) {
+                throw new RuntimeException("Parameter failure: "+
+                    io.getMessage());
             }
         }
         return params;
--- a/src/share/classes/com/sun/crypto/provider/SunJCE.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/crypto/provider/SunJCE.java	Wed Apr 17 21:48:04 2013 -0700
@@ -91,6 +91,10 @@
     /* Are we debugging? -- for developers */
     static final boolean debug = false;
 
+    // Instance of this provider, so we don't have to call the provider list
+    // to find ourselves or run the risk of not being in the list.
+    private static volatile SunJCE instance = null;
+
     // lazy initialize SecureRandom to avoid potential recursion if Sun
     // provider has not been installed yet
     private static class SecureRandomHolder {
@@ -770,5 +774,17 @@
                     return null;
                 }
             });
+
+        if (instance == null) {
+            instance = this;
+        }
+    }
+
+    // Return the instance of this class or create one if needed.
+    static SunJCE getInstance() {
+        if (instance == null) {
+            return new SunJCE();
+        }
+        return instance;
     }
 }
--- a/src/share/classes/com/sun/crypto/provider/TlsKeyMaterialGenerator.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/crypto/provider/TlsKeyMaterialGenerator.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -165,16 +165,18 @@
         // partition keyblock into individual secrets
 
         int ofs = 0;
-        byte[] tmp = new byte[macLength];
+        if (macLength != 0) {
+            byte[] tmp = new byte[macLength];
 
-        // mac keys
-        System.arraycopy(keyBlock, ofs, tmp, 0, macLength);
-        ofs += macLength;
-        clientMacKey = new SecretKeySpec(tmp, "Mac");
+            // mac keys
+            System.arraycopy(keyBlock, ofs, tmp, 0, macLength);
+            ofs += macLength;
+            clientMacKey = new SecretKeySpec(tmp, "Mac");
 
-        System.arraycopy(keyBlock, ofs, tmp, 0, macLength);
-        ofs += macLength;
-        serverMacKey = new SecretKeySpec(tmp, "Mac");
+            System.arraycopy(keyBlock, ofs, tmp, 0, macLength);
+            ofs += macLength;
+            serverMacKey = new SecretKeySpec(tmp, "Mac");
+        }
 
         if (keyLength == 0) { // SSL_RSA_WITH_NULL_* ciphersuites
             return new TlsKeyMaterialSpec(clientMacKey, serverMacKey);
@@ -198,7 +200,7 @@
 
             // IV keys if needed.
             if (ivLength != 0) {
-                tmp = new byte[ivLength];
+                byte[] tmp = new byte[ivLength];
 
                 System.arraycopy(keyBlock, ofs, tmp, 0, ivLength);
                 ofs += ivLength;
@@ -220,8 +222,8 @@
                 // TLS 1.0
                 byte[] seed = concat(clientRandom, serverRandom);
 
-                tmp = doTLS10PRF(clientKeyBytes, LABEL_CLIENT_WRITE_KEY, seed,
-                            expandedKeyLength, md5, sha);
+                byte[] tmp = doTLS10PRF(clientKeyBytes,
+                    LABEL_CLIENT_WRITE_KEY, seed, expandedKeyLength, md5, sha);
                 clientCipherKey = new SecretKeySpec(tmp, alg);
 
                 tmp = doTLS10PRF(serverKeyBytes, LABEL_SERVER_WRITE_KEY, seed,
@@ -239,7 +241,7 @@
                 }
             } else {
                 // SSLv3
-                tmp = new byte[expandedKeyLength];
+                byte[] tmp = new byte[expandedKeyLength];
 
                 md5.update(clientKeyBytes);
                 md5.update(clientRandom);
--- a/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	Wed Apr 17 21:48:04 2013 -0700
@@ -243,12 +243,17 @@
      * sending warnings to listeners.
      */
     protected void warningOccurred(int code) {
-        if ((code < 0) || (code > MAX_WARNING)){
-            throw new InternalError("Invalid warning index");
+        cbLock.lock();
+        try {
+            if ((code < 0) || (code > MAX_WARNING)){
+                throw new InternalError("Invalid warning index");
+            }
+            processWarningOccurred
+                ("com.sun.imageio.plugins.jpeg.JPEGImageReaderResources",
+                 Integer.toString(code));
+        } finally {
+            cbLock.unlock();
         }
-        processWarningOccurred
-            ("com.sun.imageio.plugins.jpeg.JPEGImageReaderResources",
-             Integer.toString(code));
     }
 
     /**
@@ -265,7 +270,12 @@
      * library warnings from being printed to stderr.
      */
     protected void warningWithMessage(String msg) {
-        processWarningOccurred(msg);
+        cbLock.lock();
+        try {
+            processWarningOccurred(msg);
+        } finally {
+            cbLock.unlock();
+        }
     }
 
     public void setInput(Object input,
@@ -274,18 +284,55 @@
     {
         setThreadLock();
         try {
+            cbLock.check();
+
             super.setInput(input, seekForwardOnly, ignoreMetadata);
             this.ignoreMetadata = ignoreMetadata;
             resetInternalState();
             iis = (ImageInputStream) input; // Always works
-            setSource(structPointer, iis);
+            setSource(structPointer);
         } finally {
             clearThreadLock();
         }
     }
 
-    private native void setSource(long structPointer,
-                                  ImageInputStream source);
+    /**
+     * This method is called from native code in order to fill
+     * native input buffer.
+     *
+     * We block any attempt to change the reading state during this
+     * method, in order to prevent a corruption of the native decoder
+     * state.
+     *
+     * @return number of bytes read from the stream.
+     */
+    private int readInputData(byte[] buf, int off, int len) throws IOException {
+        cbLock.lock();
+        try {
+            return iis.read(buf, off, len);
+        } finally {
+            cbLock.unlock();
+        }
+    }
+
+    /**
+     * This method is called from the native code in order to
+     * skip requested number of bytes in the input stream.
+     *
+     * @param n
+     * @return
+     * @throws IOException
+     */
+    private long skipInputBytes(long n) throws IOException {
+        cbLock.lock();
+        try {
+            return iis.skipBytes(n);
+        } finally {
+            cbLock.unlock();
+        }
+    }
+
+    private native void setSource(long structPointer);
 
     private void checkTablesOnly() throws IOException {
         if (debug) {
@@ -337,6 +384,8 @@
     public int getNumImages(boolean allowSearch) throws IOException {
         setThreadLock();
         try { // locked thread
+            cbLock.check();
+
             return getNumImagesOnThread(allowSearch);
         } finally {
             clearThreadLock();
@@ -536,8 +585,13 @@
         if (debug) {
             System.out.println("pushing back " + num + " bytes");
         }
-        iis.seek(iis.getStreamPosition()-num);
-        // The buffer is clear after this, so no need to set haveSeeked.
+        cbLock.lock();
+        try {
+            iis.seek(iis.getStreamPosition()-num);
+            // The buffer is clear after this, so no need to set haveSeeked.
+        } finally {
+            cbLock.unlock();
+        }
     }
 
     /**
@@ -644,7 +698,12 @@
                  * Ignore this profile.
                  */
                 iccCS = null;
-                warningOccurred(WARNING_IGNORE_INVALID_ICC);
+                cbLock.lock();
+                try {
+                    warningOccurred(WARNING_IGNORE_INVALID_ICC);
+                } finally {
+                    cbLock.unlock();
+                }
             }
         }
     }
@@ -653,6 +712,7 @@
         setThreadLock();
         try {
             if (currentImage != imageIndex) {
+                cbLock.check();
                 readHeader(imageIndex, true);
             }
             return width;
@@ -665,6 +725,7 @@
         setThreadLock();
         try {
             if (currentImage != imageIndex) {
+                cbLock.check();
                 readHeader(imageIndex, true);
             }
             return height;
@@ -693,6 +754,8 @@
         setThreadLock();
         try {
             if (currentImage != imageIndex) {
+                cbLock.check();
+
                 readHeader(imageIndex, true);
             }
 
@@ -716,6 +779,7 @@
     private Iterator getImageTypesOnThread(int imageIndex)
         throws IOException {
         if (currentImage != imageIndex) {
+            cbLock.check();
             readHeader(imageIndex, true);
         }
 
@@ -931,6 +995,7 @@
         setThreadLock();
         try {
             if (!tablesOnlyChecked) {
+                cbLock.check();
                 checkTablesOnly();
             }
             return streamMetadata;
@@ -951,6 +1016,8 @@
                 return imageMetadata;
             }
 
+            cbLock.check();
+
             gotoImage(imageIndex);
 
             imageMetadata = new JPEGMetadata(false, false, iis, this);
@@ -967,6 +1034,7 @@
         throws IOException {
         setThreadLock();
         try {
+            cbLock.check();
             try {
                 readInternal(imageIndex, param, false);
             } catch (RuntimeException e) {
@@ -1196,58 +1264,63 @@
         }
         target.setRect(destROI.x, destROI.y + y, raster);
 
-        processImageUpdate(image,
-                           destROI.x, destROI.y+y,
-                           raster.getWidth(), 1,
-                           1, 1,
-                           destinationBands);
-        if ((y > 0) && (y%progInterval == 0)) {
-            int height = target.getHeight()-1;
-            float percentOfPass = ((float)y)/height;
-            if (progressive) {
-                if (knownPassCount != UNKNOWN) {
-                    processImageProgress((pass + percentOfPass)*100.0F
-                                         / knownPassCount);
-                } else if (maxProgressivePass != Integer.MAX_VALUE) {
-                    // Use the range of allowed progressive passes
-                    processImageProgress((pass + percentOfPass)*100.0F
-                        / (maxProgressivePass - minProgressivePass + 1));
+        cbLock.lock();
+        try {
+            processImageUpdate(image,
+                               destROI.x, destROI.y+y,
+                               raster.getWidth(), 1,
+                               1, 1,
+                               destinationBands);
+            if ((y > 0) && (y%progInterval == 0)) {
+                int height = target.getHeight()-1;
+                float percentOfPass = ((float)y)/height;
+                if (progressive) {
+                    if (knownPassCount != UNKNOWN) {
+                        processImageProgress((pass + percentOfPass)*100.0F
+                                             / knownPassCount);
+                    } else if (maxProgressivePass != Integer.MAX_VALUE) {
+                        // Use the range of allowed progressive passes
+                        processImageProgress((pass + percentOfPass)*100.0F
+                                             / (maxProgressivePass - minProgressivePass + 1));
+                    } else {
+                        // Assume there are a minimum of MIN_ESTIMATED_PASSES
+                        // and that there is always one more pass
+                        // Compute the percentage as the percentage at the end
+                        // of the previous pass, plus the percentage of this
+                        // pass scaled to be the percentage of the total remaining,
+                        // assuming a minimum of MIN_ESTIMATED_PASSES passes and
+                        // that there is always one more pass.  This is monotonic
+                        // and asymptotic to 1.0, which is what we need.
+                        int remainingPasses = // including this one
+                            Math.max(2, MIN_ESTIMATED_PASSES-pass);
+                        int totalPasses = pass + remainingPasses-1;
+                        progInterval = Math.max(height/20*totalPasses,
+                                                totalPasses);
+                        if (y%progInterval == 0) {
+                            percentToDate = previousPassPercentage +
+                                (1.0F - previousPassPercentage)
+                                * (percentOfPass)/remainingPasses;
+                            if (debug) {
+                                System.out.print("pass= " + pass);
+                                System.out.print(", y= " + y);
+                                System.out.print(", progInt= " + progInterval);
+                                System.out.print(", % of pass: " + percentOfPass);
+                                System.out.print(", rem. passes: "
+                                                 + remainingPasses);
+                                System.out.print(", prev%: "
+                                                 + previousPassPercentage);
+                                System.out.print(", %ToDate: " + percentToDate);
+                                System.out.print(" ");
+                            }
+                            processImageProgress(percentToDate*100.0F);
+                        }
+                    }
                 } else {
-                    // Assume there are a minimum of MIN_ESTIMATED_PASSES
-                    // and that there is always one more pass
-                    // Compute the percentage as the percentage at the end
-                    // of the previous pass, plus the percentage of this
-                    // pass scaled to be the percentage of the total remaining,
-                    // assuming a minimum of MIN_ESTIMATED_PASSES passes and
-                    // that there is always one more pass.  This is monotonic
-                    // and asymptotic to 1.0, which is what we need.
-                    int remainingPasses = // including this one
-                        Math.max(2, MIN_ESTIMATED_PASSES-pass);
-                    int totalPasses = pass + remainingPasses-1;
-                    progInterval = Math.max(height/20*totalPasses,
-                                            totalPasses);
-                    if (y%progInterval == 0) {
-                        percentToDate = previousPassPercentage +
-                            (1.0F - previousPassPercentage)
-                            * (percentOfPass)/remainingPasses;
-                        if (debug) {
-                            System.out.print("pass= " + pass);
-                            System.out.print(", y= " + y);
-                            System.out.print(", progInt= " + progInterval);
-                            System.out.print(", % of pass: " + percentOfPass);
-                            System.out.print(", rem. passes: "
-                                             + remainingPasses);
-                            System.out.print(", prev%: "
-                                             + previousPassPercentage);
-                            System.out.print(", %ToDate: " + percentToDate);
-                            System.out.print(" ");
-                        }
-                        processImageProgress(percentToDate*100.0F);
-                    }
+                    processImageProgress(percentOfPass * 100.0F);
                 }
-            } else {
-                processImageProgress(percentOfPass * 100.0F);
             }
+        } finally {
+            cbLock.unlock();
         }
     }
 
@@ -1260,33 +1333,58 @@
     }
 
     private void passStarted (int pass) {
-        this.pass = pass;
-        previousPassPercentage = percentToDate;
-        processPassStarted(image,
-                           pass,
-                           minProgressivePass,
-                           maxProgressivePass,
-                           0, 0,
-                           1,1,
-                           destinationBands);
+        cbLock.lock();
+        try {
+            this.pass = pass;
+            previousPassPercentage = percentToDate;
+            processPassStarted(image,
+                               pass,
+                               minProgressivePass,
+                               maxProgressivePass,
+                               0, 0,
+                               1,1,
+                               destinationBands);
+        } finally {
+            cbLock.unlock();
+        }
     }
 
     private void passComplete () {
-        processPassComplete(image);
+        cbLock.lock();
+        try {
+            processPassComplete(image);
+        } finally {
+            cbLock.unlock();
+        }
     }
 
     void thumbnailStarted(int thumbnailIndex) {
-        processThumbnailStarted(currentImage, thumbnailIndex);
+        cbLock.lock();
+        try {
+            processThumbnailStarted(currentImage, thumbnailIndex);
+        } finally {
+            cbLock.unlock();
+        }
     }
 
     // Provide access to protected superclass method
     void thumbnailProgress(float percentageDone) {
-        processThumbnailProgress(percentageDone);
+        cbLock.lock();
+        try {
+            processThumbnailProgress(percentageDone);
+        } finally {
+            cbLock.unlock();
+        }
     }
 
     // Provide access to protected superclass method
     void thumbnailComplete() {
-        processThumbnailComplete();
+        cbLock.lock();
+        try {
+            processThumbnailComplete();
+        } finally {
+            cbLock.unlock();
+        }
     }
 
     /**
@@ -1310,6 +1408,11 @@
     public void abort() {
         setThreadLock();
         try {
+            /**
+             * NB: we do not check the call back lock here,
+             * we allow to abort the reader any time.
+             */
+
             super.abort();
             abortRead(structPointer);
         } finally {
@@ -1332,6 +1435,7 @@
         setThreadLock();
         Raster retval = null;
         try {
+            cbLock.check();
             /*
              * This could be further optimized by not resetting the dest.
              * offset and creating a translated raster in readInternal()
@@ -1371,6 +1475,8 @@
     public int getNumThumbnails(int imageIndex) throws IOException {
         setThreadLock();
         try {
+            cbLock.check();
+
             getImageMetadata(imageIndex);  // checks iis state for us
             // Now check the jfif segments
             JFIFMarkerSegment jfif =
@@ -1391,6 +1497,8 @@
         throws IOException {
         setThreadLock();
         try {
+            cbLock.check();
+
             if ((thumbnailIndex < 0)
                 || (thumbnailIndex >= getNumThumbnails(imageIndex))) {
                 throw new IndexOutOfBoundsException("No such thumbnail");
@@ -1409,6 +1517,8 @@
         throws IOException {
         setThreadLock();
         try {
+            cbLock.check();
+
             if ((thumbnailIndex < 0)
                 || (thumbnailIndex >= getNumThumbnails(imageIndex))) {
                 throw new IndexOutOfBoundsException("No such thumbnail");
@@ -1428,6 +1538,8 @@
         throws IOException {
         setThreadLock();
         try {
+            cbLock.check();
+
             if ((thumbnailIndex < 0)
                 || (thumbnailIndex >= getNumThumbnails(imageIndex))) {
                 throw new IndexOutOfBoundsException("No such thumbnail");
@@ -1468,6 +1580,7 @@
     public void reset() {
         setThreadLock();
         try {
+            cbLock.check();
             super.reset();
         } finally {
             clearThreadLock();
@@ -1479,6 +1592,8 @@
     public void dispose() {
         setThreadLock();
         try {
+            cbLock.check();
+
             if (structPointer != 0) {
                 disposerRecord.dispose();
                 structPointer = 0;
@@ -1540,6 +1655,36 @@
             theThread = null;
         }
     }
+
+    private CallBackLock cbLock = new CallBackLock();
+
+    private static class CallBackLock {
+
+        private State lockState;
+
+        CallBackLock() {
+            lockState = State.Unlocked;
+        }
+
+        void check() {
+            if (lockState != State.Unlocked) {
+                throw new IllegalStateException("Access to the reader is not allowed");
+            }
+        }
+
+        private void lock() {
+            lockState = State.Locked;
+        }
+
+        private void unlock() {
+            lockState = State.Unlocked;
+        }
+
+        private static enum State {
+            Unlocked,
+            Locked
+        }
+    }
 }
 
 /**
--- a/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java	Wed Apr 17 21:48:04 2013 -0700
@@ -183,8 +183,7 @@
                     return null;
                 }
             });
-        initWriterIDs(ImageOutputStream.class,
-                      JPEGQTable.class,
+        initWriterIDs(JPEGQTable.class,
                       JPEGHuffmanTable.class);
     }
 
@@ -200,11 +199,13 @@
     public void setOutput(Object output) {
         setThreadLock();
         try {
+            cbLock.check();
+
             super.setOutput(output); // validates output
             resetInternalState();
             ios = (ImageOutputStream) output; // so this will always work
             // Set the native destination
-            setDest(structPointer, ios);
+            setDest(structPointer);
         } finally {
             clearThreadLock();
         }
@@ -359,6 +360,8 @@
                       ImageWriteParam param) throws IOException {
         setThreadLock();
         try {
+            cbLock.check();
+
             writeOnThread(streamMetadata, image, param);
         } finally {
             clearThreadLock();
@@ -1082,13 +1085,18 @@
                              haveMetadata,
                              restartInterval);
 
-        if (aborted) {
-            processWriteAborted();
-        } else {
-            processImageComplete();
+        cbLock.lock();
+        try {
+            if (aborted) {
+                processWriteAborted();
+            } else {
+                processImageComplete();
+            }
+
+            ios.flush();
+        } finally {
+            cbLock.unlock();
         }
-
-        ios.flush();
         currentImage++;  // After a successful write
     }
 
@@ -1096,6 +1104,8 @@
         throws IOException {
         setThreadLock();
         try {
+            cbLock.check();
+
             prepareWriteSequenceOnThread(streamMetadata);
         } finally {
             clearThreadLock();
@@ -1175,6 +1185,8 @@
         throws IOException {
         setThreadLock();
         try {
+            cbLock.check();
+
             if (sequencePrepared == false) {
                 throw new IllegalStateException("sequencePrepared not called!");
             }
@@ -1188,6 +1200,8 @@
     public void endWriteSequence() throws IOException {
         setThreadLock();
         try {
+            cbLock.check();
+
             if (sequencePrepared == false) {
                 throw new IllegalStateException("sequencePrepared not called!");
             }
@@ -1200,6 +1214,10 @@
     public synchronized void abort() {
         setThreadLock();
         try {
+            /**
+             * NB: we do not check the call back lock here, we allow to abort
+             * the reader any time.
+             */
             super.abort();
             abortWrite(structPointer);
         } finally {
@@ -1223,6 +1241,8 @@
     public void reset() {
         setThreadLock();
         try {
+            cbLock.check();
+
             super.reset();
         } finally {
             clearThreadLock();
@@ -1232,6 +1252,8 @@
     public void dispose() {
         setThreadLock();
         try {
+            cbLock.check();
+
             if (structPointer != 0) {
                 disposerRecord.dispose();
                 structPointer = 0;
@@ -1251,13 +1273,18 @@
      * sending warnings to listeners.
      */
     void warningOccurred(int code) {
-        if ((code < 0) || (code > MAX_WARNING)){
-            throw new InternalError("Invalid warning index");
+        cbLock.lock();
+        try {
+            if ((code < 0) || (code > MAX_WARNING)){
+                throw new InternalError("Invalid warning index");
+            }
+            processWarningOccurred
+                (currentImage,
+                 "com.sun.imageio.plugins.jpeg.JPEGImageWriterResources",
+                Integer.toString(code));
+        } finally {
+            cbLock.unlock();
         }
-        processWarningOccurred
-            (currentImage,
-             "com.sun.imageio.plugins.jpeg.JPEGImageWriterResources",
-             Integer.toString(code));
     }
 
     /**
@@ -1274,21 +1301,41 @@
      * library warnings from being printed to stderr.
      */
     void warningWithMessage(String msg) {
-        processWarningOccurred(currentImage, msg);
+        cbLock.lock();
+        try {
+            processWarningOccurred(currentImage, msg);
+        } finally {
+            cbLock.unlock();
+        }
     }
 
     void thumbnailStarted(int thumbnailIndex) {
-        processThumbnailStarted(currentImage, thumbnailIndex);
+        cbLock.lock();
+        try {
+            processThumbnailStarted(currentImage, thumbnailIndex);
+        } finally {
+            cbLock.unlock();
+        }
     }
 
     // Provide access to protected superclass method
     void thumbnailProgress(float percentageDone) {
-        processThumbnailProgress(percentageDone);
+        cbLock.lock();
+        try {
+            processThumbnailProgress(percentageDone);
+        } finally {
+            cbLock.unlock();
+        }
     }
 
     // Provide access to protected superclass method
     void thumbnailComplete() {
-        processThumbnailComplete();
+        cbLock.lock();
+        try {
+            processThumbnailComplete();
+        } finally {
+            cbLock.unlock();
+        }
     }
 
     ///////// End of Package-access API
@@ -1615,16 +1662,14 @@
     ////////////// Native methods and callbacks
 
     /** Sets up static native structures. */
-    private static native void initWriterIDs(Class iosClass,
-                                             Class qTableClass,
+    private static native void initWriterIDs(Class qTableClass,
                                              Class huffClass);
 
     /** Sets up per-writer native structure and returns a pointer to it. */
     private native long initJPEGImageWriter();
 
     /** Sets up native structures for output stream */
-    private native void setDest(long structPointer,
-                                ImageOutputStream ios);
+    private native void setDest(long structPointer);
 
     /**
      * Returns <code>true</code> if the write was aborted.
@@ -1749,7 +1794,12 @@
         }
         raster.setRect(sourceLine);
         if ((y > 7) && (y%8 == 0)) {  // Every 8 scanlines
-            processImageProgress((float) y / (float) sourceHeight * 100.0F);
+            cbLock.lock();
+            try {
+                processImageProgress((float) y / (float) sourceHeight * 100.0F);
+            } finally {
+                cbLock.unlock();
+            }
         }
     }
 
@@ -1777,6 +1827,25 @@
         }
     }
 
+    /**
+     * This method is called from native code in order to write encoder
+     * output to the destination.
+     *
+     * We block any attempt to change the writer state during this
+     * method, in order to prevent a corruption of the native encoder
+     * state.
+     */
+    private void writeOutputData(byte[] data, int offset, int len)
+            throws IOException
+    {
+        cbLock.lock();
+        try {
+            ios.write(data, offset, len);
+        } finally {
+            cbLock.unlock();
+        }
+    }
+
     private Thread theThread = null;
     private int theLockCount = 0;
 
@@ -1811,4 +1880,34 @@
             theThread = null;
         }
     }
+
+    private CallBackLock cbLock = new CallBackLock();
+
+    private static class CallBackLock {
+
+        private State lockState;
+
+        CallBackLock() {
+            lockState = State.Unlocked;
+        }
+
+        void check() {
+            if (lockState != State.Unlocked) {
+                throw new IllegalStateException("Access to the writer is not allowed");
+            }
+        }
+
+        private void lock() {
+            lockState = State.Locked;
+        }
+
+        private void unlock() {
+            lockState = State.Unlocked;
+        }
+
+        private static enum State {
+            Unlocked,
+            Locked
+        }
+    }
 }
--- a/src/share/classes/com/sun/jmx/mbeanserver/MBeanInstantiator.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/jmx/mbeanserver/MBeanInstantiator.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
 import java.io.ObjectInputStream;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Modifier;
 import java.security.Permission;
 import java.util.Map;
 import java.util.logging.Level;
@@ -213,7 +214,6 @@
 
         Object moi;
 
-
         // ------------------------------
         // ------------------------------
         Constructor<?> cons = findConstructor(theClass, null);
@@ -224,6 +224,7 @@
         // Instantiate the new object
         try {
             ReflectUtil.checkPackageAccess(theClass);
+            ensureClassAccess(theClass);
             moi= cons.newInstance();
         } catch (InvocationTargetException e) {
             // Wrap the exception.
@@ -270,7 +271,6 @@
         checkMBeanPermission(theClass, null, null, "instantiate");
 
         // Instantiate the new object
-
         // ------------------------------
         // ------------------------------
         final Class<?>[] tab;
@@ -300,6 +300,7 @@
         }
         try {
             ReflectUtil.checkPackageAccess(theClass);
+            ensureClassAccess(theClass);
             moi = cons.newInstance(params);
         }
         catch (NoSuchMethodError error) {
@@ -741,4 +742,13 @@
             sm.checkPermission(perm);
         }
     }
+
+    private static void ensureClassAccess(Class clazz)
+            throws IllegalAccessException
+    {
+        int mod = clazz.getModifiers();
+        if (!Modifier.isPublic(mod)) {
+            throw new IllegalAccessException("Class is not public and can't be instantiated");
+        }
+    }
 }
--- a/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java	Wed Apr 17 21:48:04 2013 -0700
@@ -56,7 +56,7 @@
     // from simultaneous creation and destruction
     // reduces possibility of deadlock, compared to
     // synchronizing to the class instance
-    private Object traRecLock = new Object();
+    private final Object traRecLock = new Object();
 
     // DEVICE ATTRIBUTES
 
@@ -474,7 +474,7 @@
         This is necessary for Receivers retrieved via MidiSystem.getReceiver()
         (which opens the device implicitely).
      */
-    protected abstract class AbstractReceiver implements MidiDeviceReceiver {
+    abstract class AbstractReceiver implements MidiDeviceReceiver {
         private boolean open = true;
 
 
@@ -483,24 +483,24 @@
             Receiver. Therefore, subclasses should not override this method.
             Instead, they should implement implSend().
         */
-        public synchronized void send(MidiMessage message, long timeStamp) {
-            if (open) {
-                implSend(message, timeStamp);
-            } else {
+        @Override
+        public final synchronized void send(final MidiMessage message,
+                                            final long timeStamp) {
+            if (!open) {
                 throw new IllegalStateException("Receiver is not open");
             }
+            implSend(message, timeStamp);
         }
 
-
-        protected abstract void implSend(MidiMessage message, long timeStamp);
-
+        abstract void implSend(MidiMessage message, long timeStamp);
 
         /** Close the Receiver.
          * Here, the call to the magic method closeInternal() takes place.
          * Therefore, subclasses that override this method must call
          * 'super.close()'.
          */
-        public void close() {
+        @Override
+        public final void close() {
             open = false;
             synchronized (AbstractMidiDevice.this.traRecLock) {
                 AbstractMidiDevice.this.getReceiverList().remove(this);
@@ -508,11 +508,12 @@
             AbstractMidiDevice.this.closeInternal(this);
         }
 
-        public MidiDevice getMidiDevice() {
+        @Override
+        public final MidiDevice getMidiDevice() {
             return AbstractMidiDevice.this;
         }
 
-        protected boolean isOpen() {
+        final boolean isOpen() {
             return open;
         }
 
--- a/src/share/classes/com/sun/media/sound/FastShortMessage.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/media/sound/FastShortMessage.java	Wed Apr 17 21:48:04 2013 -0700
@@ -32,7 +32,7 @@
  *
  * @author Florian Bomers
  */
-class FastShortMessage extends ShortMessage {
+final class FastShortMessage extends ShortMessage {
     private int packedMsg;
 
     public FastShortMessage(int packedMsg) throws InvalidMidiDataException {
--- a/src/share/classes/com/sun/media/sound/FastSysexMessage.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/media/sound/FastSysexMessage.java	Wed Apr 17 21:48:04 2013 -0700
@@ -32,7 +32,7 @@
  *
  * @author Florian Bomers
  */
-class FastSysexMessage extends SysexMessage {
+final class FastSysexMessage extends SysexMessage {
 
     FastSysexMessage(byte[] data) throws InvalidMidiDataException {
         super(data);
--- a/src/share/classes/com/sun/media/sound/MidiOutDevice.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/media/sound/MidiOutDevice.java	Wed Apr 17 21:48:04 2013 -0700
@@ -103,9 +103,9 @@
 
     class MidiOutReceiver extends AbstractReceiver {
 
-        protected void implSend(MidiMessage message, long timeStamp) {
-            int length = message.getLength();
-            int status = message.getStatus();
+        void implSend(final MidiMessage message, final long timeStamp) {
+            final int length = message.getLength();
+            final int status = message.getStatus();
             if (length <= 3 && status != 0xF0 && status != 0xF7) {
                 int packedMsg;
                 if (message instanceof ShortMessage) {
@@ -140,11 +140,15 @@
                 }
                 nSendShortMessage(id, packedMsg, timeStamp);
             } else {
+                final byte[] data;
                 if (message instanceof FastSysexMessage) {
-                    nSendLongMessage(id, ((FastSysexMessage) message).getReadOnlyMessage(),
-                                     length, timeStamp);
+                    data = ((FastSysexMessage) message).getReadOnlyMessage();
                 } else {
-                    nSendLongMessage(id, message.getMessage(), length, timeStamp);
+                    data = message.getMessage();
+                }
+                final int dataLength = Math.min(length, data.length);
+                if (dataLength > 0) {
+                    nSendLongMessage(id, data, dataLength, timeStamp);
                 }
             }
         }
--- a/src/share/classes/com/sun/media/sound/RealTimeSequencer.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/media/sound/RealTimeSequencer.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1026,7 +1026,7 @@
 
     class SequencerReceiver extends AbstractReceiver {
 
-        protected void implSend(MidiMessage message, long timeStamp) {
+        void implSend(MidiMessage message, long timeStamp) {
             if (recording) {
                 long tickPos = 0;
 
--- a/src/share/classes/com/sun/tools/jdi/EventSetImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/com/sun/tools/jdi/EventSetImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -851,6 +851,11 @@
         }
     }
 
+    @Override
+    public Spliterator<Event> spliterator() {
+        return Spliterators.spliterator(this, Spliterator.DISTINCT);
+    }
+
     /* below make this unmodifiable */
 
     public boolean add(Event o){
--- a/src/share/classes/java/awt/Window.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/awt/Window.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2234,7 +2234,7 @@
                 WindowPeer peer = (WindowPeer)this.peer;
                 synchronized(getTreeLock()) {
                     if (peer != null) {
-                        peer.setAlwaysOnTop(alwaysOnTop);
+                        peer.updateAlwaysOnTopState();
                     }
                 }
             }
--- a/src/share/classes/java/awt/peer/WindowPeer.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/awt/peer/WindowPeer.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -53,15 +53,14 @@
     void toBack();
 
     /**
-     * Sets if the window should always stay on top of all other windows or
-     * not.
+     * Updates the window's always-on-top state.
+     * Sets if the window should always stay
+     * on top of all other windows or not.
      *
-     * @param alwaysOnTop if the window should always stay on top of all other
-     *        windows or not
-     *
+     * @see Window#getAlwaysOnTop()
      * @see Window#setAlwaysOnTop(boolean)
      */
-    void setAlwaysOnTop(boolean alwaysOnTop);
+    void updateAlwaysOnTopState();
 
     /**
      * Updates the window's focusable state.
--- a/src/share/classes/java/beans/ThreadGroupContext.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/beans/ThreadGroupContext.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,6 @@
 import com.sun.beans.finder.PropertyEditorFinder;
 
 import java.awt.GraphicsEnvironment;
-import java.util.HashMap;
 import java.util.Map;
 import java.util.WeakHashMap;
 
@@ -42,7 +41,7 @@
  */
 final class ThreadGroupContext {
 
-    private static final Map<ThreadGroup, ThreadGroupContext> contexts = new WeakHashMap<>();
+    private static final WeakIdentityMap<ThreadGroupContext> contexts = new WeakIdentityMap<>();
 
     /**
      * Returns the appropriate {@code AppContext} for the caller,
@@ -69,6 +68,8 @@
     private BeanInfoFinder beanInfoFinder;
     private PropertyEditorFinder propertyEditorFinder;
 
+    private ThreadGroupContext() {
+    }
 
     boolean isDesignTime() {
         return this.isDesignTime;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/beans/WeakIdentityMap.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.beans;
+
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+
+/**
+ * Hash table based mapping, which uses weak references to store keys
+ * and reference-equality in place of object-equality to compare them.
+ * An entry will automatically be removed when its key is no longer
+ * in ordinary use.  Both null values and the null key are supported.
+ *
+ * @see java.util.IdentityHashMap
+ * @see java.util.WeakHashMap
+ */
+final class WeakIdentityMap<T> {
+
+    private static final int MAXIMUM_CAPACITY = 1 << 30; // it MUST be a power of two
+    private static final Object NULL = new Object(); // special object for null key
+
+    private final ReferenceQueue<Object> queue = new ReferenceQueue<Object>();
+
+    private Entry<T>[] table = newTable(1<<3); // table's length MUST be a power of two
+    private int threshold = 6; // the next size value at which to resize
+    private int size = 0; // the number of key-value mappings
+
+    public T get(Object key) {
+        removeStaleEntries();
+        if (key == null) {
+            key = NULL;
+        }
+        int hash = key.hashCode();
+        int index = getIndex(this.table, hash);
+        for (Entry<T> entry = this.table[index]; entry != null; entry = entry.next) {
+            if (entry.isMatched(key, hash)) {
+                return entry.value;
+            }
+        }
+        return null;
+    }
+
+    public T put(Object key, T value) {
+        removeStaleEntries();
+        if (key == null) {
+            key = NULL;
+        }
+        int hash = key.hashCode();
+        int index = getIndex(this.table, hash);
+        for (Entry<T> entry = this.table[index]; entry != null; entry = entry.next) {
+            if (entry.isMatched(key, hash)) {
+                T oldValue = entry.value;
+                entry.value = value;
+                return oldValue;
+            }
+        }
+        this.table[index] = new Entry<T>(key, hash, value, this.queue, this.table[index]);
+        if (++this.size >= this.threshold) {
+            if (this.table.length == MAXIMUM_CAPACITY) {
+                this.threshold = Integer.MAX_VALUE;
+            }
+            else {
+                removeStaleEntries();
+                Entry<T>[] table = newTable(this.table.length * 2);
+                transfer(this.table, table);
+
+                // If ignoring null elements and processing ref queue caused massive
+                // shrinkage, then restore old table.  This should be rare, but avoids
+                // unbounded expansion of garbage-filled tables.
+                if (this.size >= this.threshold / 2) {
+                    this.table = table;
+                    this.threshold *= 2;
+                }
+                else {
+                    transfer(table, this.table);
+                }
+            }
+        }
+        return null;
+    }
+
+    private void removeStaleEntries() {
+        for (Object ref = this.queue.poll(); ref != null; ref = this.queue.poll()) {
+            @SuppressWarnings("unchecked")
+            Entry<T> entry = (Entry<T>) ref;
+            int index = getIndex(this.table, entry.hash);
+
+            Entry<T> prev = this.table[index];
+            Entry<T> current = prev;
+            while (current != null) {
+                Entry<T> next = current.next;
+                if (current == entry) {
+                    if (prev == entry) {
+                        this.table[index] = next;
+                    }
+                    else {
+                        prev.next = next;
+                    }
+                    entry.value = null; // Help GC
+                    entry.next = null; // Help GC
+                    this.size--;
+                    break;
+                }
+                prev = current;
+                current = next;
+            }
+        }
+    }
+
+    private void transfer(Entry<T>[] oldTable, Entry<T>[] newTable) {
+        for (int i = 0; i < oldTable.length; i++) {
+            Entry<T> entry = oldTable[i];
+            oldTable[i] = null;
+            while (entry != null) {
+                Entry<T> next = entry.next;
+                Object key = entry.get();
+                if (key == null) {
+                    entry.value = null; // Help GC
+                    entry.next = null; // Help GC
+                    this.size--;
+                }
+                else {
+                    int index = getIndex(newTable, entry.hash);
+                    entry.next = newTable[index];
+                    newTable[index] = entry;
+                }
+                entry = next;
+            }
+        }
+    }
+
+
+    @SuppressWarnings("unchecked")
+    private Entry<T>[] newTable(int length) {
+        return (Entry<T>[]) new Entry<?>[length];
+    }
+
+    private static int getIndex(Entry<?>[] table, int hash) {
+        return hash & (table.length - 1);
+    }
+
+    private static class Entry<T> extends WeakReference<Object> {
+        private final int hash;
+        private T value;
+        private Entry<T> next;
+
+        Entry(Object key, int hash, T value, ReferenceQueue<Object> queue, Entry<T> next) {
+            super(key, queue);
+            this.hash = hash;
+            this.value = value;
+            this.next  = next;
+        }
+
+        boolean isMatched(Object key, int hash) {
+            return (this.hash == hash) && (key == get());
+        }
+    }
+}
--- a/src/share/classes/java/io/ObjectInputStream.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/io/ObjectInputStream.java	Wed Apr 17 21:48:04 2013 -0700
@@ -41,6 +41,7 @@
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.atomic.AtomicBoolean;
 import static java.io.ObjectStreamClass.processQueue;
+import sun.reflect.misc.ReflectUtil;
 
 /**
  * An ObjectInputStream deserializes primitive data and objects previously
@@ -1519,6 +1520,12 @@
         }
     }
 
+    private boolean isCustomSubclass() {
+        // Return true if this class is a custom subclass of ObjectInputStream
+        return getClass().getClassLoader()
+                    != ObjectInputStream.class.getClassLoader();
+    }
+
     /**
      * Reads in and returns class descriptor for a dynamic proxy class.  Sets
      * passHandle to proxy class descriptor's assigned handle.  If proxy class
@@ -1548,6 +1555,15 @@
         try {
             if ((cl = resolveProxyClass(ifaces)) == null) {
                 resolveEx = new ClassNotFoundException("null class");
+            } else if (!Proxy.isProxyClass(cl)) {
+                throw new InvalidClassException("Not a proxy");
+            } else {
+                // ReflectUtil.checkProxyPackageAccess makes a test
+                // equivalent to isCustomSubclass so there's no need
+                // to condition this call to isCustomSubclass == true here.
+                ReflectUtil.checkProxyPackageAccess(
+                        getClass().getClassLoader(),
+                        cl.getInterfaces());
             }
         } catch (ClassNotFoundException ex) {
             resolveEx = ex;
@@ -1589,9 +1605,12 @@
         Class<?> cl = null;
         ClassNotFoundException resolveEx = null;
         bin.setBlockDataMode(true);
+        final boolean checksRequired = isCustomSubclass();
         try {
             if ((cl = resolveClass(readDesc)) == null) {
                 resolveEx = new ClassNotFoundException("null class");
+            } else if (checksRequired) {
+                ReflectUtil.checkPackageAccess(cl);
             }
         } catch (ClassNotFoundException ex) {
             resolveEx = ex;
--- a/src/share/classes/java/lang/Class.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/Class.java	Wed Apr 17 21:48:04 2013 -0700
@@ -53,6 +53,7 @@
 import java.util.HashMap;
 import java.util.Objects;
 import sun.misc.Unsafe;
+import sun.reflect.CallerSensitive;
 import sun.reflect.ConstantPool;
 import sun.reflect.Reflection;
 import sun.reflect.ReflectionFactory;
@@ -250,9 +251,11 @@
      *            by this method fails
      * @exception ClassNotFoundException if the class cannot be located
      */
+    @CallerSensitive
     public static Class<?> forName(String className)
                 throws ClassNotFoundException {
-        return forName0(className, true, ClassLoader.getCallerClassLoader());
+        return forName0(className, true,
+                        ClassLoader.getClassLoader(Reflection.getCallerClass()));
     }
 
 
@@ -317,6 +320,7 @@
      * @see       java.lang.ClassLoader
      * @since     1.2
      */
+    @CallerSensitive
     public static Class<?> forName(String name, boolean initialize,
                                    ClassLoader loader)
         throws ClassNotFoundException
@@ -324,7 +328,7 @@
         if (sun.misc.VM.isSystemDomainLoader(loader)) {
             SecurityManager sm = System.getSecurityManager();
             if (sm != null) {
-                ClassLoader ccl = ClassLoader.getCallerClassLoader();
+                ClassLoader ccl = ClassLoader.getClassLoader(Reflection.getCallerClass());
                 if (!sun.misc.VM.isSystemDomainLoader(ccl)) {
                     sm.checkPermission(
                         SecurityConstants.GET_CLASSLOADER_PERMISSION);
@@ -386,18 +390,14 @@
      *             </ul>
      *
      */
+    @CallerSensitive
     public T newInstance()
         throws InstantiationException, IllegalAccessException
     {
         if (System.getSecurityManager() != null) {
-            checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), false);
+            checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), false);
         }
-        return newInstance0();
-    }
 
-    private T newInstance0()
-        throws InstantiationException, IllegalAccessException
-    {
         // NOTE: the following code may not be strictly correct under
         // the current Java memory model.
 
@@ -432,7 +432,7 @@
         // Security check (same as in java.lang.reflect.Constructor)
         int modifiers = tmpConstructor.getModifiers();
         if (!Reflection.quickCheckMemberAccess(this, modifiers)) {
-            Class<?> caller = Reflection.getCallerClass(3);
+            Class<?> caller = Reflection.getCallerClass();
             if (newInstanceCallerCache != caller) {
                 Reflection.ensureMemberAccess(caller, this, null, modifiers);
                 newInstanceCallerCache = caller;
@@ -674,16 +674,14 @@
      * @see SecurityManager#checkPermission
      * @see java.lang.RuntimePermission
      */
+    @CallerSensitive
     public ClassLoader getClassLoader() {
         ClassLoader cl = getClassLoader0();
         if (cl == null)
             return null;
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
-            ClassLoader ccl = ClassLoader.getCallerClassLoader();
-            if (ClassLoader.needsClassLoaderPermissionCheck(ccl, cl)) {
-                sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
-            }
+            ClassLoader.checkClassLoaderPermission(cl, Reflection.getCallerClass());
         }
         return cl;
     }
@@ -1392,11 +1390,9 @@
      *
      * @since JDK1.1
      */
+    @CallerSensitive
     public Class<?>[] getClasses() {
-        // be very careful not to change the stack depth of this
-        // checkMemberAccess call for security reasons
-        // see java.lang.SecurityManager.checkMemberAccess
-        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), false);
+        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), false);
 
         // Privileged so this implementation can look at DECLARED classes,
         // something the caller might not have privilege to do.  The code here
@@ -1467,11 +1463,9 @@
      *
      * @since JDK1.1
      */
+    @CallerSensitive
     public Field[] getFields() throws SecurityException {
-        // be very careful not to change the stack depth of this
-        // checkMemberAccess call for security reasons
-        // see java.lang.SecurityManager.checkMemberAccess
-        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
+        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
         return copyFields(privateGetPublicFields(null));
     }
 
@@ -1518,11 +1512,9 @@
      *
      * @since JDK1.1
      */
+    @CallerSensitive
     public Method[] getMethods() throws SecurityException {
-        // be very careful not to change the stack depth of this
-        // checkMemberAccess call for security reasons
-        // see java.lang.SecurityManager.checkMemberAccess
-        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
+        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
         return copyMethods(privateGetPublicMethods());
     }
 
@@ -1567,11 +1559,9 @@
      *
      * @since JDK1.1
      */
+    @CallerSensitive
     public Constructor<?>[] getConstructors() throws SecurityException {
-        // be very careful not to change the stack depth of this
-        // checkMemberAccess call for security reasons
-        // see java.lang.SecurityManager.checkMemberAccess
-        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
+        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
         return copyConstructors(privateGetDeclaredConstructors(true));
     }
 
@@ -1625,12 +1615,10 @@
      *
      * @since JDK1.1
      */
+    @CallerSensitive
     public Field getField(String name)
         throws NoSuchFieldException, SecurityException {
-        // be very careful not to change the stack depth of this
-        // checkMemberAccess call for security reasons
-        // see java.lang.SecurityManager.checkMemberAccess
-        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
+        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
         Field field = getField0(name);
         if (field == null) {
             throw new NoSuchFieldException(name);
@@ -1710,12 +1698,10 @@
      *
      * @since JDK1.1
      */
+    @CallerSensitive
     public Method getMethod(String name, Class<?>... parameterTypes)
         throws NoSuchMethodException, SecurityException {
-        // be very careful not to change the stack depth of this
-        // checkMemberAccess call for security reasons
-        // see java.lang.SecurityManager.checkMemberAccess
-        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
+        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
         Method method = getMethod0(name, parameterTypes);
         if (method == null) {
             throw new NoSuchMethodException(getName() + "." + name + argumentTypesToString(parameterTypes));
@@ -1764,12 +1750,10 @@
      *
      * @since JDK1.1
      */
+    @CallerSensitive
     public Constructor<T> getConstructor(Class<?>... parameterTypes)
         throws NoSuchMethodException, SecurityException {
-        // be very careful not to change the stack depth of this
-        // checkMemberAccess call for security reasons
-        // see java.lang.SecurityManager.checkMemberAccess
-        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
+        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
         return getConstructor0(parameterTypes, Member.PUBLIC);
     }
 
@@ -1807,11 +1791,9 @@
      *
      * @since JDK1.1
      */
+    @CallerSensitive
     public Class<?>[] getDeclaredClasses() throws SecurityException {
-        // be very careful not to change the stack depth of this
-        // checkMemberAccess call for security reasons
-        // see java.lang.SecurityManager.checkMemberAccess
-        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), false);
+        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), false);
         return getDeclaredClasses0();
     }
 
@@ -1851,11 +1833,9 @@
      *
      * @since JDK1.1
      */
+    @CallerSensitive
     public Field[] getDeclaredFields() throws SecurityException {
-        // be very careful not to change the stack depth of this
-        // checkMemberAccess call for security reasons
-        // see java.lang.SecurityManager.checkMemberAccess
-        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
+        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
         return copyFields(privateGetDeclaredFields(false));
     }
 
@@ -1899,11 +1879,9 @@
      *
      * @since JDK1.1
      */
+    @CallerSensitive
     public Method[] getDeclaredMethods() throws SecurityException {
-        // be very careful not to change the stack depth of this
-        // checkMemberAccess call for security reasons
-        // see java.lang.SecurityManager.checkMemberAccess
-        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
+        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
         return copyMethods(privateGetDeclaredMethods(false));
     }
 
@@ -1944,11 +1922,9 @@
      *
      * @since JDK1.1
      */
+    @CallerSensitive
     public Constructor<?>[] getDeclaredConstructors() throws SecurityException {
-        // be very careful not to change the stack depth of this
-        // checkMemberAccess call for security reasons
-        // see java.lang.SecurityManager.checkMemberAccess
-        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
+        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
         return copyConstructors(privateGetDeclaredConstructors(false));
     }
 
@@ -1987,12 +1963,10 @@
      *
      * @since JDK1.1
      */
+    @CallerSensitive
     public Field getDeclaredField(String name)
         throws NoSuchFieldException, SecurityException {
-        // be very careful not to change the stack depth of this
-        // checkMemberAccess call for security reasons
-        // see java.lang.SecurityManager.checkMemberAccess
-        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
+        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
         Field field = searchFields(privateGetDeclaredFields(false), name);
         if (field == null) {
             throw new NoSuchFieldException(name);
@@ -2042,12 +2016,10 @@
      *
      * @since JDK1.1
      */
+    @CallerSensitive
     public Method getDeclaredMethod(String name, Class<?>... parameterTypes)
         throws NoSuchMethodException, SecurityException {
-        // be very careful not to change the stack depth of this
-        // checkMemberAccess call for security reasons
-        // see java.lang.SecurityManager.checkMemberAccess
-        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
+        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
         Method method = searchMethods(privateGetDeclaredMethods(false), name, parameterTypes);
         if (method == null) {
             throw new NoSuchMethodException(getName() + "." + name + argumentTypesToString(parameterTypes));
@@ -2092,12 +2064,10 @@
      *
      * @since JDK1.1
      */
+    @CallerSensitive
     public Constructor<T> getDeclaredConstructor(Class<?>... parameterTypes)
         throws NoSuchMethodException, SecurityException {
-        // be very careful not to change the stack depth of this
-        // checkMemberAccess call for security reasons
-        // see java.lang.SecurityManager.checkMemberAccess
-        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
+        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
         return getConstructor0(parameterTypes, Member.DECLARED);
     }
 
@@ -2255,23 +2225,40 @@
      */
     static native Class<?> getPrimitiveClass(String name);
 
+    private static boolean isCheckMemberAccessOverridden(SecurityManager smgr) {
+        if (smgr.getClass() == SecurityManager.class) return false;
+
+        Class<?>[] paramTypes = new Class<?>[] {Class.class, int.class};
+        return smgr.getClass().getMethod0("checkMemberAccess", paramTypes).
+                getDeclaringClass() != SecurityManager.class;
+    }
 
     /*
      * Check if client is allowed to access members.  If access is denied,
      * throw a SecurityException.
      *
-     * Be very careful not to change the stack depth of this checkMemberAccess
-     * call for security reasons.
-     * See java.lang.SecurityManager.checkMemberAccess.
-     *
      * <p> Default policy: allow all clients access with normal Java access
      * control.
      */
-    private void checkMemberAccess(int which, ClassLoader ccl, boolean checkProxyInterfaces) {
-        SecurityManager s = System.getSecurityManager();
+    private void checkMemberAccess(int which, Class<?> caller, boolean checkProxyInterfaces) {
+        final SecurityManager s = System.getSecurityManager();
         if (s != null) {
-            s.checkMemberAccess(this, which);
-            ClassLoader cl = getClassLoader0();
+            final ClassLoader ccl = ClassLoader.getClassLoader(caller);
+            final ClassLoader cl = getClassLoader0();
+            if (!isCheckMemberAccessOverridden(s)) {
+                // Inlined SecurityManager.checkMemberAccess
+                if (which != Member.PUBLIC) {
+                    if (ccl != cl) {
+                        s.checkPermission(SecurityConstants.CHECK_MEMBER_ACCESS_PERMISSION);
+                    }
+                }
+            } else {
+                // Don't refactor; otherwise break the stack depth for
+                // checkMemberAccess of subclasses of SecurityManager as specified.
+                s.checkMemberAccess(this, which);
+            }
+
+
             if (ReflectUtil.needsPackageAccessCheck(ccl, cl)) {
                 String name = this.getName();
                 int i = name.lastIndexOf('.');
--- a/src/share/classes/java/lang/ClassLoader.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/ClassLoader.java	Wed Apr 17 21:48:04 2013 -0700
@@ -55,6 +55,7 @@
 import sun.misc.Resource;
 import sun.misc.URLClassPath;
 import sun.misc.VM;
+import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
 import sun.security.util.SecurityConstants;
 
@@ -1159,11 +1160,6 @@
         return java.util.Collections.emptyEnumeration();
     }
 
-    // index 0: java.lang.ClassLoader.class
-    // index 1: the immediate caller of index 0.
-    // index 2: the immediate caller of index 1.
-    private static native Class<? extends ClassLoader> getCaller(int index);
-
     /**
      * Registers the caller as parallel capable.</p>
      * The registration succeeds if and only if all of the following
@@ -1179,8 +1175,11 @@
      *
      * @since   1.7
      */
+    @CallerSensitive
     protected static boolean registerAsParallelCapable() {
-        return ParallelLoaders.register(getCaller(1));
+        Class<? extends ClassLoader> callerClass =
+            Reflection.getCallerClass().asSubclass(ClassLoader.class);
+        return ParallelLoaders.register(callerClass);
     }
 
     /**
@@ -1340,15 +1339,13 @@
      *
      * @since  1.2
      */
+    @CallerSensitive
     public final ClassLoader getParent() {
         if (parent == null)
             return null;
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
-            ClassLoader ccl = getCallerClassLoader();
-            if (needsClassLoaderPermissionCheck(ccl, this)) {
-                sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
-            }
+            checkClassLoaderPermission(this, Reflection.getCallerClass());
         }
         return parent;
     }
@@ -1408,6 +1405,7 @@
      *
      * @revised  1.4
      */
+    @CallerSensitive
     public static ClassLoader getSystemClassLoader() {
         initSystemClassLoader();
         if (scl == null) {
@@ -1415,10 +1413,7 @@
         }
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
-            ClassLoader ccl = getCallerClassLoader();
-            if (needsClassLoaderPermissionCheck(ccl, scl)) {
-                sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
-            }
+            checkClassLoaderPermission(scl, Reflection.getCallerClass());
         }
         return scl;
     }
@@ -1471,8 +1466,8 @@
     // class loader 'from' is same as class loader 'to' or an ancestor
     // of 'to'.  The class loader in a system domain can access
     // any class loader.
-    static boolean needsClassLoaderPermissionCheck(ClassLoader from,
-                                                   ClassLoader to)
+    private static boolean needsClassLoaderPermissionCheck(ClassLoader from,
+                                                           ClassLoader to)
     {
         if (from == to)
             return false;
@@ -1483,13 +1478,8 @@
         return !to.isAncestor(from);
     }
 
-    // Returns the invoker's class loader, or null if none.
-    // NOTE: This must always be invoked when there is exactly one intervening
-    // frame from the core libraries on the stack between this method's
-    // invocation and the desired invoker.
-    static ClassLoader getCallerClassLoader() {
-        // NOTE use of more generic Reflection.getCallerClass()
-        Class<?> caller = Reflection.getCallerClass(3);
+    // Returns the class's class loader, or null if none.
+    static ClassLoader getClassLoader(Class<?> caller) {
         // This can be null if the VM is requesting it
         if (caller == null) {
             return null;
@@ -1498,6 +1488,17 @@
         return caller.getClassLoader0();
     }
 
+    static void checkClassLoaderPermission(ClassLoader cl, Class<?> caller) {
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            // caller can be null if the VM is requesting it
+            ClassLoader ccl = getClassLoader(caller);
+            if (needsClassLoaderPermissionCheck(ccl, cl)) {
+                sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
+            }
+        }
+    }
+
     // The class loader for the system
     // @GuardedBy("ClassLoader.class")
     private static ClassLoader scl;
--- a/src/share/classes/java/lang/Iterable.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/Iterable.java	Wed Apr 17 21:48:04 2013 -0700
@@ -22,26 +22,55 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package java.lang;
 
 import java.util.Iterator;
+import java.util.Objects;
+import java.util.function.Consumer;
 
 /**
  * Implementing this interface allows an object to be the target of
- * the "foreach" statement.
+ * the "for-each loop" statement. See
+ * <strong>
+ * <a href="{@docRoot}/../technotes/guides/language/foreach.html">For-each Loop</a>
+ * </strong>
  *
  * @param <T> the type of elements returned by the iterator
  *
  * @since 1.5
+ * @jls 14.14.2 The enhanced for statement
  */
 @FunctionalInterface
 public interface Iterable<T> {
-
     /**
-     * Returns an iterator over a set of elements of type T.
+     * Returns an iterator over elements of type {@code T}.
      *
      * @return an Iterator.
      */
     Iterator<T> iterator();
+
+    /**
+     * Performs the given action on the contents of the {@code Iterable}, in the
+     * order elements occur when iterating, until all elements have been
+     * processed or the action throws an exception.  Errors or runtime
+     * exceptions thrown by the action are relayed to the caller.
+     *
+     * @implSpec
+     * <p>The default implementation behaves as if:
+     * <pre>{@code
+     *     for (T t : this)
+     *         action.accept(t);
+     * }</pre>
+     *
+     * @param action The action to be performed for each element
+     * @throws NullPointerException if the specified action is null
+     * @since 1.8
+     */
+    default void forEach(Consumer<? super T> action) {
+        Objects.requireNonNull(action);
+        for (T t : this) {
+            action.accept(t);
+        }
+    }
 }
+
--- a/src/share/classes/java/lang/Long.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/Long.java	Wed Apr 17 21:48:04 2013 -0700
@@ -479,7 +479,7 @@
      * of the string as a type indicator, as would be permitted in
      * Java programming language source code - except that either
      * {@code L} or {@code l} may appear as a digit for a
-     * radix greater than 22.
+     * radix greater than or equal to 22.
      *
      * <p>An exception of type {@code NumberFormatException} is
      * thrown if any of the following situations occurs:
--- a/src/share/classes/java/lang/Package.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/Package.java	Wed Apr 17 21:48:04 2013 -0700
@@ -49,6 +49,8 @@
 import java.util.Iterator;
 
 import sun.net.www.ParseUtil;
+import sun.reflect.CallerSensitive;
+import sun.reflect.Reflection;
 
 import java.lang.annotation.Annotation;
 
@@ -273,8 +275,9 @@
      * @return the package of the requested name. It may be null if no package
      *          information is available from the archive or codebase.
      */
+    @CallerSensitive
     public static Package getPackage(String name) {
-        ClassLoader l = ClassLoader.getCallerClassLoader();
+        ClassLoader l = ClassLoader.getClassLoader(Reflection.getCallerClass());
         if (l != null) {
             return l.getPackage(name);
         } else {
@@ -294,8 +297,9 @@
      * @return a new array of packages known to the callers {@code ClassLoader}
      * instance.  An zero length array is returned if none are known.
      */
+    @CallerSensitive
     public static Package[] getPackages() {
-        ClassLoader l = ClassLoader.getCallerClassLoader();
+        ClassLoader l = ClassLoader.getClassLoader(Reflection.getCallerClass());
         if (l != null) {
             return l.getPackages();
         } else {
--- a/src/share/classes/java/lang/ProcessBuilder.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/ProcessBuilder.java	Wed Apr 17 21:48:04 2013 -0700
@@ -30,6 +30,7 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.FileOutputStream;
+import java.security.AccessControlException;
 import java.util.Arrays;
 import java.util.ArrayList;
 import java.util.List;
@@ -1024,13 +1025,24 @@
                                      redirects,
                                      redirectErrorStream);
         } catch (IOException e) {
+            String exceptionInfo = ": " + e.getMessage();
+            Throwable cause = e;
+            if (security != null) {
+                // Can not disclose the fail reason for read-protected files.
+                try {
+                    security.checkRead(prog);
+                } catch (AccessControlException ace) {
+                    exceptionInfo = "";
+                    cause = ace;
+                }
+            }
             // It's much easier for us to create a high-quality error
             // message than the low-level C code which found the problem.
             throw new IOException(
                 "Cannot run program \"" + prog + "\""
                 + (dir == null ? "" : " (in directory \"" + dir + "\")")
-                + ": " + e.getMessage(),
-                e);
+                + exceptionInfo,
+                cause);
         }
     }
 }
--- a/src/share/classes/java/lang/Runtime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/Runtime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -27,6 +27,8 @@
 
 import java.io.*;
 import java.util.StringTokenizer;
+import sun.reflect.CallerSensitive;
+import sun.reflect.Reflection;
 
 /**
  * Every Java application has a single instance of class
@@ -790,8 +792,9 @@
      * @see        java.lang.SecurityException
      * @see        java.lang.SecurityManager#checkLink(java.lang.String)
      */
+    @CallerSensitive
     public void load(String filename) {
-        load0(System.getCallerClass(), filename);
+        load0(Reflection.getCallerClass(), filename);
     }
 
     synchronized void load0(Class<?> fromClass, String filename) {
@@ -850,8 +853,9 @@
      * @see        java.lang.SecurityException
      * @see        java.lang.SecurityManager#checkLink(java.lang.String)
      */
+    @CallerSensitive
     public void loadLibrary(String libname) {
-        loadLibrary0(System.getCallerClass(), libname);
+        loadLibrary0(Reflection.getCallerClass(), libname);
     }
 
     synchronized void loadLibrary0(Class<?> fromClass, String libname) {
--- a/src/share/classes/java/lang/SecurityManager.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/SecurityManager.java	Wed Apr 17 21:48:04 2013 -0700
@@ -36,10 +36,10 @@
 import java.net.NetPermission;
 import java.util.Hashtable;
 import java.net.InetAddress;
-import java.lang.reflect.Member;
 import java.lang.reflect.*;
 import java.net.URL;
 
+import sun.reflect.CallerSensitive;
 import sun.security.util.SecurityConstants;
 
 /**
@@ -1679,6 +1679,7 @@
      * @since JDK1.1
      * @see        #checkPermission(java.security.Permission) checkPermission
      */
+    @CallerSensitive
     public void checkMemberAccess(Class<?> clazz, int which) {
         if (clazz == null) {
             throw new NullPointerException("class can't be null");
--- a/src/share/classes/java/lang/System.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/System.java	Wed Apr 17 21:48:04 2013 -0700
@@ -35,6 +35,7 @@
 import java.nio.channels.Channel;
 import java.nio.channels.spi.SelectorProvider;
 import sun.nio.ch.Interruptible;
+import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
 import sun.security.util.SecurityConstants;
 import sun.reflect.annotation.AnnotationType;
@@ -1072,8 +1073,9 @@
      * @see        java.lang.Runtime#load(java.lang.String)
      * @see        java.lang.SecurityManager#checkLink(java.lang.String)
      */
+    @CallerSensitive
     public static void load(String filename) {
-        Runtime.getRuntime().load0(getCallerClass(), filename);
+        Runtime.getRuntime().load0(Reflection.getCallerClass(), filename);
     }
 
     /**
@@ -1107,8 +1109,9 @@
      * @see        java.lang.Runtime#loadLibrary(java.lang.String)
      * @see        java.lang.SecurityManager#checkLink(java.lang.String)
      */
+    @CallerSensitive
     public static void loadLibrary(String libname) {
-        Runtime.getRuntime().loadLibrary0(getCallerClass(), libname);
+        Runtime.getRuntime().loadLibrary0(Reflection.getCallerClass(), libname);
     }
 
     /**
@@ -1245,10 +1248,4 @@
             }
         });
     }
-
-    /* returns the class of the caller. */
-    static Class<?> getCallerClass() {
-        // NOTE use of more generic Reflection.getCallerClass()
-        return Reflection.getCallerClass(3);
-    }
 }
--- a/src/share/classes/java/lang/Thread.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/Thread.java	Wed Apr 17 21:48:04 2013 -0700
@@ -37,6 +37,8 @@
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.locks.LockSupport;
 import sun.nio.ch.Interruptible;
+import sun.reflect.CallerSensitive;
+import sun.reflect.Reflection;
 import sun.security.util.SecurityConstants;
 
 
@@ -1443,15 +1445,14 @@
      *
      * @since 1.2
      */
+    @CallerSensitive
     public ClassLoader getContextClassLoader() {
         if (contextClassLoader == null)
             return null;
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
-            ClassLoader ccl = ClassLoader.getCallerClassLoader();
-            if (ClassLoader.needsClassLoaderPermissionCheck(ccl, contextClassLoader)) {
-                sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
-            }
+            ClassLoader.checkClassLoaderPermission(contextClassLoader,
+                                                   Reflection.getCallerClass());
         }
         return contextClassLoader;
     }
--- a/src/share/classes/java/lang/invoke/BoundMethodHandle.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/invoke/BoundMethodHandle.java	Wed Apr 17 21:48:04 2013 -0700
@@ -709,7 +709,9 @@
             InvokerBytecodeGenerator.maybeDump(className, classFile);
             Class<? extends BoundMethodHandle> bmhClass =
                 //UNSAFE.defineAnonymousClass(BoundMethodHandle.class, classFile, null).asSubclass(BoundMethodHandle.class);
-                UNSAFE.defineClass(className, classFile, 0, classFile.length).asSubclass(BoundMethodHandle.class);
+                UNSAFE.defineClass(className, classFile, 0, classFile.length,
+                                   BoundMethodHandle.class.getClassLoader(), null)
+                    .asSubclass(BoundMethodHandle.class);
             UNSAFE.ensureClassInitialized(bmhClass);
 
             return bmhClass;
--- a/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Wed Apr 17 21:48:04 2013 -0700
@@ -184,7 +184,7 @@
         for (int i=0; i<markerInterfaces.length; i++) {
             interfaces[i+1] = markerInterfaces[i].getName().replace('.', '/');
         }
-        cw.visit(CLASSFILE_VERSION, ACC_SUPER,
+        cw.visit(CLASSFILE_VERSION, ACC_SUPER + ACC_FINAL + ACC_SYNTHETIC,
                  lambdaClassName, null,
                  NAME_MAGIC_ACCESSOR_IMPL, interfaces);
 
--- a/src/share/classes/java/lang/invoke/MemberName.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/invoke/MemberName.java	Wed Apr 17 21:48:04 2013 -0700
@@ -391,10 +391,11 @@
 
     // private flags, not part of RECOGNIZED_MODIFIERS:
     static final int
-            IS_METHOD      = MN_IS_METHOD,      // method (not constructor)
-            IS_CONSTRUCTOR = MN_IS_CONSTRUCTOR, // constructor
-            IS_FIELD       = MN_IS_FIELD,       // field
-            IS_TYPE        = MN_IS_TYPE;        // nested type
+            IS_METHOD        = MN_IS_METHOD,        // method (not constructor)
+            IS_CONSTRUCTOR   = MN_IS_CONSTRUCTOR,   // constructor
+            IS_FIELD         = MN_IS_FIELD,         // field
+            IS_TYPE          = MN_IS_TYPE,          // nested type
+            CALLER_SENSITIVE = MN_CALLER_SENSITIVE; // @CallerSensitive annotation detected
 
     static final int ALL_ACCESS = Modifier.PUBLIC | Modifier.PRIVATE | Modifier.PROTECTED;
     static final int ALL_KINDS = IS_METHOD | IS_CONSTRUCTOR | IS_FIELD | IS_TYPE;
@@ -430,6 +431,10 @@
     public boolean isPackage() {
         return !testAnyFlags(ALL_ACCESS);
     }
+    /** Query whether this member has a CallerSensitive annotation. */
+    public boolean isCallerSensitive() {
+        return testAllFlags(CALLER_SENSITIVE);
+    }
 
     /** Utility method to query whether this member is accessible from a given lookup class. */
     public boolean isAccessibleFrom(Class<?> lookupClass) {
--- a/src/share/classes/java/lang/invoke/MethodHandleImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/invoke/MethodHandleImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -34,6 +34,8 @@
 import sun.invoke.util.ValueConversions;
 import sun.invoke.util.VerifyType;
 import sun.invoke.util.Wrapper;
+import sun.reflect.CallerSensitive;
+import sun.reflect.Reflection;
 import static java.lang.invoke.LambdaForm.*;
 import static java.lang.invoke.MethodHandleStatics.*;
 import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
@@ -891,9 +893,11 @@
             }
         }
 
+        @CallerSensitive
         private static boolean checkCallerClass(Class<?> expected, Class<?> expected2) {
-            final int FRAME_COUNT_ARG = 2;  // [0] Reflection [1] BindCaller [2] Expected
-            Class<?> actual = sun.reflect.Reflection.getCallerClass(FRAME_COUNT_ARG);
+            // This method is called via MH_checkCallerClass and so it's
+            // correct to ask for the immediate caller here.
+            Class<?> actual = Reflection.getCallerClass();
             if (actual != expected && actual != expected2)
                 throw new InternalError("found "+actual.getName()+", expected "+expected.getName()
                                         +(expected == expected2 ? "" : ", or else "+expected2.getName()));
--- a/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Wed Apr 17 21:48:04 2013 -0700
@@ -26,7 +26,6 @@
 package java.lang.invoke;
 
 import java.lang.invoke.MethodHandles.Lookup;
-import java.lang.reflect.AccessibleObject;
 import java.lang.reflect.Field;
 import static java.lang.invoke.MethodHandleNatives.Constants.*;
 import static java.lang.invoke.MethodHandleStatics.*;
@@ -34,7 +33,7 @@
 
 /**
  * The JVM interface for the method handles package is all here.
- * This is an interface internal and private to an implemetantion of JSR 292.
+ * This is an interface internal and private to an implementation of JSR 292.
  * <em>This class is not part of the JSR 292 standard.</em>
  * @author jrose
  */
@@ -101,6 +100,7 @@
                 MN_IS_CONSTRUCTOR      = 0x00020000, // constructor
                 MN_IS_FIELD            = 0x00040000, // field
                 MN_IS_TYPE             = 0x00080000, // nested type
+                MN_CALLER_SENSITIVE    = 0x00100000, // @CallerSensitive annotation detected
                 MN_REFERENCE_KIND_SHIFT = 24, // refKind
                 MN_REFERENCE_KIND_MASK = 0x0F000000 >> MN_REFERENCE_KIND_SHIFT,
                 // The SEARCH_* bits are not for MN.flags but for the matchFlags argument of MHN.getMembers:
@@ -391,129 +391,24 @@
      * I.e., does it call Reflection.getCallerClass or a similer method
      * to ask about the identity of its caller?
      */
-    // FIXME: Replace this pattern match by an annotation @sun.reflect.CallerSensitive.
     static boolean isCallerSensitive(MemberName mem) {
         if (!mem.isInvocable())  return false;  // fields are not caller sensitive
+
+        return mem.isCallerSensitive() || canBeCalledVirtual(mem);
+    }
+
+    static boolean canBeCalledVirtual(MemberName mem) {
+        assert(mem.isInvocable());
         Class<?> defc = mem.getDeclaringClass();
         switch (mem.getName()) {
-        case "doPrivileged":
-        case "doPrivilegedWithCombiner":
-            return defc == java.security.AccessController.class;
         case "checkMemberAccess":
             return canBeCalledVirtual(mem, java.lang.SecurityManager.class);
-        case "getUnsafe":
-            return defc == sun.misc.Unsafe.class;
-        case "lookup":
-            return defc == java.lang.invoke.MethodHandles.class;
-        case "findStatic":
-        case "findVirtual":
-        case "findConstructor":
-        case "findSpecial":
-        case "findGetter":
-        case "findSetter":
-        case "findStaticGetter":
-        case "findStaticSetter":
-        case "bind":
-        case "unreflect":
-        case "unreflectSpecial":
-        case "unreflectConstructor":
-        case "unreflectGetter":
-        case "unreflectSetter":
-            return defc == java.lang.invoke.MethodHandles.Lookup.class;
-        case "invoke":
-            return defc == java.lang.reflect.Method.class;
-        case "get":
-        case "getBoolean":
-        case "getByte":
-        case "getChar":
-        case "getShort":
-        case "getInt":
-        case "getLong":
-        case "getFloat":
-        case "getDouble":
-        case "set":
-        case "setBoolean":
-        case "setByte":
-        case "setChar":
-        case "setShort":
-        case "setInt":
-        case "setLong":
-        case "setFloat":
-        case "setDouble":
-            return defc == java.lang.reflect.Field.class;
-        case "newInstance":
-            if (defc == java.lang.reflect.Constructor.class)  return true;
-            if (defc == java.lang.Class.class)  return true;
-            break;
-        case "forName":
-        case "getClassLoader":
-        case "getClasses":
-        case "getFields":
-        case "getMethods":
-        case "getConstructors":
-        case "getDeclaredClasses":
-        case "getDeclaredFields":
-        case "getDeclaredMethods":
-        case "getDeclaredConstructors":
-        case "getField":
-        case "getMethod":
-        case "getConstructor":
-        case "getDeclaredField":
-        case "getDeclaredMethod":
-        case "getDeclaredConstructor":
-            return defc == java.lang.Class.class;
-        case "getConnection":
-        case "getDriver":
-        case "getDrivers":
-        case "deregisterDriver":
-            return defc == getClass("java.sql.DriverManager");
-        case "newUpdater":
-            if (defc == java.util.concurrent.atomic.AtomicIntegerFieldUpdater.class)  return true;
-            if (defc == java.util.concurrent.atomic.AtomicLongFieldUpdater.class)  return true;
-            if (defc == java.util.concurrent.atomic.AtomicReferenceFieldUpdater.class)  return true;
-            break;
         case "getContextClassLoader":
             return canBeCalledVirtual(mem, java.lang.Thread.class);
-        case "getPackage":
-        case "getPackages":
-            return defc == java.lang.Package.class;
-        case "getParent":
-        case "getSystemClassLoader":
-            return defc == java.lang.ClassLoader.class;
-        case "load":
-        case "loadLibrary":
-            if (defc == java.lang.Runtime.class)  return true;
-            if (defc == java.lang.System.class)  return true;
-            break;
-        case "getCallerClass":
-            if (defc == sun.reflect.Reflection.class)  return true;
-            if (defc == java.lang.System.class)  return true;
-            break;
-        case "getCallerClassLoader":
-            return defc == java.lang.ClassLoader.class;
-        case "registerAsParallelCapable":
-            return canBeCalledVirtual(mem, java.lang.ClassLoader.class);
-        case "getProxyClass":
-        case "newProxyInstance":
-            return defc == java.lang.reflect.Proxy.class;
-        case "asInterfaceInstance":
-            return defc == java.lang.invoke.MethodHandleProxies.class;
-        case "getBundle":
-        case "clearCache":
-            return defc == java.util.ResourceBundle.class;
         }
         return false;
     }
 
-    // avoid static dependency to a class in other modules
-    private static Class<?> getClass(String cn) {
-        try {
-            return Class.forName(cn, false,
-                                 MethodHandleNatives.class.getClassLoader());
-        } catch (ClassNotFoundException e) {
-            throw new InternalError(e);
-        }
-    }
     static boolean canBeCalledVirtual(MemberName symbolicRef, Class<?> definingClass) {
         Class<?> symbolicRefClass = symbolicRef.getDeclaringClass();
         if (symbolicRefClass == definingClass)  return true;
--- a/src/share/classes/java/lang/invoke/MethodHandleProxies.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/invoke/MethodHandleProxies.java	Wed Apr 17 21:48:04 2013 -0700
@@ -30,6 +30,7 @@
 import java.security.PrivilegedAction;
 import sun.invoke.WrapperInstance;
 import java.util.ArrayList;
+import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
 import sun.reflect.misc.ReflectUtil;
 
@@ -137,14 +138,14 @@
     // entry points, must be covered by hand-written or automatically
     // generated adapter classes.
     //
+    @CallerSensitive
     public static
     <T> T asInterfaceInstance(final Class<T> intfc, final MethodHandle target) {
         if (!intfc.isInterface() || !Modifier.isPublic(intfc.getModifiers()))
             throw new IllegalArgumentException("not a public interface: "+intfc.getName());
         final MethodHandle mh;
         if (System.getSecurityManager() != null) {
-            final int CALLER_FRAME = 2; // 0: Reflection, 1: asInterfaceInstance, 2: caller
-            final Class<?> caller = Reflection.getCallerClass(CALLER_FRAME);
+            final Class<?> caller = Reflection.getCallerClass();
             final ClassLoader ccl = caller != null ? caller.getClassLoader() : null;
             ReflectUtil.checkProxyPackageAccess(ccl, intfc);
             mh = ccl != null ? bindCaller(target, caller) : target;
--- a/src/share/classes/java/lang/invoke/MethodHandles.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/invoke/MethodHandles.java	Wed Apr 17 21:48:04 2013 -0700
@@ -26,13 +26,17 @@
 package java.lang.invoke;
 
 import java.lang.reflect.*;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Arrays;
 import sun.invoke.util.ValueConversions;
 import sun.invoke.util.VerifyAccess;
 import sun.invoke.util.Wrapper;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Arrays;
+import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
+import sun.security.util.SecurityConstants;
 import static java.lang.invoke.MethodHandleStatics.*;
 import static java.lang.invoke.MethodHandleNatives.Constants.*;
 
@@ -65,8 +69,9 @@
      * This lookup object is a <em>capability</em> which may be delegated to trusted agents.
      * Do not store it in place where untrusted code can access it.
      */
+    @CallerSensitive
     public static Lookup lookup() {
-        return new Lookup();
+        return new Lookup(Reflection.getCallerClass());
     }
 
     /**
@@ -416,20 +421,13 @@
          * for method handle creation.
          * Must be called by from a method in this package,
          * which in turn is called by a method not in this package.
-         * <p>
-         * Also, don't make it private, lest javac interpose
-         * an access$N method.
          */
-        Lookup() {
-            this(getCallerClassAtEntryPoint(false), ALL_MODES);
+        Lookup(Class<?> lookupClass) {
+            this(lookupClass, ALL_MODES);
             // make sure we haven't accidentally picked up a privileged class:
             checkUnprivilegedlookupClass(lookupClass);
         }
 
-        Lookup(Class<?> lookupClass) {
-            this(lookupClass, ALL_MODES);
-        }
-
         private Lookup(Class<?> lookupClass, int allowedModes) {
             this.lookupClass = lookupClass;
             this.allowedModes = allowedModes;
@@ -554,20 +552,6 @@
             }
         }
 
-        /* Obtain the external caller class, when called from Lookup.<init> or a first-level subroutine. */
-        private static Class<?> getCallerClassAtEntryPoint(boolean inSubroutine) {
-            final int CALLER_DEPTH = 4;
-            //  Stack for the constructor entry point (inSubroutine=false):
-            // 0: Reflection.getCC, 1: getCallerClassAtEntryPoint,
-            // 2: Lookup.<init>, 3: MethodHandles.*, 4: caller
-            //  The stack is slightly different for a subroutine of a Lookup.find* method:
-            // 2: Lookup.*, 3: Lookup.find*.*, 4: caller
-            // Note:  This should be the only use of getCallerClass in this file.
-            assert(Reflection.getCallerClass(CALLER_DEPTH-2) == Lookup.class);
-            assert(Reflection.getCallerClass(CALLER_DEPTH-1) == (inSubroutine ? Lookup.class : MethodHandles.class));
-            return Reflection.getCallerClass(CALLER_DEPTH);
-        }
-
         /**
          * Produces a method handle for a static method.
          * The type of the method handle will be that of the method.
@@ -594,12 +578,14 @@
          *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
          * @throws NullPointerException if any argument is null
          */
+        @CallerSensitive
         public
         MethodHandle findStatic(Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
             MemberName method = resolveOrFail(REF_invokeStatic, refc, name, type);
-            checkSecurityManager(refc, method);  // stack walk magic: do not refactor
-            Class<?> callerClass = findBoundCallerClass(method);  // stack walk magic: do not refactor
-            return getDirectMethod(REF_invokeStatic, refc, method, callerClass);
+            Class<?> callerClass = Reflection.getCallerClass();
+            checkSecurityManager(refc, method, callerClass);
+            return getDirectMethod(REF_invokeStatic, refc, method,
+                                   findBoundCallerClass(method, callerClass));
         }
 
         /**
@@ -645,6 +631,7 @@
          *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
          * @throws NullPointerException if any argument is null
          */
+        @CallerSensitive
         public MethodHandle findVirtual(Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
             if (refc == MethodHandle.class) {
                 MethodHandle mh = findVirtualForMH(name, type);
@@ -652,9 +639,10 @@
             }
             byte refKind = (refc.isInterface() ? REF_invokeInterface : REF_invokeVirtual);
             MemberName method = resolveOrFail(refKind, refc, name, type);
-            checkSecurityManager(refc, method);  // stack walk magic: do not refactor
-            Class<?> callerClass = findBoundCallerClass(method);
-            return getDirectMethod(refKind, refc, method, callerClass);
+            Class<?> callerClass = Reflection.getCallerClass();
+            checkSecurityManager(refc, method, callerClass);
+            return getDirectMethod(refKind, refc, method,
+                                   findBoundCallerClass(method, callerClass));
         }
         private MethodHandle findVirtualForMH(String name, MethodType type) {
             // these names require special lookups because of the implicit MethodType argument
@@ -691,10 +679,11 @@
          *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
          * @throws NullPointerException if any argument is null
          */
+        @CallerSensitive
         public MethodHandle findConstructor(Class<?> refc, MethodType type) throws NoSuchMethodException, IllegalAccessException {
             String name = "<init>";
             MemberName ctor = resolveOrFail(REF_newInvokeSpecial, refc, name, type);
-            checkSecurityManager(refc, ctor);  // stack walk magic: do not refactor
+            checkSecurityManager(refc, ctor, Reflection.getCallerClass());
             return getDirectConstructor(refc, ctor);
         }
 
@@ -732,14 +721,16 @@
          *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
          * @throws NullPointerException if any argument is null
          */
+        @CallerSensitive
         public MethodHandle findSpecial(Class<?> refc, String name, MethodType type,
                                         Class<?> specialCaller) throws NoSuchMethodException, IllegalAccessException {
             checkSpecialCaller(specialCaller);
             Lookup specialLookup = this.in(specialCaller);
             MemberName method = specialLookup.resolveOrFail(REF_invokeSpecial, refc, name, type);
-            checkSecurityManager(refc, method);  // stack walk magic: do not refactor
-            Class<?> callerClass = findBoundCallerClass(method);
-            return specialLookup.getDirectMethod(REF_invokeSpecial, refc, method, callerClass);
+            Class<?> callerClass = Reflection.getCallerClass();
+            checkSecurityManager(refc, method, callerClass);
+            return specialLookup.getDirectMethod(REF_invokeSpecial, refc, method,
+                                                 findBoundCallerClass(method, callerClass));
         }
 
         /**
@@ -759,9 +750,10 @@
          *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
          * @throws NullPointerException if any argument is null
          */
+        @CallerSensitive
         public MethodHandle findGetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
             MemberName field = resolveOrFail(REF_getField, refc, name, type);
-            checkSecurityManager(refc, field);  // stack walk magic: do not refactor
+            checkSecurityManager(refc, field, Reflection.getCallerClass());
             return getDirectField(REF_getField, refc, field);
         }
 
@@ -782,9 +774,10 @@
          *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
          * @throws NullPointerException if any argument is null
          */
+        @CallerSensitive
         public MethodHandle findSetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
             MemberName field = resolveOrFail(REF_putField, refc, name, type);
-            checkSecurityManager(refc, field);  // stack walk magic: do not refactor
+            checkSecurityManager(refc, field, Reflection.getCallerClass());
             return getDirectField(REF_putField, refc, field);
         }
 
@@ -804,9 +797,10 @@
          *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
          * @throws NullPointerException if any argument is null
          */
+        @CallerSensitive
         public MethodHandle findStaticGetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
             MemberName field = resolveOrFail(REF_getStatic, refc, name, type);
-            checkSecurityManager(refc, field);  // stack walk magic: do not refactor
+            checkSecurityManager(refc, field, Reflection.getCallerClass());
             return getDirectField(REF_getStatic, refc, field);
         }
 
@@ -826,9 +820,10 @@
          *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
          * @throws NullPointerException if any argument is null
          */
+        @CallerSensitive
         public MethodHandle findStaticSetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
             MemberName field = resolveOrFail(REF_putStatic, refc, name, type);
-            checkSecurityManager(refc, field);  // stack walk magic: do not refactor
+            checkSecurityManager(refc, field, Reflection.getCallerClass());
             return getDirectField(REF_putStatic, refc, field);
         }
 
@@ -878,12 +873,14 @@
          *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
          * @throws NullPointerException if any argument is null
          */
+        @CallerSensitive
         public MethodHandle bind(Object receiver, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
             Class<? extends Object> refc = receiver.getClass(); // may get NPE
             MemberName method = resolveOrFail(REF_invokeSpecial, refc, name, type);
-            checkSecurityManager(refc, method);  // stack walk magic: do not refactor
-            Class<?> callerClass = findBoundCallerClass(method);  // stack walk magic: do not refactor
-            MethodHandle mh = getDirectMethodNoRestrict(REF_invokeSpecial, refc, method, callerClass);
+            Class<?> callerClass = Reflection.getCallerClass();
+            checkSecurityManager(refc, method, callerClass);
+            MethodHandle mh = getDirectMethodNoRestrict(REF_invokeSpecial, refc, method,
+                                                        findBoundCallerClass(method, callerClass));
             return mh.bindReceiver(receiver).setVarargs(method);
         }
 
@@ -908,13 +905,14 @@
          *                                is set and {@code asVarargsCollector} fails
          * @throws NullPointerException if the argument is null
          */
+        @CallerSensitive
         public MethodHandle unreflect(Method m) throws IllegalAccessException {
             MemberName method = new MemberName(m);
             byte refKind = method.getReferenceKind();
             if (refKind == REF_invokeSpecial)
                 refKind = REF_invokeVirtual;
             assert(method.isMethod());
-            Class<?> callerClass = findBoundCallerClass(method);  // stack walk magic: do not refactor
+            Class<?> callerClass = findBoundCallerClass(method, Reflection.getCallerClass());
             Lookup lookup = m.isAccessible() ? IMPL_LOOKUP : this;
             return lookup.getDirectMethod(refKind, method.getDeclaringClass(), method, callerClass);
         }
@@ -940,12 +938,13 @@
          *                                is set and {@code asVarargsCollector} fails
          * @throws NullPointerException if any argument is null
          */
+        @CallerSensitive
         public MethodHandle unreflectSpecial(Method m, Class<?> specialCaller) throws IllegalAccessException {
             checkSpecialCaller(specialCaller);
             Lookup specialLookup = this.in(specialCaller);
             MemberName method = new MemberName(m, true);
             assert(method.isMethod());
-            Class<?> callerClass = findBoundCallerClass(method);  // stack walk magic: do not refactor
+            Class<?> callerClass = findBoundCallerClass(method, Reflection.getCallerClass());
             // ignore m.isAccessible:  this is a new kind of access
             return specialLookup.getDirectMethod(REF_invokeSpecial, method.getDeclaringClass(), method, callerClass);
         }
@@ -1050,20 +1049,35 @@
          * If this lookup object has private access, then the caller class is the lookupClass.
          * Otherwise, it is the caller of the currently executing public API method (e.g., findVirtual).
          * This is the same caller class as is used by checkSecurityManager.
-         * This function performs stack walk magic: do not refactor it.
          */
-        Class<?> findBoundCallerClass(MemberName m) {
+        Class<?> findBoundCallerClass(MemberName m, Class<?> callerAtEntryPoint) {
             Class<?> callerClass = null;
             if (MethodHandleNatives.isCallerSensitive(m)) {
                 // Do not refactor this to a more "logical" place, since it is stack walk magic.
                 // Note that this is the same expression as in Step 2 below in checkSecurityManager.
                 callerClass = ((allowedModes & PRIVATE) != 0
                                ? lookupClass  // for strong access modes, no extra check
-                               // next line does stack walk magic; do not refactor:
-                               : getCallerClassAtEntryPoint(true));
+                               : callerAtEntryPoint);
             }
             return callerClass;
         }
+
+        /**
+         * Determine whether a security manager has an overridden
+         * SecurityManager.checkMemberAccess method.
+         */
+        private boolean isCheckMemberAccessOverridden(SecurityManager sm) {
+            final Class<? extends SecurityManager> cls = sm.getClass();
+            if (cls == SecurityManager.class) return false;
+
+            try {
+                return cls.getMethod("checkMemberAccess", Class.class, int.class).
+                    getDeclaringClass() != SecurityManager.class;
+            } catch (NoSuchMethodException e) {
+                throw new InternalError("should not reach here");
+            }
+        }
+
         /**
          * Perform necessary <a href="MethodHandles.Lookup.html#secmgr">access checks</a>.
          * Determines a trustable caller class to compare with refc, the symbolic reference class.
@@ -1071,46 +1085,55 @@
          * Otherwise, it is the caller of the currently executing public API method (e.g., findVirtual).
          * This function performs stack walk magic: do not refactor it.
          */
-        void checkSecurityManager(Class<?> refc, MemberName m) {
+        void checkSecurityManager(Class<?> refc, MemberName m, Class<?> caller) {
             SecurityManager smgr = System.getSecurityManager();
             if (smgr == null)  return;
             if (allowedModes == TRUSTED)  return;
+
+            final boolean overridden = isCheckMemberAccessOverridden(smgr);
             // Step 1:
-            smgr.checkMemberAccess(refc, Member.PUBLIC);
+            {
+                // Default policy is to allow Member.PUBLIC; no need to check
+                // permission if SecurityManager is the default implementation
+                final int which = Member.PUBLIC;
+                final Class<?> clazz = refc;
+                if (overridden) {
+                    // Don't refactor; otherwise break the stack depth for
+                    // checkMemberAccess of subclasses of SecurityManager as specified.
+                    smgr.checkMemberAccess(clazz, which);
+                }
+            }
+
             // Step 2:
             Class<?> callerClass = ((allowedModes & PRIVATE) != 0
                                     ? lookupClass  // for strong access modes, no extra check
-                                    // next line does stack walk magic; do not refactor:
-                                    : getCallerClassAtEntryPoint(true));
+                                    : caller);
             if (!VerifyAccess.classLoaderIsAncestor(lookupClass, refc) ||
                 (callerClass != lookupClass &&
                  !VerifyAccess.classLoaderIsAncestor(callerClass, refc)))
                 smgr.checkPackageAccess(VerifyAccess.getPackageName(refc));
+
             // Step 3:
             if (m.isPublic()) return;
             Class<?> defc = m.getDeclaringClass();
-            smgr.checkMemberAccess(defc, Member.DECLARED);  // STACK WALK HERE
+            {
+                // Inline SecurityManager.checkMemberAccess
+                final int which = Member.DECLARED;
+                final Class<?> clazz = defc;
+                if (!overridden) {
+                    if (caller.getClassLoader() != clazz.getClassLoader()) {
+                        smgr.checkPermission(SecurityConstants.CHECK_MEMBER_ACCESS_PERMISSION);
+                    }
+                } else {
+                    // Don't refactor; otherwise break the stack depth for
+                    // checkMemberAccess of subclasses of SecurityManager as specified.
+                    smgr.checkMemberAccess(clazz, which);
+                }
+            }
+
             // Step 4:
             if (defc != refc)
                 smgr.checkPackageAccess(VerifyAccess.getPackageName(defc));
-
-            // Comment from SM.checkMemberAccess, where which=DECLARED:
-            /*
-             * stack depth of 4 should be the caller of one of the
-             * methods in java.lang.Class that invoke checkMember
-             * access. The stack should look like:
-             *
-             * someCaller                        [3]
-             * java.lang.Class.someReflectionAPI [2]
-             * java.lang.Class.checkMemberAccess [1]
-             * SecurityManager.checkMemberAccess [0]
-             *
-             */
-            // For us it is this stack:
-            // someCaller                        [3]
-            // Lookup.findSomeMember             [2]
-            // Lookup.checkSecurityManager       [1]
-            // SecurityManager.checkMemberAccess [0]
         }
 
         void checkMethod(byte refKind, Class<?> refc, MemberName m) throws IllegalAccessException {
@@ -1237,6 +1260,30 @@
             checkMethod(refKind, refc, method);
             if (method.isMethodHandleInvoke())
                 return fakeMethodHandleInvoke(method);
+
+            Class<?> refcAsSuper;
+            if (refKind == REF_invokeSpecial &&
+                refc != lookupClass() &&
+                refc != (refcAsSuper = lookupClass().getSuperclass()) &&
+                refc.isAssignableFrom(lookupClass())) {
+                assert(!method.getName().equals("<init>"));  // not this code path
+                // Per JVMS 6.5, desc. of invokespecial instruction:
+                // If the method is in a superclass of the LC,
+                // and if our original search was above LC.super,
+                // repeat the search (symbolic lookup) from LC.super.
+                // FIXME: MemberName.resolve should handle this instead.
+                MemberName m2 = new MemberName(refcAsSuper,
+                                               method.getName(),
+                                               method.getMethodType(),
+                                               REF_invokeSpecial);
+                m2 = IMPL_NAMES.resolveOrNull(refKind, m2, lookupClassOrNull());
+                if (m2 == null)  throw new InternalError(method.toString());
+                method = m2;
+                refc = refcAsSuper;
+                // redo basic checks
+                checkMethod(refKind, refc, method);
+            }
+
             MethodHandle mh = DirectMethodHandle.make(refKind, refc, method);
             mh = maybeBindCaller(method, mh, callerClass);
             mh = mh.setVarargs(method);
--- a/src/share/classes/java/lang/ref/Finalizer.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/ref/Finalizer.java	Wed Apr 17 21:48:04 2013 -0700
@@ -38,9 +38,9 @@
      */
     static native void invokeFinalizeMethod(Object o) throws Throwable;
 
-    static private ReferenceQueue queue = new ReferenceQueue();
-    static private Finalizer unfinalized = null;
-    static private Object lock = new Object();
+    private static ReferenceQueue queue = new ReferenceQueue();
+    private static Finalizer unfinalized = null;
+    private static final Object lock = new Object();
 
     private Finalizer
         next = null,
@@ -142,7 +142,11 @@
     /* Called by Runtime.runFinalization() */
     static void runFinalization() {
         forkSecondaryFinalizer(new Runnable() {
+            private volatile boolean running;
             public void run() {
+                if (running)
+                    return;
+                running = true;
                 for (;;) {
                     Finalizer f = (Finalizer)queue.poll();
                     if (f == null) break;
@@ -155,7 +159,11 @@
     /* Invoked by java.lang.Shutdown */
     static void runAllFinalizers() {
         forkSecondaryFinalizer(new Runnable() {
+            private volatile boolean running;
             public void run() {
+                if (running)
+                    return;
+                running = true;
                 for (;;) {
                     Finalizer f;
                     synchronized (lock) {
@@ -168,10 +176,14 @@
     }
 
     private static class FinalizerThread extends Thread {
+        private volatile boolean running;
         FinalizerThread(ThreadGroup g) {
             super(g, "Finalizer");
         }
         public void run() {
+            if (running)
+                return;
+            running = true;
             for (;;) {
                 try {
                     Finalizer f = (Finalizer)queue.remove();
--- a/src/share/classes/java/lang/reflect/Constructor.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/reflect/Constructor.java	Wed Apr 17 21:48:04 2013 -0700
@@ -25,6 +25,7 @@
 
 package java.lang.reflect;
 
+import sun.reflect.CallerSensitive;
 import sun.reflect.ConstructorAccessor;
 import sun.reflect.Reflection;
 import sun.reflect.generics.repository.ConstructorRepository;
@@ -392,14 +393,14 @@
      * @exception ExceptionInInitializerError if the initialization provoked
      *              by this method fails.
      */
+    @CallerSensitive
     public T newInstance(Object ... initargs)
         throws InstantiationException, IllegalAccessException,
                IllegalArgumentException, InvocationTargetException
     {
         if (!override) {
             if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
-                Class<?> caller = Reflection.getCallerClass(2);
-
+                Class<?> caller = Reflection.getCallerClass();
                 checkAccess(caller, clazz, null, modifiers);
             }
         }
--- a/src/share/classes/java/lang/reflect/Field.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/reflect/Field.java	Wed Apr 17 21:48:04 2013 -0700
@@ -25,6 +25,7 @@
 
 package java.lang.reflect;
 
+import sun.reflect.CallerSensitive;
 import sun.reflect.FieldAccessor;
 import sun.reflect.Reflection;
 import sun.reflect.generics.repository.FieldRepository;
@@ -376,9 +377,16 @@
      * @exception ExceptionInInitializerError if the initialization provoked
      *              by this method fails.
      */
+    @CallerSensitive
     public Object get(Object obj)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         return getFieldAccessor(obj).get(obj);
     }
 
@@ -404,9 +412,16 @@
      *              by this method fails.
      * @see       Field#get
      */
+    @CallerSensitive
     public boolean getBoolean(Object obj)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         return getFieldAccessor(obj).getBoolean(obj);
     }
 
@@ -432,9 +447,16 @@
      *              by this method fails.
      * @see       Field#get
      */
+    @CallerSensitive
     public byte getByte(Object obj)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         return getFieldAccessor(obj).getByte(obj);
     }
 
@@ -462,9 +484,16 @@
      *              by this method fails.
      * @see Field#get
      */
+    @CallerSensitive
     public char getChar(Object obj)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         return getFieldAccessor(obj).getChar(obj);
     }
 
@@ -492,9 +521,16 @@
      *              by this method fails.
      * @see       Field#get
      */
+    @CallerSensitive
     public short getShort(Object obj)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         return getFieldAccessor(obj).getShort(obj);
     }
 
@@ -522,9 +558,16 @@
      *              by this method fails.
      * @see       Field#get
      */
+    @CallerSensitive
     public int getInt(Object obj)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         return getFieldAccessor(obj).getInt(obj);
     }
 
@@ -552,9 +595,16 @@
      *              by this method fails.
      * @see       Field#get
      */
+    @CallerSensitive
     public long getLong(Object obj)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         return getFieldAccessor(obj).getLong(obj);
     }
 
@@ -582,9 +632,16 @@
      *              by this method fails.
      * @see Field#get
      */
+    @CallerSensitive
     public float getFloat(Object obj)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         return getFieldAccessor(obj).getFloat(obj);
     }
 
@@ -612,9 +669,16 @@
      *              by this method fails.
      * @see       Field#get
      */
+    @CallerSensitive
     public double getDouble(Object obj)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         return getFieldAccessor(obj).getDouble(obj);
     }
 
@@ -684,9 +748,16 @@
      * @exception ExceptionInInitializerError if the initialization provoked
      *              by this method fails.
      */
+    @CallerSensitive
     public void set(Object obj, Object value)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         getFieldAccessor(obj).set(obj, value);
     }
 
@@ -714,9 +785,16 @@
      *              by this method fails.
      * @see       Field#set
      */
+    @CallerSensitive
     public void setBoolean(Object obj, boolean z)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         getFieldAccessor(obj).setBoolean(obj, z);
     }
 
@@ -744,9 +822,16 @@
      *              by this method fails.
      * @see       Field#set
      */
+    @CallerSensitive
     public void setByte(Object obj, byte b)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         getFieldAccessor(obj).setByte(obj, b);
     }
 
@@ -774,9 +859,16 @@
      *              by this method fails.
      * @see       Field#set
      */
+    @CallerSensitive
     public void setChar(Object obj, char c)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         getFieldAccessor(obj).setChar(obj, c);
     }
 
@@ -804,9 +896,16 @@
      *              by this method fails.
      * @see       Field#set
      */
+    @CallerSensitive
     public void setShort(Object obj, short s)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         getFieldAccessor(obj).setShort(obj, s);
     }
 
@@ -834,9 +933,16 @@
      *              by this method fails.
      * @see       Field#set
      */
+    @CallerSensitive
     public void setInt(Object obj, int i)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         getFieldAccessor(obj).setInt(obj, i);
     }
 
@@ -864,9 +970,16 @@
      *              by this method fails.
      * @see       Field#set
      */
+    @CallerSensitive
     public void setLong(Object obj, long l)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         getFieldAccessor(obj).setLong(obj, l);
     }
 
@@ -894,9 +1007,16 @@
      *              by this method fails.
      * @see       Field#set
      */
+    @CallerSensitive
     public void setFloat(Object obj, float f)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         getFieldAccessor(obj).setFloat(obj, f);
     }
 
@@ -924,20 +1044,26 @@
      *              by this method fails.
      * @see       Field#set
      */
+    @CallerSensitive
     public void setDouble(Object obj, double d)
         throws IllegalArgumentException, IllegalAccessException
     {
+        if (!override) {
+            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
+                Class<?> caller = Reflection.getCallerClass();
+                checkAccess(caller, clazz, obj, modifiers);
+            }
+        }
         getFieldAccessor(obj).setDouble(obj, d);
     }
 
-    // Convenience routine which performs security checks
+    // security check is done before calling this method
     private FieldAccessor getFieldAccessor(Object obj)
         throws IllegalAccessException
     {
-        doSecurityCheck(obj);
         boolean ov = override;
-        FieldAccessor a = (ov)? overrideFieldAccessor : fieldAccessor;
-        return (a != null)? a : acquireFieldAccessor(ov);
+        FieldAccessor a = (ov) ? overrideFieldAccessor : fieldAccessor;
+        return (a != null) ? a : acquireFieldAccessor(ov);
     }
 
     // NOTE that there is no synchronization used here. It is correct
@@ -982,19 +1108,6 @@
         }
     }
 
-    // NOTE: be very careful if you change the stack depth of this
-    // routine. The depth of the "getCallerClass" call is hardwired so
-    // that the compiler can have an easier time if this gets inlined.
-    private void doSecurityCheck(Object obj) throws IllegalAccessException {
-        if (!override) {
-            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
-                Class<?> caller = Reflection.getCallerClass(4);
-
-                checkAccess(caller, clazz, obj, modifiers);
-            }
-        }
-    }
-
     /**
      * @throws NullPointerException {@inheritDoc}
      * @since 1.5
--- a/src/share/classes/java/lang/reflect/Method.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/reflect/Method.java	Wed Apr 17 21:48:04 2013 -0700
@@ -25,6 +25,7 @@
 
 package java.lang.reflect;
 
+import sun.reflect.CallerSensitive;
 import sun.reflect.MethodAccessor;
 import sun.reflect.Reflection;
 import sun.reflect.generics.repository.MethodRepository;
@@ -472,14 +473,14 @@
      * @exception ExceptionInInitializerError if the initialization
      * provoked by this method fails.
      */
+    @CallerSensitive
     public Object invoke(Object obj, Object... args)
         throws IllegalAccessException, IllegalArgumentException,
            InvocationTargetException
     {
         if (!override) {
             if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
-                Class<?> caller = Reflection.getCallerClass(1);
-
+                Class<?> caller = Reflection.getCallerClass();
                 checkAccess(caller, clazz, obj, modifiers);
             }
         }
--- a/src/share/classes/java/lang/reflect/Proxy.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/reflect/Proxy.java	Wed Apr 17 21:48:04 2013 -0700
@@ -28,7 +28,6 @@
 import java.lang.ref.Reference;
 import java.lang.ref.WeakReference;
 import java.security.AccessController;
-import java.security.Permission;
 import java.security.PrivilegedAction;
 import java.util.Arrays;
 import java.util.Collections;
@@ -39,6 +38,8 @@
 import java.util.List;
 import java.util.WeakHashMap;
 import sun.misc.ProxyGenerator;
+import sun.misc.VM;
+import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
 import sun.reflect.misc.ReflectUtil;
 import sun.security.util.SecurityConstants;
@@ -51,16 +52,14 @@
  * <p>To create a proxy for some interface {@code Foo}:
  * <pre>
  *     InvocationHandler handler = new MyInvocationHandler(...);
- *     Class proxyClass = Proxy.getProxyClass(
- *         Foo.class.getClassLoader(), new Class[] { Foo.class });
- *     Foo f = (Foo) proxyClass.
- *         getConstructor(new Class[] { InvocationHandler.class }).
- *         newInstance(new Object[] { handler });
+ *     Class&lt;?&gt; proxyClass = Proxy.getProxyClass(Foo.class.getClassLoader(), Foo.class);
+ *     Foo f = (Foo) proxyClass.getConstructor(InvocationHandler.class).
+ *                     newInstance(handler);
  * </pre>
  * or more simply:
  * <pre>
  *     Foo f = (Foo) Proxy.newProxyInstance(Foo.class.getClassLoader(),
- *                                          new Class[] { Foo.class },
+ *                                          new Class&lt;?&gt;[] { Foo.class },
  *                                          handler);
  * </pre>
  *
@@ -89,7 +88,11 @@
  * <p>A proxy class has the following properties:
  *
  * <ul>
- * <li>Proxy classes are public, final, and not abstract.
+ * <li>Proxy classes are <em>public, final, and not abstract</em> if
+ * all proxy interfaces are public.</li>
+ *
+ * <li>Proxy classes are <em>non-public, final, and not abstract</em> if
+ * any of the proxy interfaces is non-public.</li>
  *
  * <li>The unqualified name of a proxy class is unspecified.  The space
  * of class names that begin with the string {@code "$Proxy"}
@@ -271,76 +274,17 @@
      * @param   h the invocation handler for this proxy instance
      */
     protected Proxy(InvocationHandler h) {
-        doNewInstanceCheck();
         this.h = h;
     }
 
-    private static class ProxyAccessHelper {
-        // The permission is implementation specific.
-        static final Permission PROXY_PERMISSION =
-            new ReflectPermission("proxyConstructorNewInstance");
-        // These system properties are defined to provide a short-term
-        // workaround if customers need to disable the new security checks.
-        static final boolean allowNewInstance;
-        static final boolean allowNullLoader;
-        static {
-            allowNewInstance = getBooleanProperty("sun.reflect.proxy.allowsNewInstance");
-            allowNullLoader = getBooleanProperty("sun.reflect.proxy.allowsNullLoader");
-        }
-
-        private static boolean getBooleanProperty(final String key) {
-            String s = AccessController.doPrivileged(new PrivilegedAction<String>() {
-                public String run() {
-                    return System.getProperty(key);
-                }
-            });
-            return Boolean.valueOf(s);
-        }
-
-        static boolean needsNewInstanceCheck(Class<?> proxyClass) {
-            if (!Proxy.isProxyClass(proxyClass) || allowNewInstance) {
-                return false;
-            }
-
-            if (proxyClass.getName().startsWith(ReflectUtil.PROXY_PACKAGE + ".")) {
-                // all proxy interfaces are public
-                return false;
-            }
-            for (Class<?> intf : proxyClass.getInterfaces()) {
-                if (!Modifier.isPublic(intf.getModifiers())) {
-                    return true;
-                }
-            }
-            return false;
-        }
-    }
-
-    /*
-     * Access check on a proxy class that implements any non-public interface.
-     *
-     * @throws  SecurityException if a security manager exists, and
-     *          the caller does not have the permission.
-     */
-    private void doNewInstanceCheck() {
-        SecurityManager sm = System.getSecurityManager();
-        Class<?> proxyClass = this.getClass();
-        if (sm != null && ProxyAccessHelper.needsNewInstanceCheck(proxyClass)) {
-            try {
-                sm.checkPermission(ProxyAccessHelper.PROXY_PERMISSION);
-            } catch (SecurityException e) {
-                throw new SecurityException("Not allowed to construct a Proxy "
-                        + "instance that implements a non-public interface", e);
-            }
-        }
-    }
-
     /**
      * Returns the {@code java.lang.Class} object for a proxy class
      * given a class loader and an array of interfaces.  The proxy class
      * will be defined by the specified class loader and will implement
-     * all of the supplied interfaces.  If a proxy class for the same
-     * permutation of interfaces has already been defined by the class
-     * loader, then the existing proxy class will be returned; otherwise,
+     * all of the supplied interfaces.  If any of the given interfaces
+     * is non-public, the proxy class will be non-public. If a proxy class
+     * for the same permutation of interfaces has already been defined by the
+     * class loader, then the existing proxy class will be returned; otherwise,
      * a proxy class for those interfaces will be generated dynamically
      * and defined by the class loader.
      *
@@ -405,31 +349,40 @@
      * @throws  IllegalArgumentException if any of the restrictions on the
      *          parameters that may be passed to {@code getProxyClass}
      *          are violated
+     * @throws  SecurityException if a security manager, <em>s</em>, is present
+     *          and any of the following conditions is met:
+     *          <ul>
+     *             <li> the given {@code loader} is {@code null} and
+     *             the caller's class loader is not {@code null} and the
+     *             invocation of {@link SecurityManager#checkPermission
+     *             s.checkPermission} with
+     *             {@code RuntimePermission("getClassLoader")} permission
+     *             denies access.</li>
+     *             <li> the caller's class loader is not the same as or an
+     *             ancestor of the class loader for the current class and
+     *             invocation of {@link SecurityManager#checkPackageAccess
+     *             s.checkPackageAccess()} denies access to any one of the
+     *             given proxy interfaces.</li>
+     *          </ul>
+
      * @throws  NullPointerException if the {@code interfaces} array
      *          argument or any of its elements are {@code null}
      */
+    @CallerSensitive
     public static Class<?> getProxyClass(ClassLoader loader,
                                          Class<?>... interfaces)
         throws IllegalArgumentException
     {
-        return getProxyClass0(loader, interfaces); // stack walk magic: do not refactor
-    }
-
-    private static void checkProxyLoader(ClassLoader ccl,
-                                         ClassLoader loader)
-    {
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
-            if (loader == null && ccl != null) {
-                if (!ProxyAccessHelper.allowNullLoader) {
-                    sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
-                }
-            }
+            checkProxyAccess(Reflection.getCallerClass(), loader, interfaces);
         }
+
+        return getProxyClass0(loader, interfaces);
     }
 
     /*
-     * Generate a proxy class (caller-sensitive).
+     * Check permissions required to create a Proxy class.
      *
      * To define a proxy class, it performs the access checks as in
      * Class.forName (VM will invoke ClassLoader.checkPackageAccess):
@@ -446,17 +399,26 @@
      * will throw IllegalAccessError when the generated proxy class is
      * being defined via the defineClass0 method.
      */
-    private static Class<?> getProxyClass0(ClassLoader loader,
-                                           Class<?>... interfaces) {
+    private static void checkProxyAccess(Class<?> caller,
+                                         ClassLoader loader,
+                                         Class<?>... interfaces)
+    {
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
-            final int CALLER_FRAME = 3; // 0: Reflection, 1: getProxyClass0 2: Proxy 3: caller
-            final Class<?> caller = Reflection.getCallerClass(CALLER_FRAME);
-            final ClassLoader ccl = caller.getClassLoader();
-            checkProxyLoader(ccl, loader);
+            ClassLoader ccl = caller.getClassLoader();
+            if (VM.isSystemDomainLoader(loader) && !VM.isSystemDomainLoader(ccl)) {
+                sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
+            }
             ReflectUtil.checkProxyPackageAccess(ccl, interfaces);
         }
+    }
 
+    /**
+     * Generate a proxy class.  Must call the checkProxyAccess method
+     * to perform permission checks before calling this.
+     */
+    private static Class<?> getProxyClass0(ClassLoader loader,
+                                           Class<?>... interfaces) {
         if (interfaces.length > 65535) {
             throw new IllegalArgumentException("interface limit exceeded");
         }
@@ -587,6 +549,7 @@
 
         try {
             String proxyPkg = null;     // package to define proxy class in
+            int accessFlags = Modifier.PUBLIC | Modifier.FINAL;
 
             /*
              * Record the package of a non-public proxy interface so that the
@@ -596,6 +559,7 @@
             for (int i = 0; i < interfaces.length; i++) {
                 int flags = interfaces[i].getModifiers();
                 if (!Modifier.isPublic(flags)) {
+                    accessFlags = Modifier.FINAL;
                     String name = interfaces[i].getName();
                     int n = name.lastIndexOf('.');
                     String pkg = ((n == -1) ? "" : name.substring(0, n + 1));
@@ -631,7 +595,7 @@
                  * Generate the specified proxy class.
                  */
                 byte[] proxyClassFile = ProxyGenerator.generateProxyClass(
-                    proxyName, interfaces);
+                    proxyName, interfaces, accessFlags);
                 try {
                     proxyClass = defineClass0(loader, proxyName,
                         proxyClassFile, 0, proxyClassFile.length);
@@ -672,12 +636,7 @@
     /**
      * Returns an instance of a proxy class for the specified interfaces
      * that dispatches method invocations to the specified invocation
-     * handler.  This method is equivalent to:
-     * <pre>
-     *     Proxy.getProxyClass(loader, interfaces).
-     *         getConstructor(new Class[] { InvocationHandler.class }).
-     *         newInstance(new Object[] { handler });
-     * </pre>
+     * handler.
      *
      * <p>{@code Proxy.newProxyInstance} throws
      * {@code IllegalArgumentException} for the same reasons that
@@ -693,11 +652,33 @@
      * @throws  IllegalArgumentException if any of the restrictions on the
      *          parameters that may be passed to {@code getProxyClass}
      *          are violated
+     * @throws  SecurityException if a security manager, <em>s</em>, is present
+     *          and any of the following conditions is met:
+     *          <ul>
+     *          <li> the given {@code loader} is {@code null} and
+     *               the caller's class loader is not {@code null} and the
+     *               invocation of {@link SecurityManager#checkPermission
+     *               s.checkPermission} with
+     *               {@code RuntimePermission("getClassLoader")} permission
+     *               denies access;</li>
+     *          <li> the caller's class loader is not the same as or an
+     *               ancestor of the class loader for the current class and
+     *               invocation of {@link SecurityManager#checkPackageAccess
+     *               s.checkPackageAccess()} denies access to any one of the
+     *               given proxy interfaces.</li>
+     *          <li> any of the given proxy interfaces is non-public and the
+     *               caller class is not in the same {@linkplain Package runtime package}
+     *               as the non-public interface and the invocation of
+     *               {@link SecurityManager#checkPermission s.checkPermission} with
+     *               {@code ReflectPermission("newProxyInPackage.{package name}")}
+     *               permission denies access.</li>
+     *          </ul>
      * @throws  NullPointerException if the {@code interfaces} array
      *          argument or any of its elements are {@code null}, or
      *          if the invocation handler, {@code h}, is
      *          {@code null}
      */
+    @CallerSensitive
     public static Object newProxyInstance(ClassLoader loader,
                                           Class<?>[] interfaces,
                                           InvocationHandler h)
@@ -707,34 +688,75 @@
             throw new NullPointerException();
         }
 
+        final SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            checkProxyAccess(Reflection.getCallerClass(), loader, interfaces);
+        }
+
         /*
          * Look up or generate the designated proxy class.
          */
-        Class<?> cl = getProxyClass0(loader, interfaces); // stack walk magic: do not refactor
+        Class<?> cl = getProxyClass0(loader, interfaces);
 
         /*
          * Invoke its constructor with the designated invocation handler.
          */
         try {
+            if (sm != null) {
+                checkNewProxyPermission(Reflection.getCallerClass(), cl);
+            }
+
             final Constructor<?> cons = cl.getConstructor(constructorParams);
             final InvocationHandler ih = h;
-            SecurityManager sm = System.getSecurityManager();
-            if (sm != null && ProxyAccessHelper.needsNewInstanceCheck(cl)) {
-                // create proxy instance with doPrivilege as the proxy class may
-                // implement non-public interfaces that requires a special permission
-                return AccessController.doPrivileged(new PrivilegedAction<Object>() {
-                    public Object run() {
-                        return newInstance(cons, ih);
+            if (!Modifier.isPublic(cl.getModifiers())) {
+                AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                    public Void run() {
+                        cons.setAccessible(true);
+                        return null;
                     }
                 });
+            }
+            return cons.newInstance(new Object[]{h});
+        } catch (IllegalAccessException|InstantiationException e) {
+            throw new InternalError(e.toString(), e);
+        } catch (InvocationTargetException e) {
+            Throwable t = e.getCause();
+            if (t instanceof RuntimeException) {
+                throw (RuntimeException) t;
             } else {
-                return newInstance(cons, ih);
+                throw new InternalError(t.toString(), t);
             }
         } catch (NoSuchMethodException e) {
             throw new InternalError(e.toString(), e);
         }
     }
 
+    private static void checkNewProxyPermission(Class<?> caller, Class<?> proxyClass) {
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            String pcn = proxyClass.getName();
+            if (pcn.startsWith(ReflectUtil.PROXY_PACKAGE + ".")) {
+                // all proxy interfaces are public
+                return;
+            }
+
+            ClassLoader ccl = caller.getClassLoader();
+            ClassLoader pcl = proxyClass.getClassLoader();
+
+            // do permission check if the caller is in a different runtime package
+            // of the proxy class
+            int n = pcn.lastIndexOf('.');
+            String pkg = (n == -1) ? "" : pcn.substring(0, n);
+
+            n = caller.getName().lastIndexOf('.');
+            String callerPkg = (n == -1) ? "" : caller.getName().substring(0, n);
+
+            if (pcl != ccl || !pkg.equals(callerPkg)) {
+                sm.checkPermission(new ReflectPermission("newProxyInPackage." + pkg));
+            }
+        }
+    }
+
     private static Object newInstance(Constructor<?> cons, InvocationHandler h) {
         try {
             return cons.newInstance(new Object[] {h} );
--- a/src/share/classes/java/lang/reflect/ReflectPermission.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/lang/reflect/ReflectPermission.java	Wed Apr 17 21:48:04 2013 -0700
@@ -26,12 +26,7 @@
 package java.lang.reflect;
 
 /**
- * The Permission class for reflective operations.  A
- * ReflectPermission is a <em>named permission</em> and has no
- * actions.  The only name currently defined is {@code suppressAccessChecks},
- * which allows suppressing the standard Java language access checks
- * -- for public, default (package) access, protected, and private
- * members -- performed by reflected objects at their point of use.
+ * The Permission class for reflective operations.
  * <P>
  * The following table
  * provides a summary description of what the permission allows,
@@ -47,11 +42,21 @@
  *
  * <tr>
  *   <td>suppressAccessChecks</td>
- *   <td>ability to access
- * fields and invoke methods in a class. Note that this includes
- * not only public, but protected and private fields and methods as well.</td>
+ *   <td>ability to suppress the standard Java language access checks
+ *       on fields and methods in a class; allow access not only public members
+ *       but also allow access to default (package) access, protected,
+ *       and private members.</td>
  *   <td>This is dangerous in that information (possibly confidential) and
- * methods normally unavailable would be accessible to malicious code.</td>
+ *       methods normally unavailable would be accessible to malicious code.</td>
+ * </tr>
+ * <tr>
+ *   <td>newProxyInPackage.{package name}</td>
+ *   <td>ability to create a proxy instance in the specified package of which
+ *       the non-public interface that the proxy class implements.</td>
+ *   <td>This gives code access to classes in packages to which it normally
+ *       does not have access and the dynamic proxy class is in the system
+ *       protection domain. Malicious code may use these classes to
+ *       help in its attempt to compromise security in the system.</td>
  * </tr>
  *
  * </table>
@@ -63,6 +68,7 @@
  * @see Field#set
  * @see Method#invoke
  * @see Constructor#newInstance
+ * @see Proxy#newProxyInstance
  *
  * @since 1.2
  */
--- a/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -122,7 +122,7 @@
      * not connected already.
      */
     protected void disconnect() {
-        disconnect0(connectedAddress.family);
+        disconnect0(connectedAddress.holder().getFamily());
         connected = false;
         connectedAddress = null;
         connectedPort = -1;
--- a/src/share/classes/java/net/Inet4Address.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/net/Inet4Address.java	Wed Apr 17 21:48:04 2013 -0700
@@ -100,27 +100,28 @@
 
     Inet4Address() {
         super();
-        hostName = null;
-        address = 0;
-        family = IPv4;
+        holder().hostName = null;
+        holder().address = 0;
+        holder().family = IPv4;
     }
 
     Inet4Address(String hostName, byte addr[]) {
-        this.hostName = hostName;
-        this.family = IPv4;
+        holder().hostName = hostName;
+        holder().family = IPv4;
         if (addr != null) {
             if (addr.length == INADDRSZ) {
-                address  = addr[3] & 0xFF;
+                int address  = addr[3] & 0xFF;
                 address |= ((addr[2] << 8) & 0xFF00);
                 address |= ((addr[1] << 16) & 0xFF0000);
                 address |= ((addr[0] << 24) & 0xFF000000);
+                holder().address = address;
             }
         }
     }
     Inet4Address(String hostName, int address) {
-        this.hostName = hostName;
-        this.family = IPv4;
-        this.address = address;
+        holder().hostName = hostName;
+        holder().family = IPv4;
+        holder().address = address;
     }
 
     /**
@@ -134,8 +135,8 @@
     private Object writeReplace() throws ObjectStreamException {
         // will replace the to be serialized 'this' object
         InetAddress inet = new InetAddress();
-        inet.hostName = this.hostName;
-        inet.address = this.address;
+        inet.holder().hostName = holder().getHostName();
+        inet.holder().address = holder().getAddress();
 
         /**
          * Prior to 1.4 an InetAddress was created with a family
@@ -143,7 +144,7 @@
          * For compatibility reasons we must therefore write the
          * the InetAddress with this family.
          */
-        inet.family = 2;
+        inet.holder().family = 2;
 
         return inet;
     }
@@ -157,7 +158,7 @@
      * @since   JDK1.1
      */
     public boolean isMulticastAddress() {
-        return ((address & 0xf0000000) == 0xe0000000);
+        return ((holder().getAddress() & 0xf0000000) == 0xe0000000);
     }
 
     /**
@@ -167,7 +168,7 @@
      * @since 1.4
      */
     public boolean isAnyLocalAddress() {
-        return address == 0;
+        return holder().getAddress() == 0;
     }
 
     /**
@@ -195,6 +196,7 @@
         // defined in "Documenting Special Use IPv4 Address Blocks
         // that have been Registered with IANA" by Bill Manning
         // draft-manning-dsua-06.txt
+        int address = holder().getAddress();
         return (((address >>> 24) & 0xFF) == 169)
             && (((address >>> 16) & 0xFF) == 254);
     }
@@ -211,6 +213,7 @@
         // 10/8 prefix
         // 172.16/12 prefix
         // 192.168/16 prefix
+        int address = holder().getAddress();
         return (((address >>> 24) & 0xFF) == 10)
             || ((((address >>> 24) & 0xFF) == 172)
                 && (((address >>> 16) & 0xF0) == 16))
@@ -257,6 +260,7 @@
      */
     public boolean isMCLinkLocal() {
         // 224.0.0/24 prefix and ttl == 1
+        int address = holder().getAddress();
         return (((address >>> 24) & 0xFF) == 224)
             && (((address >>> 16) & 0xFF) == 0)
             && (((address >>> 8) & 0xFF) == 0);
@@ -272,6 +276,7 @@
      */
     public boolean isMCSiteLocal() {
         // 239.255/16 prefix or ttl < 32
+        int address = holder().getAddress();
         return (((address >>> 24) & 0xFF) == 239)
             && (((address >>> 16) & 0xFF) == 255);
     }
@@ -287,6 +292,7 @@
      */
     public boolean isMCOrgLocal() {
         // 239.192 - 239.195
+        int address = holder().getAddress();
         return (((address >>> 24) & 0xFF) == 239)
             && (((address >>> 16) & 0xFF) >= 192)
             && (((address >>> 16) & 0xFF) <= 195);
@@ -300,6 +306,7 @@
      * @return  the raw IP address of this object.
      */
     public byte[] getAddress() {
+        int address = holder().getAddress();
         byte[] addr = new byte[INADDRSZ];
 
         addr[0] = (byte) ((address >>> 24) & 0xFF);
@@ -325,7 +332,7 @@
      * @return  a hash code value for this IP address.
      */
     public int hashCode() {
-        return address;
+        return holder().getAddress();
     }
 
     /**
@@ -346,7 +353,7 @@
      */
     public boolean equals(Object obj) {
         return (obj != null) && (obj instanceof Inet4Address) &&
-            (((InetAddress)obj).address == address);
+            (((InetAddress)obj).holder().getAddress() == holder().getAddress());
     }
 
     // Utilities
--- a/src/share/classes/java/net/Inet4AddressImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/net/Inet4AddressImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -40,7 +40,7 @@
     public synchronized InetAddress anyLocalAddress() {
         if (anyLocalAddress == null) {
             anyLocalAddress = new Inet4Address(); // {0x00,0x00,0x00,0x00}
-            anyLocalAddress.hostName = "0.0.0.0";
+            anyLocalAddress.holder().hostName = "0.0.0.0";
         }
         return anyLocalAddress;
     }
--- a/src/share/classes/java/net/Inet6Address.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/net/Inet6Address.java	Wed Apr 17 21:48:04 2013 -0700
@@ -210,18 +210,18 @@
 
     Inet6Address() {
         super();
-        hostName = null;
+        holder().hostName = null;
         ipaddress = new byte[INADDRSZ];
-        family = IPv6;
+        holder().family = IPv6;
     }
 
     /* checking of value for scope_id should be done by caller
      * scope_id must be >= 0, or -1 to indicate not being set
      */
     Inet6Address(String hostName, byte addr[], int scope_id) {
-        this.hostName = hostName;
+        holder().hostName = hostName;
         if (addr.length == INADDRSZ) { // normal IPv6 address
-            family = IPv6;
+            holder().family = IPv6;
             ipaddress = addr.clone();
         }
         if (scope_id >= 0) {
@@ -335,9 +335,9 @@
     private void initif(String hostName, byte addr[],NetworkInterface nif)
         throws UnknownHostException
     {
-        this.hostName = hostName;
+        holder().hostName = hostName;
         if (addr.length == INADDRSZ) { // normal IPv6 address
-            family = IPv6;
+            holder().family = IPv6;
             ipaddress = addr.clone();
         }
         if (nif != null) {
@@ -420,6 +420,11 @@
      */
     private void readObject(ObjectInputStream s)
         throws IOException, ClassNotFoundException {
+
+        if (getClass().getClassLoader() != null) {
+            throw new SecurityException ("invalid address type");
+        }
+
         s.defaultReadObject();
 
         if (ifname != null && !ifname.equals("")) {
@@ -447,7 +452,7 @@
                                              ipaddress.length);
         }
 
-        if (family != IPv6) {
+        if (holder().getFamily() != IPv6) {
             throw new InvalidObjectException("invalid address family type");
         }
     }
--- a/src/share/classes/java/net/Inet6AddressImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/net/Inet6AddressImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -81,7 +81,7 @@
         if (anyLocalAddress == null) {
             if (InetAddress.preferIPv6Address) {
                 anyLocalAddress = new Inet6Address();
-                anyLocalAddress.hostName = "::";
+                anyLocalAddress.holder().hostName = "::";
             } else {
                 anyLocalAddress = (new Inet4AddressImpl()).anyLocalAddress();
             }
--- a/src/share/classes/java/net/InetAddress.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/net/InetAddress.java	Wed Apr 17 21:48:04 2013 -0700
@@ -35,8 +35,12 @@
 import java.util.ServiceLoader;
 import java.security.AccessController;
 import java.io.ObjectStreamException;
+import java.io.ObjectStreamField;
 import java.io.IOException;
 import java.io.ObjectInputStream;
+import java.io.ObjectInputStream.GetField;
+import java.io.ObjectOutputStream;
+import java.io.ObjectOutputStream.PutField;
 import sun.security.action.*;
 import sun.net.InetAddressCachePolicy;
 import sun.net.util.IPAddressUtil;
@@ -199,25 +203,48 @@
     /* Specify address family preference */
     static transient boolean preferIPv6Address = false;
 
-    /**
-     * @serial
-     */
-    String hostName;
+    static class InetAddressHolder {
+
+        InetAddressHolder() {}
+
+        InetAddressHolder(String hostName, int address, int family) {
+            this.hostName = hostName;
+            this.address = address;
+            this.family = family;
+        }
+
+        String hostName;
+
+        String getHostName() {
+            return hostName;
+        }
+
+        /**
+         * Holds a 32-bit IPv4 address.
+         */
+        int address;
 
-    /**
-     * Holds a 32-bit IPv4 address.
-     *
-     * @serial
-     */
-    int address;
+        int getAddress() {
+            return address;
+        }
+
+        /**
+         * Specifies the address family type, for instance, '1' for IPv4
+         * addresses, and '2' for IPv6 addresses.
+         */
+        int family;
 
-    /**
-     * Specifies the address family type, for instance, '1' for IPv4
-     * addresses, and '2' for IPv6 addresses.
-     *
-     * @serial
-     */
-    int family;
+        int getFamily() {
+            return family;
+        }
+    }
+
+    /* Used to store the serializable fields of InetAddress */
+    private final transient InetAddressHolder holder;
+
+    InetAddressHolder holder() {
+        return holder;
+    }
 
     /* Used to store the name service provider */
     private static List<NameService> nameServices = null;
@@ -251,6 +278,7 @@
      * put in the address cache, since it is not created by name.
      */
     InetAddress() {
+        holder = new InetAddressHolder();
     }
 
     /**
@@ -263,7 +291,7 @@
      */
     private Object readResolve() throws ObjectStreamException {
         // will replace the deserialized 'this' object
-        return new Inet4Address(this.hostName, this.address);
+        return new Inet4Address(holder().getHostName(), holder().getAddress());
     }
 
     /**
@@ -500,10 +528,10 @@
      * @see SecurityManager#checkConnect
      */
     String getHostName(boolean check) {
-        if (hostName == null) {
-            hostName = InetAddress.getHostFromNameService(this, check);
+        if (holder().getHostName() == null) {
+            holder().hostName = InetAddress.getHostFromNameService(this, check);
         }
-        return hostName;
+        return holder().getHostName();
     }
 
     /**
@@ -666,6 +694,7 @@
      * @return  a string representation of this IP address.
      */
     public String toString() {
+        String hostName = holder().getHostName();
         return ((hostName != null) ? hostName : "")
             + "/" + getHostAddress();
     }
@@ -1522,14 +1551,58 @@
         }
     }
 
+    private static final long FIELDS_OFFSET;
+    private static final sun.misc.Unsafe UNSAFE;
+
+    static {
+        try {
+            sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe();
+            FIELDS_OFFSET = unsafe.objectFieldOffset(
+                InetAddress.class.getDeclaredField("holder")
+            );
+            UNSAFE = unsafe;
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
+    }
+
     private void readObject (ObjectInputStream s) throws
                          IOException, ClassNotFoundException {
-        s.defaultReadObject ();
         if (getClass().getClassLoader() != null) {
-            hostName = null;
-            address = 0;
             throw new SecurityException ("invalid address type");
         }
+        GetField gf = s.readFields();
+        String host = (String)gf.get("hostName", null);
+        int address= gf.get("address", 0);
+        int family= gf.get("family", 0);
+        InetAddressHolder h = new InetAddressHolder(host, address, family);
+        UNSAFE.putObject(this, FIELDS_OFFSET, h);
+    }
+
+    /* needed because the serializable fields no longer exist */
+
+    /**
+     * @serialField hostName String
+     * @serialField address int
+     * @serialField family int
+     */
+    private static final ObjectStreamField[] serialPersistentFields = {
+        new ObjectStreamField("hostName", String.class),
+        new ObjectStreamField("address", int.class),
+        new ObjectStreamField("family", int.class),
+    };
+
+    private void writeObject (ObjectOutputStream s) throws
+                        IOException {
+        if (getClass().getClassLoader() != null) {
+            throw new SecurityException ("invalid address type");
+        }
+        PutField pf = s.putFields();
+        pf.put("hostName", holder().getHostName());
+        pf.put("address", holder().getAddress());
+        pf.put("family", holder().getFamily());
+        s.writeFields();
+        s.flush();
     }
 }
 
--- a/src/share/classes/java/net/InetSocketAddress.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/net/InetSocketAddress.java	Wed Apr 17 21:48:04 2013 -0700
@@ -87,8 +87,8 @@
             if (hostname != null)
                 return hostname;
             if (addr != null) {
-                if (addr.hostName != null)
-                    return addr.hostName;
+                if (addr.holder().getHostName() != null)
+                    return addr.holder().getHostName();
                 else
                     return addr.getHostAddress();
             }
--- a/src/share/classes/java/nio/file/attribute/FileTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/nio/file/attribute/FileTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -25,12 +25,10 @@
 
 package java.nio.file.attribute;
 
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.Date;
-import java.util.Formatter;
-import java.util.Locale;
-import java.util.TimeZone;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.ZoneOffset;
+import java.util.Objects;
 import java.util.concurrent.TimeUnit;
 
 /**
@@ -51,14 +49,22 @@
     implements Comparable<FileTime>
 {
     /**
+     * The unit of granularity to interpret the value. Null if
+     * this {@code FileTime} is converted from an {@code Instant},
+     * the {@code value} and {@code unit} pair will not be used
+     * in this scenario.
+     */
+    private final TimeUnit unit;
+
+    /**
      * The value since the epoch; can be negative.
      */
     private final long value;
 
     /**
-     * The unit of granularity to interpret the value.
+     * The value as Instant (created lazily, if not from an instant)
      */
-    private final TimeUnit unit;
+    private Instant instant;
 
     /**
      * The value return by toString (created lazily)
@@ -66,27 +72,12 @@
     private String valueAsString;
 
     /**
-     * The value in days and excess nanos (created lazily)
-     */
-    private DaysAndNanos daysAndNanos;
-
-    /**
-     * Returns a DaysAndNanos object representing the value.
-     */
-    private DaysAndNanos asDaysAndNanos() {
-        if (daysAndNanos == null)
-            daysAndNanos = new DaysAndNanos(value, unit);
-        return daysAndNanos;
-    }
-
-    /**
      * Initializes a new instance of this class.
      */
-    private FileTime(long value, TimeUnit unit) {
-        if (unit == null)
-            throw new NullPointerException();
+    private FileTime(long value, TimeUnit unit, Instant instant) {
         this.value = value;
         this.unit = unit;
+        this.instant = instant;
     }
 
     /**
@@ -102,7 +93,8 @@
      * @return  a {@code FileTime} representing the given value
      */
     public static FileTime from(long value, TimeUnit unit) {
-        return new FileTime(value, unit);
+        Objects.requireNonNull(unit, "unit");
+        return new FileTime(value, unit, null);
     }
 
     /**
@@ -115,7 +107,22 @@
      * @return  a {@code FileTime} representing the given value
      */
     public static FileTime fromMillis(long value) {
-        return new FileTime(value, TimeUnit.MILLISECONDS);
+        return new FileTime(value, TimeUnit.MILLISECONDS, null);
+    }
+
+    /**
+     * Returns a {@code FileTime} representing the same point of time value
+     * on the time-line as the provided {@code Instant} object.
+     *
+     * @param   instant
+     *          the instant to convert
+     * @return  a {@code FileTime} representing the same point on the time-line
+     *          as the provided instant
+     * @since 1.8
+     */
+    public static FileTime from(Instant instant) {
+        Objects.requireNonNull(instant, "instant");
+        return new FileTime(0, null, instant);
     }
 
     /**
@@ -132,7 +139,22 @@
      *          since the epoch (1970-01-01T00:00:00Z); can be negative
      */
     public long to(TimeUnit unit) {
-        return unit.convert(this.value, this.unit);
+        Objects.requireNonNull(unit, "unit");
+        if (this.unit != null) {
+            return unit.convert(this.value, this.unit);
+        } else {
+            long secs = unit.convert(instant.getEpochSecond(), TimeUnit.SECONDS);
+            if (secs == Long.MIN_VALUE || secs == Long.MAX_VALUE) {
+                return secs;
+            }
+            long nanos = unit.convert(instant.getNano(), TimeUnit.NANOSECONDS);
+            long r = secs + nanos;
+            // Math.addExact() variant
+            if (((secs ^ r) & (nanos ^ r)) < 0) {
+                return (secs < 0) ? Long.MIN_VALUE : Long.MAX_VALUE;
+            }
+            return r;
+        }
     }
 
     /**
@@ -145,7 +167,110 @@
      * @return  the value in milliseconds, since the epoch (1970-01-01T00:00:00Z)
      */
     public long toMillis() {
-        return unit.toMillis(value);
+        if (unit != null) {
+            return unit.toMillis(value);
+        } else {
+            long secs = instant.getEpochSecond();
+            int  nanos = instant.getNano();
+            // Math.multiplyExact() variant
+            long r = secs * 1000;
+            long ax = Math.abs(secs);
+            if (((ax | 1000) >>> 31 != 0)) {
+                if ((r / 1000) != secs) {
+                    return (secs < 0) ? Long.MIN_VALUE : Long.MAX_VALUE;
+                }
+            }
+            return r + nanos / 1000_000;
+        }
+    }
+
+    /**
+     * Time unit constants for conversion.
+     */
+    private static final long HOURS_PER_DAY      = 24L;
+    private static final long MINUTES_PER_HOUR   = 60L;
+    private static final long SECONDS_PER_MINUTE = 60L;
+    private static final long SECONDS_PER_HOUR   = SECONDS_PER_MINUTE * MINUTES_PER_HOUR;
+    private static final long SECONDS_PER_DAY    = SECONDS_PER_HOUR * HOURS_PER_DAY;
+    private static final long MILLIS_PER_SECOND  = 1000L;
+    private static final long MICROS_PER_SECOND  = 1000_000L;
+    private static final long NANOS_PER_SECOND   = 1000_000_000L;
+    private static final int  NANOS_PER_MILLI    = 1000_000;
+    private static final int  NANOS_PER_MICRO    = 1000;
+    // The epoch second of Instant.MIN.
+    private static final long MIN_SECOND = -31557014167219200L;
+    // The epoch second of Instant.MAX.
+    private static final long MAX_SECOND = 31556889864403199L;
+
+    /*
+     * Scale d by m, checking for overflow.
+     */
+    private static long scale(long d, long m, long over) {
+        if (d >  over) return Long.MAX_VALUE;
+        if (d < -over) return Long.MIN_VALUE;
+        return d * m;
+    }
+
+    /**
+     * Converts this {@code FileTime} object to an {@code Instant}.
+     *
+     * <p> The conversion creates an {@code Instant} that represents the
+     * same point on the time-line as this {@code FileTime}.
+     *
+     * <p> {@code FileTime} can store points on the time-line further in the
+     * future and further in the past than {@code Instant}. Conversion
+     * from such further time points saturates to {@link Instant.MIN} if
+     * earlier than {@code Instant.MIN} or {@link Instant.MAX} if later
+     * than {@code Instant.MAX}.
+     *
+     * @return  an instant representing the same point on the time-line as
+     *          this {@code FileTime} object
+     * @since 1.8
+     */
+    public Instant toInstant() {
+        if (instant == null) {
+            long secs = 0L;
+            int nanos = 0;
+            switch (unit) {
+                case DAYS:
+                    secs = scale(value, SECONDS_PER_DAY,
+                                 Long.MAX_VALUE/SECONDS_PER_DAY);
+                    break;
+                case HOURS:
+                    secs = scale(value, SECONDS_PER_HOUR,
+                                 Long.MAX_VALUE/SECONDS_PER_HOUR);
+                    break;
+                case MINUTES:
+                    secs = scale(value, SECONDS_PER_MINUTE,
+                                 Long.MAX_VALUE/SECONDS_PER_MINUTE);
+                    break;
+                case SECONDS:
+                    secs = value;
+                    break;
+                case MILLISECONDS:
+                    secs = Math.floorDiv(value, MILLIS_PER_SECOND);
+                    nanos = (int)Math.floorMod(value, MILLIS_PER_SECOND)
+                            * NANOS_PER_MILLI;
+                    break;
+                case MICROSECONDS:
+                    secs = Math.floorDiv(value, MICROS_PER_SECOND);
+                    nanos = (int)Math.floorMod(value, MICROS_PER_SECOND)
+                            * NANOS_PER_MICRO;
+                    break;
+                case NANOSECONDS:
+                    secs = Math.floorDiv(value, NANOS_PER_SECOND);
+                    nanos = (int)Math.floorMod(value, NANOS_PER_SECOND);
+                    break;
+                default : throw new AssertionError("Unit not handled");
+            }
+            if (secs <= MIN_SECOND)
+                instant = Instant.MIN;
+            else if (secs >= MAX_SECOND)
+                instant = Instant.MAX;
+            else
+                instant = Instant.ofEpochSecond(secs, nanos);
+        }
+        return instant;
     }
 
     /**
@@ -176,8 +301,25 @@
      */
     @Override
     public int hashCode() {
-        // hashcode of days/nanos representation to satisfy contract with equals
-        return asDaysAndNanos().hashCode();
+        // hashcode of instant representation to satisfy contract with equals
+        return toInstant().hashCode();
+    }
+
+    private long toDays() {
+        if (unit != null) {
+            return unit.toDays(value);
+        } else {
+            return TimeUnit.SECONDS.toDays(toInstant().getEpochSecond());
+        }
+    }
+
+    private long toExcessNanos(long days) {
+        if (unit != null) {
+            return unit.toNanos(value - unit.convert(days, TimeUnit.DAYS));
+        } else {
+            return TimeUnit.SECONDS.toNanos(toInstant().getEpochSecond()
+                                            - TimeUnit.DAYS.toSeconds(days));
+        }
     }
 
     /**
@@ -194,14 +336,52 @@
     @Override
     public int compareTo(FileTime other) {
         // same granularity
-        if (unit == other.unit) {
-            return (value < other.value) ? -1 : (value == other.value ? 0 : 1);
+        if (unit != null && unit == other.unit) {
+            return Long.compare(value, other.value);
         } else {
-            // compare using days/nanos representation when unit differs
-            return asDaysAndNanos().compareTo(other.asDaysAndNanos());
+            // compare using instant representation when unit differs
+            long secs = toInstant().getEpochSecond();
+            long secsOther = other.toInstant().getEpochSecond();
+            int cmp = Long.compare(secs, secsOther);
+            if (cmp != 0) {
+                return cmp;
+            }
+            cmp = Long.compare(toInstant().getNano(), other.toInstant().getNano());
+            if (cmp != 0) {
+                return cmp;
+            }
+            if (secs != MAX_SECOND && secs != MIN_SECOND) {
+                return 0;
+            }
+            // if both this and other's Instant reps are MIN/MAX,
+            // use daysSinceEpoch and nanosOfDays, which will not
+            // saturate during calculation.
+            long days = toDays();
+            long daysOther = other.toDays();
+            if (days == daysOther) {
+                return Long.compare(toExcessNanos(days), other.toExcessNanos(daysOther));
+            }
+            return Long.compare(days, daysOther);
         }
     }
 
+    // days in a 400 year cycle = 146097
+    // days in a 10,000 year cycle = 146097 * 25
+    // seconds per day = 86400
+    private static final long DAYS_PER_10000_YEARS = 146097L * 25L;
+    private static final long SECONDS_PER_10000_YEARS = 146097L * 25L * 86400L;
+    private static final long SECONDS_0000_TO_1970 = ((146097L * 5L) - (30L * 365L + 7L)) * 86400L;
+
+    // append year/month/day/hour/minute/second/nano with width and 0 padding
+    private StringBuilder append(StringBuilder sb, int w, int d) {
+        while (w > 0) {
+            sb.append((char)(d/w + '0'));
+            d = d % w;
+            w /= 10;
+        }
+        return sb;
+    }
+
     /**
      * Returns the string representation of this {@code FileTime}. The string
      * is returned in the <a
@@ -229,135 +409,67 @@
      */
     @Override
     public String toString() {
-        String v = valueAsString;
-        if (v == null) {
-            // overflow saturates to Long.MIN_VALUE or Long.MAX_VALUE so this
-            // limits the range:
-            // [-292275056-05-16T16:47:04.192Z,292278994-08-17T07:12:55.807Z]
-            long ms = toMillis();
-
-            // nothing to do when seconds/minutes/hours/days
-            String fractionAsString = "";
-            if (unit.compareTo(TimeUnit.SECONDS) < 0) {
-                long fraction = asDaysAndNanos().fractionOfSecondInNanos();
-                if (fraction != 0L) {
-                    // fraction must be positive
-                    if (fraction < 0L) {
-                        final long MAX_FRACTION_PLUS_1 = 1000L * 1000L * 1000L;
-                        fraction += MAX_FRACTION_PLUS_1;
-                        if (ms != Long.MIN_VALUE) ms--;
-                    }
-
-                    // convert to String, adding leading zeros as required and
-                    // stripping any trailing zeros
-                    String s = Long.toString(fraction);
-                    int len = s.length();
-                    int width = 9 - len;
-                    StringBuilder sb = new StringBuilder(".");
-                    while (width-- > 0) {
-                        sb.append('0');
-                    }
-                    if (s.charAt(len-1) == '0') {
-                        // drop trailing zeros
-                        len--;
-                        while (s.charAt(len-1) == '0')
-                            len--;
-                        sb.append(s.substring(0, len));
-                    } else {
-                        sb.append(s);
-                    }
-                    fractionAsString = sb.toString();
+        if (valueAsString == null) {
+            long secs = 0L;
+            int  nanos = 0;
+            if (instant == null && unit.compareTo(TimeUnit.SECONDS) >= 0) {
+                secs = unit.toSeconds(value);
+            } else {
+                secs = toInstant().getEpochSecond();
+                nanos = toInstant().getNano();
+            }
+            LocalDateTime ldt;
+            int year = 0;
+            if (secs >= -SECONDS_0000_TO_1970) {
+                // current era
+                long zeroSecs = secs - SECONDS_PER_10000_YEARS + SECONDS_0000_TO_1970;
+                long hi = Math.floorDiv(zeroSecs, SECONDS_PER_10000_YEARS) + 1;
+                long lo = Math.floorMod(zeroSecs, SECONDS_PER_10000_YEARS);
+                ldt = LocalDateTime.ofEpochSecond(lo - SECONDS_0000_TO_1970, nanos, ZoneOffset.UTC);
+                year = ldt.getYear() +  (int)hi * 10000;
+            } else {
+                // before current era
+                long zeroSecs = secs + SECONDS_0000_TO_1970;
+                long hi = zeroSecs / SECONDS_PER_10000_YEARS;
+                long lo = zeroSecs % SECONDS_PER_10000_YEARS;
+                ldt = LocalDateTime.ofEpochSecond(lo - SECONDS_0000_TO_1970, nanos, ZoneOffset.UTC);
+                year = ldt.getYear() + (int)hi * 10000;
+            }
+            if (year <= 0) {
+                year = year - 1;
+            }
+            int fraction = ldt.getNano();
+            StringBuilder sb = new StringBuilder(64);
+            sb.append(year < 0 ? "-" : "");
+            year = Math.abs(year);
+            if (year < 10000) {
+                append(sb, 1000, Math.abs(year));
+            } else {
+                sb.append(String.valueOf(year));
+            }
+            sb.append('-');
+            append(sb, 10, ldt.getMonthValue());
+            sb.append('-');
+            append(sb, 10, ldt.getDayOfMonth());
+            sb.append('T');
+            append(sb, 10, ldt.getHour());
+            sb.append(':');
+            append(sb, 10, ldt.getMinute());
+            sb.append(':');
+            append(sb, 10, ldt.getSecond());
+            if (fraction != 0) {
+                sb.append('.');
+                // adding leading zeros and stripping any trailing zeros
+                int w = 100_000_000;
+                while (fraction % 10 == 0) {
+                    fraction /= 10;
+                    w /= 10;
                 }
+                append(sb, w, fraction);
             }
-
-            // create calendar to use with formatter.
-            GregorianCalendar cal =
-                new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
-            if (value < 0L)
-                cal.setGregorianChange(new Date(Long.MIN_VALUE));
-            cal.setTimeInMillis(ms);
-
-            // years are negative before common era
-            String sign = (cal.get(Calendar.ERA) == GregorianCalendar.BC) ? "-" : "";
-
-            // [-]YYYY-MM-DDThh:mm:ss[.s]Z
-            v = new Formatter(Locale.ROOT)
-                .format("%s%tFT%tR:%tS%sZ", sign, cal, cal, cal, fractionAsString)
-                .toString();
-            valueAsString = v;
+            sb.append('Z');
+            valueAsString = sb.toString();
         }
-        return v;
-    }
-
-    /**
-     * Represents a FileTime's value as two longs: the number of days since
-     * the epoch, and the excess (in nanoseconds). This is used for comparing
-     * values with different units of granularity.
-     */
-    private static class DaysAndNanos implements Comparable<DaysAndNanos> {
-        // constants for conversion
-        private static final long C0 = 1L;
-        private static final long C1 = C0 * 24L;
-        private static final long C2 = C1 * 60L;
-        private static final long C3 = C2 * 60L;
-        private static final long C4 = C3 * 1000L;
-        private static final long C5 = C4 * 1000L;
-        private static final long C6 = C5 * 1000L;
-
-        /**
-         * The value (in days) since the epoch; can be negative.
-         */
-        private final long days;
-
-        /**
-         * The excess (in nanoseconds); can be negative if days &lt;= 0.
-         */
-        private final long excessNanos;
-
-        /**
-         * Initializes a new instance of this class.
-         */
-        DaysAndNanos(long value, TimeUnit unit) {
-            long scale;
-            switch (unit) {
-                case DAYS         : scale = C0; break;
-                case HOURS        : scale = C1; break;
-                case MINUTES      : scale = C2; break;
-                case SECONDS      : scale = C3; break;
-                case MILLISECONDS : scale = C4; break;
-                case MICROSECONDS : scale = C5; break;
-                case NANOSECONDS  : scale = C6; break;
-                default : throw new AssertionError("Unit not handled");
-            }
-            this.days = unit.toDays(value);
-            this.excessNanos = unit.toNanos(value - (this.days * scale));
-        }
-
-        /**
-         * Returns the fraction of a second, in nanoseconds.
-         */
-        long fractionOfSecondInNanos() {
-            return excessNanos % (1000L * 1000L * 1000L);
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            return (obj instanceof DaysAndNanos) ?
-                compareTo((DaysAndNanos)obj) == 0 : false;
-        }
-
-        @Override
-        public int hashCode() {
-            return (int)(days ^ (days >>> 32) ^
-                         excessNanos ^ (excessNanos >>> 32));
-        }
-
-        @Override
-        public int compareTo(DaysAndNanos other) {
-            if (this.days != other.days)
-                return (this.days < other.days) ? -1 : 1;
-            return (this.excessNanos < other.excessNanos) ? -1 :
-                   (this.excessNanos == other.excessNanos) ? 0 : 1;
-        }
+        return valueAsString;
     }
 }
--- a/src/share/classes/java/rmi/server/LogStream.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/rmi/server/LogStream.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -120,6 +120,13 @@
      */
     @Deprecated
     public static synchronized void setDefaultStream(PrintStream newDefault) {
+        SecurityManager sm = System.getSecurityManager();
+
+        if (sm != null) {
+            sm.checkPermission(
+                new java.util.logging.LoggingPermission("control", null));
+        }
+
         defaultStream = newDefault;
     }
 
--- a/src/share/classes/java/security/AccessController.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/security/AccessController.java	Wed Apr 17 21:48:04 2013 -0700
@@ -26,6 +26,8 @@
 package java.security;
 
 import sun.security.util.Debug;
+import sun.reflect.CallerSensitive;
+import sun.reflect.Reflection;
 
 /**
  * <p> The AccessController class is used for access control operations
@@ -264,6 +266,7 @@
      * @see java.security.DomainCombiner
      */
 
+    @CallerSensitive
     public static native <T> T doPrivileged(PrivilegedAction<T> action);
 
     /**
@@ -288,14 +291,15 @@
      *
      * @since 1.6
      */
+    @CallerSensitive
     public static <T> T doPrivilegedWithCombiner(PrivilegedAction<T> action) {
-
         AccessControlContext acc = getStackAccessControlContext();
         if (acc == null) {
             return AccessController.doPrivileged(action);
         }
         DomainCombiner dc = acc.getAssignedCombiner();
-        return AccessController.doPrivileged(action, preserveCombiner(dc));
+        return AccessController.doPrivileged(action,
+                                             preserveCombiner(dc, Reflection.getCallerClass()));
     }
 
 
@@ -326,6 +330,7 @@
      * @see #doPrivileged(PrivilegedAction)
      * @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext)
      */
+    @CallerSensitive
     public static native <T> T doPrivileged(PrivilegedAction<T> action,
                                             AccessControlContext context);
 
@@ -353,6 +358,7 @@
      * @see #doPrivilegedWithCombiner(PrivilegedExceptionAction)
      * @see java.security.DomainCombiner
      */
+    @CallerSensitive
     public static native <T> T
         doPrivileged(PrivilegedExceptionAction<T> action)
         throws PrivilegedActionException;
@@ -383,34 +389,29 @@
      *
      * @since 1.6
      */
-    public static <T> T doPrivilegedWithCombiner
-        (PrivilegedExceptionAction<T> action) throws PrivilegedActionException {
-
+    @CallerSensitive
+    public static <T> T doPrivilegedWithCombiner(PrivilegedExceptionAction<T> action)
+        throws PrivilegedActionException
+    {
         AccessControlContext acc = getStackAccessControlContext();
         if (acc == null) {
             return AccessController.doPrivileged(action);
         }
         DomainCombiner dc = acc.getAssignedCombiner();
-        return AccessController.doPrivileged(action, preserveCombiner(dc));
+        return AccessController.doPrivileged(action,
+                                             preserveCombiner(dc, Reflection.getCallerClass()));
     }
 
     /**
      * preserve the combiner across the doPrivileged call
      */
-    private static AccessControlContext preserveCombiner
-                                        (DomainCombiner combiner) {
-
-        /**
-         * callerClass[0] = Reflection.getCallerClass
-         * callerClass[1] = AccessController.preserveCombiner
-         * callerClass[2] = AccessController.doPrivileged
-         * callerClass[3] = caller
-         */
-        final Class<?> callerClass = sun.reflect.Reflection.getCallerClass(3);
+    private static AccessControlContext preserveCombiner(DomainCombiner combiner,
+                                                         Class<?> caller)
+    {
         ProtectionDomain callerPd = doPrivileged
             (new PrivilegedAction<ProtectionDomain>() {
             public ProtectionDomain run() {
-                return callerClass.getProtectionDomain();
+                return caller.getProtectionDomain();
             }
         });
 
@@ -455,6 +456,7 @@
      * @see #doPrivileged(PrivilegedAction)
      * @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext)
      */
+    @CallerSensitive
     public static native <T> T
         doPrivileged(PrivilegedExceptionAction<T> action,
                      AccessControlContext context)
--- a/src/share/classes/java/security/SecureRandom.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/security/SecureRandom.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 package java.security;
 
 import java.util.*;
+import java.util.regex.*;
 
 import java.security.Provider.Service;
 
@@ -79,7 +80,7 @@
  *
  * Note: Depending on the implementation, the <code>generateSeed</code> and
  * <code>nextBytes</code> methods may block as entropy is being gathered,
- * for example, if they need to read from /dev/random on various unix-like
+ * for example, if they need to read from /dev/random on various Unix-like
  * operating systems.
  *
  * @see java.security.SecureRandomSpi
@@ -428,6 +429,7 @@
      *
      * @see #getSeed
      */
+    @Override
     public void setSeed(long seed) {
         /*
          * Ignore call from super constructor (as well as any other calls
@@ -450,7 +452,7 @@
      *
      * @param bytes the array to be filled in with random bytes.
      */
-
+    @Override
     synchronized public void nextBytes(byte[] bytes) {
         secureRandomSpi.engineNextBytes(bytes);
     }
@@ -469,14 +471,16 @@
      * @return an <code>int</code> containing the user-specified number
      * of pseudo-random bits (right justified, with leading zeros).
      */
+    @Override
     final protected int next(int numBits) {
         int numBytes = (numBits+7)/8;
         byte b[] = new byte[numBytes];
         int next = 0;
 
         nextBytes(b);
-        for (int i = 0; i < numBytes; i++)
+        for (int i = 0; i < numBytes; i++) {
             next = (next << 8) + (b[i] & 0xFF);
+        }
 
         return next >>> (numBytes*8 - numBits);
     }
@@ -499,8 +503,9 @@
      * @see #setSeed
      */
     public static byte[] getSeed(int numBytes) {
-        if (seedGenerator == null)
+        if (seedGenerator == null) {
             seedGenerator = new SecureRandom();
+        }
         return seedGenerator.generateSeed(numBytes);
     }
 
@@ -549,6 +554,104 @@
         return null;
     }
 
+    /*
+     * Lazily initialize since Pattern.compile() is heavy.
+     * Effective Java (2nd Edition), Item 71.
+     */
+    private static final class StrongPatternHolder {
+        /*
+         * Entries are alg:prov separated by ,
+         * Allow for prepended/appended whitespace between entries.
+         *
+         * Capture groups:
+         *     1 - alg
+         *     2 - :prov (optional)
+         *     3 - prov (optional)
+         *     4 - ,nextEntry (optional)
+         *     5 - nextEntry (optional)
+         */
+        private static Pattern pattern =
+            Pattern.compile(
+                "\\s*([\\S&&[^:,]]*)(\\:([\\S&&[^,]]*))?\\s*(\\,(.*))?");
+    }
+
+    /**
+     * Returns a {@code SecureRandom} object that was selected by using
+     * the algorithms/providers specified in the {@code
+     * securerandom.strongAlgorithms} Security property.
+     * <p>
+     * Some situations require strong random values, such as when
+     * creating high-value/long-lived secrets like RSA public/private
+     * keys.  To help guide applications in selecting a suitable strong
+     * {@code SecureRandom} implementation, Java distributions should
+     * include a list of known strong {@code SecureRandom}
+     * implementations in the {@code securerandom.strongAlgorithms}
+     * Security property.
+     *
+     * <pre>
+     *     SecureRandom sr = SecureRandom.getStrongSecureRandom();
+     *
+     *     if (sr == null) {
+     *         // Decide if this is a problem, and whether to recover.
+     *         sr = new SecureRandom();
+     *         if (!goodEnough(sr)) {
+     *             return;
+     *         }
+     *     }
+     *
+     *     keyPairGenerator.initialize(2048, sr);
+     * </pre>
+     *
+     * @return a strong {@code SecureRandom} implementation as indicated
+     * by the {@code securerandom.strongAlgorithms} Security property, or
+     * null if none are available.
+     *
+     * @see Security#getProperty(String)
+     *
+     * @since 1.8
+     */
+    public static SecureRandom getStrongSecureRandom() {
+
+        String property = AccessController.doPrivileged(
+            new PrivilegedAction<String>() {
+                @Override
+                public String run() {
+                    return Security.getProperty(
+                        "securerandom.strongAlgorithms");
+                }
+            });
+
+        if ((property == null) || (property.length() == 0)) {
+            return null;
+        }
+
+        String remainder = property;
+        while (remainder != null) {
+            Matcher m;
+            if ((m = StrongPatternHolder.pattern.matcher(
+                    remainder)).matches()) {
+
+                String alg = m.group(1);
+                String prov = m.group(3);
+
+                try {
+                    if (prov == null) {
+                        return SecureRandom.getInstance(alg);
+                    } else {
+                        return SecureRandom.getInstance(alg, prov);
+                    }
+                } catch (NoSuchAlgorithmException |
+                        NoSuchProviderException e) {
+                }
+                remainder = m.group(5);
+            } else {
+                remainder = null;
+            }
+        }
+
+        return null;
+    }
+
     // Declare serialVersionUID to be compatible with JDK1.1
     static final long serialVersionUID = 4940670005562187L;
 
--- a/src/share/classes/java/sql/DriverManager.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/sql/DriverManager.java	Wed Apr 17 21:48:04 2013 -0700
@@ -30,6 +30,7 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.concurrent.CopyOnWriteArrayList;
+import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
 
 
@@ -192,14 +193,11 @@
      * has been exceeded and has at least tried to cancel the
      * current database connection attempt
      */
+    @CallerSensitive
     public static Connection getConnection(String url,
         java.util.Properties info) throws SQLException {
 
-        // Gets the classloader of the code that called this method, may
-        // be null.
-        ClassLoader callerCL = DriverManager.getCallerClassLoader();
-
-        return (getConnection(url, info, callerCL));
+        return (getConnection(url, info, Reflection.getCallerClass()));
     }
 
     /**
@@ -226,14 +224,11 @@
      * has been exceeded and has at least tried to cancel the
      * current database connection attempt
      */
+    @CallerSensitive
     public static Connection getConnection(String url,
         String user, String password) throws SQLException {
         java.util.Properties info = new java.util.Properties();
 
-        // Gets the classloader of the code that called this method, may
-        // be null.
-        ClassLoader callerCL = DriverManager.getCallerClassLoader();
-
         if (user != null) {
             info.put("user", user);
         }
@@ -241,7 +236,7 @@
             info.put("password", password);
         }
 
-        return (getConnection(url, info, callerCL));
+        return (getConnection(url, info, Reflection.getCallerClass()));
     }
 
     /**
@@ -259,16 +254,12 @@
      * has been exceeded and has at least tried to cancel the
      * current database connection attempt
      */
+    @CallerSensitive
     public static Connection getConnection(String url)
         throws SQLException {
 
         java.util.Properties info = new java.util.Properties();
-
-        // Gets the classloader of the code that called this method, may
-        // be null.
-        ClassLoader callerCL = DriverManager.getCallerClassLoader();
-
-        return (getConnection(url, info, callerCL));
+        return (getConnection(url, info, Reflection.getCallerClass()));
     }
 
     /**
@@ -282,21 +273,20 @@
      * that can connect to the given URL
      * @exception SQLException if a database access error occurs
      */
+    @CallerSensitive
     public static Driver getDriver(String url)
         throws SQLException {
 
         println("DriverManager.getDriver(\"" + url + "\")");
 
-        // Gets the classloader of the code that called this method, may
-        // be null.
-        ClassLoader callerCL = DriverManager.getCallerClassLoader();
+        Class<?> callerClass = Reflection.getCallerClass();
 
         // Walk through the loaded registeredDrivers attempting to locate someone
         // who understands the given URL.
         for (DriverInfo aDriver : registeredDrivers) {
             // If the caller does not have permission to load the driver then
             // skip it.
-            if(isDriverAllowed(aDriver.driver, callerCL)) {
+            if(isDriverAllowed(aDriver.driver, callerClass)) {
                 try {
                     if(aDriver.driver.acceptsURL(url)) {
                         // Success!
@@ -350,20 +340,18 @@
      * @param driver the JDBC Driver to drop
      * @exception SQLException if a database access error occurs
      */
+    @CallerSensitive
     public static synchronized void deregisterDriver(Driver driver)
         throws SQLException {
         if (driver == null) {
             return;
         }
 
-        // Gets the classloader of the code that called this method,
-        // may be null.
-        ClassLoader callerCL = DriverManager.getCallerClassLoader();
         println("DriverManager.deregisterDriver: " + driver);
 
         DriverInfo aDriver = new DriverInfo(driver);
         if(registeredDrivers.contains(aDriver)) {
-            if (isDriverAllowed(driver, callerCL)) {
+            if (isDriverAllowed(driver, Reflection.getCallerClass())) {
                  registeredDrivers.remove(aDriver);
             } else {
                 // If the caller does not have permission to load the driver then
@@ -384,18 +372,17 @@
      *
      * @return the list of JDBC Drivers loaded by the caller's class loader
      */
+    @CallerSensitive
     public static java.util.Enumeration<Driver> getDrivers() {
         java.util.Vector<Driver> result = new java.util.Vector<>();
 
-        // Gets the classloader of the code that called this method, may
-        // be null.
-        ClassLoader callerCL = DriverManager.getCallerClassLoader();
+        Class<?> callerClass = Reflection.getCallerClass();
 
         // Walk through the loaded registeredDrivers.
         for(DriverInfo aDriver : registeredDrivers) {
             // If the caller does not have permission to load the driver then
             // skip it.
-            if(isDriverAllowed(aDriver.driver, callerCL)) {
+            if(isDriverAllowed(aDriver.driver, callerClass)) {
                 result.addElement(aDriver.driver);
             } else {
                 println("    skipping: " + aDriver.getClass().getName());
@@ -493,17 +480,13 @@
 
     //------------------------------------------------------------------------
 
-    // Internal method used to get the caller's class loader.
-    // Replaces the call to the native method
-    private static ClassLoader getCallerClassLoader() {
-        Class<?> cc = Reflection.getCallerClass(3);
-        ClassLoader cl = (cc != null) ? cc.getClassLoader() : null;
-        return cl;
+    // Indicates whether the class object that would be created if the code calling
+    // DriverManager is accessible.
+    private static boolean isDriverAllowed(Driver driver, Class<?> caller) {
+        ClassLoader callerCL = caller != null ? caller.getClassLoader() : null;
+        return isDriverAllowed(driver, callerCL);
     }
 
-
-    // Indicates whether the class object that would be created if the code calling
-    // DriverManager is accessible.
     private static boolean isDriverAllowed(Driver driver, ClassLoader classLoader) {
         boolean result = false;
         if(driver != null) {
@@ -556,7 +539,7 @@
                  */
                 try{
                     while(driversIterator.hasNext()) {
-                        println(" Loading done by the java.util.ServiceLoader :  "+driversIterator.next());
+                        driversIterator.next();
                     }
                 } catch(Throwable t) {
                 // Do nothing
@@ -586,18 +569,19 @@
 
     //  Worker method called by the public getConnection() methods.
     private static Connection getConnection(
-        String url, java.util.Properties info, ClassLoader callerCL) throws SQLException {
+        String url, java.util.Properties info, Class<?> caller) throws SQLException {
         /*
          * When callerCl is null, we should check the application's
          * (which is invoking this class indirectly)
          * classloader, so that the JDBC driver class outside rt.jar
          * can be loaded from here.
          */
+        ClassLoader callerCL = caller != null ? caller.getClassLoader() : null;
         synchronized(DriverManager.class) {
-          // synchronize loading of the correct classloader.
-          if(callerCL == null) {
-              callerCL = Thread.currentThread().getContextClassLoader();
-           }
+            // synchronize loading of the correct classloader.
+            if (callerCL == null) {
+                callerCL = Thread.currentThread().getContextClassLoader();
+            }
         }
 
         if(url == null) {
--- a/src/share/classes/java/time/DayOfWeek.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/DayOfWeek.java	Wed Apr 17 21:48:04 2013 -0700
@@ -61,13 +61,13 @@
  */
 package java.time;
 
+import java.time.temporal.UnsupportedTemporalTypeException;
 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
 import static java.time.temporal.ChronoUnit.DAYS;
 
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.format.TextStyle;
 import java.time.temporal.ChronoField;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -259,7 +259,7 @@
      * <p>
      * If the field is {@link ChronoField#DAY_OF_WEEK DAY_OF_WEEK} then the
      * range of the day-of-week, from 1 to 7, will be returned.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
@@ -269,6 +269,7 @@
      * @param field  the field to query the range for, not null
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      */
     @Override
     public ValueRange range(TemporalField field) {
@@ -288,7 +289,7 @@
      * <p>
      * If the field is {@link ChronoField#DAY_OF_WEEK DAY_OF_WEEK} then the
      * value of the day-of-week, from 1 to 7, will be returned.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -297,7 +298,10 @@
      *
      * @param field  the field to get, not null
      * @return the value for the field, within the valid range of values
-     * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws DateTimeException if a value for the field cannot be obtained or
+     *         the value is outside the range of valid values for the field
+     * @throws UnsupportedTemporalTypeException if the field is not supported or
+     *         the range of values exceeds an {@code int}
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -317,7 +321,7 @@
      * <p>
      * If the field is {@link ChronoField#DAY_OF_WEEK DAY_OF_WEEK} then the
      * value of the day-of-week, from 1 to 7, will be returned.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -327,6 +331,7 @@
      * @param field  the field to get, not null
      * @return the value for the field
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -334,7 +339,7 @@
         if (field == DAY_OF_WEEK) {
             return getValue();
         } else if (field instanceof ChronoField) {
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.getFrom(this);
     }
@@ -393,7 +398,7 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.precision()) {
+        if (query == TemporalQuery.precision()) {
             return (R) DAYS;
         }
         return TemporalAccessor.super.query(query);
@@ -409,8 +414,8 @@
      * passing {@link ChronoField#DAY_OF_WEEK} as the field.
      * Note that this adjusts forwards or backwards within a Monday to Sunday week.
      * See {@link WeekFields#dayOfWeek} for localized week start days.
-     * See {@link java.time.temporal.Adjusters Adjusters} for other adjusters
-     * with more control, such as {@code next(MONDAY)}.
+     * See {@code TemporalAdjuster} for other adjusters with more control,
+     * such as {@code next(MONDAY)}.
      * <p>
      * In most cases, it is clearer to reverse the calling pattern by using
      * {@link Temporal#with(TemporalAdjuster)}:
--- a/src/share/classes/java/time/Duration.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/Duration.java	Wed Apr 17 21:48:04 2013 -0700
@@ -85,6 +85,7 @@
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
@@ -302,31 +303,32 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Obtains a {@code Duration} representing the duration between two instants.
+     * Obtains an instance of {@code Duration} from a temporal amount.
+     * <p>
+     * This obtains a duration based on the specified amount.
+     * A {@code TemporalAmount} represents an  amount of time, which may be
+     * date-based or time-based, which this factory extracts to a duration.
      * <p>
-     * This calculates the duration between two temporal objects of the same type.
-     * The difference in seconds is calculated using
-     * {@link Temporal#periodUntil(Temporal, TemporalUnit)}.
-     * The difference in nanoseconds is calculated using by querying the
-     * {@link ChronoField#NANO_OF_SECOND NANO_OF_SECOND} field.
-     * <p>
-     * The result of this method can be a negative period if the end is before the start.
-     * To guarantee to obtain a positive duration call {@link #abs()} on the result.
+     * The conversion loops around the set of units from the amount and uses
+     * the {@linkplain TemporalUnit#getDuration() duration} of the unit to
+     * calculate the total {@code Duration}.
+     * Only a subset of units are accepted by this method. The unit must either
+     * have an {@linkplain TemporalUnit#isDurationEstimated() exact duration}
+     * or be {@link ChronoUnit#DAYS} which is treated as 24 hours.
+     * If any other units are found then an exception is thrown.
      *
-     * @param startInclusive  the start instant, inclusive, not null
-     * @param endExclusive  the end instant, exclusive, not null
-     * @return a {@code Duration}, not null
-     * @throws ArithmeticException if the calculation exceeds the capacity of {@code Duration}
+     * @param amount  the temporal amount to convert, not null
+     * @return the equivalent duration, not null
+     * @throws DateTimeException if unable to convert to a {@code Duration}
+     * @throws ArithmeticException if numeric overflow occurs
      */
-    public static  Duration between(Temporal startInclusive, Temporal endExclusive) {
-        long secs = startInclusive.periodUntil(endExclusive, SECONDS);
-        long nanos;
-        try {
-            nanos = endExclusive.getLong(NANO_OF_SECOND) - startInclusive.getLong(NANO_OF_SECOND);
-        } catch (DateTimeException ex) {
-            nanos = 0;
+    public static Duration from(TemporalAmount amount) {
+        Objects.requireNonNull(amount, "amount");
+        Duration duration = ZERO;
+        for (TemporalUnit unit : amount.getUnits()) {
+            duration = duration.plus(amount.get(unit), unit);
         }
-        return ofSeconds(secs, nanos);
+        return duration;
     }
 
     //-----------------------------------------------------------------------
@@ -360,14 +362,14 @@
      * <p>
      * Examples:
      * <pre>
-     *    "PT20.345S" -> parses as "20.345 seconds"
-     *    "PT15M"     -> parses as "15 minutes" (where a minute is 60 seconds)
-     *    "PT10H"     -> parses as "10 hours" (where an hour is 3600 seconds)
-     *    "P2D"       -> parses as "2 days" (where a day is 24 hours or 86400 seconds)
-     *    "P2DT3H4M"  -> parses as "2 days, 3 hours and 4 minutes"
-     *    "P-6H3M"    -> parses as "-6 hours and +3 minutes"
-     *    "-P6H3M"    -> parses as "-6 hours and -3 minutes"
-     *    "-P-6H+3M"  -> parses as "+6 hours and -3 minutes"
+     *    "PT20.345S" -- parses as "20.345 seconds"
+     *    "PT15M"     -- parses as "15 minutes" (where a minute is 60 seconds)
+     *    "PT10H"     -- parses as "10 hours" (where an hour is 3600 seconds)
+     *    "P2D"       -- parses as "2 days" (where a day is 24 hours or 86400 seconds)
+     *    "P2DT3H4M"  -- parses as "2 days, 3 hours and 4 minutes"
+     *    "P-6H3M"    -- parses as "-6 hours and +3 minutes"
+     *    "-P6H3M"    -- parses as "-6 hours and -3 minutes"
+     *    "-P-6H+3M"  -- parses as "+6 hours and -3 minutes"
      * </pre>
      *
      * @param text  the text to parse, not null
@@ -439,6 +441,44 @@
 
     //-----------------------------------------------------------------------
     /**
+     * Obtains a {@code Duration} representing the duration between two instants.
+     * <p>
+     * This calculates the duration between two temporal objects of the same type.
+     * The specified temporal objects must support the {@link ChronoUnit#SECONDS SECONDS} unit.
+     * For full accuracy, either the {@link ChronoUnit#NANOS NANOS} unit or the
+     * {@link ChronoField#NANO_OF_SECOND NANO_OF_SECOND} field should be supported.
+     * <p>
+     * The result of this method can be a negative period if the end is before the start.
+     * To guarantee to obtain a positive duration call {@link #abs()} on the result.
+     *
+     * @param startInclusive  the start instant, inclusive, not null
+     * @param endExclusive  the end instant, exclusive, not null
+     * @return a {@code Duration}, not null
+     * @throws DateTimeException if the seconds between the temporals cannot be obtained
+     * @throws ArithmeticException if the calculation exceeds the capacity of {@code Duration}
+     */
+    public static Duration between(Temporal startInclusive, Temporal endExclusive) {
+        try {
+            return ofNanos(startInclusive.periodUntil(endExclusive, NANOS));
+        } catch (DateTimeException | ArithmeticException ex) {
+            long secs = startInclusive.periodUntil(endExclusive, SECONDS);
+            long nanos;
+            try {
+                nanos = endExclusive.getLong(NANO_OF_SECOND) - startInclusive.getLong(NANO_OF_SECOND);
+                if (secs > 0 && nanos < 0) {
+                    secs++;
+                } else if (secs < 0 && nanos > 0) {
+                    secs--;
+                }
+            } catch (DateTimeException ex2) {
+                nanos = 0;
+            }
+            return ofSeconds(secs, nanos);
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    /**
      * Obtains an instance of {@code Duration} using seconds and nanoseconds.
      *
      * @param seconds  the length of the duration in seconds, positive or negative
@@ -474,6 +514,7 @@
      * @param unit the {@code TemporalUnit} for which to return the value
      * @return the long value of the unit
      * @throws DateTimeException if the unit is not supported
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      */
     @Override
     public long get(TemporalUnit unit) {
@@ -482,7 +523,7 @@
         } else if (unit == NANOS) {
             return nanos;
         } else {
-            throw new DateTimeException("Unsupported unit: " + unit.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
     }
 
@@ -637,6 +678,7 @@
      * @param amountToAdd  the amount of the period, measured in terms of the unit, positive or negative
      * @param unit  the unit that the period is measured in, must have an exact duration, not null
      * @return a {@code Duration} based on this duration with the specified duration added, not null
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     public Duration plus(long amountToAdd, TemporalUnit unit) {
@@ -645,7 +687,7 @@
             return plus(Math.multiplyExact(amountToAdd, SECONDS_PER_DAY), 0);
         }
         if (unit.isDurationEstimated()) {
-            throw new DateTimeException("Unit must not have an estimated duration");
+            throw new UnsupportedTemporalTypeException("Unit must not have an estimated duration");
         }
         if (amountToAdd == 0) {
             return this;
@@ -1130,9 +1172,9 @@
      * @throws ArithmeticException if numeric overflow occurs
      */
     public long toNanos() {
-        long millis = Math.multiplyExact(seconds, NANOS_PER_SECOND);
-        millis = Math.addExact(millis, nanos);
-        return millis;
+        long totalNanos = Math.multiplyExact(seconds, NANOS_PER_SECOND);
+        totalNanos = Math.addExact(totalNanos, nanos);
+        return totalNanos;
     }
 
     //-----------------------------------------------------------------------
@@ -1199,10 +1241,10 @@
      * <p>
      * Examples:
      * <pre>
-     *    "20.345 seconds"                 -> "PT20.345S
-     *    "15 minutes" (15 * 60 seconds)   -> "PT15M"
-     *    "10 hours" (10 * 3600 seconds)   -> "PT10H"
-     *    "2 days" (2 * 86400 seconds)     -> "PT48H"
+     *    "20.345 seconds"                 -- "PT20.345S
+     *    "15 minutes" (15 * 60 seconds)   -- "PT15M"
+     *    "10 hours" (10 * 3600 seconds)   -- "PT10H"
+     *    "2 days" (2 * 86400 seconds)     -- "PT48H"
      * </pre>
      * Note that multiples of 24 hours are not output as days to avoid confusion
      * with {@code Period}.
--- a/src/share/classes/java/time/Instant.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/Instant.java	Wed Apr 17 21:48:04 2013 -0700
@@ -81,7 +81,6 @@
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -89,6 +88,7 @@
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
 import java.util.Objects;
 
@@ -148,6 +148,8 @@
  * <li>other times during the day will be broadly in line with the agreed international civil time</li>
  * <li>the day will be divided into exactly 86400 subdivisions, referred to as "seconds"</li>
  * <li>the Java "second" may differ from an SI second</li>
+ * <li>a well-defined algorithm must be specified to map each second in the accurate agreed
+ *  international civil time to each "second" in this time-scale</li>
  * </ul><p>
  * Agreed international civil time is the base time-scale agreed by international convention,
  * which in 2012 is UTC (with leap-seconds).
@@ -155,6 +157,14 @@
  * In 2012, the definition of the Java time-scale is the same as UTC for all days except
  * those where a leap-second occurs. On days where a leap-second does occur, the time-scale
  * effectively eliminates the leap-second, maintaining the fiction of 86400 seconds in the day.
+ * The approved well-defined algorithm to eliminate leap-seconds is specified as
+ * <a href="http://www.cl.cam.ac.uk/~mgk25/time/utc-sls/">UTC-SLS</a>.
+ * <p>
+ * UTC-SLS is a simple algorithm that smoothes the leap-second over the last 1000 seconds of
+ * the day, making each of the last 1000 seconds 1/1000th longer or shorter than an SI second.
+ * Implementations built on an accurate leap-second aware time source should use UTC-SLS.
+ * Use of a different algorithm risks confusion and misinterpretation of instants around a
+ * leap-second and is discouraged.
  * <p>
  * The main benefit of always dividing the day into 86400 subdivisions is that it matches the
  * expectations of most users of the API. The alternative is to force every user to understand
@@ -163,16 +173,10 @@
  * Most applications also do not have a problem with a second being a very small amount longer or
  * shorter than a real SI second during a leap-second.
  * <p>
- * If an application does have access to an accurate clock that reports leap-seconds, then the
- * recommended technique to implement the Java time-scale is to use the UTC-SLS convention.
- * <a href="http://www.cl.cam.ac.uk/~mgk25/time/utc-sls/">UTC-SLS</a> effectively smoothes the
- * leap-second over the last 1000 seconds of the day, making each of the last 1000 "seconds"
- * 1/1000th longer or shorter than a real SI second.
- * <p>
  * One final problem is the definition of the agreed international civil time before the
  * introduction of modern UTC in 1972. This includes the Java epoch of {@code 1970-01-01}.
  * It is intended that instants before 1972 be interpreted based on the solar day divided
- * into 86400 subdivisions.
+ * into 86400 subdivisions, as per the principles of UT1.
  * <p>
  * The Java time-scale is used for all date-time classes.
  * This includes {@code Instant}, {@code LocalDate}, {@code LocalTime}, {@code OffsetDateTime},
@@ -210,7 +214,7 @@
      */
     public static final Instant MIN = Instant.ofEpochSecond(MIN_SECOND, 0);
     /**
-     * The minimum supported {@code Instant}, '-1000000000-01-01T00:00Z'.
+     * The maximum supported {@code Instant}, '1000000000-12-31T23:59:59.999999999Z'.
      * This could be used by an application as a "far future" instant.
      * <p>
      * This is one year later than the maximum {@code LocalDateTime}.
@@ -292,9 +296,9 @@
      * to ensure that the stored nanosecond is in the range 0 to 999,999,999.
      * For example, the following will result in the exactly the same instant:
      * <pre>
-     *  Instant.ofSeconds(3, 1);
-     *  Instant.ofSeconds(4, -999_999_999);
-     *  Instant.ofSeconds(2, 1000_000_001);
+     *  Instant.ofEpochSecond(3, 1);
+     *  Instant.ofEpochSecond(4, -999_999_999);
+     *  Instant.ofEpochSecond(2, 1000_000_001);
      * </pre>
      *
      * @param epochSecond  the number of seconds from 1970-01-01T00:00:00Z
@@ -441,7 +445,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return
      * appropriate range instances.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
@@ -451,6 +455,7 @@
      * @param field  the field to query the range for, not null
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      */
     @Override  // override for Javadoc
     public ValueRange range(TemporalField field) {
@@ -469,7 +474,7 @@
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this date-time, except {@code INSTANT_SECONDS} which is too
      * large to fit in an {@code int} and throws a {@code DateTimeException}.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -478,7 +483,10 @@
      *
      * @param field  the field to get, not null
      * @return the value for the field
-     * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws DateTimeException if a value for the field cannot be obtained or
+     *         the value is outside the range of valid values for the field
+     * @throws UnsupportedTemporalTypeException if the field is not supported or
+     *         the range of values exceeds an {@code int}
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override  // override for Javadoc and performance
@@ -490,7 +498,7 @@
                 case MILLI_OF_SECOND: return nanos / 1000_000;
                 case INSTANT_SECONDS: INSTANT_SECONDS.checkValidIntValue(seconds);
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return range(field).checkValidIntValue(field.getFrom(this), field);
     }
@@ -505,7 +513,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this date-time.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -515,6 +523,7 @@
      * @param field  the field to get, not null
      * @return the value for the field
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -526,7 +535,7 @@
                 case MILLI_OF_SECOND: return nanos / 1000_000;
                 case INSTANT_SECONDS: return seconds;
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.getFrom(this);
     }
@@ -610,7 +619,7 @@
      * In all cases, if the new value is outside the valid range of values for the field
      * then a {@code DateTimeException} will be thrown.
      * <p>
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)}
@@ -623,6 +632,7 @@
      * @param newValue  the new value of the field in the result
      * @return an {@code Instant} based on {@code this} with the specified field set, not null
      * @throws DateTimeException if the field cannot be set
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -642,7 +652,7 @@
                 case NANO_OF_SECOND: return (newValue != nanos ? create(seconds, (int) newValue) : this);
                 case INSTANT_SECONDS: return (newValue != seconds ? create(newValue, nanos) : this);
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.adjustInto(this, newValue);
     }
@@ -668,6 +678,7 @@
      * @param unit  the unit to truncate to, not null
      * @return an {@code Instant} based on this instant with the time truncated, not null
      * @throws DateTimeException if the unit is invalid for truncation
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      */
     public Instant truncatedTo(TemporalUnit unit) {
         if (unit == ChronoUnit.NANOS) {
@@ -675,11 +686,11 @@
         }
         Duration unitDur = unit.getDuration();
         if (unitDur.getSeconds() > LocalTime.SECONDS_PER_DAY) {
-            throw new DateTimeException("Unit is too large to be used for truncation");
+            throw new UnsupportedTemporalTypeException("Unit is too large to be used for truncation");
         }
         long dur = unitDur.toNanos();
         if ((LocalTime.NANOS_PER_DAY % dur) != 0) {
-            throw new DateTimeException("Unit must divide into a standard day without remainder");
+            throw new UnsupportedTemporalTypeException("Unit must divide into a standard day without remainder");
         }
         long nod = (seconds % LocalTime.SECONDS_PER_DAY) * LocalTime.NANOS_PER_SECOND + nanos;
         long result = (nod / dur) * dur;
@@ -754,7 +765,7 @@
      *  multiplied by 86,400 (24 hours).
      * </ul>
      * <p>
-     * All other {@code ChronoUnit} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoUnit} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.addTo(Temporal, long)}
@@ -767,6 +778,7 @@
      * @param unit  the unit of the amount to add, not null
      * @return an {@code Instant} based on this instant with the specified amount added, not null
      * @throws DateTimeException if the addition cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -782,7 +794,7 @@
                 case HALF_DAYS: return plusSeconds(Math.multiplyExact(amountToAdd, SECONDS_PER_DAY / 2));
                 case DAYS: return plusSeconds(Math.multiplyExact(amountToAdd, SECONDS_PER_DAY));
             }
-            throw new DateTimeException("Unsupported unit: " + unit.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
         return unit.addTo(this, amountToAdd);
     }
@@ -894,6 +906,7 @@
      * @param unit  the unit of the amount to subtract, not null
      * @return an {@code Instant} based on this instant with the specified amount subtracted, not null
      * @throws DateTimeException if the subtraction cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -975,11 +988,12 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.precision()) {
+        if (query == TemporalQuery.precision()) {
             return (R) NANOS;
         }
         // inline TemporalAccessor.super.query(query) as an optimization
-        if (query == Queries.chronology() || query == Queries.zoneId() || query == Queries.zone() || query == Queries.offset()) {
+        if (query == TemporalQuery.chronology() || query == TemporalQuery.zoneId() ||
+                query == TemporalQuery.zone() || query == TemporalQuery.offset()) {
             return null;
         }
         return query.queryFrom(this);
@@ -1028,14 +1042,15 @@
      * For example, the period in days between two dates can be calculated
      * using {@code startInstant.periodUntil(endInstant, SECONDS)}.
      * <p>
-     * This method operates in association with {@link TemporalUnit#between}.
-     * The result of this method is a {@code long} representing the amount of
-     * the specified unit. By contrast, the result of {@code between} is an
-     * object that can be used directly in addition/subtraction:
+     * There are two equivalent ways of using this method.
+     * The first is to invoke this method.
+     * The second is to use {@link TemporalUnit#between(Temporal, Temporal)}:
      * <pre>
-     *   long period = start.periodUntil(end, SECONDS);   // this method
-     *   dateTime.plus(SECONDS.between(start, end));      // use in plus/minus
+     *   // these two lines are equivalent
+     *   amount = start.periodUntil(end, SECONDS);
+     *   amount = SECONDS.between(start, end);
      * </pre>
+     * The choice should be made based on which makes the code more readable.
      * <p>
      * The calculation is implemented in this method for {@link ChronoUnit}.
      * The units {@code NANOS}, {@code MICROS}, {@code MILLIS}, {@code SECONDS},
@@ -1053,6 +1068,7 @@
      * @param unit  the unit to measure the period in, not null
      * @return the amount of the period between this date and the end date
      * @throws DateTimeException if the period cannot be calculated
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1074,18 +1090,26 @@
                 case HALF_DAYS: return secondsUntil(end) / (12 * SECONDS_PER_HOUR);
                 case DAYS: return secondsUntil(end) / (SECONDS_PER_DAY);
             }
-            throw new DateTimeException("Unsupported unit: " + unit.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
         return unit.between(this, endInstant);
     }
 
     private long nanosUntil(Instant end) {
-        long secs = Math.multiplyExact(secondsUntil(end), NANOS_PER_SECOND);
-        return Math.addExact(secs, end.nanos - nanos);
+        long secsDiff = Math.subtractExact(end.seconds, seconds);
+        long totalNanos = Math.multiplyExact(secsDiff, NANOS_PER_SECOND);
+        return Math.addExact(totalNanos, end.nanos - nanos);
     }
 
     private long secondsUntil(Instant end) {
-        return Math.subtractExact(end.seconds, seconds);
+        long secsDiff = Math.subtractExact(end.seconds, seconds);
+        long nanosDiff = end.nanos - nanos;
+        if (secsDiff > 0 && nanosDiff < 0) {
+            secsDiff--;
+        } else if (secsDiff < 0 && nanosDiff > 0) {
+            secsDiff++;
+        }
+        return secsDiff;
     }
 
     //-----------------------------------------------------------------------
--- a/src/share/classes/java/time/LocalDate.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/LocalDate.java	Wed Apr 17 21:48:04 2013 -0700
@@ -69,9 +69,9 @@
 import static java.time.temporal.ChronoField.DAY_OF_MONTH;
 import static java.time.temporal.ChronoField.DAY_OF_YEAR;
 import static java.time.temporal.ChronoField.EPOCH_DAY;
-import static java.time.temporal.ChronoField.EPOCH_MONTH;
 import static java.time.temporal.ChronoField.ERA;
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
 import static java.time.temporal.ChronoField.YEAR;
 
 import java.io.DataInput;
@@ -87,7 +87,6 @@
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -95,6 +94,7 @@
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
 import java.time.zone.ZoneOffsetTransition;
 import java.time.zone.ZoneRules;
@@ -238,7 +238,7 @@
         YEAR.checkValidValue(year);
         Objects.requireNonNull(month, "month");
         DAY_OF_MONTH.checkValidValue(dayOfMonth);
-        return create(year, month, dayOfMonth);
+        return create(year, month.getValue(), dayOfMonth);
     }
 
     /**
@@ -258,7 +258,7 @@
         YEAR.checkValidValue(year);
         MONTH_OF_YEAR.checkValidValue(month);
         DAY_OF_MONTH.checkValidValue(dayOfMonth);
-        return create(year, Month.of(month), dayOfMonth);
+        return create(year, month, dayOfMonth);
     }
 
     //-----------------------------------------------------------------------
@@ -287,7 +287,7 @@
             moy = moy.plus(1);
         }
         int dom = dayOfYear - moy.firstDayOfYear(leap) + 1;
-        return create(year, moy, dom);
+        return new LocalDate(year, moy.getValue(), dom);
     }
 
     //-----------------------------------------------------------------------
@@ -342,7 +342,7 @@
      * A {@code TemporalAccessor} represents an arbitrary set of date and time information,
      * which this factory converts to an instance of {@code LocalDate}.
      * <p>
-     * The conversion uses the {@link Queries#localDate()} query, which relies
+     * The conversion uses the {@link TemporalQuery#localDate()} query, which relies
      * on extracting the {@link ChronoField#EPOCH_DAY EPOCH_DAY} field.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
@@ -353,7 +353,7 @@
      * @throws DateTimeException if unable to convert to a {@code LocalDate}
      */
     public static LocalDate from(TemporalAccessor temporal) {
-        LocalDate date = temporal.query(Queries.localDate());
+        LocalDate date = temporal.query(TemporalQuery.localDate());
         if (date == null) {
             throw new DateTimeException("Unable to obtain LocalDate from TemporalAccessor: " + temporal.getClass());
         }
@@ -395,20 +395,34 @@
      * Creates a local date from the year, month and day fields.
      *
      * @param year  the year to represent, validated from MIN_YEAR to MAX_YEAR
-     * @param month  the month-of-year to represent, validated not null
+     * @param month  the month-of-year to represent, from 1 to 12, validated
      * @param dayOfMonth  the day-of-month to represent, validated from 1 to 31
      * @return the local date, not null
      * @throws DateTimeException if the day-of-month is invalid for the month-year
      */
-    private static LocalDate create(int year, Month month, int dayOfMonth) {
-        if (dayOfMonth > 28 && dayOfMonth > month.length(IsoChronology.INSTANCE.isLeapYear(year))) {
-            if (dayOfMonth == 29) {
-                throw new DateTimeException("Invalid date 'February 29' as '" + year + "' is not a leap year");
-            } else {
-                throw new DateTimeException("Invalid date '" + month.name() + " " + dayOfMonth + "'");
+    private static LocalDate create(int year, int month, int dayOfMonth) {
+        if (dayOfMonth > 28) {
+            int dom = 31;
+            switch (month) {
+                case 2:
+                    dom = (IsoChronology.INSTANCE.isLeapYear(year) ? 29 : 28);
+                    break;
+                case 4:
+                case 6:
+                case 9:
+                case 11:
+                    dom = 30;
+                    break;
+            }
+            if (dayOfMonth > dom) {
+                if (dayOfMonth == 29) {
+                    throw new DateTimeException("Invalid date 'February 29' as '" + year + "' is not a leap year");
+                } else {
+                    throw new DateTimeException("Invalid date '" + Month.of(month).name() + " " + dayOfMonth + "'");
+                }
             }
         }
-        return new LocalDate(year, month.getValue(), dayOfMonth);
+        return new LocalDate(year, month, dayOfMonth);
     }
 
     /**
@@ -431,7 +445,7 @@
                 day = Math.min(day, 30);
                 break;
         }
-        return LocalDate.of(year, month, day);
+        return new LocalDate(year, month, day);
     }
 
     /**
@@ -467,7 +481,7 @@
      * <li>{@code ALIGNED_WEEK_OF_MONTH}
      * <li>{@code ALIGNED_WEEK_OF_YEAR}
      * <li>{@code MONTH_OF_YEAR}
-     * <li>{@code EPOCH_MONTH}
+     * <li>{@code PROLEPTIC_MONTH}
      * <li>{@code YEAR_OF_ERA}
      * <li>{@code YEAR}
      * <li>{@code ERA}
@@ -498,7 +512,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return
      * appropriate range instances.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
@@ -508,12 +522,13 @@
      * @param field  the field to query the range for, not null
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      */
     @Override
     public ValueRange range(TemporalField field) {
         if (field instanceof ChronoField) {
             ChronoField f = (ChronoField) field;
-            if (f.isDateField()) {
+            if (f.isDateBased()) {
                 switch (f) {
                     case DAY_OF_MONTH: return ValueRange.of(1, lengthOfMonth());
                     case DAY_OF_YEAR: return ValueRange.of(1, lengthOfYear());
@@ -523,7 +538,7 @@
                 }
                 return field.range();
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.rangeRefinedBy(this);
     }
@@ -538,9 +553,9 @@
      * <p>
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
-     * values based on this date, except {@code EPOCH_DAY} and {@code EPOCH_MONTH}
+     * values based on this date, except {@code EPOCH_DAY} and {@code PROLEPTIC_MONTH}
      * which are too large to fit in an {@code int} and throw a {@code DateTimeException}.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -549,7 +564,10 @@
      *
      * @param field  the field to get, not null
      * @return the value for the field
-     * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws DateTimeException if a value for the field cannot be obtained or
+     *         the value is outside the range of valid values for the field
+     * @throws UnsupportedTemporalTypeException if the field is not supported or
+     *         the range of values exceeds an {@code int}
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override  // override for Javadoc and performance
@@ -570,7 +588,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this date.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -580,6 +598,7 @@
      * @param field  the field to get, not null
      * @return the value for the field
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -588,8 +607,8 @@
             if (field == EPOCH_DAY) {
                 return toEpochDay();
             }
-            if (field == EPOCH_MONTH) {
-                return getEpochMonth();
+            if (field == PROLEPTIC_MONTH) {
+                return getProlepticMonth();
             }
             return get0(field);
         }
@@ -603,20 +622,20 @@
             case ALIGNED_DAY_OF_WEEK_IN_YEAR: return ((getDayOfYear() - 1) % 7) + 1;
             case DAY_OF_MONTH: return day;
             case DAY_OF_YEAR: return getDayOfYear();
-            case EPOCH_DAY: throw new DateTimeException("Field too large for an int: " + field);
+            case EPOCH_DAY: throw new UnsupportedTemporalTypeException("Invalid field 'EpochDay' for get() method, use getLong() instead");
             case ALIGNED_WEEK_OF_MONTH: return ((day - 1) / 7) + 1;
             case ALIGNED_WEEK_OF_YEAR: return ((getDayOfYear() - 1) / 7) + 1;
             case MONTH_OF_YEAR: return month;
-            case EPOCH_MONTH: throw new DateTimeException("Field too large for an int: " + field);
+            case PROLEPTIC_MONTH: throw new UnsupportedTemporalTypeException("Invalid field 'ProlepticMonth' for get() method, use getLong() instead");
             case YEAR_OF_ERA: return (year >= 1 ? year : 1 - year);
             case YEAR: return year;
             case ERA: return (year >= 1 ? 1 : 0);
         }
-        throw new DateTimeException("Unsupported field: " + field.getName());
+        throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
     }
 
-    private long getEpochMonth() {
-        return ((year - 1970) * 12L) + (month - 1);
+    private long getProlepticMonth() {
+        return (year * 12L + month - 1);
     }
 
     //-----------------------------------------------------------------------
@@ -626,7 +645,7 @@
      * The {@code Chronology} represents the calendar system in use.
      * The ISO-8601 calendar system is the modern civil calendar system used today
      * in most of the world. It is equivalent to the proleptic Gregorian calendar
-     * system, in which todays's rules for leap years are applied for all time.
+     * system, in which today's rules for leap years are applied for all time.
      *
      * @return the ISO chronology, not null
      */
@@ -810,7 +829,7 @@
      * <p>
      * A simple adjuster might simply set the one of the fields, such as the year field.
      * A more complex adjuster might set the date to the last day of the month.
-     * A selection of common adjustments is provided in {@link java.time.temporal.Adjusters}.
+     * A selection of common adjustments is provided in {@link TemporalAdjuster}.
      * These include finding the "last day of the month" and "next Wednesday".
      * Key date-time classes also implement the {@code TemporalAdjuster} interface,
      * such as {@link Month} and {@link java.time.MonthDay MonthDay}.
@@ -908,8 +927,8 @@
      *  The year will be unchanged. The day-of-month will also be unchanged,
      *  unless it would be invalid for the new month and year. In that case, the
      *  day-of-month is adjusted to the maximum valid value for the new month and year.
-     * <li>{@code EPOCH_MONTH} -
-     *  Returns a {@code LocalDate} with the specified epoch-month.
+     * <li>{@code PROLEPTIC_MONTH} -
+     *  Returns a {@code LocalDate} with the specified proleptic-month.
      *  The day-of-month will be unchanged, unless it would be invalid for the new month
      *  and year. In that case, the day-of-month is adjusted to the maximum valid value
      *  for the new month and year.
@@ -933,7 +952,7 @@
      * In all cases, if the new value is outside the valid range of values for the field
      * then a {@code DateTimeException} will be thrown.
      * <p>
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)}
@@ -946,6 +965,7 @@
      * @param newValue  the new value of the field in the result
      * @return a {@code LocalDate} based on {@code this} with the specified field set, not null
      * @throws DateTimeException if the field cannot be set
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -963,12 +983,12 @@
                 case ALIGNED_WEEK_OF_MONTH: return plusWeeks(newValue - getLong(ALIGNED_WEEK_OF_MONTH));
                 case ALIGNED_WEEK_OF_YEAR: return plusWeeks(newValue - getLong(ALIGNED_WEEK_OF_YEAR));
                 case MONTH_OF_YEAR: return withMonth((int) newValue);
-                case EPOCH_MONTH: return plusMonths(newValue - getLong(EPOCH_MONTH));
+                case PROLEPTIC_MONTH: return plusMonths(newValue - getProlepticMonth());
                 case YEAR_OF_ERA: return withYear((int) (year >= 1 ? newValue : 1 - newValue));
                 case YEAR: return withYear((int) newValue);
                 case ERA: return (getLong(ERA) == newValue ? this : withYear(1 - year));
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.adjustInto(this, newValue);
     }
@@ -1137,7 +1157,7 @@
      *  valid value for the new month and year.
      * </ul>
      * <p>
-     * All other {@code ChronoUnit} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoUnit} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.addTo(Temporal, long)}
@@ -1150,6 +1170,7 @@
      * @param unit  the unit of the amount to add, not null
      * @return a {@code LocalDate} based on this date with the specified amount added, not null
      * @throws DateTimeException if the addition cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1166,7 +1187,7 @@
                 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000));
                 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd));
             }
-            throw new DateTimeException("Unsupported unit: " + unit.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
         return unit.addTo(this, amountToAdd);
     }
@@ -1315,6 +1336,7 @@
      * @param unit  the unit of the amount to subtract, not null
      * @return a {@code LocalDate} based on this date with the specified amount subtracted, not null
      * @throws DateTimeException if the subtraction cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1431,7 +1453,7 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.localDate()) {
+        if (query == TemporalQuery.localDate()) {
             return (R) this;
         }
         return ChronoLocalDate.super.query(query);
@@ -1508,10 +1530,12 @@
      * @param unit  the unit to measure the period in, not null
      * @return the amount of the period between this date and the end date
      * @throws DateTimeException if the period cannot be calculated
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
     public long periodUntil(Temporal endDate, TemporalUnit unit) {
+        Objects.requireNonNull(unit, "unit");
         if (endDate instanceof LocalDate == false) {
             Objects.requireNonNull(endDate, "endDate");
             throw new DateTimeException("Unable to calculate period between objects of two different types");
@@ -1528,7 +1552,7 @@
                 case MILLENNIA: return monthsUntil(end) / 12000;
                 case ERAS: return end.getLong(ERA) - getLong(ERA);
             }
-            throw new DateTimeException("Unsupported unit: " + unit.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
         return unit.between(this, endDate);
     }
@@ -1538,8 +1562,8 @@
     }
 
     private long monthsUntil(LocalDate end) {
-        long packed1 = getEpochMonth() * 32L + getDayOfMonth();  // no overflow
-        long packed2 = end.getEpochMonth() * 32L + end.getDayOfMonth();  // no overflow
+        long packed1 = getProlepticMonth() * 32L + getDayOfMonth();  // no overflow
+        long packed2 = end.getProlepticMonth() * 32L + end.getDayOfMonth();  // no overflow
         return (packed2 - packed1) / 32;
     }
 
@@ -1549,6 +1573,7 @@
      * This calculates the period between two dates in terms of years, months and days.
      * The start and end points are {@code this} and the specified date.
      * The result will be negative if the end is before the start.
+     * The negative sign will be the same in each of year, month and day.
      * <p>
      * The calculation is performed using the ISO calendar system.
      * If necessary, the input date will be converted to ISO.
@@ -1561,9 +1586,6 @@
      * than or equal to the start day-of-month.
      * For example, from {@code 2010-01-15} to {@code 2011-03-18} is "1 year, 2 months and 3 days".
      * <p>
-     * The result of this method can be a negative period if the end is before the start.
-     * The negative sign will be the same in each of year, month and day.
-     * <p>
      * There are two equivalent ways of using this method.
      * The first is to invoke this method.
      * The second is to use {@link Period#between(LocalDate, LocalDate)}:
@@ -1580,7 +1602,7 @@
     @Override
     public Period periodUntil(ChronoLocalDate<?> endDate) {
         LocalDate end = LocalDate.from(endDate);
-        long totalMonths = end.getEpochMonth() - this.getEpochMonth();  // safe
+        long totalMonths = end.getProlepticMonth() - this.getProlepticMonth();  // safe
         int days = end.day - this.day;
         if (totalMonths > 0 && days < 0) {
             totalMonths--;
@@ -1595,6 +1617,21 @@
         return Period.of(Math.toIntExact(years), months, days);
     }
 
+    /**
+     * Formats this date using the specified formatter.
+     * <p>
+     * This date will be passed to the formatter to produce a string.
+     *
+     * @param formatter  the formatter to use, not null
+     * @return the formatted date string, not null
+     * @throws DateTimeException if an error occurs during printing
+     */
+    @Override  // override for Javadoc and performance
+    public String format(DateTimeFormatter formatter) {
+        Objects.requireNonNull(formatter, "formatter");
+        return formatter.format(this);
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Combines this date with a time to create a {@code LocalDateTime}.
@@ -1800,7 +1837,7 @@
      * This method only considers the position of the two dates on the local time-line.
      * It does not take into account the chronology, or calendar system.
      * This is different from the comparison in {@link #compareTo(ChronoLocalDate)},
-     * but is the same approach as {@link #DATE_COMPARATOR}.
+     * but is the same approach as {@link ChronoLocalDate#timeLineOrder()}.
      *
      * @param other  the other date to compare to, not null
      * @return true if this date is after the specified date
@@ -1829,7 +1866,7 @@
      * This method only considers the position of the two dates on the local time-line.
      * It does not take into account the chronology, or calendar system.
      * This is different from the comparison in {@link #compareTo(ChronoLocalDate)},
-     * but is the same approach as {@link #DATE_COMPARATOR}.
+     * but is the same approach as {@link ChronoLocalDate#timeLineOrder()}.
      *
      * @param other  the other date to compare to, not null
      * @return true if this date is before the specified date
@@ -1858,7 +1895,7 @@
      * This method only considers the position of the two dates on the local time-line.
      * It does not take into account the chronology, or calendar system.
      * This is different from the comparison in {@link #compareTo(ChronoLocalDate)}
-     * but is the same approach as {@link #DATE_COMPARATOR}.
+     * but is the same approach as {@link ChronoLocalDate#timeLineOrder()}.
      *
      * @param other  the other date to compare to, not null
      * @return true if this date is equal to the specified date
@@ -1912,7 +1949,7 @@
     /**
      * Outputs this date as a {@code String}, such as {@code 2007-12-03}.
      * <p>
-     * The output will be in the ISO-8601 format {@code yyyy-MM-dd}.
+     * The output will be in the ISO-8601 format {@code uuuu-MM-dd}.
      *
      * @return a string representation of this date, not null
      */
@@ -1942,21 +1979,6 @@
             .toString();
     }
 
-    /**
-     * Outputs this date as a {@code String} using the formatter.
-     * <p>
-     * This date will be passed to the formatter
-     * {@link DateTimeFormatter#format(TemporalAccessor) format method}.
-     *
-     * @param formatter  the formatter to use, not null
-     * @return the formatted date string, not null
-     * @throws DateTimeException if an error occurs during printing
-     */
-    @Override  // override for Javadoc
-    public String toString(DateTimeFormatter formatter) {
-        return ChronoLocalDate.super.toString(formatter);
-    }
-
     //-----------------------------------------------------------------------
     /**
      * Writes the object using a
--- a/src/share/classes/java/time/LocalDateTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/LocalDateTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -79,12 +79,10 @@
 import java.io.ObjectStreamException;
 import java.io.Serializable;
 import java.time.chrono.ChronoLocalDateTime;
-import java.time.chrono.IsoChronology;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -92,6 +90,7 @@
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
 import java.time.zone.ZoneRules;
 import java.util.Objects;
@@ -546,7 +545,7 @@
      * <li>{@code ALIGNED_WEEK_OF_MONTH}
      * <li>{@code ALIGNED_WEEK_OF_YEAR}
      * <li>{@code MONTH_OF_YEAR}
-     * <li>{@code EPOCH_MONTH}
+     * <li>{@code PROLEPTIC_MONTH}
      * <li>{@code YEAR_OF_ERA}
      * <li>{@code YEAR}
      * <li>{@code ERA}
@@ -565,7 +564,7 @@
     public boolean isSupported(TemporalField field) {
         if (field instanceof ChronoField) {
             ChronoField f = (ChronoField) field;
-            return f.isDateField() || f.isTimeField();
+            return f.isDateBased() || f.isTimeBased();
         }
         return field != null && field.isSupportedBy(this);
     }
@@ -581,7 +580,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return
      * appropriate range instances.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
@@ -591,12 +590,13 @@
      * @param field  the field to query the range for, not null
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      */
     @Override
     public ValueRange range(TemporalField field) {
         if (field instanceof ChronoField) {
             ChronoField f = (ChronoField) field;
-            return (f.isTimeField() ? time.range(field) : date.range(field));
+            return (f.isTimeBased() ? time.range(field) : date.range(field));
         }
         return field.rangeRefinedBy(this);
     }
@@ -612,9 +612,9 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this date-time, except {@code NANO_OF_DAY}, {@code MICRO_OF_DAY},
-     * {@code EPOCH_DAY} and {@code EPOCH_MONTH} which are too large to fit in
+     * {@code EPOCH_DAY} and {@code PROLEPTIC_MONTH} which are too large to fit in
      * an {@code int} and throw a {@code DateTimeException}.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -623,14 +623,17 @@
      *
      * @param field  the field to get, not null
      * @return the value for the field
-     * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws DateTimeException if a value for the field cannot be obtained or
+     *         the value is outside the range of valid values for the field
+     * @throws UnsupportedTemporalTypeException if the field is not supported or
+     *         the range of values exceeds an {@code int}
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
     public int get(TemporalField field) {
         if (field instanceof ChronoField) {
             ChronoField f = (ChronoField) field;
-            return (f.isTimeField() ? time.get(field) : date.get(field));
+            return (f.isTimeBased() ? time.get(field) : date.get(field));
         }
         return ChronoLocalDateTime.super.get(field);
     }
@@ -645,7 +648,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this date-time.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -655,13 +658,14 @@
      * @param field  the field to get, not null
      * @return the value for the field
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
     public long getLong(TemporalField field) {
         if (field instanceof ChronoField) {
             ChronoField f = (ChronoField) field;
-            return (f.isTimeField() ? time.getLong(field) : date.getLong(field));
+            return (f.isTimeBased() ? time.getLong(field) : date.getLong(field));
         }
         return field.getFrom(this);
     }
@@ -822,7 +826,7 @@
      * <p>
      * A simple adjuster might simply set the one of the fields, such as the year field.
      * A more complex adjuster might set the date to the last day of the month.
-     * A selection of common adjustments is provided in {@link java.time.temporal.Adjusters}.
+     * A selection of common adjustments is provided in {@link TemporalAdjuster}.
      * These include finding the "last day of the month" and "next Wednesday".
      * Key date-time classes also implement the {@code TemporalAdjuster} interface,
      * such as {@link Month} and {@link java.time.MonthDay MonthDay}.
@@ -886,7 +890,7 @@
      * The {@link #isSupported(TemporalField) supported fields} will behave as per
      * the matching method on {@link LocalDate#with(TemporalField, long) LocalDate}
      * or {@link LocalTime#with(TemporalField, long) LocalTime}.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)}
@@ -899,13 +903,14 @@
      * @param newValue  the new value of the field in the result
      * @return a {@code LocalDateTime} based on {@code this} with the specified field set, not null
      * @throws DateTimeException if the field cannot be set
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
     public LocalDateTime with(TemporalField field, long newValue) {
         if (field instanceof ChronoField) {
             ChronoField f = (ChronoField) field;
-            if (f.isTimeField()) {
+            if (f.isTimeBased()) {
                 return with(date, time.with(field, newValue));
             } else {
                 return with(date.with(field, newValue), time);
@@ -1052,6 +1057,7 @@
      * @param unit  the unit to truncate to, not null
      * @return a {@code LocalDateTime} based on this date-time with the time truncated, not null
      * @throws DateTimeException if unable to truncate
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      */
     public LocalDateTime truncatedTo(TemporalUnit unit) {
         return with(date, time.truncatedTo(unit));
@@ -1106,6 +1112,7 @@
      * @param unit  the unit of the amount to add, not null
      * @return a {@code LocalDateTime} based on this date-time with the specified amount added, not null
      * @throws DateTimeException if the addition cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1312,6 +1319,7 @@
      * @param unit  the unit of the amount to subtract, not null
      * @return a {@code LocalDateTime} based on this date-time with the specified amount subtracted, not null
      * @throws DateTimeException if the subtraction cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1517,7 +1525,7 @@
     @SuppressWarnings("unchecked")
     @Override  // override for Javadoc
     public <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.localDate()) {
+        if (query == TemporalQuery.localDate()) {
             return (R) date;
         }
         return ChronoLocalDateTime.super.query(query);
@@ -1597,6 +1605,7 @@
      * @param unit  the unit to measure the period in, not null
      * @return the amount of the period between this date-time and the end date-time
      * @throws DateTimeException if the period cannot be calculated
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1610,31 +1619,79 @@
             ChronoUnit f = (ChronoUnit) unit;
             if (f.isTimeUnit()) {
                 long amount = date.daysUntil(end.date);
+                if (amount == 0) {
+                    return time.periodUntil(end.time, unit);
+                }
+                long timePart = end.time.toNanoOfDay() - time.toNanoOfDay();
+                if (amount > 0) {
+                    amount--;  // safe
+                    timePart += NANOS_PER_DAY;  // safe
+                } else {
+                    amount++;  // safe
+                    timePart -= NANOS_PER_DAY;  // safe
+                }
                 switch (f) {
-                    case NANOS: amount = Math.multiplyExact(amount, NANOS_PER_DAY); break;
-                    case MICROS: amount = Math.multiplyExact(amount, MICROS_PER_DAY); break;
-                    case MILLIS: amount = Math.multiplyExact(amount, MILLIS_PER_DAY); break;
-                    case SECONDS: amount = Math.multiplyExact(amount, SECONDS_PER_DAY); break;
-                    case MINUTES: amount = Math.multiplyExact(amount, MINUTES_PER_DAY); break;
-                    case HOURS: amount = Math.multiplyExact(amount, HOURS_PER_DAY); break;
-                    case HALF_DAYS: amount = Math.multiplyExact(amount, 2); break;
+                    case NANOS:
+                        amount = Math.multiplyExact(amount, NANOS_PER_DAY);
+                        break;
+                    case MICROS:
+                        amount = Math.multiplyExact(amount, MICROS_PER_DAY);
+                        timePart = timePart / 1000;
+                        break;
+                    case MILLIS:
+                        amount = Math.multiplyExact(amount, MILLIS_PER_DAY);
+                        timePart = timePart / 1_000_000;
+                        break;
+                    case SECONDS:
+                        amount = Math.multiplyExact(amount, SECONDS_PER_DAY);
+                        timePart = timePart / NANOS_PER_SECOND;
+                        break;
+                    case MINUTES:
+                        amount = Math.multiplyExact(amount, MINUTES_PER_DAY);
+                        timePart = timePart / NANOS_PER_MINUTE;
+                        break;
+                    case HOURS:
+                        amount = Math.multiplyExact(amount, HOURS_PER_DAY);
+                        timePart = timePart / NANOS_PER_HOUR;
+                        break;
+                    case HALF_DAYS:
+                        amount = Math.multiplyExact(amount, 2);
+                        timePart = timePart / (NANOS_PER_HOUR * 12);
+                        break;
                 }
-                return Math.addExact(amount, time.periodUntil(end.time, unit));
+                return Math.addExact(amount, timePart);
             }
             LocalDate endDate = end.date;
-            if (end.time.isBefore(time)) {
+            if (endDate.isAfter(date) && end.time.isBefore(time)) {
                 endDate = endDate.minusDays(1);
+            } else if (endDate.isBefore(date) && end.time.isAfter(time)) {
+                endDate = endDate.plusDays(1);
             }
             return date.periodUntil(endDate, unit);
         }
         return unit.between(this, endDateTime);
     }
 
+    /**
+     * Formats this date-time using the specified formatter.
+     * <p>
+     * This date-time will be passed to the formatter to produce a string.
+     *
+     * @param formatter  the formatter to use, not null
+     * @return the formatted date-time string, not null
+     * @throws DateTimeException if an error occurs during printing
+     */
+    @Override  // override for Javadoc and performance
+    public String format(DateTimeFormatter formatter) {
+        Objects.requireNonNull(formatter, "formatter");
+        return formatter.format(this);
+    }
+
     //-----------------------------------------------------------------------
     /**
-     * Combines this time with a date to create an {@code OffsetTime}.
+     * Combines this date-time with an offset to create an {@code OffsetDateTime}.
      * <p>
-     * This returns an {@code OffsetTime} formed from this time at the specified offset.
+     * This returns an {@code OffsetDateTime} formed from this date-time at the specified offset.
      * All possible combinations of date-time and offset are valid.
      *
      * @param offset  the offset to combine with, not null
@@ -1645,7 +1702,7 @@
     }
 
     /**
-     * Combines this time with a time-zone to create a {@code ZonedDateTime}.
+     * Combines this date-time with a time-zone to create a {@code ZonedDateTime}.
      * <p>
      * This returns a {@code ZonedDateTime} formed from this date-time at the
      * specified time-zone. The result will match this date-time as closely as possible.
@@ -1725,7 +1782,7 @@
      * This method only considers the position of the two date-times on the local time-line.
      * It does not take into account the chronology, or calendar system.
      * This is different from the comparison in {@link #compareTo(ChronoLocalDateTime)},
-     * but is the same approach as {@link #DATE_TIME_COMPARATOR}.
+     * but is the same approach as {@link ChronoLocalDateTime#timeLineOrder()}.
      *
      * @param other  the other date-time to compare to, not null
      * @return true if this date-time is after the specified date-time
@@ -1754,7 +1811,7 @@
      * This method only considers the position of the two date-times on the local time-line.
      * It does not take into account the chronology, or calendar system.
      * This is different from the comparison in {@link #compareTo(ChronoLocalDateTime)},
-     * but is the same approach as {@link #DATE_TIME_COMPARATOR}.
+     * but is the same approach as {@link ChronoLocalDateTime#timeLineOrder()}.
      *
      * @param other  the other date-time to compare to, not null
      * @return true if this date-time is before the specified date-time
@@ -1783,7 +1840,7 @@
      * This method only considers the position of the two date-times on the local time-line.
      * It does not take into account the chronology, or calendar system.
      * This is different from the comparison in {@link #compareTo(ChronoLocalDateTime)},
-     * but is the same approach as {@link #DATE_TIME_COMPARATOR}.
+     * but is the same approach as {@link ChronoLocalDateTime#timeLineOrder()}.
      *
      * @param other  the other date-time to compare to, not null
      * @return true if this date-time is equal to the specified date-time
@@ -1834,11 +1891,11 @@
      * <p>
      * The output will be one of the following ISO-8601 formats:
      * <p><ul>
-     * <li>{@code yyyy-MM-dd'T'HH:mm}</li>
-     * <li>{@code yyyy-MM-dd'T'HH:mm:ss}</li>
-     * <li>{@code yyyy-MM-dd'T'HH:mm:ss.SSS}</li>
-     * <li>{@code yyyy-MM-dd'T'HH:mm:ss.SSSSSS}</li>
-     * <li>{@code yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSS}</li>
+     * <li>{@code uuuu-MM-dd'T'HH:mm}</li>
+     * <li>{@code uuuu-MM-dd'T'HH:mm:ss}</li>
+     * <li>{@code uuuu-MM-dd'T'HH:mm:ss.SSS}</li>
+     * <li>{@code uuuu-MM-dd'T'HH:mm:ss.SSSSSS}</li>
+     * <li>{@code uuuu-MM-dd'T'HH:mm:ss.SSSSSSSSS}</li>
      * </ul><p>
      * The format used will be the shortest that outputs the full value of
      * the time where the omitted parts are implied to be zero.
@@ -1850,21 +1907,6 @@
         return date.toString() + 'T' + time.toString();
     }
 
-    /**
-     * Outputs this date-time as a {@code String} using the formatter.
-     * <p>
-     * This date-time will be passed to the formatter
-     * {@link DateTimeFormatter#format(TemporalAccessor) format method}.
-     *
-     * @param formatter  the formatter to use, not null
-     * @return the formatted date-time string, not null
-     * @throws DateTimeException if an error occurs during printing
-     */
-    @Override  // override for Javadoc
-    public String toString(DateTimeFormatter formatter) {
-        return ChronoLocalDateTime.super.toString(formatter);
-    }
-
     //-----------------------------------------------------------------------
     /**
      * Writes the object using a
--- a/src/share/classes/java/time/LocalTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/LocalTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -80,7 +80,6 @@
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -88,6 +87,7 @@
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
 import java.util.Objects;
 
@@ -383,7 +383,7 @@
      * A {@code TemporalAccessor} represents an arbitrary set of date and time information,
      * which this factory converts to an instance of {@code LocalTime}.
      * <p>
-     * The conversion uses the {@link Queries#localTime()} query, which relies
+     * The conversion uses the {@link TemporalQuery#localTime()} query, which relies
      * on extracting the {@link ChronoField#NANO_OF_DAY NANO_OF_DAY} field.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
@@ -394,7 +394,7 @@
      * @throws DateTimeException if unable to convert to a {@code LocalTime}
      */
     public static LocalTime from(TemporalAccessor temporal) {
-        LocalTime time = temporal.query(Queries.localTime());
+        LocalTime time = temporal.query(TemporalQuery.localTime());
         if (time == null) {
             throw new DateTimeException("Unable to obtain LocalTime from TemporalAccessor: " + temporal.getClass());
         }
@@ -505,7 +505,7 @@
     @Override
     public boolean isSupported(TemporalField field) {
         if (field instanceof ChronoField) {
-            return ((ChronoField) field).isTimeField();
+            return field.isTimeBased();
         }
         return field != null && field.isSupportedBy(this);
     }
@@ -521,7 +521,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return
      * appropriate range instances.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
@@ -531,6 +531,7 @@
      * @param field  the field to query the range for, not null
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      */
     @Override  // override for Javadoc
     public ValueRange range(TemporalField field) {
@@ -549,7 +550,7 @@
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this time, except {@code NANO_OF_DAY} and {@code MICRO_OF_DAY}
      * which are too large to fit in an {@code int} and throw a {@code DateTimeException}.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -558,7 +559,10 @@
      *
      * @param field  the field to get, not null
      * @return the value for the field
-     * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws DateTimeException if a value for the field cannot be obtained or
+     *         the value is outside the range of valid values for the field
+     * @throws UnsupportedTemporalTypeException if the field is not supported or
+     *         the range of values exceeds an {@code int}
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override  // override for Javadoc and performance
@@ -579,7 +583,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this time.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -589,6 +593,7 @@
      * @param field  the field to get, not null
      * @return the value for the field
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -608,9 +613,9 @@
     private int get0(TemporalField field) {
         switch ((ChronoField) field) {
             case NANO_OF_SECOND: return nano;
-            case NANO_OF_DAY: throw new DateTimeException("Field too large for an int: " + field);
+            case NANO_OF_DAY: throw new UnsupportedTemporalTypeException("Invalid field 'NanoOfDay' for get() method, use getLong() instead");
             case MICRO_OF_SECOND: return nano / 1000;
-            case MICRO_OF_DAY: throw new DateTimeException("Field too large for an int: " + field);
+            case MICRO_OF_DAY: throw new UnsupportedTemporalTypeException("Invalid field 'MicroOfDay' for get() method, use getLong() instead");
             case MILLI_OF_SECOND: return nano / 1000_000;
             case MILLI_OF_DAY: return (int) (toNanoOfDay() / 1000_000);
             case SECOND_OF_MINUTE: return second;
@@ -623,7 +628,7 @@
             case CLOCK_HOUR_OF_DAY: return (hour == 0 ? 24 : hour);
             case AMPM_OF_DAY: return hour / 12;
         }
-        throw new DateTimeException("Unsupported field: " + field.getName());
+        throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
     }
 
     //-----------------------------------------------------------------------
@@ -760,7 +765,7 @@
      * In all cases, if the new value is outside the valid range of values for the field
      * then a {@code DateTimeException} will be thrown.
      * <p>
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)}
@@ -773,6 +778,7 @@
      * @param newValue  the new value of the field in the result
      * @return a {@code LocalTime} based on {@code this} with the specified field set, not null
      * @throws DateTimeException if the field cannot be set
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -797,7 +803,7 @@
                 case CLOCK_HOUR_OF_DAY: return withHour((int) (newValue == 24 ? 0 : newValue));
                 case AMPM_OF_DAY: return plusHours((newValue - (hour / 12)) * 12);
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.adjustInto(this, newValue);
     }
@@ -890,6 +896,7 @@
      * @param unit  the unit to truncate to, not null
      * @return a {@code LocalTime} based on this time with the time truncated, not null
      * @throws DateTimeException if unable to truncate
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      */
     public LocalTime truncatedTo(TemporalUnit unit) {
         if (unit == ChronoUnit.NANOS) {
@@ -897,11 +904,11 @@
         }
         Duration unitDur = unit.getDuration();
         if (unitDur.getSeconds() > SECONDS_PER_DAY) {
-            throw new DateTimeException("Unit is too large to be used for truncation");
+            throw new UnsupportedTemporalTypeException("Unit is too large to be used for truncation");
         }
         long dur = unitDur.toNanos();
         if ((NANOS_PER_DAY % dur) != 0) {
-            throw new DateTimeException("Unit must divide into a standard day without remainder");
+            throw new UnsupportedTemporalTypeException("Unit must divide into a standard day without remainder");
         }
         long nod = toNanoOfDay();
         return ofNanoOfDay((nod / dur) * dur);
@@ -972,7 +979,7 @@
      *  This returns {@code this} time.
      * </ul>
      * <p>
-     * All other {@code ChronoUnit} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoUnit} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.addTo(Temporal, long)}
@@ -985,6 +992,7 @@
      * @param unit  the unit of the amount to add, not null
      * @return a {@code LocalTime} based on this time with the specified amount added, not null
      * @throws DateTimeException if the addition cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1001,7 +1009,7 @@
                 case HALF_DAYS: return plusHours((amountToAdd % 2) * 12);
                 case DAYS: return this;
             }
-            throw new DateTimeException("Unsupported unit: " + unit.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
         return unit.addTo(this, amountToAdd);
     }
@@ -1147,6 +1155,7 @@
      * @param unit  the unit of the amount to subtract, not null
      * @return a {@code LocalTime} based on this time with the specified amount subtracted, not null
      * @throws DateTimeException if the subtraction cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1237,13 +1246,14 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.chronology() || query == Queries.zoneId() || query == Queries.zone() || query == Queries.offset()) {
+        if (query == TemporalQuery.chronology() || query == TemporalQuery.zoneId() ||
+                query == TemporalQuery.zone() || query == TemporalQuery.offset()) {
             return null;
-        } else if (query == Queries.localTime()) {
+        } else if (query == TemporalQuery.localTime()) {
             return (R) this;
-        } else if (query == Queries.localDate()) {
+        } else if (query == TemporalQuery.localDate()) {
             return null;
-        } else if (query == Queries.precision()) {
+        } else if (query == TemporalQuery.precision()) {
             return (R) NANOS;
         }
         // inline TemporalAccessor.super.query(query) as an optimization
@@ -1322,6 +1332,7 @@
      * @param unit  the unit to measure the period in, not null
      * @return the amount of the period between this time and the end time
      * @throws DateTimeException if the period cannot be calculated
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1342,11 +1353,25 @@
                 case HOURS: return nanosUntil / NANOS_PER_HOUR;
                 case HALF_DAYS: return nanosUntil / (12 * NANOS_PER_HOUR);
             }
-            throw new DateTimeException("Unsupported unit: " + unit.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
         return unit.between(this, endTime);
     }
 
+    /**
+     * Formats this time using the specified formatter.
+     * <p>
+     * This time will be passed to the formatter to produce a string.
+     *
+     * @param formatter  the formatter to use, not null
+     * @return the formatted time string, not null
+     * @throws DateTimeException if an error occurs during printing
+     */
+    public String format(DateTimeFormatter formatter) {
+        Objects.requireNonNull(formatter, "formatter");
+        return formatter.format(this);
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Combines this time with a date to create a {@code LocalDateTime}.
@@ -1362,7 +1387,7 @@
     }
 
     /**
-     * Combines this time with a date to create an {@code OffsetTime}.
+     * Combines this time with an offset to create an {@code OffsetTime}.
      * <p>
      * This returns an {@code OffsetTime} formed from this time at the specified offset.
      * All possible combinations of time and offset are valid.
@@ -1533,21 +1558,6 @@
         return buf.toString();
     }
 
-    /**
-     * Outputs this time as a {@code String} using the formatter.
-     * <p>
-     * This time will be passed to the formatter
-     * {@link DateTimeFormatter#format(TemporalAccessor) format method}.
-     *
-     * @param formatter  the formatter to use, not null
-     * @return the formatted time string, not null
-     * @throws DateTimeException if an error occurs during printing
-     */
-    public String toString(DateTimeFormatter formatter) {
-        Objects.requireNonNull(formatter, "formatter");
-        return formatter.format(this);
-    }
-
     //-----------------------------------------------------------------------
     /**
      * Writes the object using a
--- a/src/share/classes/java/time/Month.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/Month.java	Wed Apr 17 21:48:04 2013 -0700
@@ -61,6 +61,7 @@
  */
 package java.time;
 
+import java.time.temporal.UnsupportedTemporalTypeException;
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
 import static java.time.temporal.ChronoUnit.MONTHS;
 
@@ -69,7 +70,6 @@
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.format.TextStyle;
 import java.time.temporal.ChronoField;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -290,7 +290,7 @@
      * <p>
      * If the field is {@link ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR} then the
      * range of the month-of-year, from 1 to 12, will be returned.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
@@ -300,6 +300,7 @@
      * @param field  the field to query the range for, not null
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      */
     @Override
     public ValueRange range(TemporalField field) {
@@ -319,7 +320,7 @@
      * <p>
      * If the field is {@link ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR} then the
      * value of the month-of-year, from 1 to 12, will be returned.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -328,7 +329,10 @@
      *
      * @param field  the field to get, not null
      * @return the value for the field, within the valid range of values
-     * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws DateTimeException if a value for the field cannot be obtained or
+     *         the value is outside the range of valid values for the field
+     * @throws UnsupportedTemporalTypeException if the field is not supported or
+     *         the range of values exceeds an {@code int}
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -348,7 +352,7 @@
      * <p>
      * If the field is {@link ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR} then the
      * value of the month-of-year, from 1 to 12, will be returned.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -358,6 +362,7 @@
      * @param field  the field to get, not null
      * @return the value for the field
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -365,7 +370,7 @@
         if (field == MONTH_OF_YEAR) {
             return getValue();
         } else if (field instanceof ChronoField) {
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.getFrom(this);
     }
@@ -554,9 +559,9 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.chronology()) {
+        if (query == TemporalQuery.chronology()) {
             return (R) IsoChronology.INSTANCE;
-        } else if (query == Queries.precision()) {
+        } else if (query == TemporalQuery.precision()) {
             return (R) MONTHS;
         }
         return TemporalAccessor.super.query(query);
--- a/src/share/classes/java/time/MonthDay.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/MonthDay.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,12 +76,12 @@
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoField;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
 import java.util.Objects;
 
@@ -354,7 +354,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return
      * appropriate range instances.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
@@ -364,6 +364,7 @@
      * @param field  the field to query the range for, not null
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      */
     @Override
     public ValueRange range(TemporalField field) {
@@ -386,7 +387,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this month-day.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -395,7 +396,10 @@
      *
      * @param field  the field to get, not null
      * @return the value for the field
-     * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws DateTimeException if a value for the field cannot be obtained or
+     *         the value is outside the range of valid values for the field
+     * @throws UnsupportedTemporalTypeException if the field is not supported or
+     *         the range of values exceeds an {@code int}
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override  // override for Javadoc
@@ -413,7 +417,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this month-day.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -423,6 +427,7 @@
      * @param field  the field to get, not null
      * @return the value for the field
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -433,7 +438,7 @@
                 case DAY_OF_MONTH: return day;
                 case MONTH_OF_YEAR: return month;
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.getFrom(this);
     }
@@ -575,7 +580,7 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.chronology()) {
+        if (query == TemporalQuery.chronology()) {
             return (R) IsoChronology.INSTANCE;
         }
         return TemporalAccessor.super.query(query);
@@ -617,6 +622,20 @@
         return temporal.with(DAY_OF_MONTH, Math.min(temporal.range(DAY_OF_MONTH).getMaximum(), day));
     }
 
+    /**
+     * Formats this month-day using the specified formatter.
+     * <p>
+     * This month-day will be passed to the formatter to produce a string.
+     *
+     * @param formatter  the formatter to use, not null
+     * @return the formatted month-day string, not null
+     * @throws DateTimeException if an error occurs during printing
+     */
+    public String format(DateTimeFormatter formatter) {
+        Objects.requireNonNull(formatter, "formatter");
+        return formatter.format(this);
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Combines this month-day with a year to create a {@code LocalDate}.
@@ -722,21 +741,6 @@
             .toString();
     }
 
-    /**
-     * Outputs this month-day as a {@code String} using the formatter.
-     * <p>
-     * This month-day will be passed to the formatter
-     * {@link DateTimeFormatter#format(TemporalAccessor) format method}.
-     *
-     * @param formatter  the formatter to use, not null
-     * @return the formatted month-day string, not null
-     * @throws DateTimeException if an error occurs during printing
-     */
-    public String toString(DateTimeFormatter formatter) {
-        Objects.requireNonNull(formatter, "formatter");
-        return formatter.format(this);
-    }
-
     //-----------------------------------------------------------------------
     /**
      * Writes the object using a
--- a/src/share/classes/java/time/OffsetDateTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/OffsetDateTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -78,7 +78,6 @@
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -86,6 +85,7 @@
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
 import java.time.zone.ZoneRules;
 import java.util.Comparator;
@@ -436,7 +436,7 @@
      * <li>{@code ALIGNED_WEEK_OF_MONTH}
      * <li>{@code ALIGNED_WEEK_OF_YEAR}
      * <li>{@code MONTH_OF_YEAR}
-     * <li>{@code EPOCH_MONTH}
+     * <li>{@code PROLEPTIC_MONTH}
      * <li>{@code YEAR_OF_ERA}
      * <li>{@code YEAR}
      * <li>{@code ERA}
@@ -469,7 +469,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return
      * appropriate range instances.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
@@ -479,6 +479,7 @@
      * @param field  the field to query the range for, not null
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      */
     @Override
     public ValueRange range(TemporalField field) {
@@ -502,9 +503,9 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this date-time, except {@code NANO_OF_DAY}, {@code MICRO_OF_DAY},
-     * {@code EPOCH_DAY}, {@code EPOCH_MONTH} and {@code INSTANT_SECONDS} which are too
+     * {@code EPOCH_DAY}, {@code PROLEPTIC_MONTH} and {@code INSTANT_SECONDS} which are too
      * large to fit in an {@code int} and throw a {@code DateTimeException}.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -513,15 +514,20 @@
      *
      * @param field  the field to get, not null
      * @return the value for the field
-     * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws DateTimeException if a value for the field cannot be obtained or
+     *         the value is outside the range of valid values for the field
+     * @throws UnsupportedTemporalTypeException if the field is not supported or
+     *         the range of values exceeds an {@code int}
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
     public int get(TemporalField field) {
         if (field instanceof ChronoField) {
             switch ((ChronoField) field) {
-                case INSTANT_SECONDS: throw new DateTimeException("Field too large for an int: " + field);
-                case OFFSET_SECONDS: return getOffset().getTotalSeconds();
+                case INSTANT_SECONDS:
+                    throw new UnsupportedTemporalTypeException("Invalid field 'InstantSeconds' for get() method, use getLong() instead");
+                case OFFSET_SECONDS:
+                    return getOffset().getTotalSeconds();
             }
             return dateTime.get(field);
         }
@@ -538,7 +544,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this date-time.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -548,6 +554,7 @@
      * @param field  the field to get, not null
      * @return the value for the field
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -790,7 +797,7 @@
      * <p>
      * A simple adjuster might simply set the one of the fields, such as the year field.
      * A more complex adjuster might set the date to the last day of the month.
-     * A selection of common adjustments is provided in {@link java.time.temporal.Adjusters}.
+     * A selection of common adjustments is provided in {@link TemporalAdjuster}.
      * These include finding the "last day of the month" and "next Wednesday".
      * Key date-time classes also implement the {@code TemporalAdjuster} interface,
      * such as {@link Month} and {@link java.time.MonthDay MonthDay}.
@@ -867,7 +874,7 @@
      * the matching method on {@link LocalDateTime#with(TemporalField, long) LocalDateTime}.
      * In this case, the offset is not part of the calculation and will be unchanged.
      * <p>
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)}
@@ -880,6 +887,7 @@
      * @param newValue  the new value of the field in the result
      * @return an {@code OffsetDateTime} based on {@code this} with the specified field set, not null
      * @throws DateTimeException if the field cannot be set
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1041,6 +1049,7 @@
      * @param unit  the unit to truncate to, not null
      * @return an {@code OffsetDateTime} based on this date-time with the time truncated, not null
      * @throws DateTimeException if unable to truncate
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      */
     public OffsetDateTime truncatedTo(TemporalUnit unit) {
         return with(dateTime.truncatedTo(unit), offset);
@@ -1094,6 +1103,7 @@
      * @param unit  the unit of the amount to add, not null
      * @return an {@code OffsetDateTime} based on this date-time with the specified amount added, not null
      * @throws DateTimeException if the addition cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1285,6 +1295,7 @@
      * @param unit  the unit of the amount to subtract, not null
      * @return an {@code OffsetDateTime} based on this date-time with the specified amount subtracted, not null
      * @throws DateTimeException if the subtraction cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1453,17 +1464,17 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.offset() || query == Queries.zone()) {
+        if (query == TemporalQuery.offset() || query == TemporalQuery.zone()) {
             return (R) getOffset();
-        } else if (query == Queries.zoneId()) {
+        } else if (query == TemporalQuery.zoneId()) {
             return null;
-        } else if (query == Queries.localDate()) {
+        } else if (query == TemporalQuery.localDate()) {
             return (R) toLocalDate();
-        } else if (query == Queries.localTime()) {
+        } else if (query == TemporalQuery.localTime()) {
             return (R) toLocalTime();
-        } else if (query == Queries.chronology()) {
+        } else if (query == TemporalQuery.chronology()) {
             return (R) IsoChronology.INSTANCE;
-        } else if (query == Queries.precision()) {
+        } else if (query == TemporalQuery.precision()) {
             return (R) NANOS;
         }
         // inline TemporalAccessor.super.query(query) as an optimization
@@ -1479,8 +1490,8 @@
      * with the offset, date and time changed to be the same as this.
      * <p>
      * The adjustment is equivalent to using {@link Temporal#with(TemporalField, long)}
-     * three times, passing {@link ChronoField#OFFSET_SECONDS},
-     * {@link ChronoField#EPOCH_DAY} and {@link ChronoField#NANO_OF_DAY} as the fields.
+     * three times, passing {@link ChronoField#EPOCH_DAY},
+     * {@link ChronoField#NANO_OF_DAY} and {@link ChronoField#OFFSET_SECONDS} as the fields.
      * <p>
      * In most cases, it is clearer to reverse the calling pattern by using
      * {@link Temporal#with(TemporalAdjuster)}:
@@ -1499,10 +1510,14 @@
      */
     @Override
     public Temporal adjustInto(Temporal temporal) {
+        // OffsetDateTime is treated as three separate fields, not an instant
+        // this produces the most consistent set of results overall
+        // the offset is set after the date and time, as it is typically a small
+        // tweak to the result, with ZonedDateTime frequently ignoring the offset
         return temporal
-                .with(OFFSET_SECONDS, getOffset().getTotalSeconds())
                 .with(EPOCH_DAY, toLocalDate().toEpochDay())
-                .with(NANO_OF_DAY, toLocalTime().toNanoOfDay());
+                .with(NANO_OF_DAY, toLocalTime().toNanoOfDay())
+                .with(OFFSET_SECONDS, getOffset().getTotalSeconds());
     }
 
     /**
@@ -1552,6 +1567,7 @@
      * @param unit  the unit to measure the period in, not null
      * @return the amount of the period between this date-time and the end date-time
      * @throws DateTimeException if the period cannot be calculated
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1568,6 +1584,20 @@
         return unit.between(this, endDateTime);
     }
 
+    /**
+     * Formats this date-time using the specified formatter.
+     * <p>
+     * This date-time will be passed to the formatter to produce a string.
+     *
+     * @param formatter  the formatter to use, not null
+     * @return the formatted date-time string, not null
+     * @throws DateTimeException if an error occurs during printing
+     */
+    public String format(DateTimeFormatter formatter) {
+        Objects.requireNonNull(formatter, "formatter");
+        return formatter.format(this);
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Combines this date-time with a time-zone to create a {@code ZonedDateTime}
@@ -1796,11 +1826,11 @@
      * <p>
      * The output will be one of the following ISO-8601 formats:
      * <p><ul>
-     * <li>{@code yyyy-MM-dd'T'HH:mmXXXXX}</li>
-     * <li>{@code yyyy-MM-dd'T'HH:mm:ssXXXXX}</li>
-     * <li>{@code yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX}</li>
-     * <li>{@code yyyy-MM-dd'T'HH:mm:ss.SSSSSSXXXXX}</li>
-     * <li>{@code yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSSXXXXX}</li>
+     * <li>{@code uuuu-MM-dd'T'HH:mmXXXXX}</li>
+     * <li>{@code uuuu-MM-dd'T'HH:mm:ssXXXXX}</li>
+     * <li>{@code uuuu-MM-dd'T'HH:mm:ss.SSSXXXXX}</li>
+     * <li>{@code uuuu-MM-dd'T'HH:mm:ss.SSSSSSXXXXX}</li>
+     * <li>{@code uuuu-MM-dd'T'HH:mm:ss.SSSSSSSSSXXXXX}</li>
      * </ul><p>
      * The format used will be the shortest that outputs the full value of
      * the time where the omitted parts are implied to be zero.
@@ -1812,21 +1842,6 @@
         return dateTime.toString() + offset.toString();
     }
 
-    /**
-     * Outputs this date-time as a {@code String} using the formatter.
-     * <p>
-     * This date-time will be passed to the formatter
-     * {@link DateTimeFormatter#format(TemporalAccessor) format method}.
-     *
-     * @param formatter  the formatter to use, not null
-     * @return the formatted date-time string, not null
-     * @throws DateTimeException if an error occurs during printing
-     */
-    public String toString(DateTimeFormatter formatter) {
-        Objects.requireNonNull(formatter, "formatter");
-        return formatter.format(this);
-    }
-
     //-----------------------------------------------------------------------
     /**
      * Writes the object using a
--- a/src/share/classes/java/time/OffsetTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/OffsetTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -79,7 +79,6 @@
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -87,6 +86,7 @@
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
 import java.time.zone.ZoneRules;
 import java.util.Objects;
@@ -384,7 +384,7 @@
     @Override
     public boolean isSupported(TemporalField field) {
         if (field instanceof ChronoField) {
-            return ((ChronoField) field).isTimeField() || field == OFFSET_SECONDS;
+            return field.isTimeBased() || field == OFFSET_SECONDS;
         }
         return field != null && field.isSupportedBy(this);
     }
@@ -400,7 +400,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return
      * appropriate range instances.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
@@ -410,6 +410,7 @@
      * @param field  the field to query the range for, not null
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      */
     @Override
     public ValueRange range(TemporalField field) {
@@ -434,7 +435,7 @@
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this time, except {@code NANO_OF_DAY} and {@code MICRO_OF_DAY}
      * which are too large to fit in an {@code int} and throw a {@code DateTimeException}.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -443,7 +444,10 @@
      *
      * @param field  the field to get, not null
      * @return the value for the field
-     * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws DateTimeException if a value for the field cannot be obtained or
+     *         the value is outside the range of valid values for the field
+     * @throws UnsupportedTemporalTypeException if the field is not supported or
+     *         the range of values exceeds an {@code int}
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override  // override for Javadoc
@@ -461,7 +465,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this time.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -471,6 +475,7 @@
      * @param field  the field to get, not null
      * @return the value for the field
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -655,7 +660,7 @@
      * the matching method on {@link LocalTime#with(TemporalField, long)} LocalTime}.
      * In this case, the offset is not part of the calculation and will be unchanged.
      * <p>
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)}
@@ -668,6 +673,7 @@
      * @param newValue  the new value of the field in the result
      * @return an {@code OffsetTime} based on {@code this} with the specified field set, not null
      * @throws DateTimeException if the field cannot be set
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -764,6 +770,7 @@
      * @param unit  the unit to truncate to, not null
      * @return an {@code OffsetTime} based on this time with the time truncated, not null
      * @throws DateTimeException if unable to truncate
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      */
     public OffsetTime truncatedTo(TemporalUnit unit) {
         return with(time.truncatedTo(unit), offset);
@@ -817,6 +824,7 @@
      * @param unit  the unit of the amount to add, not null
      * @return an {@code OffsetTime} based on this time with the specified amount added, not null
      * @throws DateTimeException if the addition cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -930,6 +938,7 @@
      * @param unit  the unit of the amount to subtract, not null
      * @return an {@code OffsetTime} based on this time with the specified amount subtracted, not null
      * @throws DateTimeException if the subtraction cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1020,13 +1029,13 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.offset() || query == Queries.zone()) {
+        if (query == TemporalQuery.offset() || query == TemporalQuery.zone()) {
             return (R) offset;
-        } else if (query == Queries.zoneId() | query == Queries.chronology() || query == Queries.localDate()) {
+        } else if (query == TemporalQuery.zoneId() | query == TemporalQuery.chronology() || query == TemporalQuery.localDate()) {
             return null;
-        } else if (query == Queries.localTime()) {
+        } else if (query == TemporalQuery.localTime()) {
             return (R) time;
-        } else if (query == Queries.precision()) {
+        } else if (query == TemporalQuery.precision()) {
             return (R) NANOS;
         }
         // inline TemporalAccessor.super.query(query) as an optimization
@@ -1042,8 +1051,8 @@
      * with the offset and time changed to be the same as this.
      * <p>
      * The adjustment is equivalent to using {@link Temporal#with(TemporalField, long)}
-     * twice, passing {@link ChronoField#OFFSET_SECONDS} and
-     * {@link ChronoField#NANO_OF_DAY} as the fields.
+     * twice, passing {@link ChronoField#NANO_OF_DAY} and
+     * {@link ChronoField#OFFSET_SECONDS} as the fields.
      * <p>
      * In most cases, it is clearer to reverse the calling pattern by using
      * {@link Temporal#with(TemporalAdjuster)}:
@@ -1063,8 +1072,8 @@
     @Override
     public Temporal adjustInto(Temporal temporal) {
         return temporal
-                .with(OFFSET_SECONDS, offset.getTotalSeconds())
-                .with(NANO_OF_DAY, time.toNanoOfDay());
+                .with(NANO_OF_DAY, time.toNanoOfDay())
+                .with(OFFSET_SECONDS, offset.getTotalSeconds());
     }
 
     /**
@@ -1112,6 +1121,7 @@
      * @param unit  the unit to measure the period in, not null
      * @return the amount of the period between this time and the end time
      * @throws DateTimeException if the period cannot be calculated
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1132,14 +1142,28 @@
                 case HOURS: return nanosUntil / NANOS_PER_HOUR;
                 case HALF_DAYS: return nanosUntil / (12 * NANOS_PER_HOUR);
             }
-            throw new DateTimeException("Unsupported unit: " + unit.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
         return unit.between(this, endTime);
     }
 
+    /**
+     * Formats this time using the specified formatter.
+     * <p>
+     * This time will be passed to the formatter to produce a string.
+     *
+     * @param formatter  the formatter to use, not null
+     * @return the formatted time string, not null
+     * @throws DateTimeException if an error occurs during printing
+     */
+    public String format(DateTimeFormatter formatter) {
+        Objects.requireNonNull(formatter, "formatter");
+        return formatter.format(this);
+    }
+
     //-----------------------------------------------------------------------
     /**
-     * Combines this date with a time to create an {@code OffsetDateTime}.
+     * Combines this time with a date to create an {@code OffsetDateTime}.
      * <p>
      * This returns an {@code OffsetDateTime} formed from this time and the specified date.
      * All possible combinations of date and time are valid.
@@ -1307,27 +1331,12 @@
         return time.toString() + offset.toString();
     }
 
-    /**
-     * Outputs this time as a {@code String} using the formatter.
-     * <p>
-     * This time will be passed to the formatter
-     * {@link DateTimeFormatter#format(TemporalAccessor) format method}.
-     *
-     * @param formatter  the formatter to use, not null
-     * @return the formatted time string, not null
-     * @throws DateTimeException if an error occurs during printing
-     */
-    public String toString(DateTimeFormatter formatter) {
-        Objects.requireNonNull(formatter, "formatter");
-        return formatter.format(this);
-    }
-
-    // -----------------------------------------------------------------------
+    //-----------------------------------------------------------------------
     /**
      * Writes the object using a
      * <a href="../../../serialized-form.html#java.time.temporal.Ser">dedicated serialized form</a>.
      * <pre>
-     *  out.writeByte(9);  // identifies this as a OffsetDateTime
+     *  out.writeByte(9);  // identifies this as a OffsetTime
      *  out.writeObject(time);
      *  out.writeObject(offset);
      * </pre>
--- a/src/share/classes/java/time/Period.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/Period.java	Wed Apr 17 21:48:04 2013 -0700
@@ -79,6 +79,7 @@
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
 import java.util.Arrays;
 import java.util.Collections;
@@ -215,26 +216,40 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Obtains a {@code Period} consisting of the number of years, months,
-     * and days between two dates.
+     * Obtains an instance of {@code Period} from a temporal amount.
      * <p>
-     * The start date is included, but the end date is not.
-     * The period is calculated by removing complete months, then calculating
-     * the remaining number of days, adjusting to ensure that both have the same sign.
-     * The number of months is then split into years and months based on a 12 month year.
-     * A month is considered if the end day-of-month is greater than or equal to the start day-of-month.
-     * For example, from {@code 2010-01-15} to {@code 2011-03-18} is one year, two months and three days.
+     * This obtains a period based on the specified amount.
+     * A {@code TemporalAmount} represents an  amount of time, which may be
+     * date-based or time-based, which this factory extracts to a period.
      * <p>
-     * The result of this method can be a negative period if the end is before the start.
-     * The negative sign will be the same in each of year, month and day.
+     * The conversion loops around the set of units from the amount and uses
+     * the {@link ChronoUnit#YEARS YEARS}, {@link ChronoUnit#MONTHS MONTHS}
+     * and {@link ChronoUnit#DAYS DAYS} units to create a period.
+     * If any other units are found then an exception is thrown.
      *
-     * @param startDate  the start date, inclusive, not null
-     * @param endDate  the end date, exclusive, not null
-     * @return the period between this date and the end date, not null
-     * @see ChronoLocalDate#periodUntil(ChronoLocalDate)
+     * @param amount  the temporal amount to convert, not null
+     * @return the equivalent period, not null
+     * @throws DateTimeException if unable to convert to a {@code Period}
+     * @throws ArithmeticException if the amount of years, months or days exceeds an int
      */
-    public static Period between(LocalDate startDate, LocalDate endDate) {
-        return startDate.periodUntil(endDate);
+    public static Period from(TemporalAmount amount) {
+        Objects.requireNonNull(amount, "amount");
+        int years = 0;
+        int months = 0;
+        int days = 0;
+        for (TemporalUnit unit : amount.getUnits()) {
+            long unitAmount = amount.get(unit);
+            if (unit == ChronoUnit.YEARS) {
+                years = Math.toIntExact(unitAmount);
+            } else if (unit == ChronoUnit.MONTHS) {
+                months = Math.toIntExact(unitAmount);
+            } else if (unit == ChronoUnit.DAYS) {
+                days = Math.toIntExact(unitAmount);
+            } else {
+                throw new DateTimeException("Unit must be Years, Months or Days, but was " + unit);
+            }
+        }
+        return create(years, months, days);
     }
 
     //-----------------------------------------------------------------------
@@ -298,6 +313,30 @@
 
     //-----------------------------------------------------------------------
     /**
+     * Obtains a {@code Period} consisting of the number of years, months,
+     * and days between two dates.
+     * <p>
+     * The start date is included, but the end date is not.
+     * The period is calculated by removing complete months, then calculating
+     * the remaining number of days, adjusting to ensure that both have the same sign.
+     * The number of months is then split into years and months based on a 12 month year.
+     * A month is considered if the end day-of-month is greater than or equal to the start day-of-month.
+     * For example, from {@code 2010-01-15} to {@code 2011-03-18} is one year, two months and three days.
+     * <p>
+     * The result of this method can be a negative period if the end is before the start.
+     * The negative sign will be the same in each of year, month and day.
+     *
+     * @param startDate  the start date, inclusive, not null
+     * @param endDate  the end date, exclusive, not null
+     * @return the period between this date and the end date, not null
+     * @see ChronoLocalDate#periodUntil(ChronoLocalDate)
+     */
+    public static Period between(LocalDate startDate, LocalDate endDate) {
+        return startDate.periodUntil(endDate);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
      * Creates an instance.
      *
      * @param years  the amount
@@ -336,6 +375,7 @@
      * @param unit the {@code TemporalUnit} for which to return the value
      * @return the long value of the unit
      * @throws DateTimeException if the unit is not supported
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      */
     @Override
     public long get(TemporalUnit unit) {
@@ -346,7 +386,7 @@
         } else if (unit == ChronoUnit.DAYS) {
             return getDays();
         } else {
-            throw new DateTimeException("Unsupported unit: " + unit.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
     }
 
@@ -499,8 +539,7 @@
     /**
      * Returns a copy of this period with the specified period added.
      * <p>
-     * This operates separately on the years, months, days and the normalized time.
-     * There is no further normalization beyond the normalized time.
+     * This operates separately on the years, months and days.
      * <p>
      * For example, "1 year, 6 months and 3 days" plus "2 years, 2 months and 2 days"
      * returns "3 years, 8 months and 5 days".
@@ -582,8 +621,7 @@
     /**
      * Returns a copy of this period with the specified period subtracted.
      * <p>
-     * This operates separately on the years, months, days and the normalized time.
-     * There is no further normalization beyond the normalized time.
+     * This operates separately on the years, months and days.
      * <p>
      * For example, "1 year, 6 months and 3 days" minus "2 years, 2 months and 2 days"
      * returns "-1 years, 4 months and 1 day".
@@ -845,9 +883,11 @@
      * @return the month range, negative if not fixed range
      */
     private long monthRange(Temporal temporal) {
-        ValueRange startRange = Chronology.from(temporal).range(MONTH_OF_YEAR);
-        if (startRange.isFixed() && startRange.isIntValue()) {
-            return startRange.getMaximum() - startRange.getMinimum() + 1;
+        if (temporal.isSupported(MONTH_OF_YEAR)) {
+            ValueRange startRange = Chronology.from(temporal).range(MONTH_OF_YEAR);
+            if (startRange.isFixed() && startRange.isIntValue()) {
+                return startRange.getMaximum() - startRange.getMinimum() + 1;
+            }
         }
         return -1;
     }
--- a/src/share/classes/java/time/Year.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/Year.java	Wed Apr 17 21:48:04 2013 -0700
@@ -80,7 +80,6 @@
 import java.time.format.SignStyle;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -88,6 +87,7 @@
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
 import java.util.Objects;
 
@@ -368,7 +368,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return
      * appropriate range instances.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
@@ -378,6 +378,7 @@
      * @param field  the field to query the range for, not null
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      */
     @Override
     public ValueRange range(TemporalField field) {
@@ -398,7 +399,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this year.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -407,7 +408,10 @@
      *
      * @param field  the field to get, not null
      * @return the value for the field
-     * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws DateTimeException if a value for the field cannot be obtained or
+     *         the value is outside the range of valid values for the field
+     * @throws UnsupportedTemporalTypeException if the field is not supported or
+     *         the range of values exceeds an {@code int}
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override  // override for Javadoc
@@ -425,7 +429,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this year.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -435,6 +439,7 @@
      * @param field  the field to get, not null
      * @return the value for the field
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -445,7 +450,7 @@
                 case YEAR: return year;
                 case ERA: return (year < 1 ? 0 : 1);
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.getFrom(this);
     }
@@ -544,7 +549,7 @@
      * In all cases, if the new value is outside the valid range of values for the field
      * then a {@code DateTimeException} will be thrown.
      * <p>
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)}
@@ -557,6 +562,7 @@
      * @param newValue  the new value of the field in the result
      * @return a {@code Year} based on {@code this} with the specified field set, not null
      * @throws DateTimeException if the field cannot be set
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -569,7 +575,7 @@
                 case YEAR: return Year.of((int) newValue);
                 case ERA: return (getLong(ERA) == newValue ? this : Year.of(1 - year));
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.adjustInto(this, newValue);
     }
@@ -632,7 +638,7 @@
      *  is unchanged.
      * </ul>
      * <p>
-     * All other {@code ChronoUnit} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoUnit} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.addTo(Temporal, long)}
@@ -645,6 +651,7 @@
      * @param unit  the unit of the amount to add, not null
      * @return a {@code Year} based on this year with the specified amount added, not null
      * @throws DateTimeException if the addition cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -657,7 +664,7 @@
                 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000));
                 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd));
             }
-            throw new DateTimeException("Unsupported unit: " + unit.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
         return unit.addTo(this, amountToAdd);
     }
@@ -705,9 +712,9 @@
     }
 
     /**
-     * Returns a copy of this year-month with the specified amount subtracted.
+     * Returns a copy of this year with the specified amount subtracted.
      * <p>
-     * This returns a {@code YearMonth}, based on this one, with the amount
+     * This returns a {@code Year}, based on this one, with the amount
      * in terms of the unit subtracted. If it is not possible to subtract the amount,
      * because the unit is not supported or for some other reason, an exception is thrown.
      * <p>
@@ -718,8 +725,9 @@
      *
      * @param amountToSubtract  the amount of the unit to subtract from the result, may be negative
      * @param unit  the unit of the amount to subtract, not null
-     * @return a {@code YearMonth} based on this year-month with the specified amount subtracted, not null
+     * @return a {@code Year} based on this year with the specified amount subtracted, not null
      * @throws DateTimeException if the subtraction cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -762,9 +770,9 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.chronology()) {
+        if (query == TemporalQuery.chronology()) {
             return (R) IsoChronology.INSTANCE;
-        } else if (query == Queries.precision()) {
+        } else if (query == TemporalQuery.precision()) {
             return (R) YEARS;
         }
         return Temporal.super.query(query);
@@ -846,6 +854,7 @@
      * @param unit  the unit to measure the period in, not null
      * @return the amount of the period between this year and the end year
      * @throws DateTimeException if the period cannot be calculated
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -864,11 +873,25 @@
                 case MILLENNIA: return yearsUntil / 1000;
                 case ERAS: return end.getLong(ERA) - getLong(ERA);
             }
-            throw new DateTimeException("Unsupported unit: " + unit.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
         return unit.between(this, endYear);
     }
 
+    /**
+     * Formats this year using the specified formatter.
+     * <p>
+     * This year will be passed to the formatter to produce a string.
+     *
+     * @param formatter  the formatter to use, not null
+     * @return the formatted year string, not null
+     * @throws DateTimeException if an error occurs during printing
+     */
+    public String format(DateTimeFormatter formatter) {
+        Objects.requireNonNull(formatter, "formatter");
+        return formatter.format(this);
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Combines this year with a day-of-year to create a {@code LocalDate}.
@@ -1014,21 +1037,6 @@
         return Integer.toString(year);
     }
 
-    /**
-     * Outputs this year as a {@code String} using the formatter.
-     * <p>
-     * This year will be passed to the formatter
-     * {@link DateTimeFormatter#format(TemporalAccessor) format method}.
-     *
-     * @param formatter  the formatter to use, not null
-     * @return the formatted year string, not null
-     * @throws DateTimeException if an error occurs during printing
-     */
-    public String toString(DateTimeFormatter formatter) {
-        Objects.requireNonNull(formatter, "formatter");
-        return formatter.format(this);
-    }
-
     //-----------------------------------------------------------------------
     /**
      * Writes the object using a
--- a/src/share/classes/java/time/YearMonth.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/YearMonth.java	Wed Apr 17 21:48:04 2013 -0700
@@ -61,9 +61,9 @@
  */
 package java.time;
 
-import static java.time.temporal.ChronoField.EPOCH_MONTH;
 import static java.time.temporal.ChronoField.ERA;
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
 import static java.time.temporal.ChronoField.YEAR;
 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
 import static java.time.temporal.ChronoUnit.MONTHS;
@@ -82,7 +82,6 @@
 import java.time.format.SignStyle;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -90,6 +89,7 @@
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
 import java.util.Objects;
 
@@ -255,7 +255,7 @@
      * Obtains an instance of {@code YearMonth} from a text string such as {@code 2007-12}.
      * <p>
      * The string must represent a valid year-month.
-     * The format must be {@code yyyy-MM}.
+     * The format must be {@code uuuu-MM}.
      * Years outside the range 0000 to 9999 must be prefixed by the plus or minus symbol.
      *
      * @param text  the text to parse such as "2007-12", not null
@@ -320,7 +320,7 @@
      * The supported fields are:
      * <ul>
      * <li>{@code MONTH_OF_YEAR}
-     * <li>{@code EPOCH_MONTH}
+     * <li>{@code PROLEPTIC_MONTH}
      * <li>{@code YEAR_OF_ERA}
      * <li>{@code YEAR}
      * <li>{@code ERA}
@@ -339,7 +339,7 @@
     public boolean isSupported(TemporalField field) {
         if (field instanceof ChronoField) {
             return field == YEAR || field == MONTH_OF_YEAR ||
-                    field == EPOCH_MONTH || field == YEAR_OF_ERA || field == ERA;
+                    field == PROLEPTIC_MONTH || field == YEAR_OF_ERA || field == ERA;
         }
         return field != null && field.isSupportedBy(this);
     }
@@ -355,7 +355,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return
      * appropriate range instances.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
@@ -365,6 +365,7 @@
      * @param field  the field to query the range for, not null
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      */
     @Override
     public ValueRange range(TemporalField field) {
@@ -384,9 +385,9 @@
      * <p>
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
-     * values based on this year-month, except {@code EPOCH_MONTH} which is too
+     * values based on this year-month, except {@code PROLEPTIC_MONTH} which is too
      * large to fit in an {@code int} and throw a {@code DateTimeException}.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -395,7 +396,10 @@
      *
      * @param field  the field to get, not null
      * @return the value for the field
-     * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws DateTimeException if a value for the field cannot be obtained or
+     *         the value is outside the range of valid values for the field
+     * @throws UnsupportedTemporalTypeException if the field is not supported or
+     *         the range of values exceeds an {@code int}
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override  // override for Javadoc
@@ -413,7 +417,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this year-month.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -423,6 +427,7 @@
      * @param field  the field to get, not null
      * @return the value for the field
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -430,18 +435,18 @@
         if (field instanceof ChronoField) {
             switch ((ChronoField) field) {
                 case MONTH_OF_YEAR: return month;
-                case EPOCH_MONTH: return getEpochMonth();
+                case PROLEPTIC_MONTH: return getProlepticMonth();
                 case YEAR_OF_ERA: return (year < 1 ? 1 - year : year);
                 case YEAR: return year;
                 case ERA: return (year < 1 ? 0 : 1);
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.getFrom(this);
     }
 
-    private long getEpochMonth() {
-        return ((year - 1970) * 12L) + (month - 1);
+    private long getProlepticMonth() {
+        return (year * 12L + month - 1);
     }
 
     //-----------------------------------------------------------------------
@@ -589,8 +594,8 @@
      * <li>{@code MONTH_OF_YEAR} -
      *  Returns a {@code YearMonth} with the specified month-of-year.
      *  The year will be unchanged.
-     * <li>{@code EPOCH_MONTH} -
-     *  Returns a {@code YearMonth} with the specified epoch-month.
+     * <li>{@code PROLEPTIC_MONTH} -
+     *  Returns a {@code YearMonth} with the specified proleptic-month.
      *  This completely replaces the year and month of this object.
      * <li>{@code YEAR_OF_ERA} -
      *  Returns a {@code YearMonth} with the specified year-of-era
@@ -606,7 +611,7 @@
      * In all cases, if the new value is outside the valid range of values for the field
      * then a {@code DateTimeException} will be thrown.
      * <p>
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)}
@@ -619,6 +624,7 @@
      * @param newValue  the new value of the field in the result
      * @return a {@code YearMonth} based on {@code this} with the specified field set, not null
      * @throws DateTimeException if the field cannot be set
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -628,12 +634,12 @@
             f.checkValidValue(newValue);
             switch (f) {
                 case MONTH_OF_YEAR: return withMonth((int) newValue);
-                case EPOCH_MONTH: return plusMonths(newValue - getLong(EPOCH_MONTH));
+                case PROLEPTIC_MONTH: return plusMonths(newValue - getProlepticMonth());
                 case YEAR_OF_ERA: return withYear((int) (year < 1 ? 1 - newValue : newValue));
                 case YEAR: return withYear((int) newValue);
                 case ERA: return (getLong(ERA) == newValue ? this : withYear(1 - year));
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.adjustInto(this, newValue);
     }
@@ -728,7 +734,7 @@
      *  is unchanged.
      * </ul>
      * <p>
-     * All other {@code ChronoUnit} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoUnit} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.addTo(Temporal, long)}
@@ -741,6 +747,7 @@
      * @param unit  the unit of the amount to add, not null
      * @return a {@code YearMonth} based on this year-month with the specified amount added, not null
      * @throws DateTimeException if the addition cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -754,7 +761,7 @@
                 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000));
                 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd));
             }
-            throw new DateTimeException("Unsupported unit: " + unit.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
         return unit.addTo(this, amountToAdd);
     }
@@ -838,6 +845,7 @@
      * @param unit  the unit of the amount to subtract, not null
      * @return a {@code YearMonth} based on this year-month with the specified amount subtracted, not null
      * @throws DateTimeException if the subtraction cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -893,9 +901,9 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.chronology()) {
+        if (query == TemporalQuery.chronology()) {
             return (R) IsoChronology.INSTANCE;
-        } else if (query == Queries.precision()) {
+        } else if (query == TemporalQuery.precision()) {
             return (R) MONTHS;
         }
         return Temporal.super.query(query);
@@ -908,7 +916,7 @@
      * with the year and month changed to be the same as this.
      * <p>
      * The adjustment is equivalent to using {@link Temporal#with(TemporalField, long)}
-     * passing {@link ChronoField#EPOCH_MONTH} as the field.
+     * passing {@link ChronoField#PROLEPTIC_MONTH} as the field.
      * If the specified temporal object does not use the ISO calendar system then
      * a {@code DateTimeException} is thrown.
      * <p>
@@ -932,7 +940,7 @@
         if (Chronology.from(temporal).equals(IsoChronology.INSTANCE) == false) {
             throw new DateTimeException("Adjustment only supported on ISO date-time");
         }
-        return temporal.with(EPOCH_MONTH, getEpochMonth());
+        return temporal.with(PROLEPTIC_MONTH, getProlepticMonth());
     }
 
     /**
@@ -977,6 +985,7 @@
      * @param unit  the unit to measure the period in, not null
      * @return the amount of the period between this year-month and the end year-month
      * @throws DateTimeException if the period cannot be calculated
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -987,7 +996,7 @@
         }
         YearMonth end = (YearMonth) endYearMonth;
         if (unit instanceof ChronoUnit) {
-            long monthsUntil = end.getEpochMonth() - getEpochMonth();  // no overflow
+            long monthsUntil = end.getProlepticMonth() - getProlepticMonth();  // no overflow
             switch ((ChronoUnit) unit) {
                 case MONTHS: return monthsUntil;
                 case YEARS: return monthsUntil / 12;
@@ -996,11 +1005,25 @@
                 case MILLENNIA: return monthsUntil / 12000;
                 case ERAS: return end.getLong(ERA) - getLong(ERA);
             }
-            throw new DateTimeException("Unsupported unit: " + unit.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
         return unit.between(this, endYearMonth);
     }
 
+    /**
+     * Formats this year-month using the specified formatter.
+     * <p>
+     * This year-month will be passed to the formatter to produce a string.
+     *
+     * @param formatter  the formatter to use, not null
+     * @return the formatted year-month string, not null
+     * @throws DateTimeException if an error occurs during printing
+     */
+    public String format(DateTimeFormatter formatter) {
+        Objects.requireNonNull(formatter, "formatter");
+        return formatter.format(this);
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Combines this year-month with a day-of-month to create a {@code LocalDate}.
@@ -1115,7 +1138,7 @@
     /**
      * Outputs this year-month as a {@code String}, such as {@code 2007-12}.
      * <p>
-     * The output will be in the format {@code yyyy-MM}:
+     * The output will be in the format {@code uuuu-MM}:
      *
      * @return a string representation of this year-month, not null
      */
@@ -1137,21 +1160,6 @@
             .toString();
     }
 
-    /**
-     * Outputs this year-month as a {@code String} using the formatter.
-     * <p>
-     * This year-month will be passed to the formatter
-     * {@link DateTimeFormatter#format(TemporalAccessor) format method}.
-     *
-     * @param formatter  the formatter to use, not null
-     * @return the formatted year-month string, not null
-     * @throws DateTimeException if an error occurs during printing
-     */
-    public String toString(DateTimeFormatter formatter) {
-        Objects.requireNonNull(formatter, "formatter");
-        return formatter.format(this);
-    }
-
     //-----------------------------------------------------------------------
     /**
      * Writes the object using a
--- a/src/share/classes/java/time/ZoneId.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/ZoneId.java	Wed Apr 17 21:48:04 2013 -0700
@@ -66,10 +66,10 @@
 import java.io.Serializable;
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.format.TextStyle;
-import java.time.temporal.Queries;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.zone.ZoneRules;
 import java.time.zone.ZoneRulesException;
 import java.time.zone.ZoneRulesProvider;
@@ -78,6 +78,7 @@
 import java.util.Locale;
 import java.util.Map;
 import java.util.Objects;
+import java.util.Set;
 import java.util.TimeZone;
 
 /**
@@ -93,6 +94,8 @@
  *  the offset from UTC/Greenwich apply
  * </ul><p>
  * Most fixed offsets are represented by {@link ZoneOffset}.
+ * Calling {@link #normalized()} on any {@code ZoneId} will ensure that a
+ * fixed offset ID will be represented as a {@code ZoneOffset}.
  * <p>
  * The actual rules, describing when and how the offset changes, are defined by {@link ZoneRules}.
  * This class is simply an ID used to obtain the underlying rules.
@@ -103,28 +106,29 @@
  * the ID, whereas serializing the rules sends the entire data set.
  * Similarly, a comparison of two IDs only examines the ID, whereas
  * a comparison of two rules examines the entire data set.
- * <p>
- * The code supports loading a {@code ZoneId} on a JVM which does not have available rules
- * for that ID. This allows the date-time object, such as {@link ZonedDateTime},
- * to still be queried.
  *
  * <h3>Time-zone IDs</h3>
  * The ID is unique within the system.
- * The formats for offset and region IDs differ.
+ * There are three types of ID.
  * <p>
- * An ID is parsed as an offset ID if it starts with 'UTC', 'GMT', 'UT' '+' or '-', or
- * is a single letter. For example, 'Z', '+02:00', '-05:00', 'UTC+05', 'GMT-6' and
- * 'UT+01:00' are all valid offset IDs.
- * Note that some IDs, such as 'D' or '+ABC' meet the criteria to be parsed as offset IDs,
- * but have an invalid offset.
+ * The simplest type of ID is that from {@code ZoneOffset}.
+ * This consists of 'Z' and IDs starting with '+' or '-'.
  * <p>
- * All other IDs are considered to be region IDs.
+ * The next type of ID are offset-style IDs with some form of prefix,
+ * such as 'GMT+2' or 'UTC+01:00'.
+ * The recognised prefixes are 'UTC', 'GMT' and 'UT'.
+ * The offset is the suffix and will be normalized during creation.
+ * These IDs can be normalized to a {@code ZoneOffset} using {@code normalized()}.
  * <p>
- * Region IDs are defined by configuration, which can be thought of as a {@code Map}
- * from region ID to {@code ZoneRules}, see {@link ZoneRulesProvider}.
+ * The third type of ID are region-based IDs. A region-based ID must be of
+ * two or more characters, and not start with 'UTC', 'GMT', 'UT' '+' or '-'.
+ * Region-based IDs are defined by configuration, see {@link ZoneRulesProvider}.
+ * The configuration focuses on providing the lookup from the ID to the
+ * underlying {@code ZoneRules}.
  * <p>
- * Time-zones are defined by governments and change frequently. There are a number of
- * organizations, known here as groups, that monitor time-zone changes and collate them.
+ * Time-zone rules are defined by governments and change frequently.
+ * There are a number of organizations, known here as groups, that monitor
+ * time-zone changes and collate them.
  * The default group is the IANA Time Zone Database (TZDB).
  * Other organizations include IATA (the airline industry body) and Microsoft.
  * <p>
@@ -139,6 +143,20 @@
  * The recommended format for region IDs from groups other than TZDB is 'group~region'.
  * Thus if IATA data were defined, Utrecht airport would be 'IATA~UTC'.
  *
+ * <h3>Serialization</h3>
+ * This class can be serialized and stores the string zone ID in the external form.
+ * The {@code ZoneOffset} subclass uses a dedicated format that only stores the
+ * offset from UTC/Greenwich.
+ * <p>
+ * A {@code ZoneId} can be deserialized in a Java Runtime where the ID is unknown.
+ * For example, if a server-side Java Runtime has been updated with a new zone ID, but
+ * the client-side Java Runtime has not been updated. In this case, the {@code ZoneId}
+ * object will exist, and can be queried using {@code getId}, {@code equals},
+ * {@code hashCode}, {@code toString}, {@code getDisplayName} and {@code normalized}.
+ * However, any call to {@code getRules} will fail with {@code ZoneRulesException}.
+ * This approach is designed to allow a {@link ZonedDateTime} to be loaded and
+ * queried, but not modified, on a Java Runtime with incomplete time-zone information.
+ *
  * <h3>Specification for implementors</h3>
  * This abstract class has two implementations, both of which are immutable and thread-safe.
  * One implementation models region-based IDs, the other is {@code ZoneOffset} modelling
@@ -149,7 +167,15 @@
 public abstract class ZoneId implements Serializable {
 
     /**
-     * A map of zone overrides to enable the older US time-zone names to be used.
+     * A map of zone overrides to enable the older short time-zone names to be used.
+     * <p>
+     * Use of short zone IDs has been deprecated in {@code java.util.TimeZone}.
+     * This map allows the IDs to continue to be used via the
+     * {@link #of(String, Map)} factory method.
+     * <p>
+     * This map contains an older mapping of the IDs, where 'EST', 'MST' and 'HST'
+     * map to IDs which include daylight savings.
+     * This is in line with versions of TZDB before 2005r.
      * <p>
      * This maps as follows:
      * <p><ul>
@@ -184,9 +210,17 @@
      * </ul><p>
      * The map is unmodifiable.
      */
-    public static final Map<String, String> OLD_IDS_PRE_2005;
+    public static final Map<String, String> OLD_SHORT_IDS;
     /**
-     * A map of zone overrides to enable the older US time-zone names to be used.
+     * A map of zone overrides to enable the short time-zone names to be used.
+     * <p>
+     * Use of short zone IDs has been deprecated in {@code java.util.TimeZone}.
+     * This map allows the IDs to continue to be used via the
+     * {@link #of(String, Map)} factory method.
+     * <p>
+     * This map contains a newer mapping of the IDs, where 'EST', 'MST' and 'HST'
+     * map to IDs which do not include daylight savings
+     * This is in line with TZDB 2005r and later.
      * <p>
      * This maps as follows:
      * <p><ul>
@@ -221,7 +255,7 @@
      * </ul><p>
      * The map is unmodifiable.
      */
-    public static final Map<String, String> OLD_IDS_POST_2005;
+    public static final Map<String, String> SHORT_IDS;
     static {
         Map<String, String> base = new HashMap<>();
         base.put("ACT", "Australia/Darwin");
@@ -253,12 +287,12 @@
         pre.put("EST", "America/New_York");
         pre.put("MST", "America/Denver");
         pre.put("HST", "Pacific/Honolulu");
-        OLD_IDS_PRE_2005 = Collections.unmodifiableMap(pre);
+        OLD_SHORT_IDS = Collections.unmodifiableMap(pre);
         Map<String, String> post = new HashMap<>(base);
         post.put("EST", "-05:00");
         post.put("MST", "-07:00");
         post.put("HST", "-10:00");
-        OLD_IDS_POST_2005 = Collections.unmodifiableMap(post);
+        SHORT_IDS = Collections.unmodifiableMap(post);
     }
     /**
      * Serialization version.
@@ -278,7 +312,23 @@
      * @throws ZoneRulesException if the converted zone region ID cannot be found
      */
     public static ZoneId systemDefault() {
-        return ZoneId.of(TimeZone.getDefault().getID(), OLD_IDS_POST_2005);
+        return ZoneId.of(TimeZone.getDefault().getID(), SHORT_IDS);
+    }
+
+    /**
+     * Gets the set of available zone IDs.
+     * <p>
+     * This set includes the string form of all available region-based IDs.
+     * Offset-based zone IDs are not included in the returned set.
+     * The ID can be passed to {@link #of(String)} to create a {@code ZoneId}.
+     * <p>
+     * The set of zone IDs can increase over time, although in a typical application
+     * the set of IDs is fixed. Each call to this method is thread-safe.
+     *
+     * @return a modifiable copy of the set of zone IDs, not null
+     */
+    public static Set<String> getAvailableZoneIds() {
+        return ZoneRulesProvider.getAvailableZoneIds();
     }
 
     //-----------------------------------------------------------------------
@@ -310,31 +360,36 @@
      * Obtains an instance of {@code ZoneId} from an ID ensuring that the
      * ID is valid and available for use.
      * <p>
-     * This method parses the ID, applies any appropriate normalization, and validates it
-     * against the known set of IDs for which rules are available.
-     * <p>
-     * An ID is parsed as though it is an offset ID if it starts with 'UTC', 'GMT', 'UT', '+'
-     * or '-', or if it has less then two letters.
-     * The offset of {@linkplain ZoneOffset#UTC zero} may be represented in multiple ways,
-     * including 'Z', 'UTC', 'GMT', 'UT', 'UTC0', 'GMT0', 'UT0', '+00:00', '-00:00' and 'UTC+00:00'.
+     * This method parses the ID producing a {@code ZoneId} or {@code ZoneOffset}.
+     * A {@code ZoneOffset} is returned if the ID is 'Z', or starts with '+' or '-'.
+     * The result will always be a valid ID for which {@link ZoneRules} can be obtained.
      * <p>
-     * Six forms of ID are recognized:
-     * <p><ul>
-     * <li><code>Z</code> - an offset of zero, which is {@code ZoneOffset.UTC}
-     * <li><code>{offset}</code> - a {@code ZoneOffset} ID, such as '+02:00'
-     * <li><code>{utcPrefix}</code> - a {@code ZoneOffset} ID equal to 'Z'
-     * <li><code>{utcPrefix}0</code> - a {@code ZoneOffset} ID equal to 'Z'
-     * <li><code>{utcPrefix}{offset}</code> - a {@code ZoneOffset} ID equal to '{offset}'
-     * <li><code>{regionID}</code> - full region ID, loaded from configuration
-     * </ul><p>
-     * The {offset} is a valid format for {@link ZoneOffset#of(String)}, excluding 'Z'.
-     * The {utcPrefix} is 'UTC', 'GMT' or 'UT'.
-     * Region IDs must match the regular expression <code>[A-Za-z][A-Za-z0-9~/._+-]+</code>.
-     * <p>
-     * The detailed format of the region ID depends on the group supplying the data.
-     * The default set of data is supplied by the IANA Time Zone Database (TZDB)
-     * This has region IDs of the form '{area}/{city}', such as 'Europe/Paris' or 'America/New_York'.
-     * This is compatible with most IDs from {@link java.util.TimeZone}.
+     * Parsing matches the zone ID step by step as follows.
+     * <ul>
+     * <li>If the zone ID equals 'Z', the result is {@code ZoneOffset.UTC}.
+     * <li>If the zone ID consists of a single letter, the zone ID is invalid
+     *  and {@code DateTimeException} is thrown.
+     * <li>If the zone ID starts with '+' or '-', the ID is parsed as a
+     *  {@code ZoneOffset} using {@link ZoneOffset#of(String)}.
+     * <li>If the zone ID equals 'GMT', 'UTC' or 'UT' then the result is a {@code ZoneId}
+     *  with the same ID and rules equivalent to {@code ZoneOffset.UTC}.
+     * <li>If the zone ID starts with 'UTC+', 'UTC-', 'GMT+', 'GMT-', 'UT+' or 'UT-'
+     *  then the ID is a prefixed offset-based ID. The ID is split in two, with
+     *  a two or three letter prefix and a suffix starting with the sign.
+     *  The suffix is parsed as a {@link ZoneOffset#of(String) ZoneOffset}.
+     *  The result will be a {@code ZoneId} with the specified UTC/GMT/UT prefix
+     *  and the normalized offset ID as per {@link ZoneOffset#getId()}.
+     *  The rules of the returned {@code ZoneId} will be equivalent to the
+     *  parsed {@code ZoneOffset}.
+     * <li>All other IDs are parsed as region-based zone IDs. Region IDs must
+     *  match the regular expression <code>[A-Za-z][A-Za-z0-9~/._+-]+</code>
+     *  otherwise a {@code DateTimeException} is thrown. If the zone ID is not
+     *  in the configured set of IDs, {@code ZoneRulesException} is thrown.
+     *  The detailed format of the region ID depends on the group supplying the data.
+     *  The default set of data is supplied by the IANA Time Zone Database (TZDB).
+     *  This has region IDs of the form '{area}/{city}', such as 'Europe/Paris' or 'America/New_York'.
+     *  This is compatible with most IDs from {@link java.util.TimeZone}.
+     * </ul>
      *
      * @param zoneId  the time-zone ID, not null
      * @return the zone ID, not null
@@ -342,15 +397,29 @@
      * @throws ZoneRulesException if the zone ID is a region ID that cannot be found
      */
     public static ZoneId of(String zoneId) {
+        return of(zoneId, true);
+    }
+
+    /**
+     * Parses the ID, taking a flag to indicate whether {@code ZoneRulesException}
+     * should be thrown or not, used in deserialization.
+     *
+     * @param zoneId  the time-zone ID, not null
+     * @param checkAvailable  whether to check if the zone ID is available
+     * @return the zone ID, not null
+     * @throws DateTimeException if the ID format is invalid
+     * @throws ZoneRulesException if checking availability and the ID cannot be found
+     */
+    static ZoneId of(String zoneId, boolean checkAvailable) {
         Objects.requireNonNull(zoneId, "zoneId");
         if (zoneId.length() <= 1 || zoneId.startsWith("+") || zoneId.startsWith("-")) {
             return ZoneOffset.of(zoneId);
         } else if (zoneId.startsWith("UTC") || zoneId.startsWith("GMT")) {
-            return ofWithPrefix(zoneId, 3);
+            return ofWithPrefix(zoneId, 3, checkAvailable);
         } else if (zoneId.startsWith("UT")) {
-            return ofWithPrefix(zoneId, 2);
+            return ofWithPrefix(zoneId, 2, checkAvailable);
         }
-        return ZoneRegion.ofId(zoneId, true);
+        return ZoneRegion.ofId(zoneId, checkAvailable);
     }
 
     /**
@@ -359,22 +428,25 @@
      * @param zoneId  the time-zone ID, not null
      * @param prefixLength  the length of the prefix, 2 or 3
      * @return the zone ID, not null
-     * @return the zone ID, not null
      * @throws DateTimeException if the zone ID has an invalid format
      */
-    private static ZoneId ofWithPrefix(String zoneId, int prefixLength) {
-        if (zoneId.length() == prefixLength ||
-                (zoneId.length() == prefixLength + 1 && zoneId.charAt(prefixLength) == '0')) {
-            return ZoneOffset.UTC;
+    private static ZoneId ofWithPrefix(String zoneId, int prefixLength, boolean checkAvailable) {
+        String prefix = zoneId.substring(0, prefixLength);
+        if (zoneId.length() == prefixLength) {
+            return ZoneRegion.ofPrefixedOffset(prefix, ZoneOffset.UTC);
+        }
+        if (zoneId.charAt(prefixLength) != '+' && zoneId.charAt(prefixLength) != '-') {
+            return ZoneRegion.ofId(zoneId, checkAvailable);  // drop through to ZoneRulesProvider
         }
-        if (zoneId.charAt(prefixLength) == '+' || zoneId.charAt(prefixLength) == '-') {
-            try {
-                return ZoneOffset.of(zoneId.substring(prefixLength));
-            } catch (DateTimeException ex) {
-                throw new DateTimeException("Invalid ID for offset-based ZoneId: " + zoneId, ex);
+        try {
+            ZoneOffset offset = ZoneOffset.of(zoneId.substring(prefixLength));
+            if (offset == ZoneOffset.UTC) {
+                return ZoneRegion.ofPrefixedOffset(prefix, offset);
             }
+            return ZoneRegion.ofPrefixedOffset(prefix + offset.toString(), offset);
+        } catch (DateTimeException ex) {
+            throw new DateTimeException("Invalid ID for offset-based ZoneId: " + zoneId, ex);
         }
-        throw new DateTimeException("Invalid ID for offset-based ZoneId: " + zoneId);
     }
 
     //-----------------------------------------------------------------------
@@ -389,7 +461,7 @@
      * This factory converts the arbitrary temporal object to an instance of {@code ZoneId}.
      * <p>
      * The conversion will try to obtain the zone in a way that favours region-based
-     * zones over offset-based zones using {@link Queries#zone()}.
+     * zones over offset-based zones using {@link TemporalQuery#zone()}.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
      * allowing it to be used in queries via method reference, {@code ZoneId::from}.
@@ -399,7 +471,7 @@
      * @throws DateTimeException if unable to convert to a {@code ZoneId}
      */
     public static ZoneId from(TemporalAccessor temporal) {
-        ZoneId obj = temporal.query(Queries.zone());
+        ZoneId obj = temporal.query(TemporalQuery.zone());
         if (obj == null) {
             throw new DateTimeException("Unable to obtain ZoneId from TemporalAccessor: " + temporal.getClass());
         }
@@ -429,29 +501,6 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Gets the time-zone rules for this ID allowing calculations to be performed.
-     * <p>
-     * The rules provide the functionality associated with a time-zone,
-     * such as finding the offset for a given instant or local date-time.
-     * <p>
-     * A time-zone can be invalid if it is deserialized in a JVM which does not
-     * have the same rules loaded as the JVM that stored it. In this case, calling
-     * this method will throw an exception.
-     * <p>
-     * The rules are supplied by {@link ZoneRulesProvider}. An advanced provider may
-     * support dynamic updates to the rules without restarting the JVM.
-     * If so, then the result of this method may change over time.
-     * Each individual call will be still remain thread-safe.
-     * <p>
-     * {@link ZoneOffset} will always return a set of rules where the offset never changes.
-     *
-     * @return the rules, not null
-     * @throws ZoneRulesException if no rules are available for this ID
-     */
-    public abstract ZoneRules getRules();
-
-    //-----------------------------------------------------------------------
-    /**
      * Gets the textual representation of the zone, such as 'British Time' or
      * '+02:00'.
      * <p>
@@ -466,24 +515,88 @@
      * @return the text value of the zone, not null
      */
     public String getDisplayName(TextStyle style, Locale locale) {
-        return new DateTimeFormatterBuilder().appendZoneText(style).toFormatter(locale).format(new TemporalAccessor() {
+        return new DateTimeFormatterBuilder().appendZoneText(style).toFormatter(locale).format(toTemporal());
+    }
+
+    /**
+     * Converts this zone to a {@code TemporalAccessor}.
+     * <p>
+     * A {@code ZoneId} can be fully represented as a {@code TemporalAccessor}.
+     * However, the interface is not implemented by this class as most of the
+     * methods on the interface have no meaning to {@code ZoneId}.
+     * <p>
+     * The returned temporal has no supported fields, with the query method
+     * supporting the return of the zone using {@link TemporalQuery#zoneId()}.
+     *
+     * @return a temporal equivalent to this zone, not null
+     */
+    private TemporalAccessor toTemporal() {
+        return new TemporalAccessor() {
             @Override
             public boolean isSupported(TemporalField field) {
                 return false;
             }
             @Override
             public long getLong(TemporalField field) {
-                throw new DateTimeException("Unsupported field: " + field);
+                throw new UnsupportedTemporalTypeException("Unsupported field: " + field);
             }
             @SuppressWarnings("unchecked")
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == Queries.zoneId()) {
+                if (query == TemporalQuery.zoneId()) {
                     return (R) ZoneId.this;
                 }
                 return TemporalAccessor.super.query(query);
             }
-        });
+        };
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Gets the time-zone rules for this ID allowing calculations to be performed.
+     * <p>
+     * The rules provide the functionality associated with a time-zone,
+     * such as finding the offset for a given instant or local date-time.
+     * <p>
+     * A time-zone can be invalid if it is deserialized in a Java Runtime which
+     * does not have the same rules loaded as the Java Runtime that stored it.
+     * In this case, calling this method will throw a {@code ZoneRulesException}.
+     * <p>
+     * The rules are supplied by {@link ZoneRulesProvider}. An advanced provider may
+     * support dynamic updates to the rules without restarting the Java Runtime.
+     * If so, then the result of this method may change over time.
+     * Each individual call will be still remain thread-safe.
+     * <p>
+     * {@link ZoneOffset} will always return a set of rules where the offset never changes.
+     *
+     * @return the rules, not null
+     * @throws ZoneRulesException if no rules are available for this ID
+     */
+    public abstract ZoneRules getRules();
+
+    /**
+     * Normalizes the time-zone ID, returning a {@code ZoneOffset} where possible.
+     * <p>
+     * The returns a normalized {@code ZoneId} that can be used in place of this ID.
+     * The result will have {@code ZoneRules} equivalent to those returned by this object,
+     * however the ID returned by {@code getId()} may be different.
+     * <p>
+     * The normalization checks if the rules of this {@code ZoneId} have a fixed offset.
+     * If they do, then the {@code ZoneOffset} equal to that offset is returned.
+     * Otherwise {@code this} is returned.
+     *
+     * @return the time-zone unique ID, not null
+     */
+    public ZoneId normalized() {
+        try {
+            ZoneRules rules = getRules();
+            if (rules.isFixedOffset()) {
+                return rules.getOffset(Instant.EPOCH);
+            }
+        } catch (ZoneRulesException ex) {
+            // invalid ZoneRegion is not important to this method
+        }
+        return this;
     }
 
     //-----------------------------------------------------------------------
@@ -536,6 +649,10 @@
      *  out.writeByte(7);  // identifies this as a ZoneId (not ZoneOffset)
      *  out.writeUTF(zoneId);
      * </pre>
+     * <p>
+     * When read back in, the {@code ZoneId} will be created as though using
+     * {@link #of(String)}, but without any exception in the case where the
+     * ID has a valid format, but is not in the known set of region-based IDs.
      *
      * @return the instance of {@code Ser}, not null
      */
--- a/src/share/classes/java/time/ZoneOffset.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/ZoneOffset.java	Wed Apr 17 21:48:04 2013 -0700
@@ -61,6 +61,7 @@
  */
 package java.time;
 
+import java.time.temporal.UnsupportedTemporalTypeException;
 import static java.time.LocalTime.MINUTES_PER_HOUR;
 import static java.time.LocalTime.SECONDS_PER_HOUR;
 import static java.time.LocalTime.SECONDS_PER_MINUTE;
@@ -73,7 +74,6 @@
 import java.io.ObjectStreamException;
 import java.io.Serializable;
 import java.time.temporal.ChronoField;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -322,7 +322,7 @@
      * A {@code TemporalAccessor} represents some form of date and time information.
      * This factory converts the arbitrary temporal object to an instance of {@code ZoneOffset}.
      * <p>
-     * The conversion uses the {@link Queries#offset()} query, which relies
+     * The conversion uses the {@link TemporalQuery#offset()} query, which relies
      * on extracting the {@link ChronoField#OFFSET_SECONDS OFFSET_SECONDS} field.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
@@ -333,7 +333,7 @@
      * @throws DateTimeException if unable to convert to an {@code ZoneOffset}
      */
     public static ZoneOffset from(TemporalAccessor temporal) {
-        ZoneOffset offset = temporal.query(Queries.offset());
+        ZoneOffset offset = temporal.query(TemporalQuery.offset());
         if (offset == null) {
             throw new DateTimeException("Unable to obtain ZoneOffset from TemporalAccessor: " + temporal.getClass());
         }
@@ -534,7 +534,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return
      * appropriate range instances.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
@@ -544,6 +544,7 @@
      * @param field  the field to query the range for, not null
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      */
     @Override  // override for Javadoc
     public ValueRange range(TemporalField field) {
@@ -560,7 +561,7 @@
      * <p>
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@code OFFSET_SECONDS} field returns the value of the offset.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -569,7 +570,10 @@
      *
      * @param field  the field to get, not null
      * @return the value for the field
-     * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws DateTimeException if a value for the field cannot be obtained or
+     *         the value is outside the range of valid values for the field
+     * @throws UnsupportedTemporalTypeException if the field is not supported or
+     *         the range of values exceeds an {@code int}
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override  // override for Javadoc and performance
@@ -577,7 +581,7 @@
         if (field == OFFSET_SECONDS) {
             return totalSeconds;
         } else if (field instanceof ChronoField) {
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return range(field).checkValidIntValue(getLong(field), field);
     }
@@ -591,7 +595,7 @@
      * <p>
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@code OFFSET_SECONDS} field returns the value of the offset.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -601,6 +605,7 @@
      * @param field  the field to get, not null
      * @return the value for the field
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -608,7 +613,7 @@
         if (field == OFFSET_SECONDS) {
             return totalSeconds;
         } else if (field instanceof ChronoField) {
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.getFrom(this);
     }
@@ -635,7 +640,7 @@
     @SuppressWarnings("unchecked")
     @Override
     public <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.offset() || query == Queries.zone()) {
+        if (query == TemporalQuery.offset() || query == TemporalQuery.zone()) {
             return (R) this;
         }
         return TemporalAccessor.super.query(query);
--- a/src/share/classes/java/time/ZoneRegion.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/ZoneRegion.java	Wed Apr 17 21:48:04 2013 -0700
@@ -95,11 +95,6 @@
      */
     private static final long serialVersionUID = 8386373296231747096L;
     /**
-     * The regex pattern for region IDs.
-     */
-    private static final Pattern PATTERN = Pattern.compile("[A-Za-z][A-Za-z0-9~/._+-]+");
-
-    /**
      * The time-zone ID, not null.
      */
     private final String id;
@@ -109,26 +104,6 @@
     private final transient ZoneRules rules;
 
     /**
-     * Obtains an instance of {@code ZoneRegion} from an identifier without checking
-     * if the time-zone has available rules.
-     * <p>
-     * This method parses the ID and applies any appropriate normalization.
-     * It does not validate the ID against the known set of IDs for which rules are available.
-     * <p>
-     * This method is intended for advanced use cases.
-     * For example, consider a system that always retrieves time-zone rules from a remote server.
-     * Using this factory would allow a {@code ZoneRegion}, and thus a {@code ZonedDateTime},
-     * to be created without loading the rules from the remote server.
-     *
-     * @param zoneId  the time-zone ID, not null
-     * @return the zone ID, not null
-     * @throws DateTimeException if the ID format is invalid
-     */
-    private static ZoneRegion ofLenient(String zoneId) {
-        return ofId(zoneId, false);
-    }
-
-    /**
      * Obtains an instance of {@code ZoneId} from an identifier.
      *
      * @param zoneId  the time-zone ID, not null
@@ -139,12 +114,7 @@
      */
     static ZoneRegion ofId(String zoneId, boolean checkAvailable) {
         Objects.requireNonNull(zoneId, "zoneId");
-        if (zoneId.length() < 2 ||
-                zoneId.startsWith("UT") ||  // includes UTC
-                zoneId.startsWith("GMT") ||
-                (PATTERN.matcher(zoneId).matches() == false)) {
-            throw new DateTimeException("Invalid ID for region-based ZoneId, invalid format: " + zoneId);
-        }
+        checkName(zoneId);
         ZoneRules rules = null;
         try {
             // always attempt load for better behavior after deserialization
@@ -157,6 +127,45 @@
         return new ZoneRegion(zoneId, rules);
     }
 
+    /**
+     * Checks that the given string is a legal ZondId name.
+     *
+     * @param zoneId  the time-zone ID, not null
+     * @throws DateTimeException if the ID format is invalid
+     */
+    private static void checkName(String zoneId) {
+        int n = zoneId.length();
+        if (n < 2) {
+           throw new DateTimeException("Invalid ID for region-based ZoneId, invalid format: " + zoneId);
+        }
+        for (int i = 0; i < n; i++) {
+            char c = zoneId.charAt(i);
+            if (c >= 'a' && c <= 'z') continue;
+            if (c >= 'A' && c <= 'Z') continue;
+            if (c == '/' && i != 0) continue;
+            if (c >= '0' && c <= '9' && i != 0) continue;
+            if (c == '~' && i != 0) continue;
+            if (c == '.' && i != 0) continue;
+            if (c == '_' && i != 0) continue;
+            if (c == '+' && i != 0) continue;
+            if (c == '-' && i != 0) continue;
+            throw new DateTimeException("Invalid ID for region-based ZoneId, invalid format: " + zoneId);
+        }
+    }
+
+    /**
+     * Obtains an instance of {@code ZoneId} wrapping an offset.
+     * <p>
+     * For example, zone IDs like 'UTC', 'GMT', 'UT' and 'UTC+01:30' will be setup here.
+     *
+     * @param zoneId  the time-zone ID, not null
+     * @param offset  the offset, not null
+     * @return the zone ID, not null
+     */
+    static ZoneRegion ofPrefixedOffset(String zoneId, ZoneOffset offset) {
+        return new ZoneRegion(zoneId, offset.getRules());
+    }
+
     //-------------------------------------------------------------------------
     /**
      * Constructor.
@@ -218,7 +227,7 @@
 
     static ZoneId readExternal(DataInput in) throws IOException {
         String id = in.readUTF();
-        return ofLenient(id);
+        return ZoneId.of(id, false);
     }
 
 }
--- a/src/share/classes/java/time/ZonedDateTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/ZonedDateTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -72,7 +72,6 @@
 import java.io.ObjectStreamException;
 import java.io.Serializable;
 import java.time.chrono.ChronoZonedDateTime;
-import java.time.chrono.IsoChronology;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoField;
@@ -84,6 +83,7 @@
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
 import java.time.zone.ZoneOffsetTransition;
 import java.time.zone.ZoneRules;
@@ -136,6 +136,11 @@
  * used, typically "summer" time.. Two additional methods,
  * {@link #withEarlierOffsetAtOverlap()} and {@link #withLaterOffsetAtOverlap()},
  * help manage the case of an overlap.
+ * <p>
+ * In terms of design, this class should be viewed primarily as the combination
+ * of a {@code LocalDateTime} and a {@code ZoneId}. The {@code ZoneOffset} is
+ * a vital, but secondary, piece of information, used to ensure that the class
+ * represents an instant, especially during a daylight savings overlap.
  *
  * <h3>Specification for implementors</h3>
  * A {@code ZonedDateTime} holds state equivalent to three separate objects,
@@ -420,6 +425,9 @@
         Objects.requireNonNull(localDateTime, "localDateTime");
         Objects.requireNonNull(offset, "offset");
         Objects.requireNonNull(zone, "zone");
+        if (zone.getRules().isValidOffset(localDateTime, offset)) {
+            return new ZonedDateTime(localDateTime, offset, zone);
+        }
         return create(localDateTime.toEpochSecond(offset), localDateTime.getNano(), zone);
     }
 
@@ -615,17 +623,18 @@
     }
 
     /**
-     * Resolves the offset into this zoned date-time.
+     * Resolves the offset into this zoned date-time for the with methods.
      * <p>
-     * This will use the new offset to find the instant, which is then looked up
-     * using the zone ID to find the actual offset to use.
+     * This typically ignores the offset, unless it can be used to switch offset in a DST overlap.
      *
      * @param offset  the offset, not null
      * @return the zoned date-time, not null
      */
     private ZonedDateTime resolveOffset(ZoneOffset offset) {
-        long epSec = dateTime.toEpochSecond(offset);
-        return create(epSec, dateTime.getNano(), zone);
+        if (offset.equals(this.offset) == false && zone.getRules().isValidOffset(dateTime, offset)) {
+            return new ZonedDateTime(dateTime, offset, zone);
+        }
+        return this;
     }
 
     //-----------------------------------------------------------------------
@@ -663,7 +672,7 @@
      * <li>{@code ALIGNED_WEEK_OF_MONTH}
      * <li>{@code ALIGNED_WEEK_OF_YEAR}
      * <li>{@code MONTH_OF_YEAR}
-     * <li>{@code EPOCH_MONTH}
+     * <li>{@code PROLEPTIC_MONTH}
      * <li>{@code YEAR_OF_ERA}
      * <li>{@code YEAR}
      * <li>{@code ERA}
@@ -696,7 +705,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return
      * appropriate range instances.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
@@ -706,6 +715,7 @@
      * @param field  the field to query the range for, not null
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      */
     @Override
     public ValueRange range(TemporalField field) {
@@ -729,9 +739,9 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this date-time, except {@code NANO_OF_DAY}, {@code MICRO_OF_DAY},
-     * {@code EPOCH_DAY}, {@code EPOCH_MONTH} and {@code INSTANT_SECONDS} which are too
+     * {@code EPOCH_DAY}, {@code PROLEPTIC_MONTH} and {@code INSTANT_SECONDS} which are too
      * large to fit in an {@code int} and throw a {@code DateTimeException}.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -740,15 +750,20 @@
      *
      * @param field  the field to get, not null
      * @return the value for the field
-     * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws DateTimeException if a value for the field cannot be obtained or
+     *         the value is outside the range of valid values for the field
+     * @throws UnsupportedTemporalTypeException if the field is not supported or
+     *         the range of values exceeds an {@code int}
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override  // override for Javadoc and performance
     public int get(TemporalField field) {
         if (field instanceof ChronoField) {
             switch ((ChronoField) field) {
-                case INSTANT_SECONDS: throw new DateTimeException("Field too large for an int: " + field);
-                case OFFSET_SECONDS: return getOffset().getTotalSeconds();
+                case INSTANT_SECONDS:
+                    throw new UnsupportedTemporalTypeException("Invalid field 'InstantSeconds' for get() method, use getLong() instead");
+                case OFFSET_SECONDS:
+                    return getOffset().getTotalSeconds();
             }
             return dateTime.get(field);
         }
@@ -765,7 +780,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this date-time.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -775,6 +790,7 @@
      * @param field  the field to get, not null
      * @return the value for the field
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1115,7 +1131,7 @@
      * <p>
      * A simple adjuster might simply set the one of the fields, such as the year field.
      * A more complex adjuster might set the date to the last day of the month.
-     * A selection of common adjustments is provided in {@link java.time.temporal.Adjusters}.
+     * A selection of common adjustments is provided in {@link TemporalAdjuster}.
      * These include finding the "last day of the month" and "next Wednesday".
      * Key date-time classes also implement the {@code TemporalAdjuster} interface,
      * such as {@link Month} and {@link java.time.MonthDay MonthDay}.
@@ -1137,15 +1153,12 @@
      *  result = zonedDateTime.with(time);
      * </pre>
      * <p>
-     * {@link ZoneOffset} also implements {@code TemporalAdjuster} however it is less likely
-     * that setting the offset will have the effect you expect. When an offset is passed in,
-     * the local date-time is combined with the new offset to form an {@code Instant}.
-     * The instant and original zone are then used to create the result.
-     * This algorithm means that it is quite likely that the output has a different offset
-     * to the specified offset. It will however work correctly when passing in the offset
-     * applicable for the instant of the zoned date-time, and will work correctly if passing
-     * one of the two valid offsets during a daylight savings overlap when the same local time
-     * occurs twice.
+     * {@link ZoneOffset} also implements {@code TemporalAdjuster} however using it
+     * as an argument typically has no effect. The offset of a {@code ZonedDateTime} is
+     * controlled primarily by the time-zone. As such, changing the offset does not generally
+     * make sense, because there is only one valid offset for the local date-time and zone.
+     * If the zoned date-time is in a daylight savings overlap, then the offset is used
+     * to switch between the two valid offsets. In all other cases, the offset is ignored.
      * <p>
      * The result of this method is obtained by invoking the
      * {@link TemporalAdjuster#adjustInto(Temporal)} method on the
@@ -1167,6 +1180,9 @@
             return resolveLocal(LocalDateTime.of(dateTime.toLocalDate(), (LocalTime) adjuster));
         } else if (adjuster instanceof LocalDateTime) {
             return resolveLocal((LocalDateTime) adjuster);
+        } else if (adjuster instanceof OffsetDateTime) {
+            OffsetDateTime odt = (OffsetDateTime) adjuster;
+            return ofLocal(odt.toLocalDateTime(), zone, odt.getOffset());
         } else if (adjuster instanceof Instant) {
             Instant instant = (Instant) adjuster;
             return create(instant.getEpochSecond(), instant.getNano(), zone);
@@ -1197,15 +1213,13 @@
      * The result will have an offset derived from the new instant and original zone.
      * If the new instant value is outside the valid range then a {@code DateTimeException} will be thrown.
      * <p>
-     * The {@code OFFSET_SECONDS} field will return a date-time calculated using the specified offset.
-     * The local date-time is combined with the new offset to form an {@code Instant}.
-     * The instant and original zone are then used to create the result.
-     * This algorithm means that it is quite likely that the output has a different offset
-     * to the specified offset. It will however work correctly when passing in the offset
-     * applicable for the instant of the zoned date-time, and will work correctly if passing
-     * one of the two valid offsets during a daylight savings overlap when the same local time
-     * occurs twice. If the new offset value is outside the valid range then a
-     * {@code DateTimeException} will be thrown.
+     * The {@code OFFSET_SECONDS} field will typically be ignored.
+     * The offset of a {@code ZonedDateTime} is controlled primarily by the time-zone.
+     * As such, changing the offset does not generally make sense, because there is only
+     * one valid offset for the local date-time and zone.
+     * If the zoned date-time is in a daylight savings overlap, then the offset is used
+     * to switch between the two valid offsets. In all other cases, the offset is ignored.
+     * If the new offset value is outside the valid range then a {@code DateTimeException} will be thrown.
      * <p>
      * The other {@link #isSupported(TemporalField) supported fields} will behave as per
      * the matching method on {@link LocalDateTime#with(TemporalField, long) LocalDateTime}.
@@ -1214,7 +1228,7 @@
      * then the offset will be retained if possible, otherwise the earlier offset will be used.
      * If in a gap, the local date-time will be adjusted forward by the length of the gap.
      * <p>
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)}
@@ -1227,6 +1241,7 @@
      * @param newValue  the new value of the field in the result
      * @return a {@code ZonedDateTime} based on {@code this} with the specified field set, not null
      * @throws DateTimeException if the field cannot be set
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1234,11 +1249,11 @@
         if (field instanceof ChronoField) {
             ChronoField f = (ChronoField) field;
             switch (f) {
-                case INSTANT_SECONDS: return create(newValue, getNano(), zone);
-                case OFFSET_SECONDS: {
+                case INSTANT_SECONDS:
+                    return create(newValue, getNano(), zone);
+                case OFFSET_SECONDS:
                     ZoneOffset offset = ZoneOffset.ofTotalSeconds(f.checkValidIntValue(newValue));
                     return resolveOffset(offset);
-                }
             }
             return resolveLocal(dateTime.with(field, newValue));
         }
@@ -1453,6 +1468,7 @@
      * @param unit  the unit to truncate to, not null
      * @return a {@code ZonedDateTime} based on this date-time with the time truncated, not null
      * @throws DateTimeException if unable to truncate
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      */
     public ZonedDateTime truncatedTo(TemporalUnit unit) {
         return resolveLocal(dateTime.truncatedTo(unit));
@@ -1518,6 +1534,7 @@
      * @param unit  the unit of the amount to add, not null
      * @return a {@code ZonedDateTime} based on this date-time with the specified amount added, not null
      * @throws DateTimeException if the addition cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -1761,6 +1778,7 @@
      * @param unit  the unit of the amount to subtract, not null
      * @return a {@code ZonedDateTime} based on this date-time with the specified amount subtracted, not null
      * @throws DateTimeException if the subtraction cannot be made
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -2025,6 +2043,7 @@
      * @param unit  the unit to measure the period in, not null
      * @return the amount of the period between this date-time and the end date-time
      * @throws DateTimeException if the period cannot be calculated
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
@@ -2046,6 +2065,21 @@
         return unit.between(this, endDateTime);
     }
 
+    /**
+     * Formats this date-time using the specified formatter.
+     * <p>
+     * This date-time will be passed to the formatter to produce a string.
+     *
+     * @param formatter  the formatter to use, not null
+     * @return the formatted date-time string, not null
+     * @throws DateTimeException if an error occurs during printing
+     */
+    @Override  // override for Javadoc and performance
+    public String format(DateTimeFormatter formatter) {
+        Objects.requireNonNull(formatter, "formatter");
+        return formatter.format(this);
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Converts this date-time to an {@code OffsetDateTime}.
@@ -2113,21 +2147,6 @@
         return str;
     }
 
-    /**
-     * Outputs this date-time as a {@code String} using the formatter.
-     * <p>
-     * This date will be passed to the formatter
-     * {@link DateTimeFormatter#format(TemporalAccessor) format method}.
-     *
-     * @param formatter  the formatter to use, not null
-     * @return the formatted date-time string, not null
-     * @throws DateTimeException if an error occurs during printing
-     */
-    @Override  // override for Javadoc
-    public String toString(DateTimeFormatter formatter) {
-        return ChronoZonedDateTime.super.toString(formatter);
-    }
-
     //-----------------------------------------------------------------------
     /**
      * Writes the object using a
--- a/src/share/classes/java/time/chrono/ChronoDateImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/ChronoDateImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,19 +59,18 @@
 import static java.time.temporal.ChronoField.DAY_OF_MONTH;
 import static java.time.temporal.ChronoField.ERA;
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
 
 import java.io.Serializable;
 import java.time.DateTimeException;
-import java.time.LocalDate;
-import java.time.LocalTime;
-import java.time.chrono.Chronology;
-import java.time.chrono.ChronoLocalDate;
-import java.time.chrono.ChronoLocalDateTime;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
+import java.time.temporal.ValueRange;
+import java.util.Objects;
 
 /**
  * A date expressed in terms of a standard year-month-day calendar system.
@@ -97,12 +96,12 @@
  *        // Enumerate the list of available calendars and print today for each
  *        Set&lt;Chronology&gt; chronos = Chronology.getAvailableChronologies();
  *        for (Chronology chrono : chronos) {
- *            ChronoLocalDate<?> date = chrono.dateNow();
+ *            ChronoLocalDate&lt;?&gt; date = chrono.dateNow();
  *            System.out.printf("   %20s: %s%n", chrono.getID(), date.toString());
  *        }
  *
  *        // Print the Hijrah date and calendar
- *        ChronoLocalDate<?> date = Chronology.of("Hijrah").dateNow();
+ *        ChronoLocalDate&lt;?&gt; date = Chronology.of("Hijrah").dateNow();
  *        int day = date.get(ChronoField.DAY_OF_MONTH);
  *        int dow = date.get(ChronoField.DAY_OF_WEEK);
  *        int month = date.get(ChronoField.MONTH_OF_YEAR);
@@ -111,10 +110,10 @@
  *                dow, day, month, year);
 
  *        // Print today's date and the last day of the year
- *        ChronoLocalDate<?> now1 = Chronology.of("Hijrah").dateNow();
- *        ChronoLocalDate<?> first = now1.with(ChronoField.DAY_OF_MONTH, 1)
+ *        ChronoLocalDate&lt;?&gt; now1 = Chronology.of("Hijrah").dateNow();
+ *        ChronoLocalDate&lt;?&gt; first = now1.with(ChronoField.DAY_OF_MONTH, 1)
  *                .with(ChronoField.MONTH_OF_YEAR, 1);
- *        ChronoLocalDate<?> last = first.plus(1, ChronoUnit.YEARS)
+ *        ChronoLocalDate&lt;?&gt; last = first.plus(1, ChronoUnit.YEARS)
  *                .minus(1, ChronoUnit.DAYS);
  *        System.out.printf("  Today is %s: start: %s; end: %s%n", last.getChronology().getID(),
  *                first, last);
@@ -168,7 +167,7 @@
                 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000));
                 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd));
             }
-            throw new DateTimeException("Unsupported unit: " + unit.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
         return ChronoLocalDate.super.plus(amountToAdd, unit);
     }
@@ -323,6 +322,8 @@
      */
     @Override
     public long periodUntil(Temporal endDateTime, TemporalUnit unit) {
+        Objects.requireNonNull(endDateTime, "endDateTime");
+        Objects.requireNonNull(unit, "unit");
         if (endDateTime instanceof ChronoLocalDate == false) {
             throw new DateTimeException("Unable to calculate period between objects of two different types");
         }
@@ -331,11 +332,35 @@
             throw new DateTimeException("Unable to calculate period between two different chronologies");
         }
         if (unit instanceof ChronoUnit) {
-            return LocalDate.from(this).periodUntil(end, unit);  // TODO: this is wrong
+            switch ((ChronoUnit) unit) {
+                case DAYS: return daysUntil(end);
+                case WEEKS: return daysUntil(end) / 7;
+                case MONTHS: return monthsUntil(end);
+                case YEARS: return monthsUntil(end) / 12;
+                case DECADES: return monthsUntil(end) / 120;
+                case CENTURIES: return monthsUntil(end) / 1200;
+                case MILLENNIA: return monthsUntil(end) / 12000;
+                case ERAS: return end.getLong(ERA) - getLong(ERA);
+            }
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
         return unit.between(this, endDateTime);
     }
 
+    private long daysUntil(ChronoLocalDate<?> end) {
+        return end.toEpochDay() - toEpochDay();  // no overflow
+    }
+
+    private long monthsUntil(ChronoLocalDate<?> end) {
+        ValueRange range = getChronology().range(MONTH_OF_YEAR);
+        if (range.getMaximum() != 12) {
+            throw new IllegalStateException("ChronoDateImpl only supports Chronologies with 12 months per year");
+        }
+        long packed1 = getLong(PROLEPTIC_MONTH) * 32L + get(DAY_OF_MONTH);  // no overflow
+        long packed2 = end.getLong(PROLEPTIC_MONTH) * 32L + end.get(DAY_OF_MONTH);  // no overflow
+        return (packed2 - packed1) / 32;
+    }
+
     @Override
     public boolean equals(Object obj) {
         if (this == obj) {
--- a/src/share/classes/java/time/chrono/ChronoLocalDate.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/ChronoLocalDate.java	Wed Apr 17 21:48:04 2013 -0700
@@ -73,7 +73,6 @@
 import java.time.format.DateTimeFormatter;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -81,6 +80,7 @@
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.util.Comparator;
 import java.util.Objects;
 
@@ -249,25 +249,55 @@
         extends Temporal, TemporalAdjuster, Comparable<ChronoLocalDate<?>> {
 
     /**
-     * Comparator for two {@code ChronoLocalDate}s ignoring the chronology.
+     * Gets a comparator that compares {@code ChronoLocalDate} in
+     * time-line order ignoring the chronology.
      * <p>
      * This comparator differs from the comparison in {@link #compareTo} in that it
      * only compares the underlying date and not the chronology.
      * This allows dates in different calendar systems to be compared based
-     * on the time-line position.
-     * This is equivalent to using {@code Long.compare(date1.toEpochDay(),  date2.toEpochDay())}.
+     * on the position of the date on the local time-line.
+     * The underlying comparison is equivalent to comparing the epoch-day.
      *
      * @see #isAfter
      * @see #isBefore
      * @see #isEqual
      */
-    public static final Comparator<ChronoLocalDate<?>> DATE_COMPARATOR =
-            new Comparator<ChronoLocalDate<?>>() {
-        @Override
-        public int compare(ChronoLocalDate<?> date1, ChronoLocalDate<?> date2) {
-            return Long.compare(date1.toEpochDay(), date2.toEpochDay());
+    static Comparator<ChronoLocalDate<?>> timeLineOrder() {
+        return Chronology.DATE_ORDER;
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Obtains an instance of {@code ChronoLocalDate} from a temporal object.
+     * <p>
+     * This obtains a local date based on the specified temporal.
+     * A {@code TemporalAccessor} represents an arbitrary set of date and time information,
+     * which this factory converts to an instance of {@code ChronoLocalDate}.
+     * <p>
+     * The conversion extracts and combines the chronology and the date
+     * from the temporal object. The behavior is equivalent to using
+     * {@link Chronology#date(TemporalAccessor)} with the extracted chronology.
+     * Implementations are permitted to perform optimizations such as accessing
+     * those fields that are equivalent to the relevant objects.
+     * <p>
+     * This method matches the signature of the functional interface {@link TemporalQuery}
+     * allowing it to be used as a query via method reference, {@code ChronoLocalDate::from}.
+     *
+     * @param temporal  the temporal object to convert, not null
+     * @return the date, not null
+     * @throws DateTimeException if unable to convert to a {@code ChronoLocalDate}
+     * @see Chronology#date(TemporalAccessor)
+     */
+    static ChronoLocalDate<?> from(TemporalAccessor temporal) {
+        if (temporal instanceof ChronoLocalDate) {
+            return (ChronoLocalDate<?>) temporal;
         }
-    };
+        Chronology chrono = temporal.query(TemporalQuery.chronology());
+        if (chrono == null) {
+            throw new DateTimeException("Unable to obtain ChronoLocalDate from TemporalAccessor: " + temporal.getClass());
+        }
+        return chrono.date(temporal);
+    }
 
     //-----------------------------------------------------------------------
     /**
@@ -295,7 +325,7 @@
      *
      * @return the chronology specific era constant applicable at this date, not null
      */
-    public default Era getEra() {
+    default Era getEra() {
         return getChronology().eraOf(get(ERA));
     }
 
@@ -310,7 +340,7 @@
      *
      * @return true if this date is in a leap year, false otherwise
      */
-    public default boolean isLeapYear() {
+    default boolean isLeapYear() {
         return getChronology().isLeapYear(getLong(YEAR));
     }
 
@@ -332,14 +362,14 @@
      *
      * @return the length of the year in days
      */
-    public default int lengthOfYear() {
+    default int lengthOfYear() {
         return (isLeapYear() ? 366 : 365);
     }
 
     @Override
-    public default boolean isSupported(TemporalField field) {
+    default boolean isSupported(TemporalField field) {
         if (field instanceof ChronoField) {
-            return ((ChronoField) field).isDateField();
+            return field.isDateBased();
         }
         return field != null && field.isSupportedBy(this);
     }
@@ -352,19 +382,20 @@
      * @throws ArithmeticException {@inheritDoc}
      */
     @Override
-    public default D with(TemporalAdjuster adjuster) {
+    default D with(TemporalAdjuster adjuster) {
         return (D) getChronology().ensureChronoLocalDate(Temporal.super.with(adjuster));
     }
 
     /**
      * {@inheritDoc}
      * @throws DateTimeException {@inheritDoc}
+     * @throws UnsupportedTemporalTypeException {@inheritDoc}
      * @throws ArithmeticException {@inheritDoc}
      */
     @Override
-    public default D with(TemporalField field, long newValue) {
+    default D with(TemporalField field, long newValue) {
         if (field instanceof ChronoField) {
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return (D) getChronology().ensureChronoLocalDate(field.adjustInto(this, newValue));
     }
@@ -375,7 +406,7 @@
      * @throws ArithmeticException {@inheritDoc}
      */
     @Override
-    public default D plus(TemporalAmount amount) {
+    default D plus(TemporalAmount amount) {
         return (D) getChronology().ensureChronoLocalDate(Temporal.super.plus(amount));
     }
 
@@ -385,9 +416,9 @@
      * @throws ArithmeticException {@inheritDoc}
      */
     @Override
-    public default D plus(long amountToAdd, TemporalUnit unit) {
+    default D plus(long amountToAdd, TemporalUnit unit) {
         if (unit instanceof ChronoUnit) {
-            throw new DateTimeException("Unsupported unit: " + unit.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
         return (D) getChronology().ensureChronoLocalDate(unit.addTo(this, amountToAdd));
     }
@@ -398,17 +429,18 @@
      * @throws ArithmeticException {@inheritDoc}
      */
     @Override
-    public default D minus(TemporalAmount amount) {
+    default D minus(TemporalAmount amount) {
         return (D) getChronology().ensureChronoLocalDate(Temporal.super.minus(amount));
     }
 
     /**
      * {@inheritDoc}
      * @throws DateTimeException {@inheritDoc}
+     * @throws UnsupportedTemporalTypeException {@inheritDoc}
      * @throws ArithmeticException {@inheritDoc}
      */
     @Override
-    public default D minus(long amountToSubtract, TemporalUnit unit) {
+    default D minus(long amountToSubtract, TemporalUnit unit) {
         return (D) getChronology().ensureChronoLocalDate(Temporal.super.minus(amountToSubtract, unit));
     }
 
@@ -433,14 +465,14 @@
      */
     @SuppressWarnings("unchecked")
     @Override
-    public default <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.zoneId() || query == Queries.zone() || query == Queries.offset()) {
+    default <R> R query(TemporalQuery<R> query) {
+        if (query == TemporalQuery.zoneId() || query == TemporalQuery.zone() || query == TemporalQuery.offset()) {
             return null;
-        } else if (query == Queries.localTime()) {
+        } else if (query == TemporalQuery.localTime()) {
             return null;
-        } else if (query == Queries.chronology()) {
+        } else if (query == TemporalQuery.chronology()) {
             return (R) getChronology();
-        } else if (query == Queries.precision()) {
+        } else if (query == TemporalQuery.precision()) {
             return (R) DAYS;
         }
         // inline TemporalAccessor.super.query(query) as an optimization
@@ -473,7 +505,7 @@
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
-    public default Temporal adjustInto(Temporal temporal) {
+    default Temporal adjustInto(Temporal temporal) {
         return temporal.with(EPOCH_DAY, toEpochDay());
     }
 
@@ -522,7 +554,7 @@
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override  // override for Javadoc
-    public abstract long periodUntil(Temporal endDate, TemporalUnit unit);
+    long periodUntil(Temporal endDate, TemporalUnit unit);
 
     /**
      * Calculates the period between this date and another date as a {@code Period}.
@@ -530,13 +562,11 @@
      * This calculates the period between two dates in terms of years, months and days.
      * The start and end points are {@code this} and the specified date.
      * The result will be negative if the end is before the start.
+     * The negative sign will be the same in each of year, month and day.
      * <p>
-     * The calculation is performed using the the chronology of this date.
+     * The calculation is performed using the chronology of this date.
      * If necessary, the input date will be converted to match.
      * <p>
-     * The result of this method can be a negative period if the end is before the start.
-     * The negative sign will be the same in each of year, month and day.
-     * <p>
      * This instance is immutable and unaffected by this method call.
      *
      * @param endDate  the end date, exclusive, which may be in any chronology, not null
@@ -544,7 +574,26 @@
      * @throws DateTimeException if the period cannot be calculated
      * @throws ArithmeticException if numeric overflow occurs
      */
-    public abstract Period periodUntil(ChronoLocalDate<?> endDate);
+    Period periodUntil(ChronoLocalDate<?> endDate);
+
+    /**
+     * Formats this date using the specified formatter.
+     * <p>
+     * This date will be passed to the formatter to produce a string.
+     * <p>
+     * The default implementation must behave as follows:
+     * <pre>
+     *  return formatter.format(this);
+     * </pre>
+     *
+     * @param formatter  the formatter to use, not null
+     * @return the formatted date string, not null
+     * @throws DateTimeException if an error occurs during printing
+     */
+    default String format(DateTimeFormatter formatter) {
+        Objects.requireNonNull(formatter, "formatter");
+        return formatter.format(this);
+    }
 
     //-----------------------------------------------------------------------
     /**
@@ -556,7 +605,7 @@
      * @param localTime  the local time to use, not null
      * @return the local date-time formed from this date and the specified time, not null
      */
-    public default ChronoLocalDateTime<D> atTime(LocalTime localTime) {
+    default ChronoLocalDateTime<D> atTime(LocalTime localTime) {
         return (ChronoLocalDateTime<D>)ChronoLocalDateTimeImpl.of(this, localTime);
     }
 
@@ -572,7 +621,7 @@
      *
      * @return the Epoch Day equivalent to this date
      */
-    public default long toEpochDay() {
+    default long toEpochDay() {
         return getLong(EPOCH_DAY);
     }
 
@@ -606,7 +655,7 @@
      * @return the comparator value, negative if less, positive if greater
      */
     @Override
-    public default int compareTo(ChronoLocalDate<?> other) {
+    default int compareTo(ChronoLocalDate<?> other) {
         int cmp = Long.compare(toEpochDay(), other.toEpochDay());
         if (cmp == 0) {
             cmp = getChronology().compareTo(other.getChronology());
@@ -628,7 +677,7 @@
      * @param other  the other date to compare to, not null
      * @return true if this is after the specified date
      */
-    public default boolean isAfter(ChronoLocalDate<?> other) {
+    default boolean isAfter(ChronoLocalDate<?> other) {
         return this.toEpochDay() > other.toEpochDay();
     }
 
@@ -646,7 +695,7 @@
      * @param other  the other date to compare to, not null
      * @return true if this is before the specified date
      */
-    public default boolean isBefore(ChronoLocalDate<?> other) {
+    default boolean isBefore(ChronoLocalDate<?> other) {
         return this.toEpochDay() < other.toEpochDay();
     }
 
@@ -664,7 +713,7 @@
      * @param other  the other date to compare to, not null
      * @return true if the underlying date is equal to the specified date
      */
-    public default boolean isEqual(ChronoLocalDate<?> other) {
+    default boolean isEqual(ChronoLocalDate<?> other) {
         return this.toEpochDay() == other.toEpochDay();
     }
 
@@ -695,28 +744,11 @@
     /**
      * Outputs this date as a {@code String}.
      * <p>
-     * The output will include the full local date and the chronology ID.
+     * The output will include the full local date.
      *
      * @return the formatted date, not null
      */
     @Override
     String toString();
 
-    /**
-     * Outputs this date as a {@code String} using the formatter.
-     * <p>
-     * The default implementation must behave as follows:
-     * <pre>
-     *  return formatter.format(this);
-     * </pre>
-     *
-     * @param formatter  the formatter to use, not null
-     * @return the formatted date string, not null
-     * @throws DateTimeException if an error occurs during printing
-     */
-    public default String toString(DateTimeFormatter formatter) {
-        Objects.requireNonNull(formatter, "formatter");
-        return formatter.format(this);
-    }
-
 }
--- a/src/share/classes/java/time/chrono/ChronoLocalDateTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/ChronoLocalDateTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -73,7 +73,6 @@
 import java.time.ZoneOffset;
 import java.time.format.DateTimeFormatter;
 import java.time.temporal.ChronoField;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -119,29 +118,57 @@
         extends Temporal, TemporalAdjuster, Comparable<ChronoLocalDateTime<?>> {
 
     /**
-     * Comparator for two {@code ChronoLocalDateTime} instances ignoring the chronology.
+     * Gets a comparator that compares {@code ChronoLocalDateTime} in
+     * time-line order ignoring the chronology.
      * <p>
-     * This method differs from the comparison in {@link #compareTo} in that it
-     * only compares the underlying date and not the chronology.
+     * This comparator differs from the comparison in {@link #compareTo} in that it
+     * only compares the underlying date-time and not the chronology.
      * This allows dates in different calendar systems to be compared based
-     * on the time-line position.
+     * on the position of the date-time on the local time-line.
+     * The underlying comparison is equivalent to comparing the epoch-day and nano-of-day.
      *
      * @see #isAfter
      * @see #isBefore
      * @see #isEqual
      */
-    Comparator<ChronoLocalDateTime<?>> DATE_TIME_COMPARATOR =
-            new Comparator<ChronoLocalDateTime<?>>() {
-        @Override
-        public int compare(ChronoLocalDateTime<?> datetime1, ChronoLocalDateTime<?> datetime2) {
-            int cmp = Long.compare(datetime1.toLocalDate().toEpochDay(), datetime2.toLocalDate().toEpochDay());
-            if (cmp == 0) {
-                cmp = Long.compare(datetime1.toLocalTime().toNanoOfDay(), datetime2.toLocalTime().toNanoOfDay());
-            }
-            return cmp;
+    static Comparator<ChronoLocalDateTime<?>> timeLineOrder() {
+        return Chronology.DATE_TIME_ORDER;
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Obtains an instance of {@code ChronoLocalDateTime} from a temporal object.
+     * <p>
+     * This obtains a local date-time based on the specified temporal.
+     * A {@code TemporalAccessor} represents an arbitrary set of date and time information,
+     * which this factory converts to an instance of {@code ChronoLocalDateTime}.
+     * <p>
+     * The conversion extracts and combines the chronology and the date-time
+     * from the temporal object. The behavior is equivalent to using
+     * {@link Chronology#localDateTime(TemporalAccessor)} with the extracted chronology.
+     * Implementations are permitted to perform optimizations such as accessing
+     * those fields that are equivalent to the relevant objects.
+     * <p>
+     * This method matches the signature of the functional interface {@link TemporalQuery}
+     * allowing it to be used as a query via method reference, {@code ChronoLocalDateTime::from}.
+     *
+     * @param temporal  the temporal object to convert, not null
+     * @return the date-time, not null
+     * @throws DateTimeException if unable to convert to a {@code ChronoLocalDateTime}
+     * @see Chronology#localDateTime(TemporalAccessor)
+     */
+    static ChronoLocalDateTime<?> from(TemporalAccessor temporal) {
+        if (temporal instanceof ChronoLocalDateTime) {
+            return (ChronoLocalDateTime<?>) temporal;
         }
-    };
+        Chronology chrono = temporal.query(TemporalQuery.chronology());
+        if (chrono == null) {
+            throw new DateTimeException("Unable to obtain ChronoLocalDateTime from TemporalAccessor: " + temporal.getClass());
+        }
+        return chrono.localDateTime(temporal);
+    }
 
+    //-----------------------------------------------------------------------
     /**
      * Gets the local date part of this date-time.
      * <p>
@@ -163,7 +190,7 @@
     LocalTime toLocalTime();
 
     @Override   // Override to provide javadoc
-    public boolean isSupported(TemporalField field);
+    boolean isSupported(TemporalField field);
 
     //-----------------------------------------------------------------------
     // override for covariant return type
@@ -173,7 +200,7 @@
      * @throws ArithmeticException {@inheritDoc}
      */
     @Override
-    public default ChronoLocalDateTime<D> with(TemporalAdjuster adjuster) {
+    default ChronoLocalDateTime<D> with(TemporalAdjuster adjuster) {
         return (ChronoLocalDateTime<D>)(toLocalDate().getChronology().ensureChronoLocalDateTime(Temporal.super.with(adjuster)));
     }
 
@@ -191,7 +218,7 @@
      * @throws ArithmeticException {@inheritDoc}
      */
     @Override
-    public default ChronoLocalDateTime<D> plus(TemporalAmount amount) {
+    default ChronoLocalDateTime<D> plus(TemporalAmount amount) {
         return (ChronoLocalDateTime<D>)(toLocalDate().getChronology().ensureChronoLocalDateTime(Temporal.super.plus(amount)));
     }
 
@@ -209,7 +236,7 @@
      * @throws ArithmeticException {@inheritDoc}
      */
     @Override
-    public default ChronoLocalDateTime<D> minus(TemporalAmount amount) {
+    default ChronoLocalDateTime<D> minus(TemporalAmount amount) {
         return (ChronoLocalDateTime<D>)(toLocalDate().getChronology().ensureChronoLocalDateTime(Temporal.super.minus(amount)));
     }
 
@@ -219,7 +246,7 @@
      * @throws ArithmeticException {@inheritDoc}
      */
     @Override
-    public default ChronoLocalDateTime<D> minus(long amountToSubtract, TemporalUnit unit) {
+    default ChronoLocalDateTime<D> minus(long amountToSubtract, TemporalUnit unit) {
         return (ChronoLocalDateTime<D>)(toLocalDate().getChronology().ensureChronoLocalDateTime(Temporal.super.minus(amountToSubtract, unit)));
     }
 
@@ -244,14 +271,14 @@
      */
     @SuppressWarnings("unchecked")
     @Override
-    public default <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.zoneId() || query == Queries.zone() || query == Queries.offset()) {
+    default <R> R query(TemporalQuery<R> query) {
+        if (query == TemporalQuery.zoneId() || query == TemporalQuery.zone() || query == TemporalQuery.offset()) {
             return null;
-        } else if (query == Queries.localTime()) {
+        } else if (query == TemporalQuery.localTime()) {
             return (R) toLocalTime();
-        } else if (query == Queries.chronology()) {
+        } else if (query == TemporalQuery.chronology()) {
             return (R) toLocalDate().getChronology();
-        } else if (query == Queries.precision()) {
+        } else if (query == TemporalQuery.precision()) {
             return (R) NANOS;
         }
         // inline TemporalAccessor.super.query(query) as an optimization
@@ -285,12 +312,31 @@
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
-    public default Temporal adjustInto(Temporal temporal) {
+    default Temporal adjustInto(Temporal temporal) {
         return temporal
                 .with(EPOCH_DAY, toLocalDate().toEpochDay())
                 .with(NANO_OF_DAY, toLocalTime().toNanoOfDay());
     }
 
+    /**
+     * Formats this date-time using the specified formatter.
+     * <p>
+     * This date-time will be passed to the formatter to produce a string.
+     * <p>
+     * The default implementation must behave as follows:
+     * <pre>
+     *  return formatter.format(this);
+     * </pre>
+     *
+     * @param formatter  the formatter to use, not null
+     * @return the formatted date-time string, not null
+     * @throws DateTimeException if an error occurs during printing
+     */
+    default String format(DateTimeFormatter formatter) {
+        Objects.requireNonNull(formatter, "formatter");
+        return formatter.format(this);
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Combines this time with a time-zone to create a {@code ChronoZonedDateTime}.
@@ -334,7 +380,7 @@
      * @param offset  the offset to use for the conversion, not null
      * @return an {@code Instant} representing the same instant, not null
      */
-    public default Instant toInstant(ZoneOffset offset) {
+    default Instant toInstant(ZoneOffset offset) {
         return Instant.ofEpochSecond(toEpochSecond(offset), toLocalTime().getNano());
     }
 
@@ -352,7 +398,7 @@
      * @param offset  the offset to use for the conversion, not null
      * @return the number of seconds from the epoch of 1970-01-01T00:00:00Z
      */
-    public default long toEpochSecond(ZoneOffset offset) {
+    default long toEpochSecond(ZoneOffset offset) {
         Objects.requireNonNull(offset, "offset");
         long epochDay = toLocalDate().toEpochDay();
         long secs = epochDay * 86400 + toLocalTime().toSecondOfDay();
@@ -388,7 +434,7 @@
      * @return the comparator value, negative if less, positive if greater
      */
     @Override
-    public default int compareTo(ChronoLocalDateTime<?> other) {
+    default int compareTo(ChronoLocalDateTime<?> other) {
         int cmp = toLocalDate().compareTo(other.toLocalDate());
         if (cmp == 0) {
             cmp = toLocalTime().compareTo(other.toLocalTime());
@@ -413,7 +459,7 @@
      * @param other  the other date-time to compare to, not null
      * @return true if this is after the specified date-time
      */
-    public default boolean isAfter(ChronoLocalDateTime<?> other) {
+    default boolean isAfter(ChronoLocalDateTime<?> other) {
         long thisEpDay = this.toLocalDate().toEpochDay();
         long otherEpDay = other.toLocalDate().toEpochDay();
         return thisEpDay > otherEpDay ||
@@ -434,7 +480,7 @@
      * @param other  the other date-time to compare to, not null
      * @return true if this is before the specified date-time
      */
-    public default boolean isBefore(ChronoLocalDateTime<?> other) {
+    default boolean isBefore(ChronoLocalDateTime<?> other) {
         long thisEpDay = this.toLocalDate().toEpochDay();
         long otherEpDay = other.toLocalDate().toEpochDay();
         return thisEpDay < otherEpDay ||
@@ -455,7 +501,7 @@
      * @param other  the other date-time to compare to, not null
      * @return true if the underlying date-time is equal to the specified date-time on the timeline
      */
-    public default boolean isEqual(ChronoLocalDateTime<?> other) {
+    default boolean isEqual(ChronoLocalDateTime<?> other) {
         // Do the time check first, it is cheaper than computing EPOCH day.
         return this.toLocalTime().toNanoOfDay() == other.toLocalTime().toNanoOfDay() &&
                this.toLocalDate().toEpochDay() == other.toLocalDate().toEpochDay();
@@ -484,27 +530,11 @@
     /**
      * Outputs this date-time as a {@code String}.
      * <p>
-     * The output will include the full local date-time and the chronology ID.
+     * The output will include the full local date-time.
      *
      * @return a string representation of this date-time, not null
      */
     @Override
     String toString();
 
-    /**
-     * Outputs this date-time as a {@code String} using the formatter.
-     * <p>
-     * The default implementation must behave as follows:
-     * <pre>
-     *  return formatter.format(this);
-     * </pre>
-     *
-     * @param formatter  the formatter to use, not null
-     * @return the formatted date-time string, not null
-     * @throws DateTimeException if an error occurs during printing
-     */
-    public default String toString(DateTimeFormatter formatter) {
-        Objects.requireNonNull(formatter, "formatter");
-        return formatter.format(this);
-    }
 }
--- a/src/share/classes/java/time/chrono/ChronoLocalDateTimeImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/ChronoLocalDateTimeImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -171,6 +171,7 @@
      * @param time  the local time, not null
      * @return the local date-time, not null
      */
+    @SuppressWarnings("rawtypes")
     static ChronoLocalDateTimeImpl<?> of(ChronoLocalDate<?> date, LocalTime time) {
         return new ChronoLocalDateTimeImpl(date, time);
     }
@@ -201,8 +202,8 @@
             return this;
         }
         // Validate that the new Temporal is a ChronoLocalDate (and not something else)
-        D cd = (D)date.getChronology().ensureChronoLocalDate(newDate);
-        return new ChronoLocalDateTimeImpl<>((D)cd, newTime);
+        D cd = (D) date.getChronology().ensureChronoLocalDate(newDate);
+        return new ChronoLocalDateTimeImpl<>(cd, newTime);
     }
 
     //-----------------------------------------------------------------------
@@ -221,7 +222,7 @@
     public boolean isSupported(TemporalField field) {
         if (field instanceof ChronoField) {
             ChronoField f = (ChronoField) field;
-            return f.isDateField() || f.isTimeField();
+            return f.isDateBased() || f.isTimeBased();
         }
         return field != null && field.isSupportedBy(this);
     }
@@ -230,7 +231,7 @@
     public ValueRange range(TemporalField field) {
         if (field instanceof ChronoField) {
             ChronoField f = (ChronoField) field;
-            return (f.isTimeField() ? time.range(field) : date.range(field));
+            return (f.isTimeBased() ? time.range(field) : date.range(field));
         }
         return field.rangeRefinedBy(this);
     }
@@ -239,7 +240,7 @@
     public int get(TemporalField field) {
         if (field instanceof ChronoField) {
             ChronoField f = (ChronoField) field;
-            return (f.isTimeField() ? time.get(field) : date.get(field));
+            return (f.isTimeBased() ? time.get(field) : date.get(field));
         }
         return range(field).checkValidIntValue(getLong(field), field);
     }
@@ -248,7 +249,7 @@
     public long getLong(TemporalField field) {
         if (field instanceof ChronoField) {
             ChronoField f = (ChronoField) field;
-            return (f.isTimeField() ? time.getLong(field) : date.getLong(field));
+            return (f.isTimeBased() ? time.getLong(field) : date.getLong(field));
         }
         return field.getFrom(this);
     }
@@ -272,7 +273,7 @@
     public ChronoLocalDateTimeImpl<D> with(TemporalField field, long newValue) {
         if (field instanceof ChronoField) {
             ChronoField f = (ChronoField) field;
-            if (f.isTimeField()) {
+            if (f.isTimeBased()) {
                 return with(date, time.with(field, newValue));
             } else {
                 return with(date.with(field, newValue), time);
@@ -376,7 +377,7 @@
             }
             D endDate = end.toLocalDate();
             if (end.toLocalTime().isBefore(time)) {
-                endDate = (D)endDate.minus(1, ChronoUnit.DAYS);
+                endDate = endDate.minus(1, ChronoUnit.DAYS);
             }
             return date.periodUntil(endDate, unit);
         }
@@ -403,7 +404,7 @@
     }
 
     static ChronoLocalDateTime<?> readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        ChronoLocalDate date = (ChronoLocalDate) in.readObject();
+        ChronoLocalDate<?> date = (ChronoLocalDate<?>) in.readObject();
         LocalTime time = (LocalTime) in.readObject();
         return date.atTime(time);
     }
--- a/src/share/classes/java/time/chrono/ChronoZonedDateTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/ChronoZonedDateTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -73,7 +73,6 @@
 import java.time.ZonedDateTime;
 import java.time.format.DateTimeFormatter;
 import java.time.temporal.ChronoField;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -81,6 +80,7 @@
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
 import java.util.Comparator;
 import java.util.Objects;
@@ -119,30 +119,59 @@
         extends Temporal, Comparable<ChronoZonedDateTime<?>> {
 
     /**
-     * Comparator for two {@code ChronoZonedDateTime} instances ignoring the chronology.
+     * Gets a comparator that compares {@code ChronoZonedDateTime} in
+     * time-line order ignoring the chronology.
      * <p>
-     * This method differs from the comparison in {@link #compareTo} in that it
-     * only compares the underlying date and not the chronology.
+     * This comparator differs from the comparison in {@link #compareTo} in that it
+     * only compares the underlying instant and not the chronology.
      * This allows dates in different calendar systems to be compared based
-     * on the time-line position.
+     * on the position of the date-time on the instant time-line.
+     * The underlying comparison is equivalent to comparing the epoch-second and nano-of-second.
      *
      * @see #isAfter
      * @see #isBefore
      * @see #isEqual
      */
-    Comparator<ChronoZonedDateTime<?>> INSTANT_COMPARATOR = new Comparator<ChronoZonedDateTime<?>>() {
-        @Override
-        public int compare(ChronoZonedDateTime<?> datetime1, ChronoZonedDateTime<?> datetime2) {
-            int cmp = Long.compare(datetime1.toEpochSecond(), datetime2.toEpochSecond());
-            if (cmp == 0) {
-                cmp = Long.compare(datetime1.toLocalTime().toNanoOfDay(), datetime2.toLocalTime().toNanoOfDay());
-            }
-            return cmp;
+    static Comparator<ChronoZonedDateTime<?>> timeLineOrder() {
+        return Chronology.INSTANT_ORDER;
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Obtains an instance of {@code ChronoZonedDateTime} from a temporal object.
+     * <p>
+     * This creates a zoned date-time based on the specified temporal.
+     * A {@code TemporalAccessor} represents an arbitrary set of date and time information,
+     * which this factory converts to an instance of {@code ChronoZonedDateTime}.
+     * <p>
+     * The conversion extracts and combines the chronology, date, time and zone
+     * from the temporal object. The behavior is equivalent to using
+     * {@link Chronology#zonedDateTime(TemporalAccessor)} with the extracted chronology.
+     * Implementations are permitted to perform optimizations such as accessing
+     * those fields that are equivalent to the relevant objects.
+     * <p>
+     * This method matches the signature of the functional interface {@link TemporalQuery}
+     * allowing it to be used as a query via method reference, {@code ChronoZonedDateTime::from}.
+     *
+     * @param temporal  the temporal objec t to convert, not null
+     * @return the date-time, not null
+     * @throws DateTimeException if unable to convert to a {@code ChronoZonedDateTime}
+     * @see Chronology#zonedDateTime(TemporalAccessor)
+     */
+    static ChronoZonedDateTime<?> from(TemporalAccessor temporal) {
+        if (temporal instanceof ChronoZonedDateTime) {
+            return (ChronoZonedDateTime<?>) temporal;
         }
-    };
+        Chronology chrono = temporal.query(TemporalQuery.chronology());
+        if (chrono == null) {
+            throw new DateTimeException("Unable to obtain ChronoZonedDateTime from TemporalAccessor: " + temporal.getClass());
+        }
+        return chrono.zonedDateTime(temporal);
+    }
 
+    //-----------------------------------------------------------------------
     @Override
-    public default ValueRange range(TemporalField field) {
+    default ValueRange range(TemporalField field) {
         if (field instanceof ChronoField) {
             if (field == INSTANT_SECONDS || field == OFFSET_SECONDS) {
                 return field.range();
@@ -153,11 +182,13 @@
     }
 
     @Override
-    public default int get(TemporalField field) {
+    default int get(TemporalField field) {
         if (field instanceof ChronoField) {
             switch ((ChronoField) field) {
-                case INSTANT_SECONDS: throw new DateTimeException("Field too large for an int: " + field);
-                case OFFSET_SECONDS: return getOffset().getTotalSeconds();
+                case INSTANT_SECONDS:
+                    throw new UnsupportedTemporalTypeException("Invalid field 'InstantSeconds' for get() method, use getLong() instead");
+                case OFFSET_SECONDS:
+                    return getOffset().getTotalSeconds();
             }
             return toLocalDateTime().get(field);
         }
@@ -165,7 +196,7 @@
     }
 
     @Override
-    public default long getLong(TemporalField field) {
+    default long getLong(TemporalField field) {
         if (field instanceof ChronoField) {
             switch ((ChronoField) field) {
                 case INSTANT_SECONDS: return toEpochSecond();
@@ -184,7 +215,7 @@
      *
      * @return the date part of this date-time, not null
      */
-    public default D toLocalDate() {
+    default D toLocalDate() {
         return toLocalDateTime().toLocalDate();
     }
 
@@ -196,7 +227,7 @@
      *
      * @return the time part of this date-time, not null
      */
-    public default LocalTime toLocalTime() {
+    default LocalTime toLocalTime() {
         return toLocalDateTime().toLocalTime();
     }
 
@@ -306,7 +337,7 @@
     ChronoZonedDateTime<D> withZoneSameInstant(ZoneId zone);
 
     @Override   // Override to provide javadoc
-    public boolean isSupported(TemporalField field);
+    boolean isSupported(TemporalField field);
 
     //-----------------------------------------------------------------------
     // override for covariant return type
@@ -316,7 +347,7 @@
      * @throws ArithmeticException {@inheritDoc}
      */
     @Override
-    public default ChronoZonedDateTime<D> with(TemporalAdjuster adjuster) {
+    default ChronoZonedDateTime<D> with(TemporalAdjuster adjuster) {
         return (ChronoZonedDateTime<D>)(toLocalDate().getChronology().ensureChronoZonedDateTime(Temporal.super.with(adjuster)));
     }
 
@@ -334,7 +365,7 @@
      * @throws ArithmeticException {@inheritDoc}
      */
     @Override
-    public default ChronoZonedDateTime<D> plus(TemporalAmount amount) {
+    default ChronoZonedDateTime<D> plus(TemporalAmount amount) {
         return (ChronoZonedDateTime<D>)(toLocalDate().getChronology().ensureChronoZonedDateTime(Temporal.super.plus(amount)));
     }
 
@@ -352,7 +383,7 @@
      * @throws ArithmeticException {@inheritDoc}
      */
     @Override
-    public default ChronoZonedDateTime<D> minus(TemporalAmount amount) {
+    default ChronoZonedDateTime<D> minus(TemporalAmount amount) {
         return (ChronoZonedDateTime<D>)(toLocalDate().getChronology().ensureChronoZonedDateTime(Temporal.super.minus(amount)));
     }
 
@@ -362,7 +393,7 @@
      * @throws ArithmeticException {@inheritDoc}
      */
     @Override
-    public default ChronoZonedDateTime<D> minus(long amountToSubtract, TemporalUnit unit) {
+    default ChronoZonedDateTime<D> minus(long amountToSubtract, TemporalUnit unit) {
         return (ChronoZonedDateTime<D>)(toLocalDate().getChronology().ensureChronoZonedDateTime(Temporal.super.minus(amountToSubtract, unit)));
     }
 
@@ -387,16 +418,16 @@
      */
     @SuppressWarnings("unchecked")
     @Override
-    public default <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.zone() || query == Queries.zoneId()) {
+    default <R> R query(TemporalQuery<R> query) {
+        if (query == TemporalQuery.zone() || query == TemporalQuery.zoneId()) {
             return (R) getZone();
-        } else if (query == Queries.offset()) {
+        } else if (query == TemporalQuery.offset()) {
             return (R) getOffset();
-        } else if (query == Queries.localTime()) {
+        } else if (query == TemporalQuery.localTime()) {
             return (R) toLocalTime();
-        } else if (query == Queries.chronology()) {
+        } else if (query == TemporalQuery.chronology()) {
             return (R) toLocalDate().getChronology();
-        } else if (query == Queries.precision()) {
+        } else if (query == TemporalQuery.precision()) {
             return (R) NANOS;
         }
         // inline TemporalAccessor.super.query(query) as an optimization
@@ -404,6 +435,25 @@
         return query.queryFrom(this);
     }
 
+    /**
+     * Formats this date-time using the specified formatter.
+     * <p>
+     * This date-time will be passed to the formatter to produce a string.
+     * <p>
+     * The default implementation must behave as follows:
+     * <pre>
+     *  return formatter.format(this);
+     * </pre>
+     *
+     * @param formatter  the formatter to use, not null
+     * @return the formatted date-time string, not null
+     * @throws DateTimeException if an error occurs during printing
+     */
+    default String format(DateTimeFormatter formatter) {
+        Objects.requireNonNull(formatter, "formatter");
+        return formatter.format(this);
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Converts this date-time to an {@code Instant}.
@@ -415,7 +465,7 @@
      *
      * @return an {@code Instant} representing the same instant, not null
      */
-    public default Instant toInstant() {
+    default Instant toInstant() {
         return Instant.ofEpochSecond(toEpochSecond(), toLocalTime().getNano());
     }
 
@@ -430,7 +480,7 @@
      *
      * @return the number of seconds from the epoch of 1970-01-01T00:00:00Z
      */
-    public default long toEpochSecond() {
+    default long toEpochSecond() {
         long epochDay = toLocalDate().toEpochDay();
         long secs = epochDay * 86400 + toLocalTime().toSecondOfDay();
         secs -= getOffset().getTotalSeconds();
@@ -454,7 +504,7 @@
      * @return the comparator value, negative if less, positive if greater
      */
     @Override
-    public default int compareTo(ChronoZonedDateTime<?> other) {
+    default int compareTo(ChronoZonedDateTime<?> other) {
         int cmp = Long.compare(toEpochSecond(), other.toEpochSecond());
         if (cmp == 0) {
             cmp = toLocalTime().getNano() - other.toLocalTime().getNano();
@@ -484,7 +534,7 @@
      * @param other  the other date-time to compare to, not null
      * @return true if this point is before the specified date-time
      */
-    public default boolean isBefore(ChronoZonedDateTime<?> other) {
+    default boolean isBefore(ChronoZonedDateTime<?> other) {
         long thisEpochSec = toEpochSecond();
         long otherEpochSec = other.toEpochSecond();
         return thisEpochSec < otherEpochSec ||
@@ -504,7 +554,7 @@
      * @param other  the other date-time to compare to, not null
      * @return true if this is after the specified date-time
      */
-    public default boolean isAfter(ChronoZonedDateTime<?> other) {
+    default boolean isAfter(ChronoZonedDateTime<?> other) {
         long thisEpochSec = toEpochSecond();
         long otherEpochSec = other.toEpochSecond();
         return thisEpochSec > otherEpochSec ||
@@ -524,7 +574,7 @@
      * @param other  the other date-time to compare to, not null
      * @return true if the instant equals the instant of the specified date-time
      */
-    public default boolean isEqual(ChronoZonedDateTime<?> other) {
+    default boolean isEqual(ChronoZonedDateTime<?> other) {
         return toEpochSecond() == other.toEpochSecond() &&
                 toLocalTime().getNano() == other.toLocalTime().getNano();
     }
@@ -555,28 +605,11 @@
     /**
      * Outputs this date-time as a {@code String}.
      * <p>
-     * The output will include the full zoned date-time and the chronology ID.
+     * The output will include the full zoned date-time.
      *
      * @return a string representation of this date-time, not null
      */
     @Override
     String toString();
 
-    /**
-     * Outputs this date-time as a {@code String} using the formatter.
-     * <p>
-     * The default implementation must behave as follows:
-     * <pre>
-     *  return formatter.format(this);
-     * </pre>
-     *
-     * @param formatter  the formatter to use, not null
-     * @return the formatted date-time string, not null
-     * @throws DateTimeException if an error occurs during printing
-     */
-    public default String toString(DateTimeFormatter formatter) {
-        Objects.requireNonNull(formatter, "formatter");
-        return formatter.format(this);
-    }
-
 }
--- a/src/share/classes/java/time/chrono/ChronoZonedDateTimeImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/ChronoZonedDateTimeImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -167,6 +167,7 @@
      * @param zone  the zone identifier, not null
      * @return the zoned date-time, not null
      */
+    @SuppressWarnings("rawtypes")
     static ChronoZonedDateTimeImpl<?> ofInstant(Chronology chrono, Instant instant, ZoneId zone) {
         ZoneRules rules = zone.getRules();
         ZoneOffset offset = rules.getOffset(instant);
--- a/src/share/classes/java/time/chrono/Chronology.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/Chronology.java	Wed Apr 17 21:48:04 2013 -0700
@@ -61,38 +61,57 @@
  */
 package java.time.chrono;
 
+import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH;
+import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR;
+import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_MONTH;
+import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_YEAR;
+import static java.time.temporal.ChronoField.DAY_OF_MONTH;
+import static java.time.temporal.ChronoField.DAY_OF_WEEK;
+import static java.time.temporal.ChronoField.DAY_OF_YEAR;
+import static java.time.temporal.ChronoField.EPOCH_DAY;
+import static java.time.temporal.ChronoField.ERA;
+import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
+import static java.time.temporal.ChronoField.YEAR;
+import static java.time.temporal.ChronoField.YEAR_OF_ERA;
+import static java.time.temporal.TemporalAdjuster.nextOrSame;
+
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 import java.io.InvalidObjectException;
 import java.io.ObjectStreamException;
+import java.io.Serializable;
 import java.time.Clock;
 import java.time.DateTimeException;
+import java.time.DayOfWeek;
 import java.time.Instant;
 import java.time.LocalDate;
 import java.time.LocalTime;
 import java.time.ZoneId;
-import java.time.chrono.HijrahChronology;
-import java.time.chrono.JapaneseChronology;
-import java.time.chrono.MinguoChronology;
-import java.time.chrono.ThaiBuddhistChronology;
 import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.ResolverStyle;
 import java.time.format.TextStyle;
 import java.time.temporal.ChronoField;
-import java.time.temporal.Queries;
+import java.time.temporal.ChronoUnit;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
+import java.util.Comparator;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Locale;
+import java.util.Map;
 import java.util.Objects;
 import java.util.ServiceLoader;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
+import sun.util.logging.PlatformLogger;
+
 /**
  * A calendar system, used to organize and identify dates.
  * <p>
@@ -106,7 +125,7 @@
  * for use by any {@code Chronology} implementation:
  * <pre>
  *   LocalDate isoDate = ...
- *   ChronoLocalDate&lt;ThaiBuddhistChronology&gt; thaiDate = ...
+ *   ThaiBuddhistDate thaiDate = ...
  *   int isoYear = isoDate.get(ChronoField.YEAR);
  *   int thaiYear = thaiDate.get(ChronoField.YEAR);
  * </pre>
@@ -154,8 +173,8 @@
  * <p>
  * Each chronology must define a chronology ID that is unique within the system.
  * If the chronology represents a calendar system defined by the
- * <em>Unicode Locale Data Markup Language (LDML)</em> specification then that
- * calendar type should also be specified.
+ * CLDR specification then the calendar type is the concatenation of the
+ * CLDR type and, if applicable, the CLDR variant,
  *
  * <h3>Specification for implementors</h3>
  * This class must be implemented with care to ensure other classes operate correctly.
@@ -167,6 +186,36 @@
 public abstract class Chronology implements Comparable<Chronology> {
 
     /**
+     * ChronoLocalDate order constant.
+     */
+    static final Comparator<ChronoLocalDate<?>> DATE_ORDER =
+        (Comparator<ChronoLocalDate<?>> & Serializable) (date1, date2) -> {
+            return Long.compare(date1.toEpochDay(), date2.toEpochDay());
+        };
+    /**
+     * ChronoLocalDateTime order constant.
+     */
+    static final Comparator<ChronoLocalDateTime<?>> DATE_TIME_ORDER =
+        (Comparator<ChronoLocalDateTime<?>> & Serializable) (dateTime1, dateTime2) -> {
+            int cmp = Long.compare(dateTime1.toLocalDate().toEpochDay(), dateTime2.toLocalDate().toEpochDay());
+            if (cmp == 0) {
+                cmp = Long.compare(dateTime1.toLocalTime().toNanoOfDay(), dateTime2.toLocalTime().toNanoOfDay());
+            }
+            return cmp;
+        };
+    /**
+     * ChronoZonedDateTime order constant.
+     */
+    static final Comparator<ChronoZonedDateTime<?>> INSTANT_ORDER =
+            (Comparator<ChronoZonedDateTime<?>> & Serializable) (dateTime1, dateTime2) -> {
+                int cmp = Long.compare(dateTime1.toEpochSecond(), dateTime2.toEpochSecond());
+                if (cmp == 0) {
+                    cmp = Long.compare(dateTime1.toLocalTime().getNano(), dateTime2.toLocalTime().getNano());
+                }
+                return cmp;
+            };
+
+    /**
      * Map of available calendars by ID.
      */
     private static final ConcurrentHashMap<String, Chronology> CHRONOS_BY_ID = new ConcurrentHashMap<>();
@@ -176,19 +225,35 @@
     private static final ConcurrentHashMap<String, Chronology> CHRONOS_BY_TYPE = new ConcurrentHashMap<>();
 
     /**
+     * Register a Chronology by its ID and type for lookup by {@link #of(java.lang.String)}.
+     * Chronologies must not be registered until they are completely constructed.
+     * Specifically, not in the constructor of Chronology.
+     *
+     * @param chrono the chronology to register; not null
+     * @return the already registered Chronology if any, may be null
+     */
+    static Chronology registerChrono(Chronology chrono) {
+        return registerChrono(chrono, chrono.getId());
+    }
+
+    /**
      * Register a Chronology by ID and type for lookup by {@link #of(java.lang.String)}.
      * Chronos must not be registered until they are completely constructed.
      * Specifically, not in the constructor of Chronology.
+     *
      * @param chrono the chronology to register; not null
+     * @param id the ID to register the chronology; not null
+     * @return the already registered Chronology if any, may be null
      */
-    private static void registerChrono(Chronology chrono) {
-        Chronology prev = CHRONOS_BY_ID.putIfAbsent(chrono.getId(), chrono);
+    static Chronology registerChrono(Chronology chrono, String id) {
+        Chronology prev = CHRONOS_BY_ID.putIfAbsent(id, chrono);
         if (prev == null) {
             String type = chrono.getCalendarType();
             if (type != null) {
                 CHRONOS_BY_TYPE.putIfAbsent(type, chrono);
             }
         }
+        return prev;
     }
 
     /**
@@ -209,18 +274,25 @@
     private static boolean initCache() {
         if (CHRONOS_BY_ID.get("ISO") == null) {
             // Initialization is incomplete
-            @SuppressWarnings("rawtypes")
-            ServiceLoader<Chronology> loader =  ServiceLoader.load(Chronology.class, null);
-            for (Chronology chrono : loader) {
-                registerChrono(chrono);
-            }
 
-            // Register these calendars; the ServiceLoader configuration is not used
+            // Register built-in Chronologies
             registerChrono(HijrahChronology.INSTANCE);
             registerChrono(JapaneseChronology.INSTANCE);
             registerChrono(MinguoChronology.INSTANCE);
             registerChrono(ThaiBuddhistChronology.INSTANCE);
 
+            // Register Chronologies from the ServiceLoader
+            @SuppressWarnings("rawtypes")
+            ServiceLoader<Chronology> loader =  ServiceLoader.load(Chronology.class, null);
+            for (Chronology chrono : loader) {
+                String id = chrono.getId();
+                if (id.equals("ISO") || registerChrono(chrono) != null) {
+                    // Log the attempt to replace an existing Chronology
+                    PlatformLogger logger = PlatformLogger.getLogger("java.time.chrono");
+                    logger.warning("Ignoring duplicate Chronology, from ServiceLoader configuration "  + id);
+                }
+            }
+
             // finally, register IsoChronology to mark initialization is complete
             registerChrono(IsoChronology.INSTANCE);
             return true;
@@ -236,7 +308,7 @@
      * A {@code TemporalAccessor} represents an arbitrary set of date and time information,
      * which this factory converts to an instance of {@code Chronology}.
      * <p>
-     * The conversion will obtain the chronology using {@link Queries#chronology()}.
+     * The conversion will obtain the chronology using {@link TemporalQuery#chronology()}.
      * If the specified temporal object does not have a chronology, {@link IsoChronology} is returned.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
@@ -248,7 +320,7 @@
      */
     public static Chronology from(TemporalAccessor temporal) {
         Objects.requireNonNull(temporal, "temporal");
-        Chronology obj = temporal.query(Queries.chronology());
+        Chronology obj = temporal.query(TemporalQuery.chronology());
         return (obj != null ? obj : IsoChronology.INSTANCE);
     }
 
@@ -266,13 +338,16 @@
      * <p>
      * The {@code Locale} class also supports an extension mechanism that
      * can be used to identify a calendar system. The mechanism is a form
-     * of key-value pairs, where the calendar system has the key "ca".
+     * of key-value pairs, where the calendar system has the key "ca"
+     * and an optional variant key "cv".
      * For example, the locale "en-JP-u-ca-japanese" represents the English
      * language as used in Japan with the Japanese calendar system.
      * <p>
      * This method finds the desired calendar system by in a manner equivalent
      * to passing "ca" to {@link Locale#getUnicodeLocaleType(String)}.
      * If the "ca" key is not present, then {@code IsoChronology} is returned.
+     * The variant, if present, is appended to the "ca" value separated by  "-"
+     * and the concatenated value is used to find the calendar system by type.
      * <p>
      * Note that the behavior of this method differs from the older
      * {@link java.util.Calendar#getInstance(Locale)} method.
@@ -299,6 +374,10 @@
         if (type == null || "iso".equals(type) || "iso8601".equals(type)) {
             return IsoChronology.INSTANCE;
         }
+        String variant = locale.getUnicodeLocaleType("cv");
+        if (variant != null && !variant.isEmpty()) {
+            type = type + '-' + variant;
+        }
         // Not pre-defined; lookup by the type
         do {
             Chronology chrono = CHRONOS_BY_TYPE.get(type);
@@ -307,6 +386,16 @@
             }
             // If not found, do the initialization (once) and repeat the lookup
         } while (initCache());
+
+        // Look for a Chronology using ServiceLoader of the Thread's ContextClassLoader
+        // Application provided Chronologies must not be cached
+        @SuppressWarnings("rawtypes")
+        ServiceLoader<Chronology> loader = ServiceLoader.load(Chronology.class);
+        for (Chronology chrono : loader) {
+            if (type.equals(chrono.getCalendarType())) {
+                return chrono;
+            }
+        }
         throw new DateTimeException("Unknown calendar system: " + type);
     }
 
@@ -317,7 +406,8 @@
      * <p>
      * This returns a chronology based on either the ID or the type.
      * The {@link #getId() chronology ID} uniquely identifies the chronology.
-     * The {@link #getCalendarType() calendar system type} is defined by the LDML specification.
+     * The {@link #getCalendarType() calendar system type} is defined by the
+     * CLDR specification.
      * <p>
      * The chronology may be a system chronology or a chronology
      * provided by the application via ServiceLoader configuration.
@@ -379,7 +469,7 @@
      */
     public static Set<Chronology> getAvailableChronologies() {
         initCache();       // force initialization
-        HashSet<Chronology> chronos = new HashSet(CHRONOS_BY_ID.values());
+        HashSet<Chronology> chronos = new HashSet<>(CHRONOS_BY_ID.values());
 
         /// Add in Chronologies from the ServiceLoader configuration
         @SuppressWarnings("rawtypes")
@@ -406,9 +496,9 @@
      * @throws ClassCastException if the date-time cannot be cast to ChronoLocalDate
      *  or the chronology is not equal this Chronology
      */
-    ChronoLocalDate ensureChronoLocalDate(Temporal temporal) {
+    ChronoLocalDate<?> ensureChronoLocalDate(Temporal temporal) {
         @SuppressWarnings("unchecked")
-        ChronoLocalDate other = (ChronoLocalDate) temporal;
+        ChronoLocalDate<?> other = (ChronoLocalDate<?>) temporal;
         if (this.equals(other.getChronology()) == false) {
             throw new ClassCastException("Chronology mismatch, expected: " + getId() + ", actual: " + other.getChronology().getId());
         }
@@ -464,15 +554,16 @@
     public abstract String getId();
 
     /**
-     * Gets the calendar type of the underlying calendar system.
+     * Gets the calendar type of the calendar system.
      * <p>
-     * The calendar type is an identifier defined by the
-     * <em>Unicode Locale Data Markup Language (LDML)</em> specification.
-     * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
-     * It can also be used as part of a locale, accessible via
-     * {@link Locale#getUnicodeLocaleType(String)} with the key 'ca'.
+     * The calendar type is an identifier defined by the CLDR and
+     * <em>Unicode Locale Data Markup Language (LDML)</em> specifications
+     * to uniquely identification a calendar.
+     * The {@code getCalendarType} is the concatenation of the CLDR calendar type
+     * and the variant, if applicable, is appended separated by "-".
+     * The calendar type is used to lookup the {@code Chronology} using {@link #of(String)}.
      *
-     * @return the calendar system type, null if the calendar is not defined by LDML
+     * @return the calendar system type, null if the calendar is not defined
      * @see #getId()
      */
     public abstract String getCalendarType();
@@ -488,8 +579,9 @@
      * @param dayOfMonth  the chronology day-of-month
      * @return the local date in this chronology, not null
      * @throws DateTimeException if unable to create the date
+     * @throws ClassCastException if the {@code era} is not of the correct type for the chronology
      */
-    public ChronoLocalDate date(Era era, int yearOfEra, int month, int dayOfMonth) {
+    public ChronoLocalDate<?> date(Era era, int yearOfEra, int month, int dayOfMonth) {
         return date(prolepticYear(era, yearOfEra), month, dayOfMonth);
     }
 
@@ -503,7 +595,7 @@
      * @return the local date in this chronology, not null
      * @throws DateTimeException if unable to create the date
      */
-    public abstract ChronoLocalDate date(int prolepticYear, int month, int dayOfMonth);
+    public abstract ChronoLocalDate<?> date(int prolepticYear, int month, int dayOfMonth);
 
     /**
      * Obtains a local date in this chronology from the era, year-of-era and
@@ -514,8 +606,9 @@
      * @param dayOfYear  the chronology day-of-year
      * @return the local date in this chronology, not null
      * @throws DateTimeException if unable to create the date
+     * @throws ClassCastException if the {@code era} is not of the correct type for the chronology
      */
-    public ChronoLocalDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
+    public ChronoLocalDate<?> dateYearDay(Era era, int yearOfEra, int dayOfYear) {
         return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
     }
 
@@ -528,7 +621,19 @@
      * @return the local date in this chronology, not null
      * @throws DateTimeException if unable to create the date
      */
-    public abstract ChronoLocalDate dateYearDay(int prolepticYear, int dayOfYear);
+    public abstract ChronoLocalDate<?> dateYearDay(int prolepticYear, int dayOfYear);
+
+    /**
+     * Obtains a local date in this chronology from the epoch-day.
+     * <p>
+     * The definition of {@link ChronoField#EPOCH_DAY EPOCH_DAY} is the same
+     * for all calendar systems, thus it can be used for conversion.
+     *
+     * @param epochDay  the epoch day
+     * @return the local date in this chronology, not null
+     * @throws DateTimeException if unable to create the date
+     */
+    public abstract ChronoLocalDate<?> dateEpochDay(long epochDay);
 
     //-----------------------------------------------------------------------
     /**
@@ -545,7 +650,7 @@
      * @return the current local date using the system clock and default time-zone, not null
      * @throws DateTimeException if unable to create the date
      */
-    public ChronoLocalDate dateNow() {
+    public ChronoLocalDate<?> dateNow() {
         return dateNow(Clock.systemDefaultZone());
     }
 
@@ -562,7 +667,7 @@
      * @return the current local date using the system clock, not null
      * @throws DateTimeException if unable to create the date
      */
-    public ChronoLocalDate dateNow(ZoneId zone) {
+    public ChronoLocalDate<?> dateNow(ZoneId zone) {
         return dateNow(Clock.system(zone));
     }
 
@@ -577,7 +682,7 @@
      * @return the current local date, not null
      * @throws DateTimeException if unable to create the date
      */
-    public ChronoLocalDate dateNow(Clock clock) {
+    public ChronoLocalDate<?> dateNow(Clock clock) {
         Objects.requireNonNull(clock, "clock");
         return date(LocalDate.now(clock));
     }
@@ -586,7 +691,7 @@
     /**
      * Obtains a local date in this chronology from another temporal object.
      * <p>
-     * This creates a date in this chronology based on the specified temporal.
+     * This obtains a date in this chronology based on the specified temporal.
      * A {@code TemporalAccessor} represents an arbitrary set of date and time information,
      * which this factory converts to an instance of {@code ChronoLocalDate}.
      * <p>
@@ -599,13 +704,14 @@
      * @param temporal  the temporal object to convert, not null
      * @return the local date in this chronology, not null
      * @throws DateTimeException if unable to create the date
+     * @see ChronoLocalDate#from(TemporalAccessor)
      */
-    public abstract ChronoLocalDate date(TemporalAccessor temporal);
+    public abstract ChronoLocalDate<?> date(TemporalAccessor temporal);
 
     /**
      * Obtains a local date-time in this chronology from another temporal object.
      * <p>
-     * This creates a date-time in this chronology based on the specified temporal.
+     * This obtains a date-time in this chronology based on the specified temporal.
      * A {@code TemporalAccessor} represents an arbitrary set of date and time information,
      * which this factory converts to an instance of {@code ChronoLocalDateTime}.
      * <p>
@@ -621,6 +727,7 @@
      * @param temporal  the temporal object to convert, not null
      * @return the local date-time in this chronology, not null
      * @throws DateTimeException if unable to create the date-time
+     * @see ChronoLocalDateTime#from(TemporalAccessor)
      */
     public ChronoLocalDateTime<?> localDateTime(TemporalAccessor temporal) {
         try {
@@ -633,7 +740,7 @@
     /**
      * Obtains a {@code ChronoZonedDateTime} in this chronology from another temporal object.
      * <p>
-     * This creates a zoned date-time in this chronology based on the specified temporal.
+     * This obtains a zoned date-time in this chronology based on the specified temporal.
      * A {@code TemporalAccessor} represents an arbitrary set of date and time information,
      * which this factory converts to an instance of {@code ChronoZonedDateTime}.
      * <p>
@@ -652,6 +759,7 @@
      * @param temporal  the temporal object to convert, not null
      * @return the zoned date-time in this chronology, not null
      * @throws DateTimeException if unable to create the date-time
+     * @see ChronoZonedDateTime#from(TemporalAccessor)
      */
     public ChronoZonedDateTime<?> zonedDateTime(TemporalAccessor temporal) {
         try {
@@ -661,6 +769,7 @@
                 return zonedDateTime(instant, zone);
 
             } catch (DateTimeException ex1) {
+                @SuppressWarnings("rawtypes")
                 ChronoLocalDateTimeImpl cldt = ensureChronoLocalDateTime(localDateTime(temporal));
                 return ChronoZonedDateTimeImpl.ofBest(cldt, zone, null);
             }
@@ -672,7 +781,7 @@
     /**
      * Obtains a {@code ChronoZonedDateTime} in this chronology from an {@code Instant}.
      * <p>
-     * This creates a zoned date-time with the same instant as that specified.
+     * This obtains a zoned date-time with the same instant as that specified.
      *
      * @param instant  the instant to create the date-time from, not null
      * @param zone  the time-zone, not null
@@ -703,11 +812,17 @@
      * Calculates the proleptic-year given the era and year-of-era.
      * <p>
      * This combines the era and year-of-era into the single proleptic-year field.
+     * <p>
+     * If the chronology makes active use of eras, such as {@code JapaneseChronology}
+     * then the year-of-era will be validated against the era.
+     * For other chronologies, validation is optional.
      *
      * @param era  the era of the correct type for the chronology, not null
      * @param yearOfEra  the chronology year-of-era
      * @return the proleptic-year
-     * @throws DateTimeException if unable to convert
+     * @throws DateTimeException if unable to convert to a proleptic-year,
+     *  such as if the year is invalid for the era
+     * @throws ClassCastException if the {@code era} is not of the correct type for the chronology
      */
     public abstract int prolepticYear(Era era, int yearOfEra);
 
@@ -775,24 +890,175 @@
      * @return the text value of the chronology, not null
      */
     public String getDisplayName(TextStyle style, Locale locale) {
-        return new DateTimeFormatterBuilder().appendChronologyText(style).toFormatter(locale).format(new TemporalAccessor() {
+        return new DateTimeFormatterBuilder().appendChronologyText(style).toFormatter(locale).format(toTemporal());
+    }
+
+    /**
+     * Converts this chronology to a {@code TemporalAccessor}.
+     * <p>
+     * A {@code Chronology} can be fully represented as a {@code TemporalAccessor}.
+     * However, the interface is not implemented by this class as most of the
+     * methods on the interface have no meaning to {@code Chronology}.
+     * <p>
+     * The returned temporal has no supported fields, with the query method
+     * supporting the return of the chronology using {@link TemporalQuery#chronology()}.
+     *
+     * @return a temporal equivalent to this chronology, not null
+     */
+    private TemporalAccessor toTemporal() {
+        return new TemporalAccessor() {
             @Override
             public boolean isSupported(TemporalField field) {
                 return false;
             }
             @Override
             public long getLong(TemporalField field) {
-                throw new DateTimeException("Unsupported field: " + field);
+                throw new UnsupportedTemporalTypeException("Unsupported field: " + field);
             }
             @SuppressWarnings("unchecked")
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == Queries.chronology()) {
+                if (query == TemporalQuery.chronology()) {
                     return (R) Chronology.this;
                 }
                 return TemporalAccessor.super.query(query);
             }
-        });
+        };
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Resolves parsed {@code ChronoField} values into a date during parsing.
+     * <p>
+     * Most {@code TemporalField} implementations are resolved using the
+     * resolve method on the field. By contrast, the {@code ChronoField} class
+     * defines fields that only have meaning relative to the chronology.
+     * As such, {@code ChronoField} date fields are resolved here in the
+     * context of a specific chronology.
+     * <p>
+     * The default implementation is suitable for most calendar systems.
+     * If {@link ChronoField#YEAR_OF_ERA} is found without an {@link ChronoField#ERA}
+     * then the last era in {@link #eras()} is used.
+     * The implementation assumes a 7 day week, that the first day-of-month
+     * has the value 1, and that first day-of-year has the value 1.
+     *
+     * @param fieldValues  the map of fields to values, which can be updated, not null
+     * @param resolverStyle  the requested type of resolve, not null
+     * @return the resolved date, null if insufficient information to create a date
+     * @throws DateTimeException if the date cannot be resolved, typically
+     *  because of a conflict in the input data
+     */
+    public ChronoLocalDate<?> resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        // check epoch-day before inventing era
+        if (fieldValues.containsKey(EPOCH_DAY)) {
+            return dateEpochDay(fieldValues.remove(EPOCH_DAY));
+        }
+
+        // fix proleptic month before inventing era
+        Long pMonth = fieldValues.remove(PROLEPTIC_MONTH);
+        if (pMonth != null) {
+            // first day-of-month is likely to be safest for setting proleptic-month
+            // cannot add to year zero, as not all chronologies have a year zero
+            ChronoLocalDate<?> chronoDate = dateNow()
+                    .with(DAY_OF_MONTH, 1).with(PROLEPTIC_MONTH, pMonth);
+            addFieldValue(fieldValues, MONTH_OF_YEAR, chronoDate.get(MONTH_OF_YEAR));
+            addFieldValue(fieldValues, YEAR, chronoDate.get(YEAR));
+        }
+
+        // invent era if necessary to resolve year-of-era
+        Long yoeLong = fieldValues.remove(YEAR_OF_ERA);
+        if (yoeLong != null) {
+            Long eraLong = fieldValues.remove(ERA);
+            int yoe = range(YEAR_OF_ERA).checkValidIntValue(yoeLong, YEAR_OF_ERA);
+            if (eraLong != null) {
+                Era eraObj = eraOf(Math.toIntExact(eraLong));
+                addFieldValue(fieldValues, YEAR, prolepticYear(eraObj, yoe));
+            } else if (fieldValues.containsKey(YEAR)) {
+                int year = range(YEAR).checkValidIntValue(fieldValues.get(YEAR), YEAR);
+                ChronoLocalDate<?> chronoDate = dateYearDay(year, 1);
+                addFieldValue(fieldValues, YEAR, prolepticYear(chronoDate.getEra(), yoe));
+            } else {
+                List<Era> eras = eras();
+                if (eras.isEmpty()) {
+                    addFieldValue(fieldValues, YEAR, yoe);
+                } else {
+                    Era eraObj = eras.get(eras.size() - 1);
+                    addFieldValue(fieldValues, YEAR, prolepticYear(eraObj, yoe));
+                }
+            }
+        }
+
+        // build date
+        if (fieldValues.containsKey(YEAR)) {
+            if (fieldValues.containsKey(MONTH_OF_YEAR)) {
+                if (fieldValues.containsKey(DAY_OF_MONTH)) {
+                    int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR);
+                    int moy = range(MONTH_OF_YEAR).checkValidIntValue(fieldValues.remove(MONTH_OF_YEAR), MONTH_OF_YEAR);
+                    int dom = range(DAY_OF_MONTH).checkValidIntValue(fieldValues.remove(DAY_OF_MONTH), DAY_OF_MONTH);
+                    return date(y, moy, dom);
+                }
+                if (fieldValues.containsKey(ALIGNED_WEEK_OF_MONTH)) {
+                    if (fieldValues.containsKey(ALIGNED_DAY_OF_WEEK_IN_MONTH)) {
+                        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR);
+                        int moy = range(MONTH_OF_YEAR).checkValidIntValue(fieldValues.remove(MONTH_OF_YEAR), MONTH_OF_YEAR);
+                        int aw = range(ALIGNED_WEEK_OF_MONTH).checkValidIntValue(fieldValues.remove(ALIGNED_WEEK_OF_MONTH), ALIGNED_WEEK_OF_MONTH);
+                        int ad = range(ALIGNED_DAY_OF_WEEK_IN_MONTH).checkValidIntValue(fieldValues.remove(ALIGNED_DAY_OF_WEEK_IN_MONTH), ALIGNED_DAY_OF_WEEK_IN_MONTH);
+                        ChronoLocalDate<?> chronoDate = date(y, moy, 1);
+                        return chronoDate.plus((aw - 1) * 7 + (ad - 1), ChronoUnit.DAYS);
+                    }
+                    if (fieldValues.containsKey(DAY_OF_WEEK)) {
+                        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR);
+                        int moy = range(MONTH_OF_YEAR).checkValidIntValue(fieldValues.remove(MONTH_OF_YEAR), MONTH_OF_YEAR);
+                        int aw = range(ALIGNED_WEEK_OF_MONTH).checkValidIntValue(fieldValues.remove(ALIGNED_WEEK_OF_MONTH), ALIGNED_WEEK_OF_MONTH);
+                        int dow = range(DAY_OF_WEEK).checkValidIntValue(fieldValues.remove(DAY_OF_WEEK), DAY_OF_WEEK);
+                        ChronoLocalDate<?> chronoDate = date(y, moy, 1);
+                        return chronoDate.plus((aw - 1) * 7, ChronoUnit.DAYS).with(nextOrSame(DayOfWeek.of(dow)));
+                    }
+                }
+            }
+            if (fieldValues.containsKey(DAY_OF_YEAR)) {
+                int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR);
+                int doy = range(DAY_OF_YEAR).checkValidIntValue(fieldValues.remove(DAY_OF_YEAR), DAY_OF_YEAR);
+                return dateYearDay(y, doy);
+            }
+            if (fieldValues.containsKey(ALIGNED_WEEK_OF_YEAR)) {
+                if (fieldValues.containsKey(ALIGNED_DAY_OF_WEEK_IN_YEAR)) {
+                    int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR);
+                    int aw = range(ALIGNED_WEEK_OF_YEAR).checkValidIntValue(fieldValues.remove(ALIGNED_WEEK_OF_YEAR), ALIGNED_WEEK_OF_YEAR);
+                    int ad = range(ALIGNED_DAY_OF_WEEK_IN_YEAR).checkValidIntValue(fieldValues.remove(ALIGNED_DAY_OF_WEEK_IN_YEAR), ALIGNED_DAY_OF_WEEK_IN_YEAR);
+                    ChronoLocalDate<?> chronoDate = dateYearDay(y, 1);
+                    return chronoDate.plus((aw - 1) * 7 + (ad - 1), ChronoUnit.DAYS);
+                }
+                if (fieldValues.containsKey(DAY_OF_WEEK)) {
+                    int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR);
+                    int aw = range(ALIGNED_WEEK_OF_YEAR).checkValidIntValue(fieldValues.remove(ALIGNED_WEEK_OF_YEAR), ALIGNED_WEEK_OF_YEAR);
+                    int dow = range(DAY_OF_WEEK).checkValidIntValue(fieldValues.remove(DAY_OF_WEEK), DAY_OF_WEEK);
+                    ChronoLocalDate<?> chronoDate = dateYearDay(y, 1);
+                    return chronoDate.plus((aw - 1) * 7, ChronoUnit.DAYS).with(nextOrSame(DayOfWeek.of(dow)));
+                }
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Adds a field-value pair to the map, checking for conflicts.
+     * <p>
+     * If the field is not already present, then the field-value pair is added to the map.
+     * If the field is already present and it has the same value as that specified, no action occurs.
+     * If the field is already present and it has a different value to that specified, then
+     * an exception is thrown.
+     *
+     * @param field  the field to add, not null
+     * @param value  the value to add, not null
+     * @throws DateTimeException if the field is already present with a different value
+     */
+    void addFieldValue(Map<TemporalField, Long> fieldValues, ChronoField field, long value) {
+        Long old = fieldValues.get(field);  // check first for better error message
+        if (old != null && old.longValue() != value) {
+            throw new DateTimeException("Conflict found: " + field + " " + old + " differs from " + field + " " + value);
+        }
+        fieldValues.put(field, value);
     }
 
     //-----------------------------------------------------------------------
@@ -861,16 +1127,16 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Writes the object using a
-     * <a href="../../../serialized-form.html#java.time.temporal.Ser">dedicated serialized form</a>.
+     * Writes the Chronology using a
+     * <a href="../../../serialized-form.html#java.time.chrono.Ser">dedicated serialized form</a>.
      * <pre>
-     *  out.writeByte(7);  // identifies this as a Chronology
-     * out.writeUTF(chronoId);
+     *  out.writeByte(1);  // identifies this as a Chronology
+     *  out.writeUTF(getId());
      * </pre>
      *
      * @return the instance of {@code Ser}, not null
      */
-    private Object writeReplace() {
+    protected Object writeReplace() {
         return new Ser(Ser.CHRONO_TYPE, this);
     }
 
--- a/src/share/classes/java/time/chrono/Era.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/Era.java	Wed Apr 17 21:48:04 2013 -0700
@@ -65,10 +65,10 @@
 import static java.time.temporal.ChronoUnit.ERAS;
 
 import java.time.DateTimeException;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.format.TextStyle;
 import java.time.temporal.ChronoField;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -120,55 +120,6 @@
      */
     int getValue();
 
-    /**
-     * Gets the chronology of this era.
-     * <p>
-     * The {@code Chronology} represents the calendar system in use.
-     * This always returns the standard form of the chronology.
-     *
-     * @return the chronology, not null
-     */
-    Chronology getChronology();
-
-    //-----------------------------------------------------------------------
-    /**
-     * Obtains a date in this era given the year-of-era, month, and day.
-     * <p>
-     * This era is combined with the given date fields to form a date.
-     * The year specified must be the year-of-era.
-     * Methods to create a date from the proleptic-year are on {@code Chronology}.
-     * This always uses the standard form of the chronology.
-     * <p>
-     * This default implementation invokes the factory method on {@link Chronology}.
-     *
-     * @param yearOfEra  the calendar system year-of-era
-     * @param month  the calendar system month-of-year
-     * @param day  the calendar system day-of-month
-     * @return a local date based on this era and the specified year-of-era, month and day
-     */
-    public default ChronoLocalDate date(int yearOfEra, int month, int day) {
-        return getChronology().date(this, yearOfEra, month, day);
-    }
-
-
-    /**
-     * Obtains a date in this era given year-of-era and day-of-year fields.
-     * <p>
-     * This era is combined with the given date fields to form a date.
-     * The year specified must be the year-of-era.
-     * Methods to create a date from the proleptic-year are on {@code Chronology}.
-     * This always uses the standard form of the chronology.
-     * <p>
-     * This default implementation invokes the factory method on {@link Chronology}.
-     *
-     * @param yearOfEra  the calendar system year-of-era
-     * @param dayOfYear  the calendar system day-of-year
-     * @return a local date based on this era and the specified year-of-era and day-of-year
-     */
-    public default ChronoLocalDate dateYearDay(int yearOfEra, int dayOfYear) {
-        return getChronology().dateYearDay(this, yearOfEra, dayOfYear);
-    }
-
     //-----------------------------------------------------------------------
     /**
      * Checks if the specified field is supported.
@@ -190,7 +141,7 @@
      * @return true if the field is supported on this era, false if not
      */
     @Override
-    public default boolean isSupported(TemporalField field) {
+    default boolean isSupported(TemporalField field) {
         if (field instanceof ChronoField) {
             return field == ERA;
         }
@@ -207,19 +158,23 @@
      * <p>
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@code ERA} field returns the range.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
      * passing {@code this} as the argument.
      * Whether the range can be obtained is determined by the field.
+     * <p>
+     * The default implementation must return a range for {@code ERA} from
+     * zero to one, suitable for two era calendar systems such as ISO.
      *
      * @param field  the field to query the range for, not null
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      */
     @Override  // override for Javadoc
-    public default ValueRange range(TemporalField field) {
+    default ValueRange range(TemporalField field) {
         return TemporalAccessor.super.range(field);
     }
 
@@ -233,7 +188,7 @@
      * <p>
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@code ERA} field returns the value of the era.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -242,15 +197,18 @@
      *
      * @param field  the field to get, not null
      * @return the value for the field
-     * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws DateTimeException if a value for the field cannot be obtained or
+     *         the value is outside the range of valid values for the field
+     * @throws UnsupportedTemporalTypeException if the field is not supported or
+     *         the range of values exceeds an {@code int}
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override  // override for Javadoc and performance
-    public default int get(TemporalField field) {
+    default int get(TemporalField field) {
         if (field == ERA) {
             return getValue();
         }
-        return range(field).checkValidIntValue(getLong(field), field);
+        return TemporalAccessor.super.get(field);
     }
 
     /**
@@ -262,7 +220,7 @@
      * <p>
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@code ERA} field returns the value of the era.
-     * All other {@code ChronoField} instances will throw a {@code DateTimeException}.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -272,14 +230,15 @@
      * @param field  the field to get, not null
      * @return the value for the field
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
-    public default long getLong(TemporalField field) {
+    default long getLong(TemporalField field) {
         if (field == ERA) {
             return getValue();
         } else if (field instanceof ChronoField) {
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.getFrom(this);
     }
@@ -305,10 +264,8 @@
      */
     @SuppressWarnings("unchecked")
     @Override
-    public default <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.chronology()) {
-            return (R) getChronology();
-        } else if (query == Queries.precision()) {
+    default <R> R query(TemporalQuery<R> query) {
+        if (query == TemporalQuery.precision()) {
             return (R) ERAS;
         }
         return TemporalAccessor.super.query(query);
@@ -339,7 +296,7 @@
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
-    public default Temporal adjustInto(Temporal temporal) {
+    default Temporal adjustInto(Temporal temporal) {
         return temporal.with(ERA, getValue());
     }
 
@@ -359,7 +316,7 @@
      * @param locale  the locale to use, not null
      * @return the text value of the era, not null
      */
-    public default String getDisplayName(TextStyle style, Locale locale) {
+    default String getDisplayName(TextStyle style, Locale locale) {
         return new DateTimeFormatterBuilder().appendText(ERA, style).toFormatter(locale).format(this);
     }
 
--- a/src/share/classes/java/time/chrono/HijrahChronology.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/HijrahChronology.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,9 +59,13 @@
 
 import static java.time.temporal.ChronoField.EPOCH_DAY;
 
+import java.io.File;
+import java.io.FileInputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.Serializable;
-import java.text.ParseException;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
 import java.time.Clock;
 import java.time.DateTimeException;
 import java.time.Instant;
@@ -73,106 +77,135 @@
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
-import java.util.Locale;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Properties;
+
+import sun.util.logging.PlatformLogger;
 
 /**
- * The Hijrah calendar system.
+ * The Hijrah calendar is a lunar calendar supporting Islamic calendars.
  * <p>
- * This chronology defines the rules of the Hijrah calendar system.
+ * The HijrahChronology follows the rules of the Hijrah calendar system. The Hijrah
+ * calendar has several variants based on differences in when the new moon is
+ * determined to have occurred and where the observation is made.
+ * In some variants the length of each month is
+ * computed algorithmically from the astronomical data for the moon and earth and
+ * in others the length of the month is determined by an authorized sighting
+ * of the new moon. For the algorithmically based calendars the calendar
+ * can project into the future.
+ * For sighting based calendars only historical data from past
+ * sightings is available.
+ * <p>
+ * The length of each month is 29 or 30 days.
+ * Ordinary years have 354 days; leap years have 355 days.
+ *
  * <p>
- * The implementation follows the Freeman-Grenville algorithm (*1) and has following features.
- * <p><ul>
- * <li>A year has 12 months.</li>
- * <li>Over a cycle of 30 years there are 11 leap years.</li>
- * <li>There are 30 days in month number 1, 3, 5, 7, 9, and 11,
- * and 29 days in month number 2, 4, 6, 8, 10, and 12.</li>
- * <li>In a leap year month 12 has 30 days.</li>
- * <li>In a 30 year cycle, year 2, 5, 7, 10, 13, 16, 18, 21, 24,
- * 26, and 29 are leap years.</li>
- * <li>Total of 10631 days in a 30 years cycle.</li>
- * </ul><p>
- * <P>
- * The table shows the features described above.
- * <blockquote>
- * <table border="1">
- *   <caption>Hijrah Calendar Months</caption>
- *   <tbody>
- *     <tr>
- *       <th># of month</th>
- *       <th>Name of month</th>
- *       <th>Number of days</th>
- *     </tr>
- *     <tr>
- *       <td>1</td>
- *       <td>Muharram</td>
- *       <td>30</td>
- *     </tr>
- *     <tr>
- *       <td>2</td>
- *       <td>Safar</td>
- *       <td>29</td>
- *     </tr>
- *     <tr>
- *       <td>3</td>
- *       <td>Rabi'al-Awwal</td>
- *       <td>30</td>
- *     </tr>
- *     <tr>
- *       <td>4</td>
- *       <td>Rabi'ath-Thani</td>
- *       <td>29</td>
- *     </tr>
- *     <tr>
- *       <td>5</td>
- *       <td>Jumada l-Ula</td>
- *       <td>30</td>
- *     </tr>
- *     <tr>
- *       <td>6</td>
- *       <td>Jumada t-Tania</td>
- *       <td>29</td>
- *     </tr>
- *     <tr>
- *       <td>7</td>
- *       <td>Rajab</td>
- *       <td>30</td>
- *     </tr>
- *     <tr>
- *       <td>8</td>
- *       <td>Sha`ban</td>
- *       <td>29</td>
- *     </tr>
- *     <tr>
- *       <td>9</td>
- *       <td>Ramadan</td>
- *       <td>30</td>
- *     </tr>
- *     <tr>
- *       <td>10</td>
- *       <td>Shawwal</td>
- *       <td>29</td>
- *     </tr>
- *     <tr>
- *       <td>11</td>
- *       <td>Dhu 'l-Qa`da</td>
- *       <td>30</td>
- *     </tr>
- *     <tr>
- *       <td>12</td>
- *       <td>Dhu 'l-Hijja</td>
- *       <td>29, but 30 days in years 2, 5, 7, 10,<br>
- * 13, 16, 18, 21, 24, 26, and 29</td>
- *     </tr>
- *   </tbody>
+ * CLDR and LDML identify variants:
+ * <table cellpadding="2" summary="Variants of Hijrah Calendars">
+ * <thead>
+ * <tr class="tableSubHeadingColor">
+ * <th class="colFirst" align="left" >Chronology ID</th>
+ * <th class="colFirst" align="left" >Calendar Type</th>
+ * <th class="colFirst" align="left" >Locale extension, see {@link java.util.Locale}</th>
+ * <th class="colLast" align="left" >Description</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr class="altColor">
+ * <td>Hijrah-umalqura</td>
+ * <td>islamic-umalqura</td>
+ * <td>ca-islamic-cv-umalqura</td>
+ * <td>Islamic - Umm Al-Qura calendar of Saudi Arabia</td>
+ * </tr>
+ * </tbody>
  * </table>
- * </blockquote>
+ * <p>Additional variants may be available through {@link Chronology#getAvailableChronologies()}.
+ *
+ * <p>Example</p>
  * <p>
- * (*1) The algorithm is taken from the book,
- * The Muslim and Christian Calendars by G.S.P. Freeman-Grenville.
- * <p>
+ * Selecting the chronology from the locale uses {@link Chronology#ofLocale}
+ * to find the Chronology based on Locale supported BCP 47 extension mechanism
+ * to request a specific calendar ("ca") and variant ("cv"). For example,
+ * </p>
+ * <pre>
+ *      Locale locale = Locale.forLanguageTag("en-US-u-ca-islamic-cv-umalqura");
+ *      Chronology chrono = Chronology.ofLocale(locale);
+ * </pre>
  *
  * <h3>Specification for implementors</h3>
  * This class is immutable and thread-safe.
+ * <h3>Implementation Note for Hijrah Calendar Variant Configuration</h3>
+ * Each Hijrah variant is configured individually. Each variant is defined by a
+ * property resource that defines the {@code ID}, the {@code calendar type},
+ * the start of the calendar, the alignment with the
+ * ISO calendar, and the length of each month for a range of years.
+ * The variants are identified in the {@code calendars.properties} file.
+ * The new properties are prefixed with {@code "calendars.hijrah."}:
+ * <table cellpadding="2" border="0" summary="Configuration of Hijrah Calendar Variants">
+ * <thead>
+ * <tr class="tableSubHeadingColor">
+ * <th class="colFirst" align="left">Property Name</th>
+ * <th class="colFirst" align="left">Property value</th>
+ * <th class="colLast" align="left">Description </th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr class="altColor">
+ * <td>calendars.hijrah.{ID}</td>
+ * <td>The property resource defining the {@code {ID}} variant</td>
+ * <td>The property resource is located with the {@code calendars.properties} file</td>
+ * </tr>
+ * <tr class="rowColor">
+ * <td>calendars.hijrah.{ID}.type</td>
+ * <td>The calendar type</td>
+ * <td>LDML defines the calendar type names</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <p>
+ * The Hijrah property resource is a set of properties that describe the calendar.
+ * The syntax is defined by {@code java.util.Properties#load(Reader)}.
+ * <table cellpadding="2" summary="Configuration of Hijrah Calendar">
+ * <thead>
+ * <tr class="tableSubHeadingColor">
+ * <th class="colFirst" align="left" > Property Name</th>
+ * <th class="colFirst" align="left" > Property value</th>
+ * <th class="colLast" align="left" > Description </th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr class="altColor">
+ * <td>id</td>
+ * <td>Chronology Id, for example, "Hijrah-umalqura"</td>
+ * <td>The Id of the calendar in common usage</td>
+ * </tr>
+ * <tr class="rowColor">
+ * <td>type</td>
+ * <td>Calendar type, for example, "islamic-umalqura"</td>
+ * <td>LDML defines the calendar types</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td>version</td>
+ * <td>Version, for example: "1.8.0_1"</td>
+ * <td>The version of the Hijrah variant data</td>
+ * </tr>
+ * <tr class="rowColor">
+ * <td>iso-start</td>
+ * <td>ISO start date, formatted as {@code yyyy-MM-dd}, for example: "1900-04-30"</td>
+ * <td>The ISO date of the first day of the minimum Hijrah year.</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td>yyyy - a numeric 4 digit year, for example "1434"</td>
+ * <td>The value is a sequence of 12 month lengths,
+ * for example: "29 30 29 30 29 30 30 30 29 30 29 29"</td>
+ * <td>The lengths of the 12 months of the year separated by whitespace.
+ * A numeric year property must be present for every year without any gaps.
+ * The month lengths must be between 29-32 inclusive.
+ * </td>
+ * </tr>
+ * </tbody>
+ * </table>
  *
  * @since 1.8
  */
@@ -182,336 +215,161 @@
      * The Hijrah Calendar id.
      */
     private final String typeId;
-
     /**
      * The Hijrah calendarType.
      */
-    private final String calendarType;
-
-    /**
-     * The singleton instance for the era before the current one - Before Hijrah -
-     * which has the value 0.
-     */
-    public static final Era ERA_BEFORE_AH = HijrahEra.BEFORE_AH;
-    /**
-     * The singleton instance for the current era - Hijrah - which has the value 1.
-     */
-    public static final Era ERA_AH = HijrahEra.AH;
+    private transient final String calendarType;
     /**
      * Serialization version.
      */
     private static final long serialVersionUID = 3127340209035924785L;
     /**
-     * The minimum valid year-of-era.
-     */
-    public static final int MIN_YEAR_OF_ERA = 1;
-    /**
-     * The maximum valid year-of-era.
-     * This is currently set to 9999 but may be changed to increase the valid range
-     * in a future version of the specification.
+     * Singleton instance of the Islamic Umm Al-Qura calendar of Saudi Arabia.
+     * Other Hijrah chronology variants may be available from
+     * {@link Chronology#getAvailableChronologies}.
      */
-    public static final int MAX_YEAR_OF_ERA = 9999;
-
+    public static final HijrahChronology INSTANCE;
     /**
-     * Number of Gregorian day of July 19, year 622 (Gregorian), which is epoch day
-     * of Hijrah calendar.
-     */
-    private static final int HIJRAH_JAN_1_1_GREGORIAN_DAY = -492148;
-    /**
-     * 0-based, for number of day-of-year in the beginning of month in normal
-     * year.
+     * Array of epoch days indexed by Hijrah Epoch month.
+     * Computed by {@link #loadCalendarData}.
      */
-    private static final int NUM_DAYS[] =
-        {0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325};
-    /**
-     * 0-based, for number of day-of-year in the beginning of month in leap year.
-     */
-    private static final int LEAP_NUM_DAYS[] =
-        {0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325};
+    private transient int[] hijrahEpochMonthStartDays;
     /**
-     * 0-based, for day-of-month in normal year.
+     * The minimum epoch day of this Hijrah calendar.
+     * Computed by {@link #loadCalendarData}.
      */
-    private static final int MONTH_LENGTH[] =
-        {30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29};
+    private transient int minEpochDay;
     /**
-     * 0-based, for day-of-month in leap year.
+     * The maximum epoch day for which calendar data is available.
+     * Computed by {@link #loadCalendarData}.
      */
-    private static final int LEAP_MONTH_LENGTH[] =
-        {30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 30};
-
+    private transient int maxEpochDay;
     /**
-     * <pre>
-     *                            Greatest       Least
-     * Field name        Minimum   Minimum     Maximum     Maximum
-     * ----------        -------   -------     -------     -------
-     * ERA                     0         0           1           1
-     * YEAR_OF_ERA             1         1        9999        9999
-     * MONTH_OF_YEAR           1         1          12          12
-     * DAY_OF_MONTH            1         1          29          30
-     * DAY_OF_YEAR             1         1         354         355
-     * </pre>
-     *
-     * Minimum values.
+     * The minimum epoch month.
+     * Computed by {@link #loadCalendarData}.
+     */
+    private transient int hijrahStartEpochMonth;
+    /**
+     * The minimum length of a month.
+     * Computed by {@link #createEpochMonths}.
+     */
+    private transient int minMonthLength;
+    /**
+     * The maximum length of a month.
+     * Computed by {@link #createEpochMonths}.
      */
-    private static final int MIN_VALUES[] =
-        {
-        0,
-        MIN_YEAR_OF_ERA,
-        0,
-        1,
-        0,
-        1,
-        1
-        };
-
+    private transient int maxMonthLength;
+    /**
+     * The minimum length of a year in days.
+     * Computed by {@link #createEpochMonths}.
+     */
+    private transient int minYearLength;
     /**
-     * Least maximum values.
+     * The maximum length of a year in days.
+     * Computed by {@link #createEpochMonths}.
      */
-    private static final int LEAST_MAX_VALUES[] =
-        {
-        1,
-        MAX_YEAR_OF_ERA,
-        11,
-        51,
-        5,
-        29,
-        354
-        };
+    private transient int maxYearLength;
+    /**
+     * A reference to the properties stored in
+     * ${java.home}/lib/calendars.properties
+     */
+    private transient final static Properties calendarProperties;
 
     /**
-     * Maximum values.
-     */
-    private static final int MAX_VALUES[] =
-        {
-        1,
-        MAX_YEAR_OF_ERA,
-        11,
-        52,
-        6,
-        30,
-        355
-        };
-
-   /**
-     * Position of day-of-month. This value is used to get the min/max value
-     * from an array.
-     */
-    private static final int POSITION_DAY_OF_MONTH = 5;
-    /**
-     * Position of day-of-year. This value is used to get the min/max value from
-     * an array.
-     */
-    private static final int POSITION_DAY_OF_YEAR = 6;
-    /**
-     * Zero-based start date of cycle year.
+     * Prefix of property names for Hijrah calendar variants.
      */
-    private static final int CYCLEYEAR_START_DATE[] =
-        {
-        0,
-        354,
-        709,
-        1063,
-        1417,
-        1772,
-        2126,
-        2481,
-        2835,
-        3189,
-        3544,
-        3898,
-        4252,
-        4607,
-        4961,
-        5315,
-        5670,
-        6024,
-        6379,
-        6733,
-        7087,
-        7442,
-        7796,
-        8150,
-        8505,
-        8859,
-        9214,
-        9568,
-        9922,
-        10277
-        };
-
-    /**
-     * Holding the adjusted month days in year. The key is a year (Integer) and
-     * the value is the all the month days in year (int[]).
-     */
-    private final HashMap<Integer, int[]> ADJUSTED_MONTH_DAYS = new HashMap<>();
-    /**
-     * Holding the adjusted month length in year. The key is a year (Integer)
-     * and the value is the all the month length in year (int[]).
-     */
-    private final HashMap<Integer, int[]> ADJUSTED_MONTH_LENGTHS = new HashMap<>();
+    private static final String PROP_PREFIX = "calendar.hijrah.";
     /**
-     * Holding the adjusted days in the 30 year cycle. The key is a cycle number
-     * (Integer) and the value is the all the starting days of the year in the
-     * cycle (int[]).
-     */
-    private final HashMap<Integer, int[]> ADJUSTED_CYCLE_YEARS = new HashMap<>();
-    /**
-     * Holding the adjusted cycle in the 1 - 30000 year. The key is the cycle
-     * number (Integer) and the value is the starting days in the cycle in the
-     * term.
-     */
-    private final long[] ADJUSTED_CYCLES;
-    /**
-     * Holding the adjusted min values.
-     */
-    private final int[] ADJUSTED_MIN_VALUES;
-    /**
-     * Holding the adjusted max least max values.
-     */
-    private final int[] ADJUSTED_LEAST_MAX_VALUES;
-    /**
-     * Holding adjusted max values.
-     */
-    private final int[] ADJUSTED_MAX_VALUES;
-    /**
-     * Holding the non-adjusted month days in year for non leap year.
-     */
-    private static final int[] DEFAULT_MONTH_DAYS;
-    /**
-     * Holding the non-adjusted month days in year for leap year.
-     */
-    private static final int[] DEFAULT_LEAP_MONTH_DAYS;
-    /**
-     * Holding the non-adjusted month length for non leap year.
+     * Suffix of property names containing the calendar type of a variant.
      */
-    private static final int[] DEFAULT_MONTH_LENGTHS;
-    /**
-     * Holding the non-adjusted month length for leap year.
-     */
-    private static final int[] DEFAULT_LEAP_MONTH_LENGTHS;
-    /**
-     * Holding the non-adjusted 30 year cycle starting day.
-     */
-    private static final int[] DEFAULT_CYCLE_YEARS;
-    /**
-     * number of 30-year cycles to hold the deviation data.
-     */
-    private static final int MAX_ADJUSTED_CYCLE = 334; // to support year 9999
-
-
-    /**
-     * Narrow names for eras.
-     */
-    private static final HashMap<String, String[]> ERA_NARROW_NAMES = new HashMap<>();
-    /**
-     * Short names for eras.
-     */
-    private static final HashMap<String, String[]> ERA_SHORT_NAMES = new HashMap<>();
-    /**
-     * Full names for eras.
-     */
-    private static final HashMap<String, String[]> ERA_FULL_NAMES = new HashMap<>();
-    /**
-     * Fallback language for the era names.
-     */
-    private static final String FALLBACK_LANGUAGE = "en";
-
-    /**
-     * Singleton instance of the Hijrah chronology.
-     * Must be initialized after the rest of the static initialization.
-     */
-    public static final HijrahChronology INSTANCE;
+    private static final String PROP_TYPE_SUFFIX = ".type";
 
     /**
      * Name data.
      */
     static {
-        ERA_NARROW_NAMES.put(FALLBACK_LANGUAGE, new String[]{"BH", "HE"});
-        ERA_SHORT_NAMES.put(FALLBACK_LANGUAGE, new String[]{"B.H.", "H.E."});
-        ERA_FULL_NAMES.put(FALLBACK_LANGUAGE, new String[]{"Before Hijrah", "Hijrah Era"});
-
-        DEFAULT_MONTH_DAYS = Arrays.copyOf(NUM_DAYS, NUM_DAYS.length);
-
-        DEFAULT_LEAP_MONTH_DAYS = Arrays.copyOf(LEAP_NUM_DAYS, LEAP_NUM_DAYS.length);
+        try {
+            calendarProperties = sun.util.calendar.BaseCalendar.getCalendarProperties();
+        } catch (IOException ioe) {
+            throw new InternalError("Can't initialize lib/calendars.properties", ioe);
+        }
 
-        DEFAULT_MONTH_LENGTHS = Arrays.copyOf(MONTH_LENGTH, MONTH_LENGTH.length);
-
-        DEFAULT_LEAP_MONTH_LENGTHS = Arrays.copyOf(LEAP_MONTH_LENGTH, LEAP_MONTH_LENGTH.length);
+        try {
+            INSTANCE = new HijrahChronology("Hijrah-umalqura");
+            // Register it by its aliases
+            Chronology.registerChrono(INSTANCE, "Hijrah");
+            Chronology.registerChrono(INSTANCE, "islamic");
 
-        DEFAULT_CYCLE_YEARS = Arrays.copyOf(CYCLEYEAR_START_DATE, CYCLEYEAR_START_DATE.length);
-
-        INSTANCE = new HijrahChronology();
+        } catch (Exception ex) {
+            // Absence of Hijrah calendar is fatal to initializing this class.
+            PlatformLogger logger = PlatformLogger.getLogger("java.time.chrono");
+            logger.severe("Unable to initialize Hijrah calendar: Hijrah-umalqura", ex);
+            throw new RuntimeException("Unable to initialize Hijrah-umalqura calendar", ex.getCause());
+        }
+        registerVariants();
+    }
 
-        String extraCalendars = java.security.AccessController.doPrivileged(
-            new sun.security.action.GetPropertyAction("java.time.chrono.HijrahCalendars"));
-        if (extraCalendars != null) {
-            try {
-                // Split on whitespace
-                String[] splits = extraCalendars.split("\\s");
-                for (String cal : splits) {
-                    if (!cal.isEmpty()) {
-                        // Split on the delimiter between typeId "-" calendarType
-                        String[] type = cal.split("-");
-                        Chronology cal2 = new HijrahChronology(type[0], type.length > 1 ? type[1] : type[0]);
-                    }
+    /**
+     * For each Hijrah variant listed, create the HijrahChronology and register it.
+     * Exceptions during initialization are logged but otherwise ignored.
+     */
+    private static void registerVariants() {
+        for (String name : calendarProperties.stringPropertyNames()) {
+            if (name.startsWith(PROP_PREFIX)) {
+                String id = name.substring(PROP_PREFIX.length());
+                if (id.indexOf('.') >= 0) {
+                    continue;   // no name or not a simple name of a calendar
                 }
-            } catch (Exception ex) {
-                // Log the error
-                // ex.printStackTrace();
+                if (id.equals(INSTANCE.getId())) {
+                    continue;           // do not duplicate the default
+                }
+                try {
+                    // Create and register the variant
+                    HijrahChronology chrono = new HijrahChronology(id);
+                    Chronology.registerChrono(chrono);
+                } catch (Exception ex) {
+                    // Log error and continue
+                    PlatformLogger logger = PlatformLogger.getLogger("java.time.chrono");
+                    logger.severe("Unable to initialize Hijrah calendar: " + id, ex);
+                }
             }
         }
     }
 
     /**
-     * Restricted constructor.
-     */
-    private HijrahChronology() {
-        this("Hijrah", "islamicc");
-    }
-    /**
-     * Constructor for name and type HijrahChronology.
+     * Create a HijrahChronology for the named variant.
+     * The resource and calendar type are retrieved from properties
+     * in the {@code calendars.properties}.
+     * The property names are {@code "calendar.hijrah." + id}
+     * and  {@code "calendar.hijrah." + id + ".type"}
      * @param id the id of the calendar
-     * @param calendarType the calendar type
+     * @throws Exception if the resource can not be accessed or
+     *    the format is invalid
      */
-    private HijrahChronology(String id, String calendarType) {
+    private HijrahChronology(String id) throws Exception {
+        if (id.isEmpty()) {
+            throw new IllegalArgumentException("calendar id is empty");
+        }
         this.typeId = id;
-        this.calendarType = calendarType;
-
-        ADJUSTED_CYCLES = new long[MAX_ADJUSTED_CYCLE];
-        for (int i = 0; i < ADJUSTED_CYCLES.length; i++) {
-            ADJUSTED_CYCLES[i] = (10631L * i);
-        }
-        // Initialize min values, least max values and max values.
-        ADJUSTED_MIN_VALUES = Arrays.copyOf(MIN_VALUES, MIN_VALUES.length);
-        ADJUSTED_LEAST_MAX_VALUES = Arrays.copyOf(LEAST_MAX_VALUES, LEAST_MAX_VALUES.length);
-        ADJUSTED_MAX_VALUES = Arrays.copyOf(MAX_VALUES,MAX_VALUES.length);
+        this.calendarType = calendarProperties.getProperty(PROP_PREFIX + id + PROP_TYPE_SUFFIX);
 
         try {
-            // Implicitly reads deviation data for this HijrahChronology.
-            boolean any = HijrahDeviationReader.readDeviation(typeId, calendarType, this::addDeviationAsHijrah);
-        } catch (IOException | ParseException e) {
-            // do nothing. Log deviation config errors.
-            //e.printStackTrace();
+            String resource = calendarProperties.getProperty(PROP_PREFIX + id);
+            Objects.requireNonNull(resource, "Resource missing for calendar");
+            loadCalendarData(resource);
+        } catch (Exception ex) {
+            throw new Exception("Unable to initialize HijrahCalendar: " + id, ex);
         }
     }
 
-    /**
-     * Resolve singleton.
-     *
-     * @return the singleton instance, not null
-     */
-    private Object readResolve() {
-        return INSTANCE;
-    }
-
     //-----------------------------------------------------------------------
     /**
-     * Gets the ID of the chronology - 'Hijrah'.
+     * Gets the ID of the chronology.
      * <p>
-     * The ID uniquely identifies the {@code Chronology}.
-     * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+     * The ID uniquely identifies the {@code Chronology}. It can be used to
+     * lookup the {@code Chronology} using {@link #of(String)}.
      *
-     * @return the chronology ID - 'Hijrah'
+     * @return the chronology ID, non-null
      * @see #getCalendarType()
      */
     @Override
@@ -520,15 +378,14 @@
     }
 
     /**
-     * Gets the calendar type of the underlying calendar system - 'islamicc'.
+     * Gets the calendar type of the Islamic calendar.
      * <p>
      * The calendar type is an identifier defined by the
      * <em>Unicode Locale Data Markup Language (LDML)</em> specification.
      * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
-     * It can also be used as part of a locale, accessible via
-     * {@link Locale#getUnicodeLocaleType(String)} with the key 'ca'.
      *
-     * @return the calendar system type - 'islamicc'
+     * @return the calendar system type; non-null if the calendar has
+     *    a standard type, otherwise null
      * @see #getId()
      */
     @Override
@@ -537,33 +394,78 @@
     }
 
     //-----------------------------------------------------------------------
+    /**
+     * Obtains a local date in Hijrah calendar system from the
+     * era, year-of-era, month-of-year and day-of-month fields.
+     *
+     * @param era  the Hijrah era, not null
+     * @param yearOfEra  the year-of-era
+     * @param month  the month-of-year
+     * @param dayOfMonth  the day-of-month
+     * @return the Hijrah local date, not null
+     * @throws DateTimeException if unable to create the date
+     * @throws ClassCastException if the {@code era} is not a {@code HijrahEra}
+     */
+    @Override
+    public HijrahDate date(Era era, int yearOfEra, int month, int dayOfMonth) {
+        return date(prolepticYear(era, yearOfEra), month, dayOfMonth);
+    }
+
+    /**
+     * Obtains a local date in Hijrah calendar system from the
+     * proleptic-year, month-of-year and day-of-month fields.
+     *
+     * @param prolepticYear  the proleptic-year
+     * @param month  the month-of-year
+     * @param dayOfMonth  the day-of-month
+     * @return the Hijrah local date, not null
+     * @throws DateTimeException if unable to create the date
+     */
     @Override
     public HijrahDate date(int prolepticYear, int month, int dayOfMonth) {
         return HijrahDate.of(this, prolepticYear, month, dayOfMonth);
     }
 
+    /**
+     * Obtains a local date in Hijrah calendar system from the
+     * era, year-of-era and day-of-year fields.
+     *
+     * @param era  the Hijrah era, not null
+     * @param yearOfEra  the year-of-era
+     * @param dayOfYear  the day-of-year
+     * @return the Hijrah local date, not null
+     * @throws DateTimeException if unable to create the date
+     * @throws ClassCastException if the {@code era} is not a {@code HijrahEra}
+     */
+    @Override
+    public HijrahDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
+        return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
+    }
+
+    /**
+     * Obtains a local date in Hijrah calendar system from the
+     * proleptic-year and day-of-year fields.
+     *
+     * @param prolepticYear  the proleptic-year
+     * @param dayOfYear  the day-of-year
+     * @return the Hijrah local date, not null
+     * @throws DateTimeException if unable to create the date
+     */
     @Override
     public HijrahDate dateYearDay(int prolepticYear, int dayOfYear) {
         return HijrahDate.of(this, prolepticYear, 1, 1).plusDays(dayOfYear - 1);  // TODO better
     }
 
-    @Override
-    public HijrahDate date(TemporalAccessor temporal) {
-        if (temporal instanceof HijrahDate) {
-            return (HijrahDate) temporal;
-        }
-        return HijrahDate.ofEpochDay(this, temporal.getLong(EPOCH_DAY));
-    }
-
-    @Override
-    public HijrahDate date(Era era, int yearOfEra, int month, int dayOfMonth) {
-        return date(prolepticYear(era, yearOfEra), month, dayOfMonth);
-
-    }
-
-    @Override
-    public HijrahDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
-        return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
+    /**
+     * Obtains a local date in the Hijrah calendar system from the epoch-day.
+     *
+     * @param epochDay  the epoch day
+     * @return the Hijrah local date, not null
+     * @throws DateTimeException if unable to create the date
+     */
+    @Override  // override with covariant return type
+    public HijrahDate dateEpochDay(long epochDay) {
+        return HijrahDate.ofEpochDay(this, epochDay);
     }
 
     @Override
@@ -582,47 +484,50 @@
     }
 
     @Override
+    public HijrahDate date(TemporalAccessor temporal) {
+        if (temporal instanceof HijrahDate) {
+            return (HijrahDate) temporal;
+        }
+        return HijrahDate.ofEpochDay(this, temporal.getLong(EPOCH_DAY));
+    }
+
+    @Override
     public ChronoLocalDateTime<HijrahDate> localDateTime(TemporalAccessor temporal) {
-        return (ChronoLocalDateTime<HijrahDate>)super.localDateTime(temporal);
+        return (ChronoLocalDateTime<HijrahDate>) super.localDateTime(temporal);
     }
 
     @Override
     public ChronoZonedDateTime<HijrahDate> zonedDateTime(TemporalAccessor temporal) {
-        return (ChronoZonedDateTime<HijrahDate>)super.zonedDateTime(temporal);
+        return (ChronoZonedDateTime<HijrahDate>) super.zonedDateTime(temporal);
     }
 
     @Override
     public ChronoZonedDateTime<HijrahDate> zonedDateTime(Instant instant, ZoneId zone) {
-        return (ChronoZonedDateTime<HijrahDate>)super.zonedDateTime(instant, zone);
+        return (ChronoZonedDateTime<HijrahDate>) super.zonedDateTime(instant, zone);
     }
 
     //-----------------------------------------------------------------------
     @Override
     public boolean isLeapYear(long prolepticYear) {
-        return isLeapYear0(prolepticYear);
-    }
-    /**
-     * Returns if the year is a leap year.
-     * @param prolepticYear he year to compute from
-     * @return {@code true} if the year is a leap year, otherwise {@code false}
-     */
-    private static boolean isLeapYear0(long prolepticYear) {
-        return (14 + 11 * (prolepticYear > 0 ? prolepticYear : -prolepticYear)) % 30 < 11;
+        int epochMonth = yearToEpochMonth((int) prolepticYear);
+        if (epochMonth < 0 || epochMonth > maxEpochDay) {
+            throw new DateTimeException("Hijrah date out of range");
+        }
+        int len = getYearLength((int) prolepticYear);
+        return (len > 354);
     }
 
     @Override
     public int prolepticYear(Era era, int yearOfEra) {
         if (era instanceof HijrahEra == false) {
-            throw new DateTimeException("Era must be HijrahEra");
+            throw new ClassCastException("Era must be HijrahEra");
         }
-        return (era == HijrahEra.AH ? yearOfEra : 1 - yearOfEra);
+        return yearOfEra;
     }
 
     @Override
     public Era eraOf(int eraValue) {
         switch (eraValue) {
-            case 0:
-                return HijrahEra.BEFORE_AH;
             case 1:
                 return HijrahEra.AH;
             default:
@@ -638,430 +543,159 @@
     //-----------------------------------------------------------------------
     @Override
     public ValueRange range(ChronoField field) {
+        if (field instanceof ChronoField) {
+            ChronoField f = field;
+            switch (f) {
+                case DAY_OF_MONTH:
+                    return ValueRange.of(1, 1, getMinimumMonthLength(), getMaximumMonthLength());
+                case DAY_OF_YEAR:
+                    return ValueRange.of(1, getMaximumDayOfYear());
+                case ALIGNED_WEEK_OF_MONTH:
+                    return ValueRange.of(1, 5);
+                case YEAR:
+                case YEAR_OF_ERA:
+                    return ValueRange.of(getMinimumYear(), getMaximumYear());
+                default:
+                    return field.range();
+            }
+        }
         return field.range();
     }
 
     /**
-     * Check the validity of a yearOfEra.
-     * @param yearOfEra the year to check
+     * Check the validity of a year.
+     *
+     * @param prolepticYear the year to check
      */
-    void checkValidYearOfEra(int yearOfEra) {
-         if (yearOfEra < MIN_YEAR_OF_ERA  ||
-                 yearOfEra > MAX_YEAR_OF_ERA) {
-             throw new DateTimeException("Invalid year of Hijrah Era");
-         }
+    int checkValidYear(long prolepticYear) {
+        if (prolepticYear < getMinimumYear() || prolepticYear > getMaximumYear()) {
+            throw new DateTimeException("Invalid Hijrah year: " + prolepticYear);
+        }
+        return (int) prolepticYear;
     }
 
     void checkValidDayOfYear(int dayOfYear) {
-         if (dayOfYear < 1  ||
-                 dayOfYear > getMaximumDayOfYear()) {
-             throw new DateTimeException("Invalid day of year of Hijrah date");
-         }
+        if (dayOfYear < 1 || dayOfYear > getMaximumDayOfYear()) {
+            throw new DateTimeException("Invalid Hijrah day of year: " + dayOfYear);
+        }
     }
 
     void checkValidMonth(int month) {
-         if (month < 1 || month > 12) {
-             throw new DateTimeException("Invalid month of Hijrah date");
-         }
-    }
-
-    void checkValidDayOfMonth(int dayOfMonth) {
-         if (dayOfMonth < 1  ||
-                 dayOfMonth > getMaximumDayOfMonth()) {
-             throw new DateTimeException("Invalid day of month of Hijrah date, day "
-                     + dayOfMonth + " greater than " + getMaximumDayOfMonth() + " or less than 1");
-         }
+        if (month < 1 || month > 12) {
+            throw new DateTimeException("Invalid Hijrah month: " + month);
+        }
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the int array containing the following field from the julian day.
-     *
-     * int[0] = ERA
-     * int[1] = YEAR
-     * int[2] = MONTH
-     * int[3] = DATE
-     * int[4] = DAY_OF_YEAR
-     * int[5] = DAY_OF_WEEK
+     * Returns an array containing the Hijrah year, month and day
+     * computed from the epoch day.
      *
-     * @param gregorianDays  a julian day.
+     * @param epochDay  the EpochDay
+     * @return int[0] = YEAR, int[1] = MONTH, int[2] = DATE
      */
-    int[] getHijrahDateInfo(long gregorianDays) {
-        int era, year, month, date, dayOfWeek, dayOfYear;
-
-        int cycleNumber, yearInCycle, dayOfCycle;
-
-        long epochDay = gregorianDays - HIJRAH_JAN_1_1_GREGORIAN_DAY;
+    int[] getHijrahDateInfo(int epochDay) {
+        if (epochDay < minEpochDay || epochDay >= maxEpochDay) {
+            throw new DateTimeException("Hijrah date out of range");
+        }
 
-        if (epochDay >= 0) {
-            cycleNumber = getCycleNumber(epochDay); // 0 - 99.
-            dayOfCycle = getDayOfCycle(epochDay, cycleNumber); // 0 - 10631.
-            yearInCycle = getYearInCycle(cycleNumber, dayOfCycle); // 0 - 29.
-            dayOfYear = getDayOfYear(cycleNumber, dayOfCycle, yearInCycle);
-            // 0 - 354/355
-            year = cycleNumber * 30 + yearInCycle + 1; // 1-based year.
-            month = getMonthOfYear(dayOfYear, year); // 0-based month-of-year
-            date = getDayOfMonth(dayOfYear, month, year); // 0-based date
-            ++date; // Convert from 0-based to 1-based
-            era = HijrahEra.AH.getValue();
-        } else {
-            cycleNumber = (int) epochDay / 10631; // 0 or negative number.
-            dayOfCycle = (int) epochDay % 10631; // -10630 - 0.
-            if (dayOfCycle == 0) {
-                dayOfCycle = -10631;
-                cycleNumber++;
-            }
-            yearInCycle = getYearInCycle(cycleNumber, dayOfCycle); // 0 - 29.
-            dayOfYear = getDayOfYear(cycleNumber, dayOfCycle, yearInCycle);
-            year = cycleNumber * 30 - yearInCycle; // negative number.
-            year = 1 - year;
-            dayOfYear = (isLeapYear(year) ? (dayOfYear + 355)
-                    : (dayOfYear + 354));
-            month = getMonthOfYear(dayOfYear, year);
-            date = getDayOfMonth(dayOfYear, month, year);
-            ++date; // Convert from 0-based to 1-based
-            era = HijrahEra.BEFORE_AH.getValue();
-        }
-        // Hijrah day zero is a Friday
-        dayOfWeek = (int) ((epochDay + 5) % 7);
-        dayOfWeek += (dayOfWeek <= 0) ? 7 : 0;
+        int epochMonth = epochDayToEpochMonth(epochDay);
+        int year = epochMonthToYear(epochMonth);
+        int month = epochMonthToMonth(epochMonth);
+        int day1 = epochMonthToEpochDay(epochMonth);
+        int date = epochDay - day1; // epochDay - dayOfEpoch(year, month);
 
-        int dateInfo[] = new int[6];
-        dateInfo[0] = era;
-        dateInfo[1] = year;
-        dateInfo[2] = month + 1; // change to 1-based.
-        dateInfo[3] = date;
-        dateInfo[4] = dayOfYear + 1; // change to 1-based.
-        dateInfo[5] = dayOfWeek;
+        int dateInfo[] = new int[3];
+        dateInfo[0] = year;
+        dateInfo[1] = month + 1; // change to 1-based.
+        dateInfo[2] = date + 1; // change to 1-based.
         return dateInfo;
     }
 
     /**
-     * Return Gregorian epoch day from Hijrah year, month, and day.
+     * Return the epoch day computed from Hijrah year, month, and day.
      *
-     * @param prolepticYear  the year to represent, caller calculated
-     * @param monthOfYear  the month-of-year to represent, caller calculated
-     * @param dayOfMonth  the day-of-month to represent, caller calculated
-     * @return a julian day
-     */
-    long getGregorianEpochDay(int prolepticYear, int monthOfYear, int dayOfMonth) {
-        long day = yearToGregorianEpochDay(prolepticYear);
-        day += getMonthDays(monthOfYear - 1, prolepticYear);
-        day += dayOfMonth;
-        return day;
-    }
-
-    /**
-     * Returns the Gregorian epoch day from the proleptic year
-     * @param prolepticYear the proleptic year
-     * @return the Epoch day
+     * @param prolepticYear the year to represent, 0-origin
+     * @param monthOfYear the month-of-year to represent, 1-origin
+     * @param dayOfMonth the day-of-month to represent, 1-origin
+     * @return the epoch day
      */
-    private long yearToGregorianEpochDay(int prolepticYear) {
-
-        int cycleNumber = (prolepticYear - 1) / 30; // 0-based.
-        int yearInCycle = (prolepticYear - 1) % 30; // 0-based.
-
-        int dayInCycle = getAdjustedCycle(cycleNumber)[Math.abs(yearInCycle)]
-                ;
-
-        if (yearInCycle < 0) {
-            dayInCycle = -dayInCycle;
-        }
-
-        Long cycleDays;
-
-        try {
-            cycleDays = ADJUSTED_CYCLES[cycleNumber];
-        } catch (ArrayIndexOutOfBoundsException e) {
-            cycleDays = null;
-        }
-
-        if (cycleDays == null) {
-            cycleDays = new Long(cycleNumber * 10631);
-        }
-
-        return (cycleDays.longValue() + dayInCycle + HIJRAH_JAN_1_1_GREGORIAN_DAY - 1);
-    }
-
-    /**
-     * Returns the 30 year cycle number from the epoch day.
-     *
-     * @param epochDay  an epoch day
-     * @return a cycle number
-     */
-    private int getCycleNumber(long epochDay) {
-        long[] days = ADJUSTED_CYCLES;
-        int cycleNumber;
-        try {
-            for (int i = 0; i < days.length; i++) {
-                if (epochDay < days[i]) {
-                    return i - 1;
-                }
-            }
-            cycleNumber = (int) epochDay / 10631;
-        } catch (ArrayIndexOutOfBoundsException e) {
-            cycleNumber = (int) epochDay / 10631;
+    long getEpochDay(int prolepticYear, int monthOfYear, int dayOfMonth) {
+        checkValidMonth(monthOfYear);
+        int epochMonth = yearToEpochMonth(prolepticYear) + (monthOfYear - 1);
+        if (epochMonth < 0 || epochMonth >= hijrahEpochMonthStartDays.length) {
+            throw new DateTimeException("Invalid Hijrah date, year: " +
+                    prolepticYear +  ", month: " + monthOfYear);
         }
-        return cycleNumber;
-    }
-
-    /**
-     * Returns day of cycle from the epoch day and cycle number.
-     *
-     * @param epochDay  an epoch day
-     * @param cycleNumber  a cycle number
-     * @return a day of cycle
-     */
-    private int getDayOfCycle(long epochDay, int cycleNumber) {
-        Long day;
-
-        try {
-            day = ADJUSTED_CYCLES[cycleNumber];
-        } catch (ArrayIndexOutOfBoundsException e) {
-            day = null;
-        }
-        if (day == null) {
-            day = new Long(cycleNumber * 10631);
-        }
-        return (int) (epochDay - day.longValue());
-    }
-
-    /**
-     * Returns the year in cycle from the cycle number and day of cycle.
-     *
-     * @param cycleNumber  a cycle number
-     * @param dayOfCycle  day of cycle
-     * @return a year in cycle
-     */
-    private int getYearInCycle(int cycleNumber, long dayOfCycle) {
-        int[] cycles = getAdjustedCycle(cycleNumber);
-        if (dayOfCycle == 0) {
-            return 0;
+        if (dayOfMonth < 1 || dayOfMonth > getMonthLength(prolepticYear, monthOfYear)) {
+            throw new DateTimeException("Invalid Hijrah day of month: " + dayOfMonth);
         }
-
-        if (dayOfCycle > 0) {
-            for (int i = 0; i < cycles.length; i++) {
-                if (dayOfCycle < cycles[i]) {
-                    return i - 1;
-                }
-            }
-            return 29;
-        } else {
-            dayOfCycle = -dayOfCycle;
-            for (int i = 0; i < cycles.length; i++) {
-                if (dayOfCycle <= cycles[i]) {
-                    return i - 1;
-                }
-            }
-            return 29;
-        }
-    }
-
-    /**
-     * Returns adjusted 30 year cycle starting day as Integer array from the
-     * cycle number specified.
-     *
-     * @param cycleNumber  a cycle number
-     * @return an Integer array
-     */
-    int[] getAdjustedCycle(int cycleNumber) {
-        int[] cycles;
-        try {
-            cycles = ADJUSTED_CYCLE_YEARS.get(cycleNumber);
-        } catch (ArrayIndexOutOfBoundsException e) {
-            cycles = null;
-        }
-        if (cycles == null) {
-            cycles = DEFAULT_CYCLE_YEARS;
-        }
-        return cycles;
+        return epochMonthToEpochDay(epochMonth) + (dayOfMonth - 1);
     }
 
     /**
-     * Returns adjusted month days as Integer array form the year specified.
+     * Returns day of year for the year and month.
      *
-     * @param year  a year
-     * @return an Integer array
-     */
-    int[] getAdjustedMonthDays(int year) {
-        int[] newMonths;
-        try {
-            newMonths = ADJUSTED_MONTH_DAYS.get(year);
-        } catch (ArrayIndexOutOfBoundsException e) {
-            newMonths = null;
-        }
-        if (newMonths == null) {
-            if (isLeapYear0(year)) {
-                newMonths = DEFAULT_LEAP_MONTH_DAYS;
-            } else {
-                newMonths = DEFAULT_MONTH_DAYS;
-            }
-        }
-        return newMonths;
-    }
-
-    /**
-     * Returns adjusted month length as Integer array form the year specified.
-     *
-     * @param year  a year
-     * @return an Integer array
+     * @param prolepticYear a proleptic year
+     * @param month a month, 1-origin
+     * @return the day of year, 1-origin
      */
-    int[] getAdjustedMonthLength(int year) {
-        int[] newMonths;
-        try {
-            newMonths = ADJUSTED_MONTH_LENGTHS.get(year);
-        } catch (ArrayIndexOutOfBoundsException e) {
-            newMonths = null;
-        }
-        if (newMonths == null) {
-            if (isLeapYear0(year)) {
-                newMonths = DEFAULT_LEAP_MONTH_LENGTHS;
-            } else {
-                newMonths = DEFAULT_MONTH_LENGTHS;
-            }
-        }
-        return newMonths;
-    }
-
-    /**
-     * Returns day-of-year.
-     *
-     * @param cycleNumber  a cycle number
-     * @param dayOfCycle  day of cycle
-     * @param yearInCycle  year in cycle
-     * @return day-of-year
-     */
-    private int getDayOfYear(int cycleNumber, int dayOfCycle, int yearInCycle) {
-        int[] cycles = getAdjustedCycle(cycleNumber);
-
-        if (dayOfCycle > 0) {
-            return dayOfCycle - cycles[yearInCycle];
-        } else {
-            return cycles[yearInCycle] + dayOfCycle;
-        }
+    int getDayOfYear(int prolepticYear, int month) {
+        return yearMonthToDayOfYear(prolepticYear, (month - 1));
     }
 
     /**
-     * Returns month-of-year. 0-based.
+     * Returns month length for the year and month.
      *
-     * @param dayOfYear  day-of-year
-     * @param year  a year
-     * @return month-of-year
-     */
-    private int getMonthOfYear(int dayOfYear, int year) {
-
-        int[] newMonths = getAdjustedMonthDays(year);
-
-        if (dayOfYear >= 0) {
-            for (int i = 0; i < newMonths.length; i++) {
-                if (dayOfYear < newMonths[i]) {
-                    return i - 1;
-                }
-            }
-            return 11;
-        } else {
-            dayOfYear = (isLeapYear0(year) ? (dayOfYear + 355)
-                    : (dayOfYear + 354));
-            for (int i = 0; i < newMonths.length; i++) {
-                if (dayOfYear < newMonths[i]) {
-                    return i - 1;
-                }
-            }
-            return 11;
-        }
-    }
-
-    /**
-     * Returns day-of-month.
-     *
-     * @param dayOfYear  day of  year
-     * @param month  month
-     * @param year  year
-     * @return day-of-month
+     * @param prolepticYear a proleptic year
+     * @param monthOfYear a month, 1-origin.
+     * @return the length of the month
      */
-    private int getDayOfMonth(int dayOfYear, int month, int year) {
-
-        int[] newMonths = getAdjustedMonthDays(year);
-
-        if (dayOfYear >= 0) {
-            if (month > 0) {
-                return dayOfYear - newMonths[month];
-            } else {
-                return dayOfYear;
-            }
-        } else {
-            dayOfYear = (isLeapYear0(year) ? (dayOfYear + 355)
-                    : (dayOfYear + 354));
-            if (month > 0) {
-                return dayOfYear - newMonths[month];
-            } else {
-                return dayOfYear;
-            }
+    int getMonthLength(int prolepticYear, int monthOfYear) {
+        int epochMonth = yearToEpochMonth(prolepticYear) + (monthOfYear - 1);
+        if (epochMonth < 0 || epochMonth >= hijrahEpochMonthStartDays.length) {
+            throw new DateTimeException("Invalid Hijrah date, year: " +
+                    prolepticYear +  ", month: " + monthOfYear);
         }
-    }
-
-
-    /**
-     * Returns month days from the beginning of year.
-     *
-     * @param month  month (0-based)
-     * @parma year  year
-     * @return month days from the beginning of year
-     */
-    private int getMonthDays(int month, int year) {
-        int[] newMonths = getAdjustedMonthDays(year);
-        return newMonths[month];
-    }
-
-    /**
-     * Returns month length.
-     *
-     * @param month  month (0-based)
-     * @param year  year
-     * @return month length
-     */
-    private int getMonthLength(int month, int year) {
-      int[] newMonths = getAdjustedMonthLength(year);
-      return newMonths[month];
+        return epochMonthLength(epochMonth);
     }
 
     /**
      * Returns year length.
+     * Note: The 12th month must exist in the data.
      *
-     * @param year  year
-     * @return year length
+     * @param prolepticYear a proleptic year
+     * @return year length in days
      */
-    int getYearLength(int year) {
-
-        int cycleNumber = (year - 1) / 30;
-        int[] cycleYears;
-        try {
-            cycleYears = ADJUSTED_CYCLE_YEARS.get(cycleNumber);
-        } catch (ArrayIndexOutOfBoundsException e) {
-            cycleYears = null;
-        }
-        if (cycleYears != null) {
-            int yearInCycle = (year - 1) % 30;
-            if (yearInCycle == 29) {
-                return (int)(ADJUSTED_CYCLES[cycleNumber + 1]
-                        - ADJUSTED_CYCLES[cycleNumber]
-                        - cycleYears[yearInCycle]);
-            }
-            return cycleYears[yearInCycle + 1]
-                    - cycleYears[yearInCycle];
-        } else {
-            return isLeapYear0(year) ? 355 : 354;
-        }
+    int getYearLength(int prolepticYear) {
+        return yearMonthToDayOfYear(prolepticYear, 12);
     }
 
+    /**
+     * Return the minimum supported Hijrah year.
+     *
+     * @return the minimum
+     */
+    int getMinimumYear() {
+        return epochMonthToYear(0);
+    }
+
+    /**
+     * Return the maximum supported Hijrah ear.
+     *
+     * @return the minimum
+     */
+    int getMaximumYear() {
+        return epochMonthToYear(hijrahEpochMonthStartDays.length - 1) - 1;
+    }
 
     /**
      * Returns maximum day-of-month.
      *
      * @return maximum day-of-month
      */
-    int getMaximumDayOfMonth() {
-        return ADJUSTED_MAX_VALUES[POSITION_DAY_OF_MONTH];
+    int getMaximumMonthLength() {
+        return maxMonthLength;
     }
 
     /**
@@ -1069,8 +703,8 @@
      *
      * @return smallest maximum day-of-month
      */
-    int getSmallestMaximumDayOfMonth() {
-        return ADJUSTED_LEAST_MAX_VALUES[POSITION_DAY_OF_MONTH];
+    int getMinimumMonthLength() {
+        return minMonthLength;
     }
 
     /**
@@ -1079,7 +713,7 @@
      * @return maximum day-of-year
      */
     int getMaximumDayOfYear() {
-        return ADJUSTED_MAX_VALUES[POSITION_DAY_OF_YEAR];
+        return maxYearLength;
     }
 
     /**
@@ -1088,296 +722,303 @@
      * @return smallest maximum day-of-year
      */
     int getSmallestMaximumDayOfYear() {
-        return ADJUSTED_LEAST_MAX_VALUES[POSITION_DAY_OF_YEAR];
+        return minYearLength;
+    }
+
+    /**
+     * Returns the epochMonth found by locating the epochDay in the table. The
+     * epochMonth is the index in the table
+     *
+     * @param epochDay
+     * @return The index of the element of the start of the month containing the
+     * epochDay.
+     */
+    private int epochDayToEpochMonth(int epochDay) {
+        // binary search
+        int ndx = Arrays.binarySearch(hijrahEpochMonthStartDays, epochDay);
+        if (ndx < 0) {
+            ndx = -ndx - 2;
+        }
+        return ndx;
+    }
+
+    /**
+     * Returns the year computed from the epochMonth
+     *
+     * @param epochMonth the epochMonth
+     * @return the Hijrah Year
+     */
+    private int epochMonthToYear(int epochMonth) {
+        return (epochMonth + hijrahStartEpochMonth) / 12;
     }
 
-    // ----- Deviation handling -----//
+    /**
+     * Returns the epochMonth for the Hijrah Year.
+     *
+     * @param year the HijrahYear
+     * @return the epochMonth for the beginning of the year.
+     */
+    private int yearToEpochMonth(int year) {
+        return (year * 12) - hijrahStartEpochMonth;
+    }
+
+    /**
+     * Returns the Hijrah month from the epochMonth.
+     *
+     * @param epochMonth the epochMonth
+     * @return the month of the Hijrah Year
+     */
+    private int epochMonthToMonth(int epochMonth) {
+        return (epochMonth + hijrahStartEpochMonth) % 12;
+    }
+
+    /**
+     * Returns the epochDay for the start of the epochMonth.
+     *
+     * @param epochMonth the epochMonth
+     * @return the epochDay for the start of the epochMonth.
+     */
+    private int epochMonthToEpochDay(int epochMonth) {
+        return hijrahEpochMonthStartDays[epochMonth];
+
+    }
+
+    /**
+     * Returns the day of year for the requested HijrahYear and month.
+     *
+     * @param prolepticYear the Hijrah year
+     * @param month the Hijrah month
+     * @return the day of year for the start of the month of the year
+     */
+    private int yearMonthToDayOfYear(int prolepticYear, int month) {
+        int epochMonthFirst = yearToEpochMonth(prolepticYear);
+        return epochMonthToEpochDay(epochMonthFirst + month)
+                - epochMonthToEpochDay(epochMonthFirst);
+    }
 
     /**
-     * Adds deviation definition. The year and month specified should be the
-     * calculated Hijrah year and month. The month is 1 based. e.g. 9 for
-     * Ramadan (9th month) Addition of anything minus deviation days is
-     * calculated negatively in the case the user wants to subtract days from
-     * the calendar. For example, adding -1 days will subtract one day from the
-     * current date.
+     * Returns the length of the epochMonth. It is computed from the start of
+     * the following month minus the start of the requested month.
      *
-     * @param startYear  start year, 1 origin
-     * @param startMonth  start month, 1 origin
-     * @param endYear  end year, 1 origin
-     * @param endMonth  end month, 1 origin
-     * @param offset  offset -2, -1, +1, +2
+     * @param epochMonth the epochMonth; assumed to be within range
+     * @return the length in days of the epochMonth
      */
-    private void addDeviationAsHijrah(Deviation entry) {
-        int startYear = entry.startYear;
-        int startMonth = entry.startMonth - 1 ;
-        int endYear = entry.endYear;
-        int endMonth = entry.endMonth - 1;
-        int offset = entry.offset;
+    private int epochMonthLength(int epochMonth) {
+        // The very last entry in the epochMonth table is not the start of a month
+        return hijrahEpochMonthStartDays[epochMonth + 1]
+                - hijrahEpochMonthStartDays[epochMonth];
+    }
+
+    //-----------------------------------------------------------------------
+    private static final String KEY_ID = "id";
+    private static final String KEY_TYPE = "type";
+    private static final String KEY_VERSION = "version";
+    private static final String KEY_ISO_START = "iso-start";
 
-        if (startYear < 1) {
-            throw new IllegalArgumentException("startYear < 1");
-        }
-        if (endYear < 1) {
-            throw new IllegalArgumentException("endYear < 1");
-        }
-        if (startMonth < 0 || startMonth > 11) {
-            throw new IllegalArgumentException(
-                    "startMonth < 0 || startMonth > 11");
+    /**
+     * Return the configuration properties from the resource.
+     * <p>
+     * The default location of the variant configuration resource is:
+     * <pre>
+     *   "$java.home/lib/" + resource-name
+     * </pre>
+     *
+     * @param resource the name of the calendar property resource
+     * @return a Properties containing the properties read from the resource.
+     * @throws Exception if access to the property resource fails
+     */
+    private static Properties readConfigProperties(final String resource) throws Exception {
+        try {
+            return AccessController
+                    .doPrivileged((java.security.PrivilegedExceptionAction<Properties>)
+                        () -> {
+                        String libDir = System.getProperty("java.home") + File.separator + "lib";
+                        File file = new File(libDir, resource);
+                        Properties props = new Properties();
+                        try (InputStream is = new FileInputStream(file)) {
+                            props.load(is);
+                        }
+                        return props;
+                    });
+        } catch (PrivilegedActionException pax) {
+            throw pax.getException();
         }
-        if (endMonth < 0 || endMonth > 11) {
-            throw new IllegalArgumentException("endMonth < 0 || endMonth > 11");
-        }
-        if (endYear > 9999) {
-            throw new IllegalArgumentException("endYear > 9999");
-        }
-        if (endYear < startYear) {
-            throw new IllegalArgumentException("startYear > endYear");
-        }
-        if (endYear == startYear && endMonth < startMonth) {
-            throw new IllegalArgumentException(
-                    "startYear == endYear && endMonth < startMonth");
-        }
+    }
 
-        // Adjusting start year.
-        boolean isStartYLeap = isLeapYear0(startYear);
-
-        // Adjusting the number of month.
-        int[] orgStartMonthNums = ADJUSTED_MONTH_DAYS.get(startYear);
-        if (orgStartMonthNums == null) {
-            if (isStartYLeap) {
-                orgStartMonthNums = Arrays.copyOf(LEAP_NUM_DAYS, LEAP_NUM_DAYS.length);
-            } else {
-                orgStartMonthNums = Arrays.copyOf(NUM_DAYS, NUM_DAYS.length);
-            }
-        }
-
-        int[] newStartMonthNums = new int[orgStartMonthNums.length];
+    /**
+     * Loads and processes the Hijrah calendar properties file.
+     * The starting Hijrah date and the corresponding ISO date are
+     * extracted and used to calculate the epochDate offset.
+     * The version number is identified and ignored.
+     * Everything else is the data for a year with containing the length of each
+     * of 12 months.
+     *
+     * @param resourceName  containing the properties defining the calendar, not null
+     * @throws IllegalArgumentException  if any of the values are malformed
+     * @throws NumberFormatException  if numbers, including properties that should
+     *      be years are invalid
+     * @throws IOException  if access to the property resource fails.
+     */
+    private void loadCalendarData(String resourceName)  throws Exception {
+        Properties props = readConfigProperties(resourceName);
 
-        for (int month = 0; month < 12; month++) {
-            if (month > startMonth) {
-                newStartMonthNums[month] = (orgStartMonthNums[month] - offset);
-            } else {
-                newStartMonthNums[month] = (orgStartMonthNums[month]);
-            }
-        }
-
-        ADJUSTED_MONTH_DAYS.put(startYear, newStartMonthNums);
-
-        // Adjusting the days of month.
-
-        int[] orgStartMonthLengths = ADJUSTED_MONTH_LENGTHS.get(startYear);
-        if (orgStartMonthLengths == null) {
-            if (isStartYLeap) {
-                orgStartMonthLengths = Arrays.copyOf(LEAP_MONTH_LENGTH, LEAP_MONTH_LENGTH.length);
-            } else {
-                orgStartMonthLengths = Arrays.copyOf(MONTH_LENGTH, MONTH_LENGTH.length);
-            }
-        }
-
-        int[] newStartMonthLengths = new int[orgStartMonthLengths.length];
-
-        for (int month = 0; month < 12; month++) {
-            if (month == startMonth) {
-                newStartMonthLengths[month] = orgStartMonthLengths[month] - offset;
-            } else {
-                newStartMonthLengths[month] = orgStartMonthLengths[month];
+        Map<Integer, int[]> years = new HashMap<>();
+        int minYear = Integer.MAX_VALUE;
+        int maxYear = Integer.MIN_VALUE;
+        String id = null;
+        String type = null;
+        String version = null;
+        int isoStart = 0;
+        for (Map.Entry<Object, Object> entry : props.entrySet()) {
+            String key = (String) entry.getKey();
+            switch (key) {
+                case KEY_ID:
+                    id = (String)entry.getValue();
+                    break;
+                case KEY_TYPE:
+                    type = (String)entry.getValue();
+                    break;
+                case KEY_VERSION:
+                    version = (String)entry.getValue();
+                    break;
+                case KEY_ISO_START: {
+                    int[] ymd = parseYMD((String) entry.getValue());
+                    isoStart = (int) LocalDate.of(ymd[0], ymd[1], ymd[2]).toEpochDay();
+                    break;
+                }
+                default:
+                    try {
+                        // Everything else is either a year or invalid
+                        int year = Integer.valueOf(key);
+                        int[] months = parseMonths((String) entry.getValue());
+                        years.put(year, months);
+                        maxYear = Math.max(maxYear, year);
+                        minYear = Math.min(minYear, year);
+                    } catch (NumberFormatException nfe) {
+                        throw new IllegalArgumentException("bad key: " + key);
+                    }
             }
         }
 
-        ADJUSTED_MONTH_LENGTHS.put(startYear, newStartMonthLengths);
-
-        if (startYear != endYear) {
-            // System.out.println("over year");
-            // Adjusting starting 30 year cycle.
-            int sCycleNumber = (startYear - 1) / 30;
-            int sYearInCycle = (startYear - 1) % 30; // 0-based.
-            int[] startCycles = ADJUSTED_CYCLE_YEARS.get(sCycleNumber);
-            if (startCycles == null) {
-                startCycles = Arrays.copyOf(CYCLEYEAR_START_DATE, CYCLEYEAR_START_DATE.length);
-            }
-
-            for (int j = sYearInCycle + 1; j < CYCLEYEAR_START_DATE.length; j++) {
-                startCycles[j] = startCycles[j] - offset;
-            }
-
-            // System.out.println(sCycleNumber + ":" + sYearInCycle);
-            ADJUSTED_CYCLE_YEARS.put(sCycleNumber, startCycles);
-
-            int sYearInMaxY = (startYear - 1) / 30;
-            int sEndInMaxY = (endYear - 1) / 30;
-
-            if (sYearInMaxY != sEndInMaxY) {
-                // System.out.println("over 30");
-                // Adjusting starting 30 * MAX_ADJUSTED_CYCLE year cycle.
-                // System.out.println(sYearInMaxY);
-
-                for (int j = sYearInMaxY + 1; j < ADJUSTED_CYCLES.length; j++) {
-                    ADJUSTED_CYCLES[j] = ADJUSTED_CYCLES[j] - offset;
-                }
-
-                // Adjusting ending 30 * MAX_ADJUSTED_CYCLE year cycles.
-                for (int j = sEndInMaxY + 1; j < ADJUSTED_CYCLES.length; j++) {
-                    ADJUSTED_CYCLES[j] = ADJUSTED_CYCLES[j] + offset;
-                }
-            }
-
-            // Adjusting ending 30 year cycle.
-            int eCycleNumber = (endYear - 1) / 30;
-            int sEndInCycle = (endYear - 1) % 30; // 0-based.
-            int[] endCycles = ADJUSTED_CYCLE_YEARS.get(eCycleNumber);
-            if (endCycles == null) {
-                endCycles = Arrays.copyOf(CYCLEYEAR_START_DATE, CYCLEYEAR_START_DATE.length);
-            }
-            for (int j = sEndInCycle + 1; j < CYCLEYEAR_START_DATE.length; j++) {
-                endCycles[j] = endCycles[j] + offset;
-            }
-            ADJUSTED_CYCLE_YEARS.put(eCycleNumber, endCycles);
+        if (!getId().equals(id)) {
+            throw new IllegalArgumentException("Configuration is for a different calendar: " + id);
+        }
+        if (!getCalendarType().equals(type)) {
+            throw new IllegalArgumentException("Configuration is for a different calendar type: " + type);
+        }
+        if (version == null || version.isEmpty()) {
+            throw new IllegalArgumentException("Configuration does not contain a version");
+        }
+        if (isoStart == 0) {
+            throw new IllegalArgumentException("Configuration does not contain a ISO start date");
         }
 
-        // Adjusting ending year.
-        boolean isEndYLeap = isLeapYear0(endYear);
-
-        int[] orgEndMonthDays = ADJUSTED_MONTH_DAYS.get(endYear);
+        // Now create and validate the array of epochDays indexed by epochMonth
+        hijrahStartEpochMonth = minYear * 12;
+        minEpochDay = isoStart;
+        hijrahEpochMonthStartDays = createEpochMonths(minEpochDay, minYear, maxYear, years);
+        maxEpochDay = hijrahEpochMonthStartDays[hijrahEpochMonthStartDays.length - 1];
 
-        if (orgEndMonthDays == null) {
-            if (isEndYLeap) {
-                orgEndMonthDays = Arrays.copyOf(LEAP_NUM_DAYS, LEAP_NUM_DAYS.length);
-            } else {
-                orgEndMonthDays = Arrays.copyOf(NUM_DAYS, NUM_DAYS.length);
-            }
-        }
-
-        int[] newEndMonthDays = new int[orgEndMonthDays.length];
-
-        for (int month = 0; month < 12; month++) {
-            if (month > endMonth) {
-                newEndMonthDays[month] = orgEndMonthDays[month] + offset;
-            } else {
-                newEndMonthDays[month] = orgEndMonthDays[month];
-            }
+        // Compute the min and max year length in days.
+        for (int year = minYear; year < maxYear; year++) {
+            int length = getYearLength(year);
+            minYearLength = Math.min(minYearLength, length);
+            maxYearLength = Math.max(maxYearLength, length);
         }
-
-        ADJUSTED_MONTH_DAYS.put(endYear, newEndMonthDays);
+    }
 
-        // Adjusting the days of month.
-        int[] orgEndMonthLengths = ADJUSTED_MONTH_LENGTHS.get(endYear);
+    /**
+     * Converts the map of year to month lengths ranging from minYear to maxYear
+     * into a linear contiguous array of epochDays. The index is the hijrahMonth
+     * computed from year and month and offset by minYear. The value of each
+     * entry is the epochDay corresponding to the first day of the month.
+     *
+     * @param minYear The minimum year for which data is provided
+     * @param maxYear The maximum year for which data is provided
+     * @param years a Map of year to the array of 12 month lengths
+     * @return array of epochDays for each month from min to max
+     */
+    private int[] createEpochMonths(int epochDay, int minYear, int maxYear, Map<Integer, int[]> years) {
+        // Compute the size for the array of dates
+        int numMonths = (maxYear - minYear + 1) * 12 + 1;
 
-        if (orgEndMonthLengths == null) {
-            if (isEndYLeap) {
-                orgEndMonthLengths = Arrays.copyOf(LEAP_MONTH_LENGTH, LEAP_MONTH_LENGTH.length);
-            } else {
-                orgEndMonthLengths = Arrays.copyOf(MONTH_LENGTH, MONTH_LENGTH.length);
-            }
-        }
+        // Initialize the running epochDay as the corresponding ISO Epoch day
+        int epochMonth = 0; // index into array of epochMonths
+        int[] epochMonths = new int[numMonths];
+        minMonthLength = Integer.MAX_VALUE;
+        maxMonthLength = Integer.MIN_VALUE;
 
-        int[] newEndMonthLengths = new int[orgEndMonthLengths.length];
+        // Only whole years are valid, any zero's in the array are illegal
+        for (int year = minYear; year <= maxYear; year++) {
+            int[] months = years.get(year);// must not be gaps
+            for (int month = 0; month < 12; month++) {
+                int length = months[month];
+                epochMonths[epochMonth++] = epochDay;
 
-        for (int month = 0; month < 12; month++) {
-            if (month == endMonth) {
-                newEndMonthLengths[month] = orgEndMonthLengths[month] + offset;
-            } else {
-                newEndMonthLengths[month] = orgEndMonthLengths[month];
+                if (length < 29 || length > 32) {
+                    throw new IllegalArgumentException("Invalid month length in year: " + minYear);
+                }
+                epochDay += length;
+                minMonthLength = Math.min(minMonthLength, length);
+                maxMonthLength = Math.max(maxMonthLength, length);
             }
         }
 
-        ADJUSTED_MONTH_LENGTHS.put(endYear, newEndMonthLengths);
-
-        int[] startMonthLengths = ADJUSTED_MONTH_LENGTHS.get(startYear);
-        int[] endMonthLengths = ADJUSTED_MONTH_LENGTHS.get(endYear);
-        int[] startMonthDays = ADJUSTED_MONTH_DAYS.get(startYear);
-        int[] endMonthDays = ADJUSTED_MONTH_DAYS.get(endYear);
-
-        int startMonthLength = startMonthLengths[startMonth];
-        int endMonthLength = endMonthLengths[endMonth];
-        int startMonthDay = startMonthDays[11] + startMonthLengths[11];
-        int endMonthDay = endMonthDays[11] + endMonthLengths[11];
-
-        int maxMonthLength = ADJUSTED_MAX_VALUES[POSITION_DAY_OF_MONTH];
-        int leastMaxMonthLength = ADJUSTED_LEAST_MAX_VALUES[POSITION_DAY_OF_MONTH];
+        // Insert the final epochDay
+        epochMonths[epochMonth++] = epochDay;
 
-        if (maxMonthLength < startMonthLength) {
-            maxMonthLength = startMonthLength;
-        }
-        if (maxMonthLength < endMonthLength) {
-            maxMonthLength = endMonthLength;
-        }
-        ADJUSTED_MAX_VALUES[POSITION_DAY_OF_MONTH] = maxMonthLength;
-
-        if (leastMaxMonthLength > startMonthLength) {
-            leastMaxMonthLength = startMonthLength;
-        }
-        if (leastMaxMonthLength > endMonthLength) {
-            leastMaxMonthLength = endMonthLength;
-        }
-        ADJUSTED_LEAST_MAX_VALUES[POSITION_DAY_OF_MONTH] = leastMaxMonthLength;
-
-        int maxMonthDay = ADJUSTED_MAX_VALUES[POSITION_DAY_OF_YEAR];
-        int leastMaxMonthDay = ADJUSTED_LEAST_MAX_VALUES[POSITION_DAY_OF_YEAR];
-
-        if (maxMonthDay < startMonthDay) {
-            maxMonthDay = startMonthDay;
-        }
-        if (maxMonthDay < endMonthDay) {
-            maxMonthDay = endMonthDay;
+        if (epochMonth != epochMonths.length) {
+            throw new IllegalStateException("Did not fill epochMonths exactly: ndx = " + epochMonth
+                    + " should be " + epochMonths.length);
         }
 
-        ADJUSTED_MAX_VALUES[POSITION_DAY_OF_YEAR] = maxMonthDay;
-
-        if (leastMaxMonthDay > startMonthDay) {
-            leastMaxMonthDay = startMonthDay;
-        }
-        if (leastMaxMonthDay > endMonthDay) {
-            leastMaxMonthDay = endMonthDay;
-        }
-        ADJUSTED_LEAST_MAX_VALUES[POSITION_DAY_OF_YEAR] = leastMaxMonthDay;
+        return epochMonths;
     }
 
     /**
-     * Package private Entry for suppling deviations from the Reader.
-     * Each entry consists of a range using the Hijrah calendar,
-     * start year, month, end year, end month, and an offset.
-     * The offset is used to modify the length of the month +2, +1, -1, -2.
+     * Parses the 12 months lengths from a property value for a specific year.
+     *
+     * @param line the value of a year property
+     * @return an array of int[12] containing the 12 month lengths
+     * @throws IllegalArgumentException if the number of months is not 12
+     * @throws NumberFormatException if the 12 tokens are not numbers
      */
-    static final class Deviation {
-
-        Deviation(int startYear, int startMonth, int endYear, int endMonth, int offset) {
-            this.startYear = startYear;
-            this.startMonth = startMonth;
-            this.endYear = endYear;
-            this.endMonth = endMonth;
-            this.offset = offset;
+    private int[] parseMonths(String line) {
+        int[] months = new int[12];
+        String[] numbers = line.split("\\s");
+        if (numbers.length != 12) {
+            throw new IllegalArgumentException("wrong number of months on line: " + Arrays.toString(numbers) + "; count: " + numbers.length);
         }
-
-        final int startYear;
-        final int startMonth;
-        final int endYear;
-        final int endMonth;
-        final int offset;
+        for (int i = 0; i < 12; i++) {
+            try {
+                months[i] = Integer.valueOf(numbers[i]);
+            } catch (NumberFormatException nfe) {
+                throw new IllegalArgumentException("bad key: " + numbers[i]);
+            }
+        }
+        return months;
+    }
 
-        int getStartYear() {
-            return startYear;
-        }
-
-        int getStartMonth() {
-            return startMonth;
-        }
-
-        int getEndYear() {
-            return endYear;
-        }
-
-        int getEndMonth() {
-            return endMonth;
-        }
-
-        int getOffset() {
-            return offset;
-        }
-
-        @Override
-        public String toString() {
-            return String.format("[year: %4d, month: %2d, offset: %+d]", startYear, startMonth, offset);
+    /**
+     * Parse yyyy-MM-dd into a 3 element array [yyyy, mm, dd].
+     *
+     * @param string the input string
+     * @return the 3 element array with year, month, day
+     */
+    private int[] parseYMD(String string) {
+        // yyyy-MM-dd
+        string = string.trim();
+        try {
+            if (string.charAt(4) != '-' || string.charAt(7) != '-') {
+                throw new IllegalArgumentException("date must be yyyy-MM-dd");
+            }
+            int[] ymd = new int[3];
+            ymd[0] = Integer.valueOf(string.substring(0, 4));
+            ymd[1] = Integer.valueOf(string.substring(5, 7));
+            ymd[2] = Integer.valueOf(string.substring(8, 10));
+            return ymd;
+        } catch (NumberFormatException ex) {
+            throw new IllegalArgumentException("date must be yyyy-MM-dd", ex);
         }
     }
-
 }
--- a/src/share/classes/java/time/chrono/HijrahDate.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/HijrahDate.java	Wed Apr 17 21:48:04 2013 -0700
@@ -70,55 +70,38 @@
 import java.io.Serializable;
 import java.time.Clock;
 import java.time.DateTimeException;
-import java.time.DayOfWeek;
 import java.time.LocalDate;
 import java.time.LocalTime;
 import java.time.Period;
 import java.time.ZoneId;
 import java.time.temporal.ChronoField;
-import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
-import java.util.Objects;
 
 /**
  * A date in the Hijrah calendar system.
  * <p>
- * This date operates using the {@linkplain HijrahChronology Hijrah calendar}.
+ * This date operates using one of several variants of the
+ * {@linkplain HijrahChronology Hijrah calendar}.
  * <p>
  * The Hijrah calendar has a different total of days in a year than
- * Gregorian calendar, and a month is based on the period of a complete
- * revolution of the moon around the earth (as between successive new moons).
- * The calendar cycles becomes longer and unstable, and sometimes a manual
- * adjustment (for entering deviation) is necessary for correctness
- * because of the complex algorithm.
+ * Gregorian calendar, and the length of each month is based on the period
+ * of a complete revolution of the moon around the earth
+ * (as between successive new moons).
+ * Refer to the {@link HijrahChronology} for details of supported variants.
  * <p>
- * HijrahDate supports the manual adjustment feature by providing a configuration
- * file. The configuration file contains the adjustment (deviation) data with following format.
- * <pre>
- *   StartYear/StartMonth(0-based)-EndYear/EndMonth(0-based):Deviation day (1, 2, -1, or -2)
- *   Line separator or ";" is used for the separator of each deviation data.</pre>
- *   Here is the example.
- * <pre>
- *     1429/0-1429/1:1
- *     1429/2-1429/7:1;1429/6-1429/11:1
- *     1429/11-9999/11:1</pre>
- * The default location of the configuration file is:
- * <pre>
- *   $CLASSPATH/java/time/i18n</pre>
- * And the default file name is:
- * <pre>
- *   hijrah_deviation.cfg</pre>
- * The default location and file name can be overriden by setting
- * following two Java's system property.
- * <pre>
- *   Location: java.time.i18n.HijrahDate.deviationConfigDir
- *   File name: java.time.i18n.HijrahDate.deviationConfigFile</pre>
- *
+ * Each HijrahDate is created bound to a particular HijrahChronology,
+ * The same chronology is propagated to each HijrahDate computed from the date.
+ * To use a different Hijrah variant, its HijrahChronology can be used
+ * to create new HijrahDate instances.
+ * Alternatively, the {@link #withVariant} method can be used to convert
+ * to a new HijrahChronology.
  * <h3>Specification for implementors</h3>
  * This class is immutable and thread-safe.
  *
@@ -132,19 +115,14 @@
      * Serialization version.
      */
     private static final long serialVersionUID = -5207853542612002020L;
-
     /**
      * The Chronology of this HijrahDate.
      */
     private final HijrahChronology chrono;
     /**
-     * The era.
+     * The proleptic year.
      */
-    private final transient HijrahEra era;
-    /**
-     * The year.
-     */
-    private final transient int yearOfEra;
+    private final transient int prolepticYear;
     /**
      * The month-of-year.
      */
@@ -153,69 +131,36 @@
      * The day-of-month.
      */
     private final transient int dayOfMonth;
-    /**
-     * The day-of-year.
-     */
-    private final transient int dayOfYear;
-    /**
-     * The day-of-week.
-     */
-    private final transient DayOfWeek dayOfWeek;
-    /**
-     * Gregorian days for this object. Holding number of days since 1970/01/01.
-     * The number of days are calculated with pure Gregorian calendar
-     * based.
-     */
-    private final long gregorianEpochDay;
-    /**
-     * True if year is leap year.
-     */
-    private final transient boolean isLeapYear;
 
     //-------------------------------------------------------------------------
     /**
-     * Obtains an instance of {@code HijrahDate} from the Hijrah era year,
-     * month-of-year and day-of-month. This uses the Hijrah era.
+     * Obtains an instance of {@code HijrahDate} from the Hijrah proleptic year,
+     * month-of-year and day-of-month.
      *
-     * @param prolepticYear  the proleptic year to represent in the Hijrah
+     * @param prolepticYear  the proleptic year to represent in the Hijrah calendar
      * @param monthOfYear  the month-of-year to represent, from 1 to 12
      * @param dayOfMonth  the day-of-month to represent, from 1 to 30
      * @return the Hijrah date, never null
      * @throws DateTimeException if the value of any field is out of range
      */
     static HijrahDate of(HijrahChronology chrono, int prolepticYear, int monthOfYear, int dayOfMonth) {
-        return (prolepticYear >= 1) ?
-            HijrahDate.of(chrono, HijrahEra.AH, prolepticYear, monthOfYear, dayOfMonth) :
-            HijrahDate.of(chrono, HijrahEra.BEFORE_AH, 1 - prolepticYear, monthOfYear, dayOfMonth);
+        return new HijrahDate(chrono, prolepticYear, monthOfYear, dayOfMonth);
     }
 
     /**
-     * Obtains an instance of {@code HijrahDate} from the era, year-of-era
-     * month-of-year and day-of-month.
-     *
-     * @param era  the era to represent, not null
-     * @param yearOfEra  the year-of-era to represent, from 1 to 9999
-     * @param monthOfYear  the month-of-year to represent, from 1 to 12
-     * @param dayOfMonth  the day-of-month to represent, from 1 to 31
-     * @return the Hijrah date, never null
-     * @throws DateTimeException if the value of any field is out of range
+     * Returns a HijrahDate for the chronology and epochDay.
+     * @param chrono The Hijrah chronology
+     * @param epochDay the epoch day
+     * @return a HijrahDate for the epoch day; non-null
      */
-    private static HijrahDate of(HijrahChronology chrono, HijrahEra era, int yearOfEra, int monthOfYear, int dayOfMonth) {
-        Objects.requireNonNull(era, "era");
-        chrono.checkValidYearOfEra(yearOfEra);
-        chrono.checkValidMonth(monthOfYear);
-        chrono.checkValidDayOfMonth(dayOfMonth);
-        long gregorianDays = chrono.getGregorianEpochDay(era.prolepticYear(yearOfEra), monthOfYear, dayOfMonth);
-        return new HijrahDate(chrono, gregorianDays);
-    }
-
     static HijrahDate ofEpochDay(HijrahChronology chrono, long epochDay) {
         return new HijrahDate(chrono, epochDay);
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Obtains the current {@code HijrahDate} from the system clock in the default time-zone.
+     * Obtains the current {@code HijrahDate} of the Islamic Umm Al-Qura calendar
+     * in the default time-zone.
      * <p>
      * This will query the {@link Clock#systemDefaultZone() system clock} in the default
      * time-zone to obtain the current date.
@@ -230,7 +175,8 @@
     }
 
     /**
-     * Obtains the current {@code HijrahDate} from the system clock in the specified time-zone.
+     * Obtains the current {@code HijrahDate} of the Islamic Umm Al-Qura calendar
+     * in the specified time-zone.
      * <p>
      * This will query the {@link Clock#system(ZoneId) system clock} to obtain the current date.
      * Specifying the time-zone avoids dependence on the default time-zone.
@@ -246,7 +192,8 @@
     }
 
     /**
-     * Obtains the current {@code HijrahDate} from the specified clock.
+     * Obtains the current {@code HijrahDate} of the Islamic Umm Al-Qura calendar
+     * from the specified clock.
      * <p>
      * This will query the specified clock to obtain the current date - today.
      * Using this method allows the use of an alternate clock for testing.
@@ -261,8 +208,8 @@
     }
 
     /**
-     * Obtains a {@code HijrahDate} representing a date in the Hijrah calendar
-     * system from the proleptic-year, month-of-year and day-of-month fields.
+     * Obtains a {@code HijrahDate} of the Islamic Umm Al-Qura calendar
+     * from the proleptic-year, month-of-year and day-of-month fields.
      * <p>
      * This returns a {@code HijrahDate} with the specified fields.
      * The day must be valid for the year and month, otherwise an exception will be thrown.
@@ -279,7 +226,7 @@
     }
 
     /**
-     * Obtains a {@code HijrahDate} from a temporal object.
+     * Obtains a {@code HijrahDate} of the Islamic Umm Al-Qura calendar from a temporal object.
      * <p>
      * This obtains a date in the Hijrah calendar system based on the specified temporal.
      * A {@code TemporalAccessor} represents an arbitrary set of date and time information,
@@ -301,35 +248,93 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Constructs an instance with the specified date.
+     * Constructs an {@code HijrahDate} with the proleptic-year, month-of-year and
+     * day-of-month fields.
      *
-     * @param gregorianDay  the number of days from 0001/01/01 (Gregorian), caller calculated
+     * @param chrono The chronology to create the date with
+     * @param prolepticYear the proleptic year
+     * @param monthOfYear the month of year
+     * @param dayOfMonth the day of month
      */
-    private HijrahDate(HijrahChronology chrono, long gregorianDay) {
-        this.chrono = chrono;
-        int[] dateInfo = chrono.getHijrahDateInfo(gregorianDay);
+    private HijrahDate(HijrahChronology chrono, int prolepticYear, int monthOfYear, int dayOfMonth) {
+        // Computing the Gregorian day checks the valid ranges
+        chrono.getEpochDay(prolepticYear, monthOfYear, dayOfMonth);
 
-        chrono.checkValidYearOfEra(dateInfo[1]);
-        chrono.checkValidMonth(dateInfo[2]);
-        chrono.checkValidDayOfMonth(dateInfo[3]);
-        chrono.checkValidDayOfYear(dateInfo[4]);
+        this.chrono = chrono;
+        this.prolepticYear = prolepticYear;
+        this.monthOfYear = monthOfYear;
+        this.dayOfMonth = dayOfMonth;
+    }
 
-        this.era = HijrahEra.of(dateInfo[0]);
-        this.yearOfEra = dateInfo[1];
-        this.monthOfYear = dateInfo[2];
-        this.dayOfMonth = dateInfo[3];
-        this.dayOfYear = dateInfo[4];
-        this.dayOfWeek = DayOfWeek.of(dateInfo[5]);
-        this.gregorianEpochDay = gregorianDay;
-        this.isLeapYear = chrono.isLeapYear(this.yearOfEra);
+    /**
+     * Constructs an instance with the Epoch Day.
+     *
+     * @param epochDay  the epochDay
+     */
+    private HijrahDate(HijrahChronology chrono, long epochDay) {
+        int[] dateInfo = chrono.getHijrahDateInfo((int)epochDay);
+
+        this.chrono = chrono;
+        this.prolepticYear = dateInfo[0];
+        this.monthOfYear = dateInfo[1];
+        this.dayOfMonth = dateInfo[2];
     }
 
     //-----------------------------------------------------------------------
+    /**
+     * Gets the chronology of this date, which is the Hijrah calendar system.
+     * <p>
+     * The {@code Chronology} represents the calendar system in use.
+     * The era and other fields in {@link ChronoField} are defined by the chronology.
+     *
+     * @return the Hijrah chronology, not null
+     */
     @Override
     public HijrahChronology getChronology() {
         return chrono;
     }
 
+    /**
+     * Gets the era applicable at this date.
+     * <p>
+     * The Hijrah calendar system has one era, 'AH',
+     * defined by {@link HijrahEra}.
+     *
+     * @return the era applicable at this date, not null
+     */
+    @Override
+    public HijrahEra getEra() {
+        return HijrahEra.AH;
+    }
+
+    /**
+     * Returns the length of the month represented by this date.
+     * <p>
+     * This returns the length of the month in days.
+     * Month lengths in the Hijrah calendar system vary between 29 and 30 days.
+     *
+     * @return the length of the month in days
+     */
+    @Override
+    public int lengthOfMonth() {
+        return chrono.getMonthLength(prolepticYear, monthOfYear);
+    }
+
+    /**
+     * Returns the length of the year represented by this date.
+     * <p>
+     * This returns the length of the year in days.
+     * A Hijrah calendar system year is typically shorter than
+     * that of the ISO calendar system.
+     *
+     * @return the length of the year in days
+     */
+    @Override
+    public int lengthOfYear() {
+        return chrono.getYearLength(prolepticYear);
+    }
+
+    //-----------------------------------------------------------------------
     @Override
     public ValueRange range(TemporalField field) {
         if (field instanceof ChronoField) {
@@ -339,83 +344,106 @@
                     case DAY_OF_MONTH: return ValueRange.of(1, lengthOfMonth());
                     case DAY_OF_YEAR: return ValueRange.of(1, lengthOfYear());
                     case ALIGNED_WEEK_OF_MONTH: return ValueRange.of(1, 5);  // TODO
-                    case YEAR_OF_ERA: return ValueRange.of(1, 1000);  // TODO
+                    // TODO does the limited range of valid years cause years to
+                    // start/end part way through? that would affect range
                 }
                 return getChronology().range(f);
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.rangeRefinedBy(this);
     }
 
-    @Override   // Override for javadoc
-    public int get(TemporalField field) {
-        return super.get(field);
-    }
-
     @Override
     public long getLong(TemporalField field) {
         if (field instanceof ChronoField) {
             switch ((ChronoField) field) {
-                case DAY_OF_WEEK: return dayOfWeek.getValue();
-                case ALIGNED_DAY_OF_WEEK_IN_MONTH: return ((dayOfWeek.getValue() - 1) % 7) + 1;
-                case ALIGNED_DAY_OF_WEEK_IN_YEAR: return ((dayOfYear - 1) % 7) + 1;
+                case DAY_OF_WEEK: return getDayOfWeek();
+                case ALIGNED_DAY_OF_WEEK_IN_MONTH: return ((getDayOfWeek() - 1) % 7) + 1;
+                case ALIGNED_DAY_OF_WEEK_IN_YEAR: return ((getDayOfYear() - 1) % 7) + 1;
                 case DAY_OF_MONTH: return this.dayOfMonth;
-                case DAY_OF_YEAR: return this.dayOfYear;
+                case DAY_OF_YEAR: return this.getDayOfYear();
                 case EPOCH_DAY: return toEpochDay();
                 case ALIGNED_WEEK_OF_MONTH: return ((dayOfMonth - 1) / 7) + 1;
-                case ALIGNED_WEEK_OF_YEAR: return ((dayOfYear - 1) / 7) + 1;
+                case ALIGNED_WEEK_OF_YEAR: return ((getDayOfYear() - 1) / 7) + 1;
                 case MONTH_OF_YEAR: return monthOfYear;
-                case YEAR_OF_ERA: return yearOfEra;
-                case YEAR: return yearOfEra;
-                case ERA: return era.getValue();
+                case PROLEPTIC_MONTH: return getProlepticMonth();
+                case YEAR_OF_ERA: return prolepticYear;
+                case YEAR: return prolepticYear;
+                case ERA: return getEraValue();
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.getFrom(this);
     }
 
+    private long getProlepticMonth() {
+        return prolepticYear * 12L + monthOfYear - 1;
+    }
+
     @Override
     public HijrahDate with(TemporalField field, long newValue) {
         if (field instanceof ChronoField) {
             ChronoField f = (ChronoField) field;
-            f.checkValidValue(newValue);        // TODO: validate value
+            // not using checkValidIntValue so EPOCH_DAY and PROLEPTIC_MONTH work
+            chrono.range(f).checkValidValue(newValue, f);    // TODO: validate value
             int nvalue = (int) newValue;
             switch (f) {
-                case DAY_OF_WEEK: return plusDays(newValue - dayOfWeek.getValue());
+                case DAY_OF_WEEK: return plusDays(newValue - getDayOfWeek());
                 case ALIGNED_DAY_OF_WEEK_IN_MONTH: return plusDays(newValue - getLong(ALIGNED_DAY_OF_WEEK_IN_MONTH));
                 case ALIGNED_DAY_OF_WEEK_IN_YEAR: return plusDays(newValue - getLong(ALIGNED_DAY_OF_WEEK_IN_YEAR));
-                case DAY_OF_MONTH: return resolvePreviousValid(yearOfEra, monthOfYear, nvalue);
-                case DAY_OF_YEAR: return resolvePreviousValid(yearOfEra, ((nvalue - 1) / 30) + 1, ((nvalue - 1) % 30) + 1);
-                case EPOCH_DAY: return new HijrahDate(chrono, nvalue);
+                case DAY_OF_MONTH: return resolvePreviousValid(prolepticYear, monthOfYear, nvalue);
+                case DAY_OF_YEAR: return resolvePreviousValid(prolepticYear, ((nvalue - 1) / 30) + 1, ((nvalue - 1) % 30) + 1);
+                case EPOCH_DAY: return new HijrahDate(chrono, newValue);
                 case ALIGNED_WEEK_OF_MONTH: return plusDays((newValue - getLong(ALIGNED_WEEK_OF_MONTH)) * 7);
                 case ALIGNED_WEEK_OF_YEAR: return plusDays((newValue - getLong(ALIGNED_WEEK_OF_YEAR)) * 7);
-                case MONTH_OF_YEAR: return resolvePreviousValid(yearOfEra, nvalue, dayOfMonth);
-                case YEAR_OF_ERA: return resolvePreviousValid(yearOfEra >= 1 ? nvalue : 1 - nvalue, monthOfYear, dayOfMonth);
+                case MONTH_OF_YEAR: return resolvePreviousValid(prolepticYear, nvalue, dayOfMonth);
+                case PROLEPTIC_MONTH: return plusMonths(newValue - getProlepticMonth());
+                case YEAR_OF_ERA: return resolvePreviousValid(prolepticYear >= 1 ? nvalue : 1 - nvalue, monthOfYear, dayOfMonth);
                 case YEAR: return resolvePreviousValid(nvalue, monthOfYear, dayOfMonth);
-                case ERA: return resolvePreviousValid(1 - yearOfEra, monthOfYear, dayOfMonth);
+                case ERA: return resolvePreviousValid(1 - prolepticYear, monthOfYear, dayOfMonth);
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
-        return (HijrahDate) ChronoLocalDate.super.with(field, newValue);
+        return ChronoLocalDate.super.with(field, newValue);
     }
 
-    private HijrahDate resolvePreviousValid(int yearOfEra, int month, int day) {
-        int monthDays = getMonthDays(month - 1, yearOfEra);
+    private HijrahDate resolvePreviousValid(int prolepticYear, int month, int day) {
+        int monthDays = chrono.getMonthLength(prolepticYear, month);
         if (day > monthDays) {
             day = monthDays;
         }
-        return HijrahDate.of(chrono, yearOfEra, month, day);
+        return HijrahDate.of(chrono, prolepticYear, month, day);
     }
 
     /**
      * {@inheritDoc}
-     * @throws DateTimeException {@inheritDoc}
+     * @throws DateTimeException if unable to make the adjustment.
+     *     For example, if the adjuster requires an ISO chronology
      * @throws ArithmeticException {@inheritDoc}
      */
     @Override
     public  HijrahDate with(TemporalAdjuster adjuster) {
-        return (HijrahDate)super.with(adjuster);
+        return super.with(adjuster);
+    }
+
+    /**
+     * Returns a {@code HijrahDate} with the Chronology requested.
+     * <p>
+     * The year, month, and day are checked against the new requested
+     * HijrahChronology.  If the chronology has a shorter month length
+     * for the month, the day is reduced to be the last day of the month.
+     *
+     * @param chronology the new HijrahChonology, non-null
+     * @return a HijrahDate with the requested HijrahChronology, non-null
+     */
+    public HijrahDate withVariant(HijrahChronology chronology) {
+        if (chrono == chronology) {
+            return this;
+        }
+        // Like resolvePreviousValid the day is constrained to stay in the same month
+        int monthDays = chronology.getDayOfYear(prolepticYear, monthOfYear);
+        return HijrahDate.of(chronology, prolepticYear, monthOfYear,(dayOfMonth > monthDays) ? monthDays : dayOfMonth );
     }
 
     /**
@@ -425,7 +453,7 @@
      */
     @Override
     public HijrahDate plus(TemporalAmount amount) {
-        return (HijrahDate)super.plus(amount);
+        return super.plus(amount);
     }
 
     /**
@@ -435,12 +463,42 @@
      */
     @Override
     public HijrahDate minus(TemporalAmount amount) {
-        return (HijrahDate)super.minus(amount);
+        return super.minus(amount);
     }
 
     @Override
     public long toEpochDay() {
-         return chrono.getGregorianEpochDay(yearOfEra, monthOfYear, dayOfMonth);
+        return chrono.getEpochDay(prolepticYear, monthOfYear, dayOfMonth);
+    }
+
+    /**
+     * Gets the day-of-year field.
+     * <p>
+     * This method returns the primitive {@code int} value for the day-of-year.
+     *
+     * @return the day-of-year
+     */
+    private int getDayOfYear() {
+        return chrono.getDayOfYear(prolepticYear, monthOfYear);
+    }
+
+    /**
+     * Gets the day-of-week value.
+     *
+     * @return the day-of-week; computed from the epochday
+     */
+    private int getDayOfWeek() {
+        int dow0 = (int)Math.floorMod(toEpochDay() + 3, 7);
+        return dow0 + 1;
+    }
+
+    /**
+     * Gets the Era of this date.
+     *
+     * @return the Era of this date; computed from epochDay
+     */
+    private int getEraValue() {
+        return (prolepticYear > 1 ? 1 : 0);
     }
 
     //-----------------------------------------------------------------------
@@ -451,7 +509,7 @@
      */
     @Override
     public boolean isLeapYear() {
-        return this.isLeapYear;
+        return chrono.isLeapYear(prolepticYear);
     }
 
     //-----------------------------------------------------------------------
@@ -460,111 +518,72 @@
         if (years == 0) {
             return this;
         }
-        int newYear = Math.addExact(this.yearOfEra, (int)years);
-        return HijrahDate.of(chrono, this.era, newYear, this.monthOfYear, this.dayOfMonth);
+        int newYear = Math.addExact(this.prolepticYear, (int)years);
+        return resolvePreviousValid(newYear, monthOfYear, dayOfMonth);
     }
 
     @Override
-    HijrahDate plusMonths(long months) {
-        if (months == 0) {
+    HijrahDate plusMonths(long monthsToAdd) {
+        if (monthsToAdd == 0) {
             return this;
         }
-        int newMonth = this.monthOfYear - 1;
-        newMonth = newMonth + (int)months;
-        int years = newMonth / 12;
-        newMonth = newMonth % 12;
-        while (newMonth < 0) {
-            newMonth += 12;
-            years = Math.subtractExact(years, 1);
-        }
-        int newYear = Math.addExact(this.yearOfEra, years);
-        return HijrahDate.of(chrono, this.era, newYear, newMonth + 1, this.dayOfMonth);
+        long monthCount = prolepticYear * 12L + (monthOfYear - 1);
+        long calcMonths = monthCount + monthsToAdd;  // safe overflow
+        int newYear = chrono.checkValidYear(Math.floorDiv(calcMonths, 12L));
+        int newMonth = (int)Math.floorMod(calcMonths, 12L) + 1;
+        return resolvePreviousValid(newYear, newMonth, dayOfMonth);
     }
 
     @Override
     HijrahDate plusWeeks(long weeksToAdd) {
-        return (HijrahDate)super.plusWeeks(weeksToAdd);
+        return super.plusWeeks(weeksToAdd);
     }
 
     @Override
     HijrahDate plusDays(long days) {
-        return new HijrahDate(chrono, this.gregorianEpochDay + days);
+        return new HijrahDate(chrono, toEpochDay() + days);
     }
 
     @Override
     public HijrahDate plus(long amountToAdd, TemporalUnit unit) {
-        return (HijrahDate)super.plus(amountToAdd, unit);
+        return super.plus(amountToAdd, unit);
     }
 
     @Override
     public HijrahDate minus(long amountToSubtract, TemporalUnit unit) {
-        return (HijrahDate)super.minus(amountToSubtract, unit);
+        return super.minus(amountToSubtract, unit);
     }
 
     @Override
     HijrahDate minusYears(long yearsToSubtract) {
-        return (HijrahDate)super.minusYears(yearsToSubtract);
+        return super.minusYears(yearsToSubtract);
     }
 
     @Override
     HijrahDate minusMonths(long monthsToSubtract) {
-        return (HijrahDate)super.minusMonths(monthsToSubtract);
+        return super.minusMonths(monthsToSubtract);
     }
 
     @Override
     HijrahDate minusWeeks(long weeksToSubtract) {
-        return (HijrahDate)super.minusWeeks(weeksToSubtract);
+        return super.minusWeeks(weeksToSubtract);
     }
 
     @Override
     HijrahDate minusDays(long daysToSubtract) {
-        return (HijrahDate)super.minusDays(daysToSubtract);
-    }
-
-    /**
-     * Returns month days from the beginning of year.
-     *
-     * @param month  month (0-based)
-     * @parma year  year
-     * @return month days from the beginning of year
-     */
-    private int getMonthDays(int month, int year) {
-        int[] newMonths = chrono.getAdjustedMonthDays(year);
-        return newMonths[month];
-    }
-
-    /**
-     * Returns month length.
-     *
-     * @param month  month (0-based)
-     * @param year  year
-     * @return month length
-     */
-    private int getMonthLength(int month, int year) {
-      int[] newMonths = chrono.getAdjustedMonthLength(year);
-      return newMonths[month];
-    }
-
-    @Override
-    public int lengthOfMonth() {
-        return getMonthLength(monthOfYear - 1, yearOfEra);
-    }
-
-    @Override
-    public int lengthOfYear() {
-        return chrono.getYearLength(yearOfEra);  // TODO: proleptic year
+        return super.minusDays(daysToSubtract);
     }
 
     @Override        // for javadoc and covariant return type
     public final ChronoLocalDateTime<HijrahDate> atTime(LocalTime localTime) {
-        return (ChronoLocalDateTime<HijrahDate>)super.atTime(localTime);
+        return super.atTime(localTime);
     }
 
     @Override
     public Period periodUntil(ChronoLocalDate<?> endDate) {
         // TODO: untested
-        HijrahDate end = (HijrahDate) getChronology().date(endDate);
-        long totalMonths = (end.yearOfEra - this.yearOfEra) * 12 + (end.monthOfYear - this.monthOfYear);  // safe
+        HijrahDate end = getChronology().date(endDate);
+        long totalMonths = (end.prolepticYear - this.prolepticYear) * 12 + (end.monthOfYear - this.monthOfYear);  // safe
         int days = end.dayOfMonth - this.dayOfMonth;
         if (totalMonths > 0 && days < 0) {
             totalMonths--;
@@ -604,7 +623,7 @@
     }
 
     static ChronoLocalDate<HijrahDate> readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        HijrahChronology chrono = (HijrahChronology)in.readObject();
+        HijrahChronology chrono = (HijrahChronology) in.readObject();
         int year = in.readInt();
         int month = in.readByte();
         int dayOfMonth = in.readByte();
--- a/src/share/classes/java/time/chrono/HijrahDeviationReader.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package java.time.chrono;
-
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.nio.file.FileSystems;
-import java.security.AccessController;
-import java.text.ParseException;
-import java.time.LocalDate;
-import java.time.format.DateTimeFormatter;
-import java.time.temporal.ChronoField;
-import java.util.Arrays;
-import java.util.function.Consumer;
-
-/**
- * A reader for Hijrah Deviation files.
- * <p>
- * For each Hijrah calendar a deviation file is used
- * to modify the initial Hijrah calendar by changing the length of
- * individual months.
- * <p>
- * The default location of the deviation files is
- * {@code <java.home> + FILE_SEP + "lib"}.
- * The deviation files are named {@code "hijrah_" + ID}.
- * <p>
- * The deviation file for a calendar can be overridden by defining the
- * property {@code java.time.chrono.HijrahChronology.File.hijrah_<ID>}
- * with the full pathname of the deviation file.
- * <p>
- * The deviation file is read line by line:
- * <ul>
- * <li>The "#" character begins a comment -
- *     all characters including and after the "#" on the line are ignored</li>
- * <li>Valid lines contain two fields, separated by whitespace, whitespace
- *     is otherwise ignored.</li>
- * <li>The first field is a LocalDate using the format "MMM-dd-yyyy";
- *     The LocalDate must be converted to a HijrahDate using
- *     the {@code islamic} calendar.</li>
- * <li>The second field is the offset, +2, +1, -1, -2 as parsed
- *     by Integer.valueOf to modify the length of the Hijrah month.</li>
- * <li>Empty lines are ignore.</li>
- * <li>Exceptions are throw for invalid formatted dates and offset,
- *     and other I/O errors on the file.
- * </ul>
- * <p>Example:</p>
- * <pre># Deviation data for islamicc calendar
- * Mar-23-2012 -1
- * Apr-22-2012 +1
- * May-21-2012 -1
- * Dec-14-2012 +1
- * </pre>
- *
- * @since 1.8
- */
-final class HijrahDeviationReader {
-
-    /**
-     * Default prefix for name of deviation file; suffix is typeId.
-     */
-    private static final String DEFAULT_CONFIG_FILE_PREFIX = "hijrah_";
-
-    /**
-     * Read Hijrah_deviation.cfg file. The config file contains the deviation
-     * data with format defined in the class javadoc.
-     *
-     * @param typeId the name of the calendar
-     * @param calendarType the calendar type
-     * @return {@code true} if the file was read and each entry accepted by the
-     * Consumer; else {@code false} no configuration was done
-     *
-     * @throws IOException for zip/jar file handling exception.
-     * @throws ParseException if the format of the configuration file is wrong.
-     */
-    static boolean readDeviation(String typeId, String calendarType,
-            Consumer<HijrahChronology.Deviation> consumer) throws IOException, ParseException {
-        InputStream is = getConfigFileInputStream(typeId);
-        if (is != null) {
-            try (BufferedReader br = new BufferedReader(new InputStreamReader(is))) {
-                String line = "";
-                int num = 0;
-                while ((line = br.readLine()) != null) {
-                    num++;
-                    HijrahChronology.Deviation entry = parseLine(line, num);
-                    if (entry != null) {
-                        consumer.accept(entry);
-                    }
-                }
-            }
-            return true;
-        }
-        return false;
-    }
-
-    /**
-     * Parse each deviation element.
-     *
-     * @param line  a line to parse
-     * @param num  line number
-     * @return an Entry or null if the line is empty.
-     * @throws ParseException if line has incorrect format.
-     */
-    private static HijrahChronology.Deviation parseLine(final String line, final int num) throws ParseException {
-        int hash = line.indexOf("#");
-        String nocomment = (hash < 0) ? line : line.substring(0, hash);
-        String[] split = nocomment.split("\\s");
-        if (split.length == 0 || split[0].isEmpty()) {
-            return null;    // Nothing to parse
-        }
-        if (split.length != 2) {
-            throw new ParseException("Less than 2 tokens on line : " + line + Arrays.toString(split) + ", split.length: " + split.length, num);
-        }
-
-        //element [0] is a date
-        //element [1] is the offset
-
-        LocalDate isoDate = DateTimeFormatter.ofPattern("MMM-dd-yyyy").parse(split[0], LocalDate::from);
-        int offset = Integer.valueOf(split[1]);
-
-        // Convert date to HijrahDate using the default Islamic Calendar
-
-        HijrahDate hijrahDate = HijrahChronology.INSTANCE.date(isoDate);
-
-        int year = hijrahDate.get(ChronoField.YEAR);
-        int month = hijrahDate.get(ChronoField.MONTH_OF_YEAR);
-        return new HijrahChronology.Deviation(year, month, year, month, offset);
-    }
-
-
-    /**
-     * Return InputStream for deviation configuration file. The default location
-     * of the deviation file is:
-     * <pre>
-     *   $CLASSPATH/java/time/calendar
-     * </pre> And the default file name is:
-     * <pre>
-     *   hijrah_ + typeId + .cfg
-     * </pre> The default location and file name can be overridden by setting
-     * following two Java system properties.
-     * <pre>
-     *   Location: java.time.chrono.HijrahDate.deviationConfigDir
-     *   File name: java.time.chrono.HijrahDate.File. + typeid
-     * </pre> Regarding the file format, see readDeviationConfig() method for
-     * details.
-     *
-     * @param typeId the name of the calendar deviation data
-     * @return InputStream for file reading.
-     * @throws IOException for zip/jar file handling exception.
-     */
-    private static InputStream getConfigFileInputStream(final String typeId) throws IOException {
-        try {
-            InputStream stream = AccessController
-                    .doPrivileged((java.security.PrivilegedExceptionAction<InputStream>) () -> {
-                String propFilename = "java.time.chrono.HijrahChronology.File." + typeId;
-                String filename = System.getProperty(propFilename);
-                File file = null;
-                if (filename != null) {
-                    file = new File(filename);
-                } else {
-                    String libDir = System.getProperty("java.home") + File.separator + "lib";
-                    try {
-                        libDir = FileSystems.getDefault().getPath(libDir).toRealPath().toString();
-                    } catch(Exception e) {}
-                    filename = DEFAULT_CONFIG_FILE_PREFIX + typeId + ".cfg";
-                    file = new File(libDir, filename);
-                }
-
-                if (file.exists()) {
-                    try {
-                        return new FileInputStream(file);
-                    } catch (IOException ioe) {
-                        throw ioe;
-                    }
-                } else {
-                    return null;
-                }
-            });
-            return stream;
-        } catch (Exception ex) {
-            ex.printStackTrace();
-            // Not working
-            return null;
-        }
-    }
-}
--- a/src/share/classes/java/time/chrono/HijrahEra.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/HijrahEra.java	Wed Apr 17 21:48:04 2013 -0700
@@ -24,6 +24,11 @@
  */
 
 /*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
  * Copyright (c) 2012, Stephen Colebourne & Michael Nascimento Santos
  *
  * All rights reserved.
@@ -56,16 +61,22 @@
  */
 package java.time.chrono;
 
+import static java.time.temporal.ChronoField.ERA;
+
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 import java.time.DateTimeException;
+import java.time.temporal.ChronoField;
+import java.time.temporal.TemporalField;
+import java.time.temporal.UnsupportedTemporalTypeException;
+import java.time.temporal.ValueRange;
 
 /**
  * An era in the Hijrah calendar system.
  * <p>
- * The Hijrah calendar system has two eras.
- * The date {@code 0001-01-01 (Hijrah)} is {@code 622-06-19 (ISO)}.
+ * The Hijrah calendar system has only one era covering the
+ * proleptic years greater than zero.
  * <p>
  * <b>Do not use {@code ordinal()} to obtain the numeric representation of {@code HijrahEra}.
  * Use {@code getValue()} instead.</b>
@@ -75,80 +86,76 @@
  *
  * @since 1.8
  */
-enum HijrahEra implements Era {
+public enum HijrahEra implements Era {
 
     /**
-     * The singleton instance for the era before the current one, 'Before Anno Hegirae',
-     * which has the value 0.
-     */
-    BEFORE_AH,
-    /**
-     * The singleton instance for the current era, 'Anno Hegirae', which has the value 1.
+     * The singleton instance for the current era, 'Anno Hegirae',
+     * which has the numeric value 1.
      */
     AH;
 
     //-----------------------------------------------------------------------
     /**
-     * Obtains an instance of {@code HijrahEra} from a value.
+     * Obtains an instance of {@code HijrahEra} from an {@code int} value.
      * <p>
-     * The current era (from ISO date 622-06-19 onwards) has the value 1
-     * The previous era has the value 0.
+     * The current era, which is the only accepted value, has the value 1
      *
-     * @param hijrahEra  the era to represent, from 0 to 1
-     * @return the HijrahEra singleton, never null
-     * @throws DateTimeException if the era is invalid
+     * @param hijrahEra  the era to represent, only 1 supported
+     * @return the HijrahEra.AH singleton, not null
+     * @throws DateTimeException if the value is invalid
      */
     public static HijrahEra of(int hijrahEra) {
-        switch (hijrahEra) {
-            case 0:
-                return BEFORE_AH;
-            case 1:
-                return AH;
-            default:
-                throw new DateTimeException("HijrahEra not valid");
+        if (hijrahEra == 1 ) {
+            return AH;
+        } else {
+            throw new DateTimeException("Invalid era: " + hijrahEra);
         }
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Gets the era numeric value.
+     * Gets the numeric era {@code int} value.
      * <p>
-     * The current era (from ISO date 622-06-19 onwards) has the value 1.
-     * The previous era has the value 0.
+     * The era AH has the value 1.
      *
-     * @return the era value, from 0 (BEFORE_AH) to 1 (AH)
+     * @return the era value, 1 (AH)
      */
     @Override
     public int getValue() {
-        return ordinal();
-    }
-
-    @Override
-    public HijrahChronology getChronology() {
-        return HijrahChronology.INSTANCE;
-    }
-
-    // JDK8 default methods:
-    //-----------------------------------------------------------------------
-    @Override
-    public HijrahDate date(int year, int month, int day) {
-        return (HijrahDate)(getChronology().date(this, year, month, day));
+        return 1;
     }
 
-    @Override
-    public HijrahDate dateYearDay(int year, int dayOfYear) {
-        return (HijrahDate)(getChronology().dateYearDay(this, year, dayOfYear));
-    }
-
-    //-------------------------------------------------------------------------
+    //-----------------------------------------------------------------------
     /**
-     * Returns the proleptic year from this era and year of era.
+     * Gets the range of valid values for the specified field.
+     * <p>
+     * The range object expresses the minimum and maximum valid values for a field.
+     * This era is used to enhance the accuracy of the returned range.
+     * If it is not possible to return the range, because the field is not supported
+     * or for some other reason, an exception is thrown.
+     * <p>
+     * If the field is a {@link ChronoField} then the query is implemented here.
+     * The {@code ERA} field returns the range.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
+     * <p>
+     * If the field is not a {@code ChronoField}, then the result of this method
+     * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
+     * passing {@code this} as the argument.
+     * Whether the range can be obtained is determined by the field.
+     * <p>
+     * The {@code ERA} field returns a range for the one valid Hijrah era.
      *
-     * @param yearOfEra the year of Era
-     * @return the computed prolepticYear
+     * @param field  the field to query the range for, not null
+     * @return the range of valid values for the field, not null
+     * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      */
-    int prolepticYear(int yearOfEra) {
-        return (this == HijrahEra.AH ? yearOfEra : 1 - yearOfEra);
+    @Override  // override as super would return range from 0 to 1
+    public ValueRange range(TemporalField field) {
+        if (field == ERA) {
+            return ValueRange.of(1, 1);
+        }
+        return Era.super.range(field);
     }
 
     //-----------------------------------------------------------------------
--- a/src/share/classes/java/time/chrono/IsoChronology.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/IsoChronology.java	Wed Apr 17 21:48:04 2013 -0700
@@ -61,20 +61,41 @@
  */
 package java.time.chrono;
 
+import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH;
+import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR;
+import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_MONTH;
+import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_YEAR;
+import static java.time.temporal.ChronoField.DAY_OF_MONTH;
+import static java.time.temporal.ChronoField.DAY_OF_WEEK;
+import static java.time.temporal.ChronoField.DAY_OF_YEAR;
+import static java.time.temporal.ChronoField.EPOCH_DAY;
+import static java.time.temporal.ChronoField.ERA;
+import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
+import static java.time.temporal.ChronoField.YEAR;
+import static java.time.temporal.ChronoField.YEAR_OF_ERA;
+import static java.time.temporal.TemporalAdjuster.nextOrSame;
+
 import java.io.Serializable;
 import java.time.Clock;
 import java.time.DateTimeException;
+import java.time.DayOfWeek;
 import java.time.Instant;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.time.Month;
+import java.time.Year;
 import java.time.ZoneId;
 import java.time.ZonedDateTime;
+import java.time.format.ResolverStyle;
 import java.time.temporal.ChronoField;
 import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalField;
 import java.time.temporal.ValueRange;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Locale;
+import java.util.Map;
 import java.util.Objects;
 
 /**
@@ -111,20 +132,6 @@
      * Singleton instance of the ISO chronology.
      */
     public static final IsoChronology INSTANCE = new IsoChronology();
-    /**
-     * The singleton instance for the era BCE - 'Before Current Era'.
-     * The 'ISO' part of the name emphasizes that this differs from the BCE
-     * era in the Gregorian calendar system.
-     * This has the numeric value of {@code 0}.
-     */
-    public static final Era ERA_BCE = IsoEra.BCE;
-    /**
-     * The singleton instance for the era CE - 'Current Era'.
-     * The 'ISO' part of the name emphasizes that this differs from the CE
-     * era in the Gregorian calendar system.
-     * This has the numeric value of {@code 1}.
-     */
-    public static final Era ERA_CE = IsoEra.CE;
 
     /**
      * Serialization version.
@@ -137,15 +144,6 @@
     private IsoChronology() {
     }
 
-    /**
-     * Resolve singleton.
-     *
-     * @return the singleton instance, not null
-     */
-    private Object readResolve() {
-        return INSTANCE;
-    }
-
     //-----------------------------------------------------------------------
     /**
      * Gets the ID of the chronology - 'ISO'.
@@ -189,6 +187,7 @@
      * @param dayOfMonth  the ISO day-of-month
      * @return the ISO local date, not null
      * @throws DateTimeException if unable to create the date
+     * @throws ClassCastException if the type of {@code era} is not {@code IsoEra}
      */
     @Override  // override with covariant return type
     public LocalDate date(Era era, int yearOfEra, int month, int dayOfMonth) {
@@ -241,6 +240,20 @@
         return LocalDate.ofYearDay(prolepticYear, dayOfYear);
     }
 
+    /**
+     * Obtains an ISO local date from the epoch-day.
+     * <p>
+     * This is equivalent to {@link LocalDate#ofEpochDay(long)}.
+     *
+     * @param epochDay  the epoch day
+     * @return the ISO local date, not null
+     * @throws DateTimeException if unable to create the date
+     */
+    @Override  // override with covariant return type
+    public LocalDate dateEpochDay(long epochDay) {
+        return LocalDate.ofEpochDay(epochDay);
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Obtains an ISO local date from another date-time object.
@@ -379,7 +392,7 @@
     @Override
     public int prolepticYear(Era era, int yearOfEra) {
         if (era instanceof IsoEra == false) {
-            throw new DateTimeException("Era must be IsoEra");
+            throw new ClassCastException("Era must be IsoEra");
         }
         return (era == IsoEra.CE ? yearOfEra : 1 - yearOfEra);
     }
@@ -395,6 +408,282 @@
     }
 
     //-----------------------------------------------------------------------
+    /**
+     * Resolves parsed {@code ChronoField} values into a date during parsing.
+     * <p>
+     * Most {@code TemporalField} implementations are resolved using the
+     * resolve method on the field. By contrast, the {@code ChronoField} class
+     * defines fields that only have meaning relative to the chronology.
+     * As such, {@code ChronoField} date fields are resolved here in the
+     * context of a specific chronology.
+     * <p>
+     * {@code ChronoField} instances on the ISO calendar system are resolved
+     * as follows.
+     * <ul>
+     * <li>{@code EPOCH_DAY} - If present, this is converted to a {@code LocalDate}
+     *  all other date fields are then cross-checked against the date
+     * <li>{@code PROLEPTIC_MONTH} - If present, then it is split into the
+     *  {@code YEAR} and {@code MONTH_OF_YEAR}. If the mode is strict or smart
+     *  then the field is validated.
+     * <li>{@code YEAR_OF_ERA} and {@code ERA} - If both are present, then they
+     *  are combined to form a {@code YEAR}. In lenient mode, the {@code YEAR_OF_ERA}
+     *  range is not validated, in smart and strict mode it is. The {@code ERA} is
+     *  validated for range in all three modes. If only the {@code YEAR_OF_ERA} is
+     *  present, and the mode is smart or lenient, then the current era (CE/AD)
+     *  is assumed. In strict mode, no ers is assumed and the {@code YEAR_OF_ERA} is
+     *  left untouched. If only the {@code ERA} is present, then it is left untouched.
+     * <li>{@code YEAR}, {@code MONTH_OF_YEAR} and {@code DAY_OF_MONTH} -
+     *  If all three are present, then they are combined to form a {@code LocalDate}.
+     *  In all three modes, the {@code YEAR} is validated. If the mode is smart or strict,
+     *  then the month and day are validated, with the day validated from 1 to 31.
+     *  If the mode is lenient, then the date is combined in a manner equivalent to
+     *  creating a date on the first of January in the requested year, then adding
+     *  the difference in months, then the difference in days.
+     *  If the mode is smart, and the day-of-month is greater than the maximum for
+     *  the year-month, then the day-of-month is adjusted to the last day-of-month.
+     *  If the mode is strict, then the three fields must form a valid date.
+     * <li>{@code YEAR} and {@code DAY_OF_YEAR} -
+     *  If both are present, then they are combined to form a {@code LocalDate}.
+     *  In all three modes, the {@code YEAR} is validated.
+     *  If the mode is lenient, then the date is combined in a manner equivalent to
+     *  creating a date on the first of January in the requested year, then adding
+     *  the difference in days.
+     *  If the mode is smart or strict, then the two fields must form a valid date.
+     * <li>{@code YEAR}, {@code MONTH_OF_YEAR}, {@code ALIGNED_WEEK_OF_MONTH} and
+     *  {@code ALIGNED_DAY_OF_WEEK_IN_MONTH} -
+     *  If all four are present, then they are combined to form a {@code LocalDate}.
+     *  In all three modes, the {@code YEAR} is validated.
+     *  If the mode is lenient, then the date is combined in a manner equivalent to
+     *  creating a date on the first of January in the requested year, then adding
+     *  the difference in months, then the difference in weeks, then in days.
+     *  If the mode is smart or strict, then the all four fields are validated to
+     *  their outer ranges. The date is then combined in a manner equivalent to
+     *  creating a date on the first day of the requested year and month, then adding
+     *  the amount in weeks and days to reach their values. If the mode is strict,
+     *  the date is additionally validated to check that the day and week adjustment
+     *  did not change the month.
+     * <li>{@code YEAR}, {@code MONTH_OF_YEAR}, {@code ALIGNED_WEEK_OF_MONTH} and
+     *  {@code DAY_OF_WEEK} - If all four are present, then they are combined to
+     *  form a {@code LocalDate}. The approach is the same as described above for
+     *  years, months and weeks in {@code ALIGNED_DAY_OF_WEEK_IN_MONTH}.
+     *  The day-of-week is adjusted as the next or same matching day-of-week once
+     *  the years, months and weeks have been handled.
+     * <li>{@code YEAR}, {@code ALIGNED_WEEK_OF_YEAR} and {@code ALIGNED_DAY_OF_WEEK_IN_YEAR} -
+     *  If all three are present, then they are combined to form a {@code LocalDate}.
+     *  In all three modes, the {@code YEAR} is validated.
+     *  If the mode is lenient, then the date is combined in a manner equivalent to
+     *  creating a date on the first of January in the requested year, then adding
+     *  the difference in weeks, then in days.
+     *  If the mode is smart or strict, then the all three fields are validated to
+     *  their outer ranges. The date is then combined in a manner equivalent to
+     *  creating a date on the first day of the requested year, then adding
+     *  the amount in weeks and days to reach their values. If the mode is strict,
+     *  the date is additionally validated to check that the day and week adjustment
+     *  did not change the year.
+     * <li>{@code YEAR}, {@code ALIGNED_WEEK_OF_YEAR} and {@code DAY_OF_WEEK} -
+     *  If all three are present, then they are combined to form a {@code LocalDate}.
+     *  The approach is the same as described above for years and weeks in
+     *  {@code ALIGNED_DAY_OF_WEEK_IN_YEAR}. The day-of-week is adjusted as the
+     *  next or same matching day-of-week once the years and weeks have been handled.
+     * </ul>
+     *
+     * @param fieldValues  the map of fields to values, which can be updated, not null
+     * @param resolverStyle  the requested type of resolve, not null
+     * @return the resolved date, null if insufficient information to create a date
+     * @throws DateTimeException if the date cannot be resolved, typically
+     *  because of a conflict in the input data
+     */
+    @Override  // override for performance
+    public LocalDate resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        // check epoch-day before inventing era
+        if (fieldValues.containsKey(EPOCH_DAY)) {
+            return LocalDate.ofEpochDay(fieldValues.remove(EPOCH_DAY));
+        }
+
+        // fix proleptic month before inventing era
+        resolveProlepticMonth(fieldValues, resolverStyle);
+
+        // invent era if necessary to resolve year-of-era
+        resolveYearOfEra(fieldValues, resolverStyle);
+
+        // build date
+        if (fieldValues.containsKey(YEAR)) {
+            if (fieldValues.containsKey(MONTH_OF_YEAR)) {
+                if (fieldValues.containsKey(DAY_OF_MONTH)) {
+                    return resolveYMD(fieldValues, resolverStyle);
+                }
+                if (fieldValues.containsKey(ALIGNED_WEEK_OF_MONTH)) {
+                    if (fieldValues.containsKey(ALIGNED_DAY_OF_WEEK_IN_MONTH)) {
+                        return resolveYMAA(fieldValues, resolverStyle);
+                    }
+                    if (fieldValues.containsKey(DAY_OF_WEEK)) {
+                        return resolveYMAD(fieldValues, resolverStyle);
+                    }
+                }
+            }
+            if (fieldValues.containsKey(DAY_OF_YEAR)) {
+                return resolveYD(fieldValues, resolverStyle);
+            }
+            if (fieldValues.containsKey(ALIGNED_WEEK_OF_YEAR)) {
+                if (fieldValues.containsKey(ALIGNED_DAY_OF_WEEK_IN_YEAR)) {
+                    return resolveYAA(fieldValues, resolverStyle);
+                }
+                if (fieldValues.containsKey(DAY_OF_WEEK)) {
+                    return resolveYAD(fieldValues, resolverStyle);
+                }
+            }
+        }
+        return null;
+    }
+
+    private void resolveProlepticMonth(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        Long pMonth = fieldValues.remove(PROLEPTIC_MONTH);
+        if (pMonth != null) {
+            if (resolverStyle != ResolverStyle.LENIENT) {
+                PROLEPTIC_MONTH.checkValidValue(pMonth);
+            }
+            addFieldValue(fieldValues, MONTH_OF_YEAR, Math.floorMod(pMonth, 12) + 1);
+            addFieldValue(fieldValues, YEAR, Math.floorDiv(pMonth, 12));
+        }
+    }
+
+    private void resolveYearOfEra(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        Long yoeLong = fieldValues.remove(YEAR_OF_ERA);
+        if (yoeLong != null) {
+            if (resolverStyle != ResolverStyle.LENIENT) {
+                YEAR_OF_ERA.checkValidValue(yoeLong);
+            }
+            Long era = fieldValues.remove(ERA);
+            if (era == null) {
+                Long year = fieldValues.get(YEAR);
+                if (resolverStyle == ResolverStyle.STRICT) {
+                    // do not invent era if strict, but do cross-check with year
+                    if (year != null) {
+                        addFieldValue(fieldValues, YEAR, (year > 0 ? yoeLong: Math.subtractExact(1, yoeLong)));
+                    } else {
+                        // reinstate the field removed earlier, no cross-check issues
+                        fieldValues.put(YEAR_OF_ERA, yoeLong);
+                    }
+                } else {
+                    // invent era
+                    addFieldValue(fieldValues, YEAR, (year == null || year > 0 ? yoeLong: Math.subtractExact(1, yoeLong)));
+                }
+            } else if (era.longValue() == 1L) {
+                addFieldValue(fieldValues, YEAR, yoeLong);
+            } else if (era.longValue() == 0L) {
+                addFieldValue(fieldValues, YEAR, Math.subtractExact(1, yoeLong));
+            } else {
+                throw new DateTimeException("Invalid value for era: " + era);
+            }
+        }
+    }
+
+    private LocalDate resolveYMD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        int y = YEAR.checkValidIntValue(fieldValues.remove(YEAR));
+        if (resolverStyle == ResolverStyle.LENIENT) {
+            long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1);
+            long days = Math.subtractExact(fieldValues.remove(DAY_OF_MONTH), 1);
+            return LocalDate.of(y, 1, 1).plusMonths(months).plusDays(days);
+        }
+        int moy = MONTH_OF_YEAR.checkValidIntValue(fieldValues.remove(MONTH_OF_YEAR));
+        int dom = DAY_OF_MONTH.checkValidIntValue(fieldValues.remove(DAY_OF_MONTH));
+        if (resolverStyle == ResolverStyle.SMART) {  // previous valid
+            dom = Math.min(dom, Month.of(moy).length(Year.isLeap(y)));
+        }
+        return LocalDate.of(y, moy, dom);
+    }
+
+    private LocalDate resolveYD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        int y = YEAR.checkValidIntValue(fieldValues.remove(YEAR));
+        if (resolverStyle == ResolverStyle.LENIENT) {
+            long days = Math.subtractExact(fieldValues.remove(DAY_OF_YEAR), 1);
+            return LocalDate.of(y, 1, 1).plusDays(days);
+        }
+        int doy = DAY_OF_YEAR.checkValidIntValue(fieldValues.remove(DAY_OF_YEAR));
+        return LocalDate.ofYearDay(y, doy);  // smart is same as strict
+    }
+
+    private LocalDate resolveYMAA(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        int y = YEAR.checkValidIntValue(fieldValues.remove(YEAR));
+        if (resolverStyle == ResolverStyle.LENIENT) {
+            long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1);
+            long weeks = Math.subtractExact(fieldValues.remove(ALIGNED_WEEK_OF_MONTH), 1);
+            long days = Math.subtractExact(fieldValues.remove(ALIGNED_DAY_OF_WEEK_IN_MONTH), 1);
+            return LocalDate.of(y, 1, 1).plusMonths(months).plusWeeks(weeks).plusDays(days);
+        }
+        int moy = MONTH_OF_YEAR.checkValidIntValue(fieldValues.remove(MONTH_OF_YEAR));
+        int aw = ALIGNED_WEEK_OF_MONTH.checkValidIntValue(fieldValues.remove(ALIGNED_WEEK_OF_MONTH));
+        int ad = ALIGNED_DAY_OF_WEEK_IN_MONTH.checkValidIntValue(fieldValues.remove(ALIGNED_DAY_OF_WEEK_IN_MONTH));
+        LocalDate date = LocalDate.of(y, moy, 1).plusDays((aw - 1) * 7 + (ad - 1));
+        if (resolverStyle == ResolverStyle.STRICT && date.getMonthValue() != moy) {
+            throw new DateTimeException("Strict mode rejected resolved date as it is in a different month");
+        }
+        return date;
+    }
+
+    private LocalDate resolveYMAD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        int y = YEAR.checkValidIntValue(fieldValues.remove(YEAR));
+        if (resolverStyle == ResolverStyle.LENIENT) {
+            long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1);
+            long weeks = Math.subtractExact(fieldValues.remove(ALIGNED_WEEK_OF_MONTH), 1);
+            long dow = Math.subtractExact(fieldValues.remove(DAY_OF_WEEK), 1);
+            return resolveAligned(y, months, weeks, dow);
+        }
+        int moy = MONTH_OF_YEAR.checkValidIntValue(fieldValues.remove(MONTH_OF_YEAR));
+        int aw = ALIGNED_WEEK_OF_MONTH.checkValidIntValue(fieldValues.remove(ALIGNED_WEEK_OF_MONTH));
+        int dow = DAY_OF_WEEK.checkValidIntValue(fieldValues.remove(DAY_OF_WEEK));
+        LocalDate date = LocalDate.of(y, moy, 1).plusDays((aw - 1) * 7).with(nextOrSame(DayOfWeek.of(dow)));
+        if (resolverStyle == ResolverStyle.STRICT && date.getMonthValue() != moy) {
+            throw new DateTimeException("Strict mode rejected resolved date as it is in a different month");
+        }
+        return date;
+    }
+
+    private LocalDate resolveYAA(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        int y = YEAR.checkValidIntValue(fieldValues.remove(YEAR));
+        if (resolverStyle == ResolverStyle.LENIENT) {
+            long weeks = Math.subtractExact(fieldValues.remove(ALIGNED_WEEK_OF_YEAR), 1);
+            long days = Math.subtractExact(fieldValues.remove(ALIGNED_DAY_OF_WEEK_IN_YEAR), 1);
+            return LocalDate.of(y, 1, 1).plusWeeks(weeks).plusDays(days);
+        }
+        int aw = ALIGNED_WEEK_OF_YEAR.checkValidIntValue(fieldValues.remove(ALIGNED_WEEK_OF_YEAR));
+        int ad = ALIGNED_DAY_OF_WEEK_IN_YEAR.checkValidIntValue(fieldValues.remove(ALIGNED_DAY_OF_WEEK_IN_YEAR));
+        LocalDate date = LocalDate.of(y, 1, 1).plusDays((aw - 1) * 7 + (ad - 1));
+        if (resolverStyle == ResolverStyle.STRICT && date.getYear() != y) {
+            throw new DateTimeException("Strict mode rejected resolved date as it is in a different year");
+        }
+        return date;
+    }
+
+    private LocalDate resolveYAD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
+        int y = YEAR.checkValidIntValue(fieldValues.remove(YEAR));
+        if (resolverStyle == ResolverStyle.LENIENT) {
+            long weeks = Math.subtractExact(fieldValues.remove(ALIGNED_WEEK_OF_YEAR), 1);
+            long dow = Math.subtractExact(fieldValues.remove(DAY_OF_WEEK), 1);
+            return resolveAligned(y, 0, weeks, dow);
+        }
+        int aw = ALIGNED_WEEK_OF_YEAR.checkValidIntValue(fieldValues.remove(ALIGNED_WEEK_OF_YEAR));
+        int dow = DAY_OF_WEEK.checkValidIntValue(fieldValues.remove(DAY_OF_WEEK));
+        LocalDate date = LocalDate.of(y, 1, 1).plusDays((aw - 1) * 7).with(nextOrSame(DayOfWeek.of(dow)));
+        if (resolverStyle == ResolverStyle.STRICT && date.getYear() != y) {
+            throw new DateTimeException("Strict mode rejected resolved date as it is in a different year");
+        }
+        return date;
+    }
+
+    private LocalDate resolveAligned(int y, long months, long weeks, long dow) {
+        LocalDate date = LocalDate.of(y, 1, 1).plusMonths(months).plusWeeks(weeks);
+        if (dow > 7) {
+            date = date.plusWeeks((dow - 1) / 7);
+            dow = ((dow - 1) % 7) + 1;
+        } else if (dow < 1) {
+            date = date.plusWeeks(Math.subtractExact(dow,  7) / 7);
+            dow = ((dow + 6) % 7) + 1;
+        }
+        return date.with(nextOrSame(DayOfWeek.of((int) dow)));
+    }
+
+    //-----------------------------------------------------------------------
     @Override
     public ValueRange range(ChronoField field) {
         return field.range();
--- a/src/share/classes/java/time/chrono/IsoEra.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/IsoEra.java	Wed Apr 17 21:48:04 2013 -0700
@@ -61,16 +61,38 @@
  */
 package java.time.chrono;
 
-
 import java.time.DateTimeException;
-import java.time.LocalDate;
 
 /**
  * An era in the ISO calendar system.
  * <p>
  * The ISO-8601 standard does not define eras.
  * A definition has therefore been created with two eras - 'Current era' (CE) for
- * years from 0001-01-01 (ISO) and 'Before current era' (BCE) for years before that.
+ * years on or after 0001-01-01 (ISO), and 'Before current era' (BCE) for years before that.
+ * <p>
+ * <table summary="ISO years and eras" cellpadding="2" cellspacing="3" border="0" >
+ * <thead>
+ * <tr class="tableSubHeadingColor">
+ * <th class="colFirst" align="left">year-of-era</th>
+ * <th class="colFirst" align="left">era</th>
+ * <th class="colLast" align="left">proleptic-year</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr class="rowColor">
+ * <td>2</td><td>CE</td><td>2</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td>1</td><td>CE</td><td>1</td>
+ * </tr>
+ * <tr class="rowColor">
+ * <td>1</td><td>BCE</td><td>0</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td>2</td><td>BCE</td><td>-1</td>
+ * </tr>
+ * </tbody>
+ * </table>
  * <p>
  * <b>Do not use {@code ordinal()} to obtain the numeric representation of {@code IsoEra}.
  * Use {@code getValue()} instead.</b>
@@ -80,20 +102,16 @@
  *
  * @since 1.8
  */
-enum IsoEra implements Era {
+public enum IsoEra implements Era {
 
     /**
-     * The singleton instance for the era BCE, 'Before Current Era'.
-     * The 'ISO' part of the name emphasizes that this differs from the BCE
-     * era in the Gregorian calendar system.
-     * This has the numeric value of {@code 0}.
+     * The singleton instance for the era before the current one, 'Before Current Era',
+     * which has the numeric value 0.
      */
     BCE,
     /**
-     * The singleton instance for the era CE, 'Current Era'.
-     * The 'ISO' part of the name emphasizes that this differs from the CE
-     * era in the Gregorian calendar system.
-     * This has the numeric value of {@code 1}.
+     * The singleton instance for the current era, 'Current Era',
+     * which has the numeric value 1.
      */
     CE;
 
@@ -104,18 +122,18 @@
      * {@code IsoEra} is an enum representing the ISO eras of BCE/CE.
      * This factory allows the enum to be obtained from the {@code int} value.
      *
-     * @param era  the BCE/CE value to represent, from 0 (BCE) to 1 (CE)
+     * @param isoEra  the BCE/CE value to represent, from 0 (BCE) to 1 (CE)
      * @return the era singleton, not null
      * @throws DateTimeException if the value is invalid
      */
-    public static IsoEra of(int era) {
-        switch (era) {
+    public static IsoEra of(int isoEra) {
+        switch (isoEra) {
             case 0:
                 return BCE;
             case 1:
                 return CE;
             default:
-                throw new DateTimeException("Invalid era: " + era);
+                throw new DateTimeException("Invalid era: " + isoEra);
         }
     }
 
@@ -132,21 +150,4 @@
         return ordinal();
     }
 
-    @Override
-    public IsoChronology getChronology() {
-        return IsoChronology.INSTANCE;
-    }
-
-    // JDK8 default methods:
-    //-----------------------------------------------------------------------
-    @Override
-    public LocalDate date(int year, int month, int day) {
-        return getChronology().date(this, year, month, day);
-    }
-
-    @Override
-    public LocalDate dateYearDay(int year, int dayOfYear) {
-        return getChronology().dateYearDay(this, year, dayOfYear);
-    }
-
 }
--- a/src/share/classes/java/time/chrono/JapaneseChronology.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/JapaneseChronology.java	Wed Apr 17 21:48:04 2013 -0700
@@ -61,11 +61,11 @@
 import java.time.DateTimeException;
 import java.time.Instant;
 import java.time.LocalDate;
+import java.time.Year;
+import java.time.ZoneId;
 import java.time.temporal.ChronoField;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.ValueRange;
-import java.time.Year;
-import java.time.ZoneId;
 import java.util.Arrays;
 import java.util.Calendar;
 import java.util.List;
@@ -105,31 +105,6 @@
     public static final JapaneseChronology INSTANCE = new JapaneseChronology();
 
     /**
-     * The singleton instance for the before Meiji era ( - 1868-09-07)
-     * which has the value -999.
-     */
-    public static final Era ERA_SEIREKI = JapaneseEra.SEIREKI;
-    /**
-     * The singleton instance for the Meiji era (1868-09-08 - 1912-07-29)
-     * which has the value -1.
-     */
-    public static final Era ERA_MEIJI = JapaneseEra.MEIJI;
-    /**
-     * The singleton instance for the Taisho era (1912-07-30 - 1926-12-24)
-     * which has the value 0.
-     */
-    public static final Era ERA_TAISHO = JapaneseEra.TAISHO;
-    /**
-     * The singleton instance for the Showa era (1926-12-25 - 1989-01-07)
-     * which has the value 1.
-     */
-    public static final Era ERA_SHOWA = JapaneseEra.SHOWA;
-    /**
-     * The singleton instance for the Heisei era (1989-01-08 - current)
-     * which has the value 2.
-     */
-    public static final Era ERA_HEISEI = JapaneseEra.HEISEI;
-    /**
      * Serialization version.
      */
     private static final long serialVersionUID = 459996390165777884L;
@@ -141,15 +116,6 @@
     private JapaneseChronology() {
     }
 
-    /**
-     * Resolve singleton.
-     *
-     * @return the singleton instance, not null
-     */
-    private Object readResolve() {
-        return INSTANCE;
-    }
-
     //-----------------------------------------------------------------------
     /**
      * Gets the ID of the chronology - 'Japanese'.
@@ -183,36 +149,82 @@
     }
 
     //-----------------------------------------------------------------------
+    /**
+     * Obtains a local date in Japanese calendar system from the
+     * era, year-of-era, month-of-year and day-of-month fields.
+     *
+     * @param era  the Japanese era, not null
+     * @param yearOfEra  the year-of-era
+     * @param month  the month-of-year
+     * @param dayOfMonth  the day-of-month
+     * @return the Japanese local date, not null
+     * @throws DateTimeException if unable to create the date
+     * @throws ClassCastException if the {@code era} is not a {@code JapaneseEra}
+     */
     @Override
     public JapaneseDate date(Era era, int yearOfEra, int month, int dayOfMonth) {
         if (era instanceof JapaneseEra == false) {
-            throw new DateTimeException("Era must be JapaneseEra");
+            throw new ClassCastException("Era must be JapaneseEra");
         }
         return JapaneseDate.of((JapaneseEra) era, yearOfEra, month, dayOfMonth);
     }
 
+    /**
+     * Obtains a local date in Japanese calendar system from the
+     * proleptic-year, month-of-year and day-of-month fields.
+     *
+     * @param prolepticYear  the proleptic-year
+     * @param month  the month-of-year
+     * @param dayOfMonth  the day-of-month
+     * @return the Japanese local date, not null
+     * @throws DateTimeException if unable to create the date
+     */
     @Override
     public JapaneseDate date(int prolepticYear, int month, int dayOfMonth) {
         return new JapaneseDate(LocalDate.of(prolepticYear, month, dayOfMonth));
     }
 
+    /**
+     * Obtains a local date in Japanese calendar system from the
+     * era, year-of-era and day-of-year fields.
+     *
+     * @param era  the Japanese era, not null
+     * @param yearOfEra  the year-of-era
+     * @param dayOfYear  the day-of-year
+     * @return the Japanese local date, not null
+     * @throws DateTimeException if unable to create the date
+     * @throws ClassCastException if the {@code era} is not a {@code JapaneseEra}
+     */
+    @Override
+    public JapaneseDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
+        return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
+    }
+
+    /**
+     * Obtains a local date in Japanese calendar system from the
+     * proleptic-year and day-of-year fields.
+     *
+     * @param prolepticYear  the proleptic-year
+     * @param dayOfYear  the day-of-year
+     * @return the Japanese local date, not null
+     * @throws DateTimeException if unable to create the date
+     */
     @Override
     public JapaneseDate dateYearDay(int prolepticYear, int dayOfYear) {
         LocalDate date = LocalDate.ofYearDay(prolepticYear, dayOfYear);
         return date(prolepticYear, date.getMonthValue(), date.getDayOfMonth());
     }
 
-    @Override
-    public JapaneseDate date(TemporalAccessor temporal) {
-        if (temporal instanceof JapaneseDate) {
-            return (JapaneseDate) temporal;
-        }
-        return new JapaneseDate(LocalDate.from(temporal));
-    }
-
-    @Override
-    public JapaneseDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
-        return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
+    /**
+     * Obtains a local date in the Japanese calendar system from the epoch-day.
+     *
+     * @param epochDay  the epoch day
+     * @return the Japanese local date, not null
+     * @throws DateTimeException if unable to create the date
+     */
+    @Override  // override with covariant return type
+    public JapaneseDate dateEpochDay(long epochDay) {
+        return new JapaneseDate(LocalDate.ofEpochDay(epochDay));
     }
 
     @Override
@@ -231,6 +243,14 @@
     }
 
     @Override
+    public JapaneseDate date(TemporalAccessor temporal) {
+        if (temporal instanceof JapaneseDate) {
+            return (JapaneseDate) temporal;
+        }
+        return new JapaneseDate(LocalDate.from(temporal));
+    }
+
+    @Override
     public ChronoLocalDateTime<JapaneseDate> localDateTime(TemporalAccessor temporal) {
         return (ChronoLocalDateTime<JapaneseDate>)super.localDateTime(temporal);
     }
@@ -264,7 +284,7 @@
     @Override
     public int prolepticYear(Era era, int yearOfEra) {
         if (era instanceof JapaneseEra == false) {
-            throw new DateTimeException("Era must be JapaneseEra");
+            throw new ClassCastException("Era must be JapaneseEra");
         }
         JapaneseEra jera = (JapaneseEra) era;
         int gregorianYear = jera.getPrivateEra().getSinceDate().getYear() + yearOfEra - 1;
@@ -273,20 +293,23 @@
         }
         LocalGregorianCalendar.Date jdate = JCAL.newCalendarDate(null);
         jdate.setEra(jera.getPrivateEra()).setDate(yearOfEra, 1, 1);
+        if (!JapaneseChronology.JCAL.validate(jdate)) {
+            throw new DateTimeException("Invalid yearOfEra value");
+        }
         JCAL.normalize(jdate);
         if (jdate.getNormalizedYear() == gregorianYear) {
             return gregorianYear;
         }
-        throw new DateTimeException("invalid yearOfEra value");
+        throw new DateTimeException("Invalid yearOfEra value");
     }
 
     /**
      * Returns the calendar system era object from the given numeric value.
      *
      * See the description of each Era for the numeric values of:
-     * {@link #ERA_HEISEI}, {@link #ERA_SHOWA},{@link #ERA_TAISHO},
-     * {@link #ERA_MEIJI}), only Meiji and later eras are supported.
-     * Prior to Meiji {@link #ERA_SEIREKI} is used.
+     * {@link JapaneseEra#HEISEI}, {@link JapaneseEra#SHOWA},{@link JapaneseEra#TAISHO},
+     * {@link JapaneseEra#MEIJI}), only Meiji and later eras are supported.
+     * Prior to Meiji {@link JapaneseEra#SEIREKI} is used.
      *
      * @param eraValue  the era value
      * @return the Japanese {@code Era} for the given numeric era value
@@ -299,7 +322,7 @@
 
     @Override
     public List<Era> eras() {
-        return Arrays.<Era>asList(JapaneseEra.values());
+        return Arrays.asList(JapaneseEra.values());
     }
 
     //-----------------------------------------------------------------------
@@ -322,20 +345,24 @@
             case NANO_OF_SECOND:
             case CLOCK_HOUR_OF_DAY:
             case CLOCK_HOUR_OF_AMPM:
-            case EPOCH_DAY:
-            case EPOCH_MONTH:
+            case EPOCH_DAY:  // TODO: if year is restricted, then so is epoch-day
                 return field.range();
         }
         Calendar jcal = Calendar.getInstance(LOCALE);
         int fieldIndex;
         switch (field) {
             case ERA:
-                return ValueRange.of(jcal.getMinimum(Calendar.ERA) - JapaneseEra.ERA_OFFSET,
+                return ValueRange.of(JapaneseEra.SEIREKI.getValue(),
                         jcal.getMaximum(Calendar.ERA) - JapaneseEra.ERA_OFFSET);
             case YEAR:
             case YEAR_OF_ERA:
+                // TODO: this is not right
                 return ValueRange.of(Year.MIN_VALUE, jcal.getGreatestMinimum(Calendar.YEAR),
                         jcal.getLeastMaximum(Calendar.YEAR), Year.MAX_VALUE);
+            case PROLEPTIC_MONTH:
+                // TODO: should be the range of months bound by the valid range of years
+                return ValueRange.of((jcal.getGreatestMinimum(Calendar.YEAR) - 1) * 12,
+                        (jcal.getLeastMaximum(Calendar.YEAR)) * 12);
             case MONTH_OF_YEAR:
                 return ValueRange.of(jcal.getMinimum(Calendar.MONTH) + 1, jcal.getGreatestMinimum(Calendar.MONTH) + 1,
                         jcal.getLeastMaximum(Calendar.MONTH) + 1, jcal.getMaximum(Calendar.MONTH) + 1);
--- a/src/share/classes/java/time/chrono/JapaneseDate.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/JapaneseDate.java	Wed Apr 17 21:48:04 2013 -0700
@@ -69,14 +69,16 @@
 import java.time.LocalDate;
 import java.time.LocalTime;
 import java.time.Period;
+import java.time.Year;
 import java.time.ZoneId;
 import java.time.temporal.ChronoField;
-import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
 import java.util.Calendar;
 import java.util.Objects;
@@ -191,7 +193,7 @@
      */
     public static JapaneseDate of(Era era, int yearOfEra, int month, int dayOfMonth) {
         if (era instanceof JapaneseEra == false) {
-            throw new DateTimeException("Era must be JapaneseEra");
+            throw new ClassCastException("Era must be JapaneseEra");
         }
         return JapaneseDate.of((JapaneseEra) era, yearOfEra, month, dayOfMonth);
     }
@@ -252,7 +254,7 @@
         LocalGregorianCalendar.Date jdate = JapaneseChronology.JCAL.newCalendarDate(null);
         jdate.setEra(era.getPrivateEra()).setDate(yearOfEra, month, dayOfMonth);
         if (!JapaneseChronology.JCAL.validate(jdate)) {
-            throw new IllegalArgumentException();
+            throw new DateTimeException("year, month, and day not valid for Era");
         }
         LocalDate date = LocalDate.of(jdate.getNormalizedYear(), month, dayOfMonth);
         return new JapaneseDate(era, yearOfEra, date);
@@ -307,22 +309,54 @@
     }
 
     //-----------------------------------------------------------------------
+    /**
+     * Gets the chronology of this date, which is the Japanese calendar system.
+     * <p>
+     * The {@code Chronology} represents the calendar system in use.
+     * The era and other fields in {@link ChronoField} are defined by the chronology.
+     *
+     * @return the Japanese chronology, not null
+     */
     @Override
     public JapaneseChronology getChronology() {
         return JapaneseChronology.INSTANCE;
     }
 
+    /**
+     * Gets the era applicable at this date.
+     * <p>
+     * The Japanese calendar system has multiple eras defined by {@link JapaneseEra}.
+     *
+     * @return the era applicable at this date, not null
+     */
+    @Override
+    public JapaneseEra getEra() {
+        return era;
+    }
+
+    /**
+     * Returns the length of the month represented by this date.
+     * <p>
+     * This returns the length of the month in days.
+     * Month lengths match those of the ISO calendar system.
+     *
+     * @return the length of the month in days
+     */
     @Override
     public int lengthOfMonth() {
         return isoDate.lengthOfMonth();
     }
 
+    //-----------------------------------------------------------------------
     @Override
     public ValueRange range(TemporalField field) {
         if (field instanceof ChronoField) {
             if (isSupported(field)) {
                 ChronoField f = (ChronoField) field;
                 switch (f) {
+                    case DAY_OF_MONTH:
+                    case ALIGNED_WEEK_OF_MONTH:
+                        return isoDate.range(field);
                     case DAY_OF_YEAR:
                         return actualRange(Calendar.DAY_OF_YEAR);
                     case YEAR_OF_ERA:
@@ -330,14 +364,14 @@
                 }
                 return getChronology().range(f);
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.rangeRefinedBy(this);
     }
 
     private ValueRange actualRange(int calendarField) {
         Calendar jcal = Calendar.getInstance(JapaneseChronology.LOCALE);
-        jcal.set(Calendar.ERA, era.getValue() + JapaneseEra.ERA_OFFSET);
+        jcal.set(Calendar.ERA, era.getValue() + JapaneseEra.ERA_OFFSET);  // TODO: cannot calculate this way for SEIREKI
         jcal.set(yearOfEra, isoDate.getMonthValue() - 1, isoDate.getDayOfMonth());
         return ValueRange.of(jcal.getActualMinimum(calendarField),
                 jcal.getActualMaximum(calendarField));
@@ -346,6 +380,12 @@
     @Override
     public long getLong(TemporalField field) {
         if (field instanceof ChronoField) {
+            // same as ISO:
+            // DAY_OF_WEEK, ALIGNED_DAY_OF_WEEK_IN_MONTH, DAY_OF_MONTH, EPOCH_DAY,
+            // ALIGNED_WEEK_OF_MONTH, MONTH_OF_YEAR, PROLEPTIC_MONTH, YEAR
+            //
+            // calendar specific fields
+            // ALIGNED_DAY_OF_WEEK_IN_YEAR, DAY_OF_YEAR, ALIGNED_WEEK_OF_YEAR, YEAR_OF_ERA, ERA
             switch ((ChronoField) field) {
                 case YEAR_OF_ERA:
                     return yearOfEra;
@@ -355,8 +395,8 @@
                     LocalGregorianCalendar.Date jdate = toPrivateJapaneseDate(isoDate);
                     return JapaneseChronology.JCAL.getDayOfYear(jdate);
                 }
+                // TODO: ALIGNED_DAY_OF_WEEK_IN_YEAR and ALIGNED_WEEK_OF_YEAR ???
             }
-            // TODO: review other fields
             return isoDate.getLong(field);
         }
         return field.getFrom(this);
@@ -392,8 +432,7 @@
                 case YEAR_OF_ERA:
                 case YEAR:
                 case ERA: {
-                    f.checkValidValue(newValue);
-                    int nvalue = (int) newValue;
+                    int nvalue = getChronology().range(f).checkValidIntValue(newValue, f);
                     switch (f) {
                         case YEAR_OF_ERA:
                             return this.withYear(nvalue);
@@ -405,15 +444,11 @@
                     }
                 }
             }
+            // YEAR, PROLEPTIC_MONTH and others are same as ISO
             // TODO: review other fields, such as WEEK_OF_YEAR
             return with(isoDate.with(field, newValue));
         }
-        return (JapaneseDate) ChronoLocalDate.super.with(field, newValue);
-    }
-
-    @Override
-    public Era getEra() {
-        return era;
+        return ChronoLocalDate.super.with(field, newValue);
     }
 
     /**
@@ -423,7 +458,7 @@
      */
     @Override
     public  JapaneseDate with(TemporalAdjuster adjuster) {
-        return (JapaneseDate)super.with(adjuster);
+        return super.with(adjuster);
     }
 
     /**
@@ -433,7 +468,7 @@
      */
     @Override
     public JapaneseDate plus(TemporalAmount amount) {
-        return (JapaneseDate)super.plus(amount);
+        return super.plus(amount);
     }
 
     /**
@@ -443,7 +478,7 @@
      */
     @Override
     public JapaneseDate minus(TemporalAmount amount) {
-        return (JapaneseDate)super.minus(amount);
+        return super.minus(amount);
     }
     //-----------------------------------------------------------------------
     /**
@@ -479,7 +514,7 @@
      * @throws DateTimeException if {@code year} is invalid
      */
     private JapaneseDate withYear(int year) {
-        return withYear((JapaneseEra) getEra(), year);
+        return withYear(getEra(), year);
     }
 
     //-----------------------------------------------------------------------
@@ -505,32 +540,32 @@
 
     @Override
     public JapaneseDate plus(long amountToAdd, TemporalUnit unit) {
-        return (JapaneseDate)super.plus(amountToAdd, unit);
+        return super.plus(amountToAdd, unit);
     }
 
     @Override
     public JapaneseDate minus(long amountToAdd, TemporalUnit unit) {
-        return (JapaneseDate)super.minus(amountToAdd, unit);
+        return super.minus(amountToAdd, unit);
     }
 
     @Override
     JapaneseDate minusYears(long yearsToSubtract) {
-        return (JapaneseDate)super.minusYears(yearsToSubtract);
+        return super.minusYears(yearsToSubtract);
     }
 
     @Override
     JapaneseDate minusMonths(long monthsToSubtract) {
-        return (JapaneseDate)super.minusMonths(monthsToSubtract);
+        return super.minusMonths(monthsToSubtract);
     }
 
     @Override
     JapaneseDate minusWeeks(long weeksToSubtract) {
-        return (JapaneseDate)super.minusWeeks(weeksToSubtract);
+        return super.minusWeeks(weeksToSubtract);
     }
 
     @Override
     JapaneseDate minusDays(long daysToSubtract) {
-        return (JapaneseDate)super.minusDays(daysToSubtract);
+        return super.minusDays(daysToSubtract);
     }
 
     private JapaneseDate with(LocalDate newDate) {
@@ -539,7 +574,7 @@
 
     @Override        // for javadoc and covariant return type
     public final ChronoLocalDateTime<JapaneseDate> atTime(LocalTime localTime) {
-        return (ChronoLocalDateTime<JapaneseDate>)super.atTime(localTime);
+        return super.atTime(localTime);
     }
 
     @Override
--- a/src/share/classes/java/time/chrono/JapaneseEra.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/JapaneseEra.java	Wed Apr 17 21:48:04 2013 -0700
@@ -24,6 +24,11 @@
  */
 
 /*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
  * Copyright (c) 2012, Stephen Colebourne & Michael Nascimento Santos
  *
  * All rights reserved.
@@ -56,6 +61,8 @@
  */
 package java.time.chrono;
 
+import static java.time.temporal.ChronoField.ERA;
+
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
@@ -64,7 +71,12 @@
 import java.io.Serializable;
 import java.time.DateTimeException;
 import java.time.LocalDate;
+import java.time.temporal.ChronoField;
+import java.time.temporal.TemporalField;
+import java.time.temporal.UnsupportedTemporalTypeException;
+import java.time.temporal.ValueRange;
 import java.util.Arrays;
+import java.util.Objects;
 
 import sun.util.calendar.CalendarDate;
 
@@ -84,7 +96,7 @@
  *
  * @since 1.8
  */
-final class JapaneseEra
+public final class JapaneseEra
         implements Era, Serializable {
 
     // The offset value to 0-based index from the era value.
@@ -202,7 +214,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Obtains an instance of {@code JapaneseEra} from a value.
+     * Obtains an instance of {@code JapaneseEra} from an {@code int} value.
      * <p>
      * The {@link #SHOWA} era that contains 1970-01-01 (ISO calendar system) has the value 1
      * Later era is numbered 2 ({@link #HEISEI}). Earlier eras are numbered 0 ({@link #TAISHO}),
@@ -210,22 +222,49 @@
      * {@link #SEIREKI} is used.
      *
      * @param japaneseEra  the era to represent
-     * @return the {@code JapaneseEra} singleton, never null
-     * @throws DateTimeException if {@code japaneseEra} is invalid
+     * @return the {@code JapaneseEra} singleton, not null
+     * @throws DateTimeException if the value is invalid
      */
     public static JapaneseEra of(int japaneseEra) {
         if (japaneseEra != SEIREKI.eraValue &&
             (japaneseEra < MEIJI.eraValue || japaneseEra > HEISEI.eraValue)) {
-            throw new DateTimeException("japaneseEra is invalid");
+            throw new DateTimeException("Invalid era: " + japaneseEra);
         }
         return KNOWN_ERAS[ordinal(japaneseEra)];
     }
 
     /**
+     * Returns the {@code JapaneseEra} with the name.
+     * <p>
+     * The string must match exactly the name of the era.
+     * (Extraneous whitespace characters are not permitted.)
+     *
+     * @param japaneseEra  the japaneseEra name; non-null
+     * @return the {@code JapaneseEra} singleton, never null
+     * @throws IllegalArgumentException if there is not JapaneseEra with the specified name
+     */
+    public static JapaneseEra valueOf(String japaneseEra) {
+        Objects.requireNonNull(japaneseEra, "japaneseEra");
+        for (JapaneseEra era : KNOWN_ERAS) {
+            if (era.getName().equals(japaneseEra)) {
+                return era;
+            }
+        }
+        throw new IllegalArgumentException("japaneseEra is invalid");
+    }
+
+    /**
      * Returns an array of JapaneseEras.
+     * <p>
+     * This method may be used to iterate over the JapaneseEras as follows:
+     * <pre>
+     * for (JapaneseEra c : JapaneseEra.values())
+     *     System.out.println(c);
+     * </pre>
+     *
      * @return an array of JapaneseEras
      */
-    static JapaneseEra[] values() {
+    public static JapaneseEra[] values() {
         return Arrays.copyOf(KNOWN_ERAS, KNOWN_ERAS.length);
     }
 
@@ -268,16 +307,17 @@
     /**
      * Returns the index into the arrays from the Era value.
      * the eraValue is a valid Era number, -999, -1..2.
-     * @param eravalue the era value to convert to the index
+     *
+     * @param eraValue  the era value to convert to the index
      * @return the index of the current Era
      */
-    private static int ordinal(int eravalue) {
-        return (eravalue == SEIREKI.eraValue) ? 0 : eravalue + ERA_OFFSET;
+    private static int ordinal(int eraValue) {
+        return (eraValue == SEIREKI.eraValue) ? 0 : eraValue + ERA_OFFSET;
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the numeric value of this {@code JapaneseEra}.
+     * Gets the numeric era {@code int} value.
      * <p>
      * The {@link #SHOWA} era that contains 1970-01-01 (ISO calendar system) has the value 1.
      * Later eras are numbered from 2 ({@link #HEISEI}).
@@ -290,9 +330,38 @@
         return eraValue;
     }
 
-    @Override
-    public JapaneseChronology getChronology() {
-        return JapaneseChronology.INSTANCE;
+    //-----------------------------------------------------------------------
+    /**
+     * Gets the range of valid values for the specified field.
+     * <p>
+     * The range object expresses the minimum and maximum valid values for a field.
+     * This era is used to enhance the accuracy of the returned range.
+     * If it is not possible to return the range, because the field is not supported
+     * or for some other reason, an exception is thrown.
+     * <p>
+     * If the field is a {@link ChronoField} then the query is implemented here.
+     * The {@code ERA} field returns the range.
+     * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
+     * <p>
+     * If the field is not a {@code ChronoField}, then the result of this method
+     * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}
+     * passing {@code this} as the argument.
+     * Whether the range can be obtained is determined by the field.
+     * <p>
+     * The range of valid Japanese eras can change over time due to the nature
+     * of the Japanese calendar system.
+     *
+     * @param field  the field to query the range for, not null
+     * @return the range of valid values for the field, not null
+     * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
+     */
+    @Override  // override as super would return range from 0 to 1
+    public ValueRange range(TemporalField field) {
+        if (field == ERA) {
+            return JapaneseChronology.INSTANCE.range(ERA);
+        }
+        return Era.super.range(field);
     }
 
     //-----------------------------------------------------------------------
--- a/src/share/classes/java/time/chrono/MinguoChronology.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/MinguoChronology.java	Wed Apr 17 21:48:04 2013 -0700
@@ -56,6 +56,7 @@
  */
 package java.time.chrono;
 
+import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
 import static java.time.temporal.ChronoField.YEAR;
 
 import java.io.Serializable;
@@ -107,16 +108,6 @@
     public static final MinguoChronology INSTANCE = new MinguoChronology();
 
     /**
-     * The singleton instance for the era ROC.
-     */
-    public static final Era ERA_ROC = MinguoEra.ROC;
-
-    /**
-     * The singleton instance for the era BEFORE_ROC.
-     */
-    public static final Era ERA_BEFORE_ROC = MinguoEra.BEFORE_ROC;
-
-    /**
      * Serialization version.
      */
     private static final long serialVersionUID = 1039765215346859963L;
@@ -131,15 +122,6 @@
     private MinguoChronology() {
     }
 
-    /**
-     * Resolve singleton.
-     *
-     * @return the singleton instance, not null
-     */
-    private Object readResolve() {
-        return INSTANCE;
-    }
-
     //-----------------------------------------------------------------------
     /**
      * Gets the ID of the chronology - 'Minguo'.
@@ -173,32 +155,78 @@
     }
 
     //-----------------------------------------------------------------------
+    /**
+     * Obtains a local date in Minguo calendar system from the
+     * era, year-of-era, month-of-year and day-of-month fields.
+     *
+     * @param era  the Minguo era, not null
+     * @param yearOfEra  the year-of-era
+     * @param month  the month-of-year
+     * @param dayOfMonth  the day-of-month
+     * @return the Minguo local date, not null
+     * @throws DateTimeException if unable to create the date
+     * @throws ClassCastException if the {@code era} is not a {@code MinguoEra}
+     */
+    @Override
+    public MinguoDate date(Era era, int yearOfEra, int month, int dayOfMonth) {
+        return date(prolepticYear(era, yearOfEra), month, dayOfMonth);
+    }
+
+    /**
+     * Obtains a local date in Minguo calendar system from the
+     * proleptic-year, month-of-year and day-of-month fields.
+     *
+     * @param prolepticYear  the proleptic-year
+     * @param month  the month-of-year
+     * @param dayOfMonth  the day-of-month
+     * @return the Minguo local date, not null
+     * @throws DateTimeException if unable to create the date
+     */
     @Override
     public MinguoDate date(int prolepticYear, int month, int dayOfMonth) {
         return new MinguoDate(LocalDate.of(prolepticYear + YEARS_DIFFERENCE, month, dayOfMonth));
     }
 
+    /**
+     * Obtains a local date in Minguo calendar system from the
+     * era, year-of-era and day-of-year fields.
+     *
+     * @param era  the Minguo era, not null
+     * @param yearOfEra  the year-of-era
+     * @param dayOfYear  the day-of-year
+     * @return the Minguo local date, not null
+     * @throws DateTimeException if unable to create the date
+     * @throws ClassCastException if the {@code era} is not a {@code MinguoEra}
+     */
+    @Override
+    public MinguoDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
+        return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
+    }
+
+    /**
+     * Obtains a local date in Minguo calendar system from the
+     * proleptic-year and day-of-year fields.
+     *
+     * @param prolepticYear  the proleptic-year
+     * @param dayOfYear  the day-of-year
+     * @return the Minguo local date, not null
+     * @throws DateTimeException if unable to create the date
+     */
     @Override
     public MinguoDate dateYearDay(int prolepticYear, int dayOfYear) {
         return new MinguoDate(LocalDate.ofYearDay(prolepticYear + YEARS_DIFFERENCE, dayOfYear));
     }
 
-    @Override
-    public MinguoDate date(TemporalAccessor temporal) {
-        if (temporal instanceof MinguoDate) {
-            return (MinguoDate) temporal;
-        }
-        return new MinguoDate(LocalDate.from(temporal));
-    }
-    @Override
-    public MinguoDate date(Era era, int yearOfEra, int month, int dayOfMonth) {
-        return date(prolepticYear(era, yearOfEra), month, dayOfMonth);
-
-    }
-
-    @Override
-    public MinguoDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
-        return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
+    /**
+     * Obtains a local date in the Minguo calendar system from the epoch-day.
+     *
+     * @param epochDay  the epoch day
+     * @return the Minguo local date, not null
+     * @throws DateTimeException if unable to create the date
+     */
+    @Override  // override with covariant return type
+    public MinguoDate dateEpochDay(long epochDay) {
+        return new MinguoDate(LocalDate.ofEpochDay(epochDay));
     }
 
     @Override
@@ -217,6 +245,14 @@
     }
 
     @Override
+    public MinguoDate date(TemporalAccessor temporal) {
+        if (temporal instanceof MinguoDate) {
+            return (MinguoDate) temporal;
+        }
+        return new MinguoDate(LocalDate.from(temporal));
+    }
+
+    @Override
     public ChronoLocalDateTime<MinguoDate> localDateTime(TemporalAccessor temporal) {
         return (ChronoLocalDateTime<MinguoDate>)super.localDateTime(temporal);
     }
@@ -250,7 +286,7 @@
     @Override
     public int prolepticYear(Era era, int yearOfEra) {
         if (era instanceof MinguoEra == false) {
-            throw new DateTimeException("Era must be MinguoEra");
+            throw new ClassCastException("Era must be MinguoEra");
         }
         return (era == MinguoEra.ROC ? yearOfEra : 1 - yearOfEra);
     }
@@ -269,6 +305,10 @@
     @Override
     public ValueRange range(ChronoField field) {
         switch (field) {
+            case PROLEPTIC_MONTH: {
+                ValueRange range = PROLEPTIC_MONTH.range();
+                return ValueRange.of(range.getMinimum() - YEARS_DIFFERENCE * 12L, range.getMaximum() - YEARS_DIFFERENCE * 12L);
+            }
             case YEAR_OF_ERA: {
                 ValueRange range = YEAR.range();
                 return ValueRange.of(1, range.getMaximum() - YEARS_DIFFERENCE, -range.getMinimum() + 1 + YEARS_DIFFERENCE);
--- a/src/share/classes/java/time/chrono/MinguoDate.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/MinguoDate.java	Wed Apr 17 21:48:04 2013 -0700
@@ -72,12 +72,13 @@
 import java.time.Period;
 import java.time.ZoneId;
 import java.time.temporal.ChronoField;
-import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
 import java.util.Objects;
 
@@ -205,16 +206,46 @@
     }
 
     //-----------------------------------------------------------------------
+    /**
+     * Gets the chronology of this date, which is the Minguo calendar system.
+     * <p>
+     * The {@code Chronology} represents the calendar system in use.
+     * The era and other fields in {@link ChronoField} are defined by the chronology.
+     *
+     * @return the Minguo chronology, not null
+     */
     @Override
     public MinguoChronology getChronology() {
         return MinguoChronology.INSTANCE;
     }
 
+    /**
+     * Gets the era applicable at this date.
+     * <p>
+     * The Minguo calendar system has two eras, 'ROC' and 'BEFORE_ROC',
+     * defined by {@link MinguoEra}.
+     *
+     * @return the era applicable at this date, not null
+     */
+    @Override
+    public MinguoEra getEra() {
+        return (getProlepticYear() >= 1 ? MinguoEra.ROC : MinguoEra.BEFORE_ROC);
+    }
+
+    /**
+     * Returns the length of the month represented by this date.
+     * <p>
+     * This returns the length of the month in days.
+     * Month lengths match those of the ISO calendar system.
+     *
+     * @return the length of the month in days
+     */
     @Override
     public int lengthOfMonth() {
         return isoDate.lengthOfMonth();
     }
 
+    //-----------------------------------------------------------------------
     @Override
     public ValueRange range(TemporalField field) {
         if (field instanceof ChronoField) {
@@ -233,7 +264,7 @@
                 }
                 return getChronology().range(f);
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.rangeRefinedBy(this);
     }
@@ -242,6 +273,8 @@
     public long getLong(TemporalField field) {
         if (field instanceof ChronoField) {
             switch ((ChronoField) field) {
+                case PROLEPTIC_MONTH:
+                    return getProlepticMonth();
                 case YEAR_OF_ERA: {
                     int prolepticYear = getProlepticYear();
                     return (prolepticYear >= 1 ? prolepticYear : 1 - prolepticYear);
@@ -256,6 +289,10 @@
         return field.getFrom(this);
     }
 
+    private long getProlepticMonth() {
+        return getProlepticYear() * 12L + isoDate.getMonthValue() - 1;
+    }
+
     private int getProlepticYear() {
         return isoDate.getYear() - YEARS_DIFFERENCE;
     }
@@ -269,11 +306,13 @@
                 return this;
             }
             switch (f) {
+                case PROLEPTIC_MONTH:
+                    getChronology().range(f).checkValidValue(newValue, f);
+                    return plusMonths(newValue - getProlepticMonth());
                 case YEAR_OF_ERA:
                 case YEAR:
                 case ERA: {
-                    f.checkValidValue(newValue);
-                    int nvalue = (int) newValue;
+                    int nvalue = getChronology().range(f).checkValidIntValue(newValue, f);
                     switch (f) {
                         case YEAR_OF_ERA:
                             return with(isoDate.withYear(getProlepticYear() >= 1 ? nvalue + YEARS_DIFFERENCE : (1 - nvalue)  + YEARS_DIFFERENCE));
@@ -286,7 +325,7 @@
             }
             return with(isoDate.with(field, newValue));
         }
-        return (MinguoDate) ChronoLocalDate.super.with(field, newValue);
+        return ChronoLocalDate.super.with(field, newValue);
     }
 
     /**
@@ -296,7 +335,7 @@
      */
     @Override
     public  MinguoDate with(TemporalAdjuster adjuster) {
-        return (MinguoDate)super.with(adjuster);
+        return super.with(adjuster);
     }
 
     /**
@@ -306,7 +345,7 @@
      */
     @Override
     public MinguoDate plus(TemporalAmount amount) {
-        return (MinguoDate)super.plus(amount);
+        return super.plus(amount);
     }
 
     /**
@@ -316,7 +355,7 @@
      */
     @Override
     public MinguoDate minus(TemporalAmount amount) {
-        return (MinguoDate)super.minus(amount);
+        return super.minus(amount);
     }
 
     //-----------------------------------------------------------------------
@@ -337,37 +376,37 @@
 
     @Override
     public MinguoDate plus(long amountToAdd, TemporalUnit unit) {
-        return (MinguoDate)super.plus(amountToAdd, unit);
+        return super.plus(amountToAdd, unit);
     }
 
     @Override
     public MinguoDate minus(long amountToAdd, TemporalUnit unit) {
-        return (MinguoDate)super.minus(amountToAdd, unit);
+        return super.minus(amountToAdd, unit);
     }
 
     @Override
     MinguoDate plusWeeks(long weeksToAdd) {
-        return (MinguoDate)super.plusWeeks(weeksToAdd);
+        return super.plusWeeks(weeksToAdd);
     }
 
     @Override
     MinguoDate minusYears(long yearsToSubtract) {
-        return (MinguoDate)super.minusYears(yearsToSubtract);
+        return super.minusYears(yearsToSubtract);
     }
 
     @Override
     MinguoDate minusMonths(long monthsToSubtract) {
-        return (MinguoDate)super.minusMonths(monthsToSubtract);
+        return super.minusMonths(monthsToSubtract);
     }
 
     @Override
     MinguoDate minusWeeks(long weeksToSubtract) {
-        return (MinguoDate)super.minusWeeks(weeksToSubtract);
+        return super.minusWeeks(weeksToSubtract);
     }
 
     @Override
     MinguoDate minusDays(long daysToSubtract) {
-        return (MinguoDate)super.minusDays(daysToSubtract);
+        return super.minusDays(daysToSubtract);
     }
 
     private MinguoDate with(LocalDate newDate) {
@@ -376,7 +415,7 @@
 
     @Override        // for javadoc and covariant return type
     public final ChronoLocalDateTime<MinguoDate> atTime(LocalTime localTime) {
-        return (ChronoLocalDateTime<MinguoDate>)super.atTime(localTime);
+        return super.atTime(localTime);
     }
 
     @Override
@@ -419,7 +458,7 @@
         out.writeByte(get(DAY_OF_MONTH));
     }
 
-    static ChronoLocalDate readExternal(DataInput in) throws IOException {
+    static ChronoLocalDate<?> readExternal(DataInput in) throws IOException {
         int year = in.readInt();
         int month = in.readByte();
         int dayOfMonth = in.readByte();
--- a/src/share/classes/java/time/chrono/MinguoEra.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/MinguoEra.java	Wed Apr 17 21:48:04 2013 -0700
@@ -24,6 +24,11 @@
  */
 
 /*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
  * Copyright (c) 2012, Stephen Colebourne & Michael Nascimento Santos
  *
  * All rights reserved.
@@ -65,7 +70,34 @@
  * An era in the Minguo calendar system.
  * <p>
  * The Minguo calendar system has two eras.
- * The date {@code 0001-01-01 (Minguo)} is equal to {@code 1912-01-01 (ISO)}.
+ * The current era, for years from 1 onwards, is known as the 'Republic of China' era.
+ * All previous years, zero or earlier in the proleptic count or one and greater
+ * in the year-of-era count, are part of the 'Before Republic of China' era.
+ * <p>
+ * <table summary="Minguo years and eras" cellpadding="2" cellspacing="3" border="0" >
+ * <thead>
+ * <tr class="tableSubHeadingColor">
+ * <th class="colFirst" align="left">year-of-era</th>
+ * <th class="colFirst" align="left">era</th>
+ * <th class="colFirst" align="left">proleptic-year</th>
+ * <th class="colLast" align="left">ISO proleptic-year</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr class="rowColor">
+ * <td>2</td><td>ROC</td><td>2</td><td>1913</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td>1</td><td>ROC</td><td>1</td><td>1912</td>
+ * </tr>
+ * <tr class="rowColor">
+ * <td>1</td><td>BEFORE_ROC</td><td>0</td><td>1911</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td>2</td><td>BEFORE_ROC</td><td>-1</td><td>1910</td>
+ * </tr>
+ * </tbody>
+ * </table>
  * <p>
  * <b>Do not use {@code ordinal()} to obtain the numeric representation of {@code MinguoEra}.
  * Use {@code getValue()} instead.</b>
@@ -75,16 +107,16 @@
  *
  * @since 1.8
  */
-enum MinguoEra implements Era  {
+public enum MinguoEra implements Era {
 
     /**
-     * The singleton instance for the era BEFORE_ROC, 'Before Republic of China'.
-     * This has the numeric value of {@code 0}.
+     * The singleton instance for the era before the current one, 'Before Republic of China Era',
+     * which has the numeric value 0.
      */
     BEFORE_ROC,
     /**
-     * The singleton instance for the era ROC, 'Republic of China'.
-     * This has the numeric value of {@code 1}.
+     * The singleton instance for the current era, 'Republic of China Era',
+     * which has the numeric value 1.
      */
     ROC;
 
@@ -95,18 +127,18 @@
      * {@code MinguoEra} is an enum representing the Minguo eras of BEFORE_ROC/ROC.
      * This factory allows the enum to be obtained from the {@code int} value.
      *
-     * @param era  the BEFORE_ROC/ROC value to represent, from 0 (BEFORE_ROC) to 1 (ROC)
+     * @param minguoEra  the BEFORE_ROC/ROC value to represent, from 0 (BEFORE_ROC) to 1 (ROC)
      * @return the era singleton, not null
      * @throws DateTimeException if the value is invalid
      */
-    public static MinguoEra of(int era) {
-        switch (era) {
+    public static MinguoEra of(int minguoEra) {
+        switch (minguoEra) {
             case 0:
                 return BEFORE_ROC;
             case 1:
                 return ROC;
             default:
-                throw new DateTimeException("Invalid era: " + era);
+                throw new DateTimeException("Invalid era: " + minguoEra);
         }
     }
 
@@ -123,24 +155,7 @@
         return ordinal();
     }
 
-    @Override
-    public MinguoChronology getChronology() {
-        return MinguoChronology.INSTANCE;
-    }
-
-    // JDK8 default methods:
     //-----------------------------------------------------------------------
-    @Override
-    public MinguoDate date(int year, int month, int day) {
-        return (MinguoDate)(getChronology().date(this, year, month, day));
-    }
-
-    @Override
-    public MinguoDate dateYearDay(int year, int dayOfYear) {
-        return (MinguoDate)(getChronology().dateYearDay(this, year, dayOfYear));
-    }
-
-    //-------------------------------------------------------------------------
     private Object writeReplace() {
         return new Ser(Ser.MINGUO_ERA_TYPE, this);
     }
--- a/src/share/classes/java/time/chrono/ThaiBuddhistChronology.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/ThaiBuddhistChronology.java	Wed Apr 17 21:48:04 2013 -0700
@@ -56,6 +56,7 @@
  */
 package java.time.chrono;
 
+import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
 import static java.time.temporal.ChronoField.YEAR;
 
 import java.io.Serializable;
@@ -106,15 +107,6 @@
      * Singleton instance of the Buddhist chronology.
      */
     public static final ThaiBuddhistChronology INSTANCE = new ThaiBuddhistChronology();
-    /**
-     * The singleton instance for the era before the current one - Before Buddhist -
-     * which has the value 0.
-     */
-    public static final Era ERA_BEFORE_BE = ThaiBuddhistEra.BEFORE_BE;
-    /**
-     * The singleton instance for the current era - Buddhist - which has the value 1.
-     */
-    public static final Era ERA_BE = ThaiBuddhistEra.BE;
 
     /**
      * Serialization version.
@@ -166,15 +158,6 @@
     private ThaiBuddhistChronology() {
     }
 
-    /**
-     * Resolve singleton.
-     *
-     * @return the singleton instance, not null
-     */
-    private Object readResolve() {
-        return INSTANCE;
-    }
-
     //-----------------------------------------------------------------------
     /**
      * Gets the ID of the chronology - 'ThaiBuddhist'.
@@ -208,32 +191,78 @@
     }
 
     //-----------------------------------------------------------------------
+    /**
+     * Obtains a local date in Thai Buddhist calendar system from the
+     * era, year-of-era, month-of-year and day-of-month fields.
+     *
+     * @param era  the Thai Buddhist era, not null
+     * @param yearOfEra  the year-of-era
+     * @param month  the month-of-year
+     * @param dayOfMonth  the day-of-month
+     * @return the Thai Buddhist local date, not null
+     * @throws DateTimeException if unable to create the date
+     * @throws ClassCastException if the {@code era} is not a {@code ThaiBuddhistEra}
+     */
+    @Override
+    public ThaiBuddhistDate date(Era era, int yearOfEra, int month, int dayOfMonth) {
+        return date(prolepticYear(era, yearOfEra), month, dayOfMonth);
+    }
+
+    /**
+     * Obtains a local date in Thai Buddhist calendar system from the
+     * proleptic-year, month-of-year and day-of-month fields.
+     *
+     * @param prolepticYear  the proleptic-year
+     * @param month  the month-of-year
+     * @param dayOfMonth  the day-of-month
+     * @return the Thai Buddhist local date, not null
+     * @throws DateTimeException if unable to create the date
+     */
     @Override
     public ThaiBuddhistDate date(int prolepticYear, int month, int dayOfMonth) {
         return new ThaiBuddhistDate(LocalDate.of(prolepticYear - YEARS_DIFFERENCE, month, dayOfMonth));
     }
 
+    /**
+     * Obtains a local date in Thai Buddhist calendar system from the
+     * era, year-of-era and day-of-year fields.
+     *
+     * @param era  the Thai Buddhist era, not null
+     * @param yearOfEra  the year-of-era
+     * @param dayOfYear  the day-of-year
+     * @return the Thai Buddhist local date, not null
+     * @throws DateTimeException if unable to create the date
+     * @throws ClassCastException if the {@code era} is not a {@code ThaiBuddhistEra}
+     */
+    @Override
+    public ThaiBuddhistDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
+        return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
+    }
+
+    /**
+     * Obtains a local date in Thai Buddhist calendar system from the
+     * proleptic-year and day-of-year fields.
+     *
+     * @param prolepticYear  the proleptic-year
+     * @param dayOfYear  the day-of-year
+     * @return the Thai Buddhist local date, not null
+     * @throws DateTimeException if unable to create the date
+     */
     @Override
     public ThaiBuddhistDate dateYearDay(int prolepticYear, int dayOfYear) {
         return new ThaiBuddhistDate(LocalDate.ofYearDay(prolepticYear - YEARS_DIFFERENCE, dayOfYear));
     }
 
-    @Override
-    public ThaiBuddhistDate date(TemporalAccessor temporal) {
-        if (temporal instanceof ThaiBuddhistDate) {
-            return (ThaiBuddhistDate) temporal;
-        }
-        return new ThaiBuddhistDate(LocalDate.from(temporal));
-    }
-    @Override
-    public ThaiBuddhistDate date(Era era, int yearOfEra, int month, int dayOfMonth) {
-        return date(prolepticYear(era, yearOfEra), month, dayOfMonth);
-
-    }
-
-    @Override
-    public ThaiBuddhistDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
-        return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
+    /**
+     * Obtains a local date in the Thai Buddhist calendar system from the epoch-day.
+     *
+     * @param epochDay  the epoch day
+     * @return the Thai Buddhist local date, not null
+     * @throws DateTimeException if unable to create the date
+     */
+    @Override  // override with covariant return type
+    public ThaiBuddhistDate dateEpochDay(long epochDay) {
+        return new ThaiBuddhistDate(LocalDate.ofEpochDay(epochDay));
     }
 
     @Override
@@ -252,6 +281,14 @@
     }
 
     @Override
+    public ThaiBuddhistDate date(TemporalAccessor temporal) {
+        if (temporal instanceof ThaiBuddhistDate) {
+            return (ThaiBuddhistDate) temporal;
+        }
+        return new ThaiBuddhistDate(LocalDate.from(temporal));
+    }
+
+    @Override
     public ChronoLocalDateTime<ThaiBuddhistDate> localDateTime(TemporalAccessor temporal) {
         return (ChronoLocalDateTime<ThaiBuddhistDate>)super.localDateTime(temporal);
     }
@@ -285,7 +322,7 @@
     @Override
     public int prolepticYear(Era era, int yearOfEra) {
         if (era instanceof ThaiBuddhistEra == false) {
-            throw new DateTimeException("Era must be BuddhistEra");
+            throw new ClassCastException("Era must be BuddhistEra");
         }
         return (era == ThaiBuddhistEra.BE ? yearOfEra : 1 - yearOfEra);
     }
@@ -304,6 +341,10 @@
     @Override
     public ValueRange range(ChronoField field) {
         switch (field) {
+            case PROLEPTIC_MONTH: {
+                ValueRange range = PROLEPTIC_MONTH.range();
+                return ValueRange.of(range.getMinimum() + YEARS_DIFFERENCE * 12L, range.getMaximum() + YEARS_DIFFERENCE * 12L);
+            }
             case YEAR_OF_ERA: {
                 ValueRange range = YEAR.range();
                 return ValueRange.of(1, -(range.getMinimum() + YEARS_DIFFERENCE) + 1, range.getMaximum() + YEARS_DIFFERENCE);
--- a/src/share/classes/java/time/chrono/ThaiBuddhistDate.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/ThaiBuddhistDate.java	Wed Apr 17 21:48:04 2013 -0700
@@ -72,12 +72,13 @@
 import java.time.Period;
 import java.time.ZoneId;
 import java.time.temporal.ChronoField;
-import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
 import java.util.Objects;
 
@@ -205,16 +206,46 @@
     }
 
     //-----------------------------------------------------------------------
+    /**
+     * Gets the chronology of this date, which is the Thai Buddhist calendar system.
+     * <p>
+     * The {@code Chronology} represents the calendar system in use.
+     * The era and other fields in {@link ChronoField} are defined by the chronology.
+     *
+     * @return the Thai Buddhist chronology, not null
+     */
     @Override
     public ThaiBuddhistChronology getChronology() {
         return ThaiBuddhistChronology.INSTANCE;
     }
 
+    /**
+     * Gets the era applicable at this date.
+     * <p>
+     * The Thai Buddhist calendar system has two eras, 'BE' and 'BEFORE_BE',
+     * defined by {@link ThaiBuddhistEra}.
+     *
+     * @return the era applicable at this date, not null
+     */
+    @Override
+    public ThaiBuddhistEra getEra() {
+        return (getProlepticYear() >= 1 ? ThaiBuddhistEra.BE : ThaiBuddhistEra.BEFORE_BE);
+    }
+
+    /**
+     * Returns the length of the month represented by this date.
+     * <p>
+     * This returns the length of the month in days.
+     * Month lengths match those of the ISO calendar system.
+     *
+     * @return the length of the month in days
+     */
     @Override
     public int lengthOfMonth() {
         return isoDate.lengthOfMonth();
     }
 
+    //-----------------------------------------------------------------------
     @Override
     public ValueRange range(TemporalField field) {
         if (field instanceof ChronoField) {
@@ -233,7 +264,7 @@
                 }
                 return getChronology().range(f);
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.rangeRefinedBy(this);
     }
@@ -242,6 +273,8 @@
     public long getLong(TemporalField field) {
         if (field instanceof ChronoField) {
             switch ((ChronoField) field) {
+                case PROLEPTIC_MONTH:
+                    return getProlepticMonth();
                 case YEAR_OF_ERA: {
                     int prolepticYear = getProlepticYear();
                     return (prolepticYear >= 1 ? prolepticYear : 1 - prolepticYear);
@@ -256,6 +289,10 @@
         return field.getFrom(this);
     }
 
+    private long getProlepticMonth() {
+        return getProlepticYear() * 12L + isoDate.getMonthValue() - 1;
+    }
+
     private int getProlepticYear() {
         return isoDate.getYear() + YEARS_DIFFERENCE;
     }
@@ -269,11 +306,13 @@
                 return this;
             }
             switch (f) {
+                case PROLEPTIC_MONTH:
+                    getChronology().range(f).checkValidValue(newValue, f);
+                    return plusMonths(newValue - getProlepticMonth());
                 case YEAR_OF_ERA:
                 case YEAR:
                 case ERA: {
-                    f.checkValidValue(newValue);
-                    int nvalue = (int) newValue;
+                    int nvalue = getChronology().range(f).checkValidIntValue(newValue, f);
                     switch (f) {
                         case YEAR_OF_ERA:
                             return with(isoDate.withYear((getProlepticYear() >= 1 ? nvalue : 1 - nvalue)  - YEARS_DIFFERENCE));
@@ -286,7 +325,7 @@
             }
             return with(isoDate.with(field, newValue));
         }
-        return (ThaiBuddhistDate) ChronoLocalDate.super.with(field, newValue);
+        return ChronoLocalDate.super.with(field, newValue);
     }
 
     /**
@@ -296,7 +335,7 @@
      */
     @Override
     public  ThaiBuddhistDate with(TemporalAdjuster adjuster) {
-        return (ThaiBuddhistDate)super.with(adjuster);
+        return super.with(adjuster);
     }
 
     /**
@@ -306,7 +345,7 @@
      */
     @Override
     public ThaiBuddhistDate plus(TemporalAmount amount) {
-        return (ThaiBuddhistDate)super.plus(amount);
+        return super.plus(amount);
     }
 
     /**
@@ -316,7 +355,7 @@
      */
     @Override
     public ThaiBuddhistDate minus(TemporalAmount amount) {
-        return (ThaiBuddhistDate)super.minus(amount);
+        return super.minus(amount);
     }
 
     //-----------------------------------------------------------------------
@@ -332,7 +371,7 @@
 
     @Override
     ThaiBuddhistDate plusWeeks(long weeksToAdd) {
-        return (ThaiBuddhistDate)super.plusWeeks(weeksToAdd);
+        return super.plusWeeks(weeksToAdd);
     }
 
     @Override
@@ -342,32 +381,32 @@
 
     @Override
     public ThaiBuddhistDate plus(long amountToAdd, TemporalUnit unit) {
-        return (ThaiBuddhistDate)super.plus(amountToAdd, unit);
+        return super.plus(amountToAdd, unit);
     }
 
     @Override
     public ThaiBuddhistDate minus(long amountToAdd, TemporalUnit unit) {
-        return (ThaiBuddhistDate)super.minus(amountToAdd, unit);
+        return super.minus(amountToAdd, unit);
     }
 
     @Override
     ThaiBuddhistDate minusYears(long yearsToSubtract) {
-        return (ThaiBuddhistDate)super.minusYears(yearsToSubtract);
+        return super.minusYears(yearsToSubtract);
     }
 
     @Override
     ThaiBuddhistDate minusMonths(long monthsToSubtract) {
-        return (ThaiBuddhistDate)super.minusMonths(monthsToSubtract);
+        return super.minusMonths(monthsToSubtract);
     }
 
     @Override
     ThaiBuddhistDate minusWeeks(long weeksToSubtract) {
-        return (ThaiBuddhistDate)super.minusWeeks(weeksToSubtract);
+        return super.minusWeeks(weeksToSubtract);
     }
 
     @Override
     ThaiBuddhistDate minusDays(long daysToSubtract) {
-        return (ThaiBuddhistDate)super.minusDays(daysToSubtract);
+        return super.minusDays(daysToSubtract);
     }
 
     private ThaiBuddhistDate with(LocalDate newDate) {
@@ -376,7 +415,7 @@
 
     @Override        // for javadoc and covariant return type
     public final ChronoLocalDateTime<ThaiBuddhistDate> atTime(LocalTime localTime) {
-        return (ChronoLocalDateTime<ThaiBuddhistDate>)super.atTime(localTime);
+        return super.atTime(localTime);
     }
 
     @Override
--- a/src/share/classes/java/time/chrono/ThaiBuddhistEra.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/chrono/ThaiBuddhistEra.java	Wed Apr 17 21:48:04 2013 -0700
@@ -24,6 +24,11 @@
  */
 
 /*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
  * Copyright (c) 2012, Stephen Colebourne & Michael Nascimento Santos
  *
  * All rights reserved.
@@ -56,7 +61,6 @@
  */
 package java.time.chrono;
 
-
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
@@ -66,37 +70,66 @@
  * An era in the Thai Buddhist calendar system.
  * <p>
  * The Thai Buddhist calendar system has two eras.
+ * The current era, for years from 1 onwards, is known as the 'Buddhist' era.
+ * All previous years, zero or earlier in the proleptic count or one and greater
+ * in the year-of-era count, are part of the 'Before Buddhist' era.
  * <p>
- * <b>Do not use ordinal() to obtain the numeric representation of a ThaiBuddhistEra
- * instance. Use getValue() instead.</b>
+ * <table summary="Buddhist years and eras" cellpadding="2" cellspacing="3" border="0" >
+ * <thead>
+ * <tr class="tableSubHeadingColor">
+ * <th class="colFirst" align="left">year-of-era</th>
+ * <th class="colFirst" align="left">era</th>
+ * <th class="colFirst" align="left">proleptic-year</th>
+ * <th class="colLast" align="left">ISO proleptic-year</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr class="rowColor">
+ * <td>2</td><td>BE</td><td>2</td><td>-542</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td>1</td><td>BE</td><td>1</td><td>-543</td>
+ * </tr>
+ * <tr class="rowColor">
+ * <td>1</td><td>BEFORE_BE</td><td>0</td><td>-544</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td>2</td><td>BEFORE_BE</td><td>-1</td><td>-545</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <p>
+ * <b>Do not use {@code ordinal()} to obtain the numeric representation of {@code ThaiBuddhistEra}.
+ * Use {@code getValue()} instead.</b>
  *
  * <h3>Specification for implementors</h3>
  * This is an immutable and thread-safe enum.
  *
  * @since 1.8
  */
-enum ThaiBuddhistEra implements Era {
+public enum ThaiBuddhistEra implements Era {
 
     /**
      * The singleton instance for the era before the current one, 'Before Buddhist Era',
-     * which has the value 0.
+     * which has the numeric value 0.
      */
     BEFORE_BE,
     /**
-     * The singleton instance for the current era, 'Buddhist Era', which has the value 1.
+     * The singleton instance for the current era, 'Buddhist Era',
+     * which has the numeric value 1.
      */
     BE;
 
     //-----------------------------------------------------------------------
     /**
-     * Obtains an instance of {@code ThaiBuddhistEra} from a value.
+     * Obtains an instance of {@code ThaiBuddhistEra} from an {@code int} value.
      * <p>
-     * The current era (from ISO year -543 onwards) has the value 1
-     * The previous era has the value 0.
+     * {@code ThaiBuddhistEra} is an enum representing the Thai Buddhist eras of BEFORE_BE/BE.
+     * This factory allows the enum to be obtained from the {@code int} value.
      *
      * @param thaiBuddhistEra  the era to represent, from 0 to 1
      * @return the BuddhistEra singleton, never null
-     * @throws IllegalCalendarFieldValueException if the era is invalid
+     * @throws DateTimeException if the era is invalid
      */
     public static ThaiBuddhistEra of(int thaiBuddhistEra) {
         switch (thaiBuddhistEra) {
@@ -105,16 +138,15 @@
             case 1:
                 return BE;
             default:
-                throw new DateTimeException("Era is not valid for ThaiBuddhistEra");
+                throw new DateTimeException("Invalid era: " + thaiBuddhistEra);
         }
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Gets the era numeric value.
+     * Gets the numeric era {@code int} value.
      * <p>
-     * The current era (from ISO year -543 onwards) has the value 1
-     * The previous era has the value 0.
+     * The era BEFORE_BE has the value 0, while the era BE has the value 1.
      *
      * @return the era value, from 0 (BEFORE_BE) to 1 (BE)
      */
@@ -123,23 +155,6 @@
         return ordinal();
     }
 
-    @Override
-    public ThaiBuddhistChronology getChronology() {
-        return ThaiBuddhistChronology.INSTANCE;
-    }
-
-    // JDK8 default methods:
-    //-----------------------------------------------------------------------
-    @Override
-    public ThaiBuddhistDate date(int year, int month, int day) {
-        return (ThaiBuddhistDate)(getChronology().date(this, year, month, day));
-    }
-
-    @Override
-    public ThaiBuddhistDate dateYearDay(int year, int dayOfYear) {
-        return (ThaiBuddhistDate)(getChronology().dateYearDay(this, year, dayOfYear));
-    }
-
     //-----------------------------------------------------------------------
     private Object writeReplace() {
         return new Ser(Ser.THAIBUDDHIST_ERA_TYPE, this);
--- a/src/share/classes/java/time/format/DateTimeBuilder.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,595 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * Copyright (c) 2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package java.time.format;
-
-import static java.time.temporal.Adjusters.nextOrSame;
-import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH;
-import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR;
-import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_MONTH;
-import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_YEAR;
-import static java.time.temporal.ChronoField.AMPM_OF_DAY;
-import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_AMPM;
-import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_DAY;
-import static java.time.temporal.ChronoField.DAY_OF_MONTH;
-import static java.time.temporal.ChronoField.DAY_OF_WEEK;
-import static java.time.temporal.ChronoField.DAY_OF_YEAR;
-import static java.time.temporal.ChronoField.EPOCH_DAY;
-import static java.time.temporal.ChronoField.EPOCH_MONTH;
-import static java.time.temporal.ChronoField.ERA;
-import static java.time.temporal.ChronoField.HOUR_OF_AMPM;
-import static java.time.temporal.ChronoField.HOUR_OF_DAY;
-import static java.time.temporal.ChronoField.MICRO_OF_DAY;
-import static java.time.temporal.ChronoField.MICRO_OF_SECOND;
-import static java.time.temporal.ChronoField.MILLI_OF_DAY;
-import static java.time.temporal.ChronoField.MILLI_OF_SECOND;
-import static java.time.temporal.ChronoField.MINUTE_OF_DAY;
-import static java.time.temporal.ChronoField.MINUTE_OF_HOUR;
-import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
-import static java.time.temporal.ChronoField.NANO_OF_DAY;
-import static java.time.temporal.ChronoField.NANO_OF_SECOND;
-import static java.time.temporal.ChronoField.SECOND_OF_DAY;
-import static java.time.temporal.ChronoField.SECOND_OF_MINUTE;
-import static java.time.temporal.ChronoField.YEAR;
-import static java.time.temporal.ChronoField.YEAR_OF_ERA;
-
-import java.time.DateTimeException;
-import java.time.DayOfWeek;
-import java.time.LocalDate;
-import java.time.LocalTime;
-import java.time.ZoneId;
-import java.time.chrono.ChronoLocalDate;
-import java.time.chrono.Chronology;
-import java.time.chrono.Era;
-import java.time.chrono.IsoChronology;
-import java.time.chrono.JapaneseChronology;
-import java.time.temporal.ChronoField;
-import java.time.temporal.ChronoUnit;
-import java.time.temporal.Queries;
-import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalField;
-import java.time.temporal.TemporalQuery;
-import java.util.EnumMap;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * Builder that can holds date and time fields and related date and time objects.
- * <p>
- * <b>This class still needs major revision before JDK1.8 ships.</b>
- * <p>
- * The builder is used to hold onto different elements of date and time.
- * It holds two kinds of object:
- * <p><ul>
- * <li>a {@code Map} from {@link TemporalField} to {@code long} value, where the
- *  value may be outside the valid range for the field
- * <li>a list of objects, such as {@code Chronology} or {@code ZoneId}
- * </ul><p>
- *
- * <h3>Specification for implementors</h3>
- * This class is mutable and not thread-safe.
- * It should only be used from a single thread.
- *
- * @since 1.8
- */
-final class DateTimeBuilder
-        implements TemporalAccessor, Cloneable {
-
-    /**
-     * The map of other fields.
-     */
-    private Map<TemporalField, Long> otherFields;
-    /**
-     * The map of date-time fields.
-     */
-    private final EnumMap<ChronoField, Long> standardFields = new EnumMap<ChronoField, Long>(ChronoField.class);
-    /**
-     * The chronology.
-     */
-    private Chronology chrono;
-    /**
-     * The zone.
-     */
-    private ZoneId zone;
-    /**
-     * The date.
-     */
-    private LocalDate date;
-    /**
-     * The time.
-     */
-    private LocalTime time;
-
-    //-----------------------------------------------------------------------
-    /**
-     * Creates an empty instance of the builder.
-     */
-    public DateTimeBuilder() {
-    }
-
-    //-----------------------------------------------------------------------
-    private Long getFieldValue0(TemporalField field) {
-        if (field instanceof ChronoField) {
-            return standardFields.get(field);
-        } else if (otherFields != null) {
-            return otherFields.get(field);
-        }
-        return null;
-    }
-
-    /**
-     * Adds a field-value pair to the builder.
-     * <p>
-     * This adds a field to the builder.
-     * If the field is not already present, then the field-value pair is added to the map.
-     * If the field is already present and it has the same value as that specified, no action occurs.
-     * If the field is already present and it has a different value to that specified, then
-     * an exception is thrown.
-     *
-     * @param field  the field to add, not null
-     * @param value  the value to add, not null
-     * @return {@code this}, for method chaining
-     * @throws DateTimeException if the field is already present with a different value
-     */
-    DateTimeBuilder addFieldValue(TemporalField field, long value) {
-        Objects.requireNonNull(field, "field");
-        Long old = getFieldValue0(field);  // check first for better error message
-        if (old != null && old.longValue() != value) {
-            throw new DateTimeException("Conflict found: " + field + " " + old + " differs from " + field + " " + value + ": " + this);
-        }
-        return putFieldValue0(field, value);
-    }
-
-    private DateTimeBuilder putFieldValue0(TemporalField field, long value) {
-        if (field instanceof ChronoField) {
-            standardFields.put((ChronoField) field, value);
-        } else {
-            if (otherFields == null) {
-                otherFields = new LinkedHashMap<TemporalField, Long>();
-            }
-            otherFields.put(field, value);
-        }
-        return this;
-    }
-
-    //-----------------------------------------------------------------------
-    void addObject(Chronology chrono) {
-        this.chrono = chrono;
-    }
-
-    void addObject(ZoneId zone) {
-        this.zone = zone;
-    }
-
-    void addObject(LocalDate date) {
-        this.date = date;
-    }
-
-    void addObject(LocalTime time) {
-        this.time = time;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Resolves the builder, evaluating the date and time.
-     * <p>
-     * This examines the contents of the builder and resolves it to produce the best
-     * available date and time, throwing an exception if a problem occurs.
-     * Calling this method changes the state of the builder.
-     *
-     * @return {@code this}, for method chaining
-     */
-    DateTimeBuilder resolve() {
-        // handle standard fields
-        mergeDate();
-        mergeTime();
-        // TODO: cross validate remaining fields?
-        return this;
-    }
-
-    private void mergeDate() {
-        if (standardFields.containsKey(EPOCH_DAY)) {
-            checkDate(LocalDate.ofEpochDay(standardFields.remove(EPOCH_DAY)));
-            return;
-        }
-
-        Era era = null;
-        if (chrono == IsoChronology.INSTANCE) {
-            // normalize fields
-            if (standardFields.containsKey(EPOCH_MONTH)) {
-                long em = standardFields.remove(EPOCH_MONTH);
-                addFieldValue(MONTH_OF_YEAR, (em % 12) + 1);
-                addFieldValue(YEAR, (em / 12) + 1970);
-            }
-        } else {
-            // TODO: revisit EPOCH_MONTH calculation in non-ISO chronology
-            // Handle EPOCH_MONTH here for non-ISO Chronology
-            if (standardFields.containsKey(EPOCH_MONTH)) {
-                long em = standardFields.remove(EPOCH_MONTH);
-                ChronoLocalDate<?> chronoDate = chrono.date(LocalDate.ofEpochDay(0L));
-                chronoDate = chronoDate.plus(em, ChronoUnit.MONTHS);
-                LocalDate date = LocalDate.ofEpochDay(chronoDate.toEpochDay());
-                checkDate(date);
-                return;
-            }
-            List<Era> eras = chrono.eras();
-            if (!eras.isEmpty()) {
-                if (standardFields.containsKey(ERA)) {
-                    long index = standardFields.remove(ERA);
-                    era = chrono.eraOf((int) index);
-                } else {
-                    era = eras.get(eras.size() - 1); // current Era
-                }
-                if (standardFields.containsKey(YEAR_OF_ERA)) {
-                    Long y = standardFields.remove(YEAR_OF_ERA);
-                    putFieldValue0(YEAR, y);
-                }
-            }
-
-        }
-
-        // build date
-        if (standardFields.containsKey(YEAR)) {
-            if (standardFields.containsKey(MONTH_OF_YEAR)) {
-                if (standardFields.containsKey(DAY_OF_MONTH)) {
-                    int y = Math.toIntExact(standardFields.remove(YEAR));
-                    int moy = Math.toIntExact(standardFields.remove(MONTH_OF_YEAR));
-                    int dom = Math.toIntExact(standardFields.remove(DAY_OF_MONTH));
-                    LocalDate date;
-                    if (chrono == IsoChronology.INSTANCE) {
-                        date = LocalDate.of(y, moy, dom);
-                    } else {
-                        ChronoLocalDate<?> chronoDate;
-                        if (era == null) {
-                            chronoDate = chrono.date(y, moy, dom);
-                        } else {
-                            chronoDate = era.date(y, moy, dom);
-                        }
-                        date = LocalDate.ofEpochDay(chronoDate.toEpochDay());
-                    }
-                    checkDate(date);
-                    return;
-                }
-                if (standardFields.containsKey(ALIGNED_WEEK_OF_MONTH)) {
-                    if (standardFields.containsKey(ALIGNED_DAY_OF_WEEK_IN_MONTH)) {
-                        int y = Math.toIntExact(standardFields.remove(YEAR));
-                        int moy = Math.toIntExact(standardFields.remove(MONTH_OF_YEAR));
-                        int aw = Math.toIntExact(standardFields.remove(ALIGNED_WEEK_OF_MONTH));
-                        int ad = Math.toIntExact(standardFields.remove(ALIGNED_DAY_OF_WEEK_IN_MONTH));
-                        LocalDate date;
-                        if (chrono == IsoChronology.INSTANCE) {
-                            date = LocalDate.of(y, moy, 1).plusDays((aw - 1) * 7 + (ad - 1));
-                        } else {
-                            ChronoLocalDate<?> chronoDate;
-                            if (era == null) {
-                                chronoDate = chrono.date(y, moy, 1);
-                            } else {
-                                chronoDate = era.date(y, moy, 1);
-                            }
-                            chronoDate = chronoDate.plus((aw - 1) * 7 + (ad - 1), ChronoUnit.DAYS);
-                            date = LocalDate.ofEpochDay(chronoDate.toEpochDay());
-                        }
-                        checkDate(date);
-                        return;
-                    }
-                    if (standardFields.containsKey(DAY_OF_WEEK)) {
-                        int y = Math.toIntExact(standardFields.remove(YEAR));
-                        int moy = Math.toIntExact(standardFields.remove(MONTH_OF_YEAR));
-                        int aw = Math.toIntExact(standardFields.remove(ALIGNED_WEEK_OF_MONTH));
-                        int dow = Math.toIntExact(standardFields.remove(DAY_OF_WEEK));
-                        LocalDate date;
-                        if (chrono == IsoChronology.INSTANCE) {
-                            date = LocalDate.of(y, moy, 1).plusDays((aw - 1) * 7).with(nextOrSame(DayOfWeek.of(dow)));
-                        } else {
-                            ChronoLocalDate<?> chronoDate;
-                            if (era == null) {
-                                chronoDate = chrono.date(y, moy, 1);
-                            } else {
-                                chronoDate = era.date(y, moy, 1);
-                            }
-                            chronoDate = chronoDate.plus((aw - 1) * 7, ChronoUnit.DAYS).with(nextOrSame(DayOfWeek.of(dow)));
-                            date = LocalDate.ofEpochDay(chronoDate.toEpochDay());
-                        }
-                        checkDate(date);
-                        return;
-                    }
-                }
-            }
-            if (standardFields.containsKey(DAY_OF_YEAR)) {
-                int y = Math.toIntExact(standardFields.remove(YEAR));
-                int doy = Math.toIntExact(standardFields.remove(DAY_OF_YEAR));
-                LocalDate date;
-                if (chrono == IsoChronology.INSTANCE) {
-                    date = LocalDate.ofYearDay(y, doy);
-                } else {
-                    ChronoLocalDate<?> chronoDate;
-                    if (era == null) {
-                        chronoDate = chrono.dateYearDay(y, doy);
-                    } else {
-                        chronoDate = era.dateYearDay(y, doy);
-                    }
-                    date = LocalDate.ofEpochDay(chronoDate.toEpochDay());
-                }
-                checkDate(date);
-                return;
-            }
-            if (standardFields.containsKey(ALIGNED_WEEK_OF_YEAR)) {
-                if (standardFields.containsKey(ALIGNED_DAY_OF_WEEK_IN_YEAR)) {
-                    int y = Math.toIntExact(standardFields.remove(YEAR));
-                    int aw = Math.toIntExact(standardFields.remove(ALIGNED_WEEK_OF_YEAR));
-                    int ad = Math.toIntExact(standardFields.remove(ALIGNED_DAY_OF_WEEK_IN_YEAR));
-                    LocalDate date;
-                    if (chrono == IsoChronology.INSTANCE) {
-                        date = LocalDate.of(y, 1, 1).plusDays((aw - 1) * 7 + (ad - 1));
-                    } else {
-                        ChronoLocalDate<?> chronoDate;
-                        if (era == null) {
-                            chronoDate = chrono.dateYearDay(y, 1);
-                        } else {
-                            chronoDate = era.dateYearDay(y, 1);
-                        }
-                        chronoDate = chronoDate.plus((aw - 1) * 7 + (ad - 1), ChronoUnit.DAYS);
-                        date = LocalDate.ofEpochDay(chronoDate.toEpochDay());
-                    }
-                    checkDate(date);
-                    return;
-                }
-                if (standardFields.containsKey(DAY_OF_WEEK)) {
-                    int y = Math.toIntExact(standardFields.remove(YEAR));
-                    int aw = Math.toIntExact(standardFields.remove(ALIGNED_WEEK_OF_YEAR));
-                    int dow = Math.toIntExact(standardFields.remove(DAY_OF_WEEK));
-                    LocalDate date;
-                    if (chrono == IsoChronology.INSTANCE) {
-                        date = LocalDate.of(y, 1, 1).plusDays((aw - 1) * 7).with(nextOrSame(DayOfWeek.of(dow)));
-                    } else {
-                        ChronoLocalDate<?> chronoDate;
-                        if (era == null) {
-                            chronoDate = chrono.dateYearDay(y, 1);
-                        } else {
-                            chronoDate = era.dateYearDay(y, 1);
-                        }
-                        chronoDate = chronoDate.plus((aw - 1) * 7, ChronoUnit.DAYS).with(nextOrSame(DayOfWeek.of(dow)));
-                        date = LocalDate.ofEpochDay(chronoDate.toEpochDay());
-                    }
-                    checkDate(date);
-                    return;
-                }
-            }
-        }
-    }
-
-    private void checkDate(LocalDate date) {
-        addObject(date);
-        for (ChronoField field : standardFields.keySet()) {
-            long val1;
-            try {
-                val1 = date.getLong(field);
-            } catch (DateTimeException ex) {
-                continue;
-            }
-            Long val2 = standardFields.get(field);
-            if (val1 != val2) {
-                throw new DateTimeException("Conflict found: Field " + field + " " + val1 + " differs from " + field + " " + val2 + " derived from " + date);
-            }
-        }
-    }
-
-    private void mergeTime() {
-        if (standardFields.containsKey(CLOCK_HOUR_OF_DAY)) {
-            long ch = standardFields.remove(CLOCK_HOUR_OF_DAY);
-            addFieldValue(HOUR_OF_DAY, ch == 24 ? 0 : ch);
-        }
-        if (standardFields.containsKey(CLOCK_HOUR_OF_AMPM)) {
-            long ch = standardFields.remove(CLOCK_HOUR_OF_AMPM);
-            addFieldValue(HOUR_OF_AMPM, ch == 12 ? 0 : ch);
-        }
-        if (standardFields.containsKey(AMPM_OF_DAY) && standardFields.containsKey(HOUR_OF_AMPM)) {
-            long ap = standardFields.remove(AMPM_OF_DAY);
-            long hap = standardFields.remove(HOUR_OF_AMPM);
-            addFieldValue(HOUR_OF_DAY, ap * 12 + hap);
-        }
-//        if (timeFields.containsKey(HOUR_OF_DAY) && timeFields.containsKey(MINUTE_OF_HOUR)) {
-//            long hod = timeFields.remove(HOUR_OF_DAY);
-//            long moh = timeFields.remove(MINUTE_OF_HOUR);
-//            addFieldValue(MINUTE_OF_DAY, hod * 60 + moh);
-//        }
-//        if (timeFields.containsKey(MINUTE_OF_DAY) && timeFields.containsKey(SECOND_OF_MINUTE)) {
-//            long mod = timeFields.remove(MINUTE_OF_DAY);
-//            long som = timeFields.remove(SECOND_OF_MINUTE);
-//            addFieldValue(SECOND_OF_DAY, mod * 60 + som);
-//        }
-        if (standardFields.containsKey(NANO_OF_DAY)) {
-            long nod = standardFields.remove(NANO_OF_DAY);
-            addFieldValue(SECOND_OF_DAY, nod / 1000_000_000L);
-            addFieldValue(NANO_OF_SECOND, nod % 1000_000_000L);
-        }
-        if (standardFields.containsKey(MICRO_OF_DAY)) {
-            long cod = standardFields.remove(MICRO_OF_DAY);
-            addFieldValue(SECOND_OF_DAY, cod / 1000_000L);
-            addFieldValue(MICRO_OF_SECOND, cod % 1000_000L);
-        }
-        if (standardFields.containsKey(MILLI_OF_DAY)) {
-            long lod = standardFields.remove(MILLI_OF_DAY);
-            addFieldValue(SECOND_OF_DAY, lod / 1000);
-            addFieldValue(MILLI_OF_SECOND, lod % 1000);
-        }
-        if (standardFields.containsKey(SECOND_OF_DAY)) {
-            long sod = standardFields.remove(SECOND_OF_DAY);
-            addFieldValue(HOUR_OF_DAY, sod / 3600);
-            addFieldValue(MINUTE_OF_HOUR, (sod / 60) % 60);
-            addFieldValue(SECOND_OF_MINUTE, sod % 60);
-        }
-        if (standardFields.containsKey(MINUTE_OF_DAY)) {
-            long mod = standardFields.remove(MINUTE_OF_DAY);
-            addFieldValue(HOUR_OF_DAY, mod / 60);
-            addFieldValue(MINUTE_OF_HOUR, mod % 60);
-        }
-
-//            long sod = nod / 1000_000_000L;
-//            addFieldValue(HOUR_OF_DAY, sod / 3600);
-//            addFieldValue(MINUTE_OF_HOUR, (sod / 60) % 60);
-//            addFieldValue(SECOND_OF_MINUTE, sod % 60);
-//            addFieldValue(NANO_OF_SECOND, nod % 1000_000_000L);
-        if (standardFields.containsKey(MILLI_OF_SECOND) && standardFields.containsKey(MICRO_OF_SECOND)) {
-            long los = standardFields.remove(MILLI_OF_SECOND);
-            long cos = standardFields.get(MICRO_OF_SECOND);
-            addFieldValue(MICRO_OF_SECOND, los * 1000 + (cos % 1000));
-        }
-
-        Long hod = standardFields.get(HOUR_OF_DAY);
-        Long moh = standardFields.get(MINUTE_OF_HOUR);
-        Long som = standardFields.get(SECOND_OF_MINUTE);
-        Long nos = standardFields.get(NANO_OF_SECOND);
-        if (hod != null) {
-            int hodVal = Math.toIntExact(hod);
-            if (moh != null) {
-                int mohVal = Math.toIntExact(moh);
-                if (som != null) {
-                    int somVal = Math.toIntExact(som);
-                    if (nos != null) {
-                        int nosVal = Math.toIntExact(nos);
-                        addObject(LocalTime.of(hodVal, mohVal, somVal, nosVal));
-                    } else {
-                        addObject(LocalTime.of(hodVal, mohVal, somVal));
-                    }
-                } else {
-                    addObject(LocalTime.of(hodVal, mohVal));
-                }
-            } else {
-                addObject(LocalTime.of(hodVal, 0));
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    @Override
-    public boolean isSupported(TemporalField field) {
-        if (field == null) {
-            return false;
-        }
-        return standardFields.containsKey(field) ||
-                (otherFields != null && otherFields.containsKey(field)) ||
-                (date != null && date.isSupported(field)) ||
-                (time != null && time.isSupported(field));
-    }
-
-    @Override
-    public long getLong(TemporalField field) {
-        Objects.requireNonNull(field, "field");
-        Long value = getFieldValue0(field);
-        if (value == null) {
-            if (date != null && date.isSupported(field)) {
-                return date.getLong(field);
-            }
-            if (time != null && time.isSupported(field)) {
-                return time.getLong(field);
-            }
-            throw new DateTimeException("Field not found: " + field);
-        }
-        return value;
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.zoneId()) {
-            return (R) zone;
-        } else if (query == Queries.chronology()) {
-            return (R) chrono;
-        } else if (query == Queries.localDate()) {
-            return (R) date;
-        } else if (query == Queries.localTime()) {
-            return (R) time;
-        } else if (query == Queries.zone() || query == Queries.offset()) {
-            return query.queryFrom(this);
-        } else if (query == Queries.precision()) {
-            return null;  // not a complete date/time
-        }
-        // inline TemporalAccessor.super.query(query) as an optimization
-        // non-JDK classes are not permitted to make this optimization
-        return query.queryFrom(this);
-    }
-
-    //-----------------------------------------------------------------------
-    @Override
-    public String toString() {
-        StringBuilder buf = new StringBuilder(128);
-        buf.append("DateTimeBuilder[");
-        Map<TemporalField, Long> fields = new HashMap<>();
-        fields.putAll(standardFields);
-        if (otherFields != null) {
-            fields.putAll(otherFields);
-        }
-        if (fields.size() > 0) {
-            buf.append("fields=").append(fields);
-        }
-        buf.append(", ").append(chrono);
-        buf.append(", ").append(zone);
-        buf.append(", ").append(date);
-        buf.append(", ").append(time);
-        buf.append(']');
-        return buf.toString();
-    }
-
-}
--- a/src/share/classes/java/time/format/DateTimeFormatStyleProvider.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * Copyright (c) 2009-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package java.time.format;
-
-import java.text.SimpleDateFormat;
-import java.time.chrono.Chronology;
-import java.util.Locale;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import sun.util.locale.provider.LocaleProviderAdapter;
-import sun.util.locale.provider.LocaleResources;
-
-/**
- * A provider to obtain date-time formatters for a style.
- * <p>
- *
- * <h3>Specification for implementors</h3>
- * This implementation is based on extraction of data from a {@link SimpleDateFormat}.
- * This class is immutable and thread-safe.
- * This Implementations caches the returned formatters.
- *
- * @since 1.8
- */
-final class DateTimeFormatStyleProvider {
-    // TODO: Better implementation based on CLDR
-
-    /** Cache of formatters. */
-    private static final ConcurrentMap<String, Object> FORMATTER_CACHE = new ConcurrentHashMap<>(16, 0.75f, 2);
-
-    private DateTimeFormatStyleProvider() {}
-
-    /**
-     * Gets an Instance of the provider of format styles.
-     *
-     * @return the provider, not null
-     */
-    static DateTimeFormatStyleProvider getInstance() {
-        return new DateTimeFormatStyleProvider();
-    }
-
-    /**
-     * Gets a localized date, time or date-time formatter.
-     * <p>
-     * The formatter will be the most appropriate to use for the date and time style in the locale.
-     * For example, some locales will use the month name while others will use the number.
-     *
-     * @param dateStyle  the date formatter style to obtain, null to obtain a time formatter
-     * @param timeStyle  the time formatter style to obtain, null to obtain a date formatter
-     * @param chrono  the chronology to use, not null
-     * @param locale  the locale to use, not null
-     * @return the date-time formatter, not null
-     * @throws IllegalArgumentException if both format styles are null or if the locale is not recognized
-     */
-    public DateTimeFormatter getFormatter(
-            FormatStyle dateStyle, FormatStyle timeStyle, Chronology chrono, Locale locale) {
-        if (dateStyle == null && timeStyle == null) {
-            throw new IllegalArgumentException("Date and Time style must not both be null");
-        }
-        String key = chrono.getId() + '|' + locale.toString() + '|' + dateStyle + timeStyle;
-        Object cached = FORMATTER_CACHE.get(key);
-        if (cached != null) {
-            return (DateTimeFormatter) cached;
-        }
-
-        LocaleResources lr = LocaleProviderAdapter.getResourceBundleBased()
-                                    .getLocaleResources(locale);
-        String pattern = lr.getCldrDateTimePattern(convertStyle(timeStyle), convertStyle(dateStyle),
-                                                   chrono.getCalendarType());
-        DateTimeFormatter formatter = new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter(locale);
-        FORMATTER_CACHE.putIfAbsent(key, formatter);
-        return formatter;
-    }
-
-    /**
-     * Converts the enum style to the java.util.Calendar style. Standalone styles
-     * are not supported.
-     *
-     * @param style  the enum style
-     * @return the int style, or -1 if style is null, indicating unrequired
-     */
-    private int convertStyle(FormatStyle style) {
-        if (style == null) {
-            return -1;
-        }
-        return style.ordinal();  // indices happen to align
-    }
-
-}
--- a/src/share/classes/java/time/format/DateTimeFormatter.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/format/DateTimeFormatter.java	Wed Apr 17 21:48:04 2013 -0700
@@ -79,45 +79,343 @@
 import java.time.DateTimeException;
 import java.time.ZoneId;
 import java.time.ZoneOffset;
+import java.time.chrono.Chronology;
+import java.time.chrono.IsoChronology;
 import java.time.format.DateTimeFormatterBuilder.CompositePrinterParser;
-import java.time.chrono.Chronology;
 import java.time.temporal.ChronoField;
 import java.time.temporal.IsoFields;
 import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Objects;
+import java.util.Set;
 
 /**
  * Formatter for printing and parsing date-time objects.
  * <p>
  * This class provides the main application entry point for printing and parsing
  * and provides common implementations of {@code DateTimeFormatter}:
- * <p><ul>
- * <li>Using pattern letters, such as {@code yyyy-MMM-dd}
- * <li>Using localized styles, such as {@code long} or {@code medium}
- * <li>Using predefined constants, such as {@code ISO_LOCAL_DATE}
- * </ul></p>
+ * <ul>
+ * <li>Using predefined constants, such as {@link #ISO_LOCAL_DATE}</li>
+ * <li>Using pattern letters, such as {@code uuuu-MMM-dd}</li>
+ * <li>Using localized styles, such as {@code long} or {@code medium}</li>
+ * </ul>
+ * <p>
+ * More complex formatters are provided by
+ * {@link DateTimeFormatterBuilder DateTimeFormatterBuilder}.
  *
  * <p>
- * In most cases, provided formatters will be sufficient.
- * For more complex formatters, a {@link DateTimeFormatterBuilder builder} is provided.
- * The main date-time classes provide two methods - one for printing,
- * {@code toString(DateTimeFormatter formatter)}, and one for parsing,
+ * The main date-time classes provide two methods - one for formatting,
+ * {@code format(DateTimeFormatter formatter)}, and one for parsing,
  * {@code parse(CharSequence text, DateTimeFormatter formatter)}.
- * For example:
- * <pre>
+ * <p>For example:
+ * <blockquote><pre>
  *  String text = date.toString(formatter);
  *  LocalDate date = LocalDate.parse(text, formatter);
+ * </pre></blockquote>
+ * <p>
+ * In addition to the format, formatters can be created with desired Locale,
+ * Chronology, ZoneId, and formatting symbols.
+ * <p>
+ * The {@link #withLocale withLocale} method returns a new formatter that
+ * overrides the locale. The locale affects some aspects of formatting and
+ * parsing. For example, the {@link #ofLocalizedDate ofLocalizedDate} provides a
+ * formatter that uses the locale specific date format.
+ * <p>
+ * The {@link #withChronology withChronology} method returns a new formatter
+ * that overrides the chronology. If overridden, the date-time value is
+ * converted to the chronology before formatting. During parsing the date-time
+ * value is converted to the chronology before it is returned.
+ * <p>
+ * The {@link #withZone withZone} method returns a new formatter that overrides
+ * the zone. If overridden, the date-time value is converted to a ZonedDateTime
+ * with the requested ZoneId before formatting. During parsing the ZoneId is
+ * applied before the value is returned.
+ * <p>
+ * The {@link #withSymbols withSymbols} method returns a new formatter that
+ * overrides the {@link DateTimeFormatSymbols}. The symbols are used for
+ * formatting and parsing.
+ * <p>
+ * Some applications may need to use the older {@link Format java.text.Format}
+ * class for formatting. The {@link #toFormat()} method returns an
+ * implementation of {@code java.text.Format}.
+ * <p>
+ * <h3 id="predefined">Predefined Formatters</h3>
+ * <table summary="Predefined Formatters" cellpadding="2" cellspacing="3" border="0" >
+ * <thead>
+ * <tr class="tableSubHeadingColor">
+ * <th class="colFirst" align="left">Formatter</th>
+ * <th class="colFirst" align="left">Description</th>
+ * <th class="colLast" align="left">Example</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr class="rowColor">
+ * <td>{@link #ofLocalizedDate ofLocalizedDate(dateStyle)} </td>
+ * <td> Formatter with date style from the locale </td>
+ * <td> '2011-12-03'</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td> {@link #ofLocalizedTime ofLocalizedTime(timeStyle)} </td>
+ * <td> Formatter with time style from the locale </td>
+ * <td> '10:15:30'</td>
+ * </tr>
+ * <tr class="rowColor">
+ * <td> {@link #ofLocalizedDateTime ofLocalizedDateTime(dateTimeStyle)} </td>
+ * <td> Formatter with a style for date and time from the locale</td>
+ * <td> '3 Jun 2008 11:05:30'</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td> {@link #ofLocalizedDateTime ofLocalizedDateTime(dateStyle,timeStyle)}
+ * </td>
+ * <td> Formatter with date and time styles from the locale </td>
+ * <td> '3 Jun 2008 11:05'</td>
+ * </tr>
+ * <tr class="rowColor">
+ * <td> {@link #BASIC_ISO_DATE}</td>
+ * <td>Basic ISO date </td> <td>'20111203'</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td> {@link #ISO_LOCAL_DATE}</td>
+ * <td> ISO Local Date </td>
+ * <td>'2011-12-03'</td>
+ * </tr>
+ * <tr class="rowColor">
+ * <td> {@link #ISO_OFFSET_DATE}</td>
+ * <td> ISO Date with offset </td>
+ * <td>'2011-12-03+01:00'</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td> {@link #ISO_DATE}</td>
+ * <td> ISO Date with or without offset </td>
+ * <td> '2011-12-03+01:00'; '2011-12-03'</td>
+ * </tr>
+ * <tr class="rowColor">
+ * <td> {@link #ISO_LOCAL_TIME}</td>
+ * <td> Time without offset </td>
+ * <td>'10:15:30'</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td> {@link #ISO_OFFSET_TIME}</td>
+ * <td> Time with offset </td>
+ * <td>'10:15:30+01:00'</td>
+ * </tr>
+ * <tr class="rowColor">
+ * <td> {@link #ISO_TIME}</td>
+ * <td> Time with or without offset </td>
+ * <td>'10:15:30+01:00'; '10:15:30'</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td> {@link #ISO_LOCAL_DATE_TIME}</td>
+ * <td> ISO Local Date and Time </td>
+ * <td>'2011-12-03T10:15:30'</td>
+ * </tr>
+ * <tr class="rowColor">
+ * <td> {@link #ISO_OFFSET_DATE_TIME}</td>
+ * <td> Date Time with Offset
+ * </td><td>2011-12-03T10:15:30+01:00'</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td> {@link #ISO_ZONED_DATE_TIME}</td>
+ * <td> Zoned Date Time </td>
+ * <td>'2011-12-03T10:15:30+01:00[Europe/Paris]'</td>
+ * </tr>
+ * <tr class="rowColor">
+ * <td> {@link #ISO_DATE_TIME}</td>
+ * <td> Date and time with ZoneId </td>
+ * <td>'2011-12-03T10:15:30+01:00[Europe/Paris]'</td>
+ * </tr>
+ * <tr class="altColor">
+ * <td> {@link #ISO_ORDINAL_DATE}</td>
+ * <td> Year and day of year </td>
+ * <td>'2012-337'</td>
+ * </tr>
+ * <tr class="rowColor">
+ * <td> {@link #ISO_WEEK_DATE}</td>
+ * <td> Year and Week </td>
+ * <td>2012-W48-6'</td></tr>
+ * <tr class="altColor">
+ * <td> {@link #ISO_INSTANT}</td>
+ * <td> Date and Time of an Instant </td>
+ * <td>'2011-12-03T10:15:30Z' </td>
+ * </tr>
+ * <tr class="rowColor">
+ * <td> {@link #RFC_1123_DATE_TIME}</td>
+ * <td> RFC 1123 / RFC 822 </td>
+ * <td>'Tue, 3 Jun 2008 11:05:30 GMT'</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ *
+ * <h3 id="patterns">Patterns for Formatting and Parsing</h3>
+ * Patterns are based on a simple sequence of letters and symbols.
+ * A pattern is used to create a Formatter using the
+ * {@link #ofPattern(String)} and {@link #ofPattern(String, Locale)} methods.
+ * For example,
+ * {@code "d MMM uuuu"} will format 2011-12-03 as '3&nbsp;Dec&nbsp;2011'.
+ * A formatter created from a pattern can be used as many times as necessary,
+ * it is immutable and is thread-safe.
+ * <p>
+ * For example:
+ * <blockquote><pre>
+ *  DateTimeFormatter formatter = DateTimeFormatter.pattern("yyyy MM dd");
+ *  String text = date.toString(formatter);
+ *  LocalDate date = LocalDate.parse(text, formatter);
+ * </pre></blockquote>
+ * <p>
+ * All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters. The
+ * following pattern letters are defined:
+ * <pre>
+ *  Symbol  Meaning                     Presentation      Examples
+ *  ------  -------                     ------------      -------
+ *   G       era                         text              AD; Anno Domini; A
+ *   u       year                        year              2004; 04
+ *   y       year-of-era                 year              2004; 04
+ *   D       day-of-year                 number            189
+ *   M/L     month-of-year               number/text       7; 07; Jul; July; J
+ *   d       day-of-month                number            10
+ *
+ *   Q/q     quarter-of-year             number/text       3; 03; Q3; 3rd quarter
+ *   Y       week-based-year             year              1996; 96
+ *   w       week-of-week-based-year     number            27
+ *   W       week-of-month               number            4
+ *   E       day-of-week                 text              Tue; Tuesday; T
+ *   e/c     localized day-of-week       number/text       2; 02; Tue; Tuesday; T
+ *   F       week-of-month               number            3
+ *
+ *   a       am-pm-of-day                text              PM
+ *   h       clock-hour-of-am-pm (1-12)  number            12
+ *   K       hour-of-am-pm (0-11)        number            0
+ *   k       clock-hour-of-am-pm (1-24)  number            0
+ *
+ *   H       hour-of-day (0-23)          number            0
+ *   m       minute-of-hour              number            30
+ *   s       second-of-minute            number            55
+ *   S       fraction-of-second          fraction          978
+ *   A       milli-of-day                number            1234
+ *   n       nano-of-second              number            987654321
+ *   N       nano-of-day                 number            1234000000
+ *
+ *   V       time-zone ID                zone-id           America/Los_Angeles; Z; -08:30
+ *   z       time-zone name              zone-name         Pacific Standard Time; PST
+ *   O       localized zone-offset       offset-O          GMT+8; GMT+08:00; UTC-08:00;
+ *   X       zone-offset 'Z' for zero    offset-X          Z; -08; -0830; -08:30; -083015; -08:30:15;
+ *   x       zone-offset                 offset-x          +0000; -08; -0830; -08:30; -083015; -08:30:15;
+ *   Z       zone-offset                 offset-Z          +0000; -0800; -08:00;
+ *
+ *   p       pad next                    pad modifier      1
+ *
+ *   '       escape for text             delimiter
+ *   ''      single quote                literal           '
+ *   [       optional section start
+ *   ]       optional section end
+ *   #       reserved for future use
+ *   {       reserved for future use
+ *   }       reserved for future use
  * </pre>
- * Some aspects of formatting and parsing are dependent on the locale.
- * The locale can be changed using the {@link #withLocale(Locale)} method
- * which returns a new formatter in the requested locale.
+ * <p>
+ * The count of pattern letters determines the format.
+ * <p>
+ * <b>Text</b>: The text style is determined based on the number of pattern
+ * letters used. Less than 4 pattern letters will use the
+ * {@link TextStyle#SHORT short form}. Exactly 4 pattern letters will use the
+ * {@link TextStyle#FULL full form}. Exactly 5 pattern letters will use the
+ * {@link TextStyle#NARROW narrow form}.
+ * Pattern letters 'L', 'c', and 'q' specify the stand-alone form of the text styles.
+ * <p>
+ * <b>Number</b>: If the count of letters is one, then the value is output using
+ * the minimum number of digits and without padding. Otherwise, the count of digits
+ * is used as the width of the output field, with the value zero-padded as necessary.
+ * The following pattern letters have constraints on the count of letters.
+ * Only one letter of 'c' and 'F' can be specified.
+ * Up to two letters of 'd', 'H', 'h', 'K', 'k', 'm', and 's' can be specified.
+ * Up to three letters of 'D' can be specified.
+ * <p>
+ * <b>Number/Text</b>: If the count of pattern letters is 3 or greater, use the
+ * Text rules above. Otherwise use the Number rules above.
+ * <p>
+ * <b>Fraction</b>: Outputs the nano-of-second field as a fraction-of-second.
+ * The nano-of-second value has nine digits, thus the count of pattern letters
+ * is from 1 to 9. If it is less than 9, then the nano-of-second value is
+ * truncated, with only the most significant digits being output. When parsing
+ * in strict mode, the number of parsed digits must match the count of pattern
+ * letters. When parsing in lenient mode, the number of parsed digits must be at
+ * least the count of pattern letters, up to 9 digits.
+ * <p>
+ * <b>Year</b>: The count of letters determines the minimum field width below
+ * which padding is used. If the count of letters is two, then a
+ * {@link DateTimeFormatterBuilder#appendValueReduced reduced} two digit form is
+ * used. For printing, this outputs the rightmost two digits. For parsing, this
+ * will parse using the base value of 2000, resulting in a year within the range
+ * 2000 to 2099 inclusive. If the count of letters is less than four (but not
+ * two), then the sign is only output for negative years as per
+ * {@link SignStyle#NORMAL}. Otherwise, the sign is output if the pad width is
+ * exceeded, as per {@link SignStyle#EXCEEDS_PAD}.
+ * <p>
+ * <b>ZoneId</b>: This outputs the time-zone ID, such as 'Europe/Paris'. If the
+ * count of letters is two, then the time-zone ID is output. Any other count of
+ * letters throws {@code IllegalArgumentException}.
+ * <p>
+ * <b>Zone names</b>: This outputs the display name of the time-zone ID. If the
+ * count of letters is one, two or three, then the short name is output. If the
+ * count of letters is four, then the full name is output. Five or more letters
+ * throws {@code IllegalArgumentException}.
  * <p>
- * Some applications may need to use the older {@link Format} class for formatting.
- * The {@link #toFormat()} method returns an implementation of the old API.
+ * <b>Offset X and x</b>: This formats the offset based on the number of pattern
+ * letters. One letter outputs just the hour, such as '+01', unless the minute
+ * is non-zero in which case the minute is also output, such as '+0130'. Two
+ * letters outputs the hour and minute, without a colon, such as '+0130'. Three
+ * letters outputs the hour and minute, with a colon, such as '+01:30'. Four
+ * letters outputs the hour and minute and optional second, without a colon,
+ * such as '+013015'. Five letters outputs the hour and minute and optional
+ * second, with a colon, such as '+01:30:15'. Six or more letters throws
+ * {@code IllegalArgumentException}. Pattern letter 'X' (upper case) will output
+ * 'Z' when the offset to be output would be zero, whereas pattern letter 'x'
+ * (lower case) will output '+00', '+0000', or '+00:00'.
+ * <p>
+ * <b>Offset O</b>: This formats the localized offset based on the number of
+ * pattern letters. One letter outputs the {@linkplain TextStyle#SHORT short}
+ * form of the localized offset, which is localized offset text, such as 'GMT',
+ * with hour without leading zero, optional 2-digit minute and second if
+ * non-zero, and colon, for example 'GMT+8'. Four letters outputs the
+ * {@linkplain TextStyle#FULL full} form, which is localized offset text,
+ * such as 'GMT, with 2-digit hour and minute field, optional second field
+ * if non-zero, and colon, for example 'GMT+08:00'. Any other count of letters
+ * throws {@code IllegalArgumentException}.
+ * <p>
+ * <b>Offset Z</b>: This formats the offset based on the number of pattern
+ * letters. One, two or three letters outputs the hour and minute, without a
+ * colon, such as '+0130'. The output will be '+0000' when the offset is zero.
+ * Four letters outputs the {@linkplain TextStyle#FULL full} form of localized
+ * offset, equivalent to four letters of Offset-O. The output will be the
+ * corresponding localized offset text if the offset is zero. Five
+ * letters outputs the hour, minute, with optional second if non-zero, with
+ * colon. It outputs 'Z' if the offset is zero.
+ * Six or more letters throws {@code IllegalArgumentException}.
+ * <p>
+ * <b>Optional section</b>: The optional section markers work exactly like
+ * calling {@link DateTimeFormatterBuilder#optionalStart()} and
+ * {@link DateTimeFormatterBuilder#optionalEnd()}.
+ * <p>
+ * <b>Pad modifier</b>: Modifies the pattern that immediately follows to be
+ * padded with spaces. The pad width is determined by the number of pattern
+ * letters. This is the same as calling
+ * {@link DateTimeFormatterBuilder#padNext(int)}.
+ * <p>
+ * For example, 'ppH' outputs the hour-of-day padded on the left with spaces to
+ * a width of 2.
+ * <p>
+ * Any unrecognized letter is an error. Any non-letter character, other than
+ * '[', ']', '{', '}', '#' and the single quote will be output directly.
+ * Despite this, it is recommended to use single quotes around all characters
+ * that you want to output directly to ensure that future changes do not break
+ * your application.
  *
  * <h3>Specification for implementors</h3>
  * This class is immutable and thread-safe.
@@ -139,6 +437,14 @@
      */
     private final DateTimeFormatSymbols symbols;
     /**
+     * The resolver style to use, not null.
+     */
+    private final ResolverStyle resolverStyle;
+    /**
+     * The fields to use in resolving, null for all fields.
+     */
+    private final Set<TemporalField> resolverFields;
+    /**
      * The chronology to use for formatting, null for no override.
      */
     private final Chronology chrono;
@@ -151,129 +457,17 @@
     /**
      * Creates a formatter using the specified pattern.
      * <p>
-     * This method will create a formatter based on a simple pattern of letters and symbols.
-     * For example, {@code d MMM yyyy} will format 2011-12-03 as '3 Dec 2011'.
-     * <p>
-     * The returned formatter will use the default locale, but this can be changed
-     * using {@link DateTimeFormatter#withLocale(Locale)}.
-     * <p>
-     * All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters.
-     * The following pattern letters are defined:
-     * <pre>
-     *  Symbol  Meaning                     Presentation      Examples
-     *  ------  -------                     ------------      -------
-     *   G       era                         text              A; AD; Anno Domini
-     *   y       year                        year              2004; 04
-     *   D       day-of-year                 number            189
-     *   M       month-of-year               number/text       7; 07; Jul; July; J
-     *   d       day-of-month                number            10
-     *
-     *   Q       quarter-of-year             number/text       3; 03; Q3
-     *   Y       week-based-year             year              1996; 96
-     *   w       week-of-year                number            27
-     *   W       week-of-month               number            27
-     *   e       localized day-of-week       number            2; Tue; Tuesday; T
-     *   E       day-of-week                 number/text       2; Tue; Tuesday; T
-     *   F       week-of-month               number            3
-     *
-     *   a       am-pm-of-day                text              PM
-     *   h       clock-hour-of-am-pm (1-12)  number            12
-     *   K       hour-of-am-pm (0-11)        number            0
-     *   k       clock-hour-of-am-pm (1-24)  number            0
-     *
-     *   H       hour-of-day (0-23)          number            0
-     *   m       minute-of-hour              number            30
-     *   s       second-of-minute            number            55
-     *   S       fraction-of-second          fraction          978
-     *   A       milli-of-day                number            1234
-     *   n       nano-of-second              number            987654321
-     *   N       nano-of-day                 number            1234000000
-     *
-     *   V       time-zone ID                zone-id           America/Los_Angeles; Z; -08:30
-     *   z       time-zone name              zone-name         Pacific Standard Time; PST
-     *   X       zone-offset 'Z' for zero    offset-X          Z; -08; -0830; -08:30; -083015; -08:30:15;
-     *   x       zone-offset                 offset-x          +0000; -08; -0830; -08:30; -083015; -08:30:15;
-     *   Z       zone-offset                 offset-Z          +0000; -0800; -08:00;
-     *
-     *   p       pad next                    pad modifier      1
-     *
-     *   '       escape for text             delimiter
-     *   ''      single quote                literal           '
-     *   [       optional section start
-     *   ]       optional section end
-     *   {}      reserved for future use
-     * </pre>
-     * <p>
-     * The count of pattern letters determine the format.
-     * <p>
-     * <b>Text</b>: The text style is determined based on the number of pattern letters used.
-     * Less than 4 pattern letters will use the {@link TextStyle#SHORT short form}.
-     * Exactly 4 pattern letters will use the {@link TextStyle#FULL full form}.
-     * Exactly 5 pattern letters will use the {@link TextStyle#NARROW narrow form}.
+     * This method will create a formatter based on a simple
+     * <a href="#patterns">pattern of letters and symbols</a>
+     * as described in the class documentation.
+     * For example, {@code d MMM uuuu} will format 2011-12-03 as '3 Dec 2011'.
      * <p>
-     * <b>Number</b>: If the count of letters is one, then the value is output using the minimum number
-     * of digits and without padding as per {@link DateTimeFormatterBuilder#appendValue(java.time.temporal.TemporalField)}.
-     * Otherwise, the count of digits is used as the width of the output field as per
-     * {@link DateTimeFormatterBuilder#appendValue(java.time.temporal.TemporalField, int)}.
-     * <p>
-     * <b>Number/Text</b>: If the count of pattern letters is 3 or greater, use the Text rules above.
-     * Otherwise use the Number rules above.
-     * <p>
-     * <b>Fraction</b>: Outputs the nano-of-second field as a fraction-of-second.
-     * The nano-of-second value has nine digits, thus the count of pattern letters is from 1 to 9.
-     * If it is less than 9, then the nano-of-second value is truncated, with only the most
-     * significant digits being output.
-     * When parsing in strict mode, the number of parsed digits must match the count of pattern letters.
-     * When parsing in lenient mode, the number of parsed digits must be at least the count of pattern
-     * letters, up to 9 digits.
-     * <p>
-     * <b>Year</b>: The count of letters determines the minimum field width below which padding is used.
-     * If the count of letters is two, then a {@link DateTimeFormatterBuilder#appendValueReduced reduced}
-     * two digit form is used.
-     * For printing, this outputs the rightmost two digits. For parsing, this will parse using the
-     * base value of 2000, resulting in a year within the range 2000 to 2099 inclusive.
-     * If the count of letters is less than four (but not two), then the sign is only output for negative
-     * years as per {@link SignStyle#NORMAL}.
-     * Otherwise, the sign is output if the pad width is exceeded, as per {@link SignStyle#EXCEEDS_PAD}
-     * <p>
-     * <b>ZoneId</b>: This outputs the time-zone ID, such as 'Europe/Paris'.
-     * If the count of letters is two, then the time-zone ID is output.
-     * Any other count of letters throws {@code IllegalArgumentException}.
+     * The formatter will use the {@link Locale#getDefault(Locale.Category) default FORMAT locale}.
+     * This can be changed using {@link DateTimeFormatter#withLocale(Locale)} on the returned formatter
+     * Alternatively use the {@link #ofPattern(String, Locale)} variant of this method.
      * <p>
-     * <b>Zone names</b>: This outputs the display name of the time-zone ID.
-     * If the count of letters is one, two or three, then the short name is output.
-     * If the count of letters is four, then the full name is output.
-     * Five or more letters throws {@code IllegalArgumentException}.
-     * <p>
-     * <b>Offset X and x</b>: This formats the offset based on the number of pattern letters.
-     * One letter outputs just the hour', such as '+01', unless the minute is non-zero
-     * in which case the minute is also output, such as '+0130'.
-     * Two letters outputs the hour and minute, without a colon, such as '+0130'.
-     * Three letters outputs the hour and minute, with a colon, such as '+01:30'.
-     * Four letters outputs the hour and minute and optional second, without a colon, such as '+013015'.
-     * Five letters outputs the hour and minute and optional second, with a colon, such as '+01:30:15'.
-     * Six or more letters throws {@code IllegalArgumentException}.
-     * Pattern letter 'X' (upper case) will output 'Z' when the offset to be output would be zero,
-     * whereas pattern letter 'x' (lower case) will output '+00', '+0000', or '+00:00'.
-     * <p>
-     * <b>Offset Z</b>: This formats the offset based on the number of pattern letters.
-     * One, two or three letters outputs the hour and minute, without a colon, such as '+0130'.
-     * Four or more letters throws {@code IllegalArgumentException}.
-     * The output will be '+0000' when the offset is zero.
-     * <p>
-     * <b>Optional section</b>: The optional section markers work exactly like calling
-     * {@link DateTimeFormatterBuilder#optionalStart()} and {@link DateTimeFormatterBuilder#optionalEnd()}.
-     * <p>
-     * <b>Pad modifier</b>: Modifies the pattern that immediately follows to be padded with spaces.
-     * The pad width is determined by the number of pattern letters.
-     * This is the same as calling {@link DateTimeFormatterBuilder#padNext(int)}.
-     * <p>
-     * For example, 'ppH' outputs the hour-of-day padded on the left with spaces to a width of 2.
-     * <p>
-     * Any unrecognized letter is an error.
-     * Any non-letter character, other than '[', ']', '{', '}' and the single quote will be output directly.
-     * Despite this, it is recommended to use single quotes around all characters that you want to
-     * output directly to ensure that future changes do not break your application.
+     * The returned formatter has no override chronology or zone.
+     * It uses {@link ResolverStyle#SMART SMART} resolver style.
      *
      * @param pattern  the pattern to use, not null
      * @return the formatter based on the pattern, not null
@@ -285,15 +479,18 @@
     }
 
     /**
-     * Creates a formatter using the specified pattern.
-     * <p>
-     * This method will create a formatter based on a simple pattern of letters and symbols.
-     * For example, {@code d MMM yyyy} will format 2011-12-03 as '3 Dec 2011'.
+     * Creates a formatter using the specified pattern and locale.
      * <p>
-     * See {@link #ofPattern(String)} for details of the pattern.
+     * This method will create a formatter based on a simple
+     * <a href="#patterns">pattern of letters and symbols</a>
+     * as described in the class documentation.
+     * For example, {@code d MMM uuuu} will format 2011-12-03 as '3 Dec 2011'.
      * <p>
-     * The returned formatter will use the specified locale, but this can be changed
-     * using {@link DateTimeFormatter#withLocale(Locale)}.
+     * The formatter will use the specified locale.
+     * This can be changed using {@link DateTimeFormatter#withLocale(Locale)} on the returned formatter
+     * <p>
+     * The returned formatter has no override chronology or zone.
+     * It uses {@link ResolverStyle#SMART SMART} resolver style.
      *
      * @param pattern  the pattern to use, not null
      * @param locale  the locale to use, not null
@@ -307,7 +504,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a locale specific date format.
+     * Returns a locale specific date format for the ISO chronology.
      * <p>
      * This returns a formatter that will format or parse a date.
      * The exact format pattern used varies by locale.
@@ -320,17 +517,22 @@
      * Note that the localized pattern is looked up lazily.
      * This {@code DateTimeFormatter} holds the style required and the locale,
      * looking up the pattern required on demand.
+     * <p>
+     * The returned formatter has a chronology of ISO set to ensure dates in
+     * other calendar systems are correctly converted.
+     * It has no override zone and uses the {@link ResolverStyle#SMART SMART} resolver style.
      *
      * @param dateStyle  the formatter style to obtain, not null
      * @return the date formatter, not null
      */
     public static DateTimeFormatter ofLocalizedDate(FormatStyle dateStyle) {
         Objects.requireNonNull(dateStyle, "dateStyle");
-        return new DateTimeFormatterBuilder().appendLocalized(dateStyle, null).toFormatter();
+        return new DateTimeFormatterBuilder().appendLocalized(dateStyle, null)
+                .toFormatter(ResolverStyle.SMART, IsoChronology.INSTANCE);
     }
 
     /**
-     * Returns a locale specific time format.
+     * Returns a locale specific time format for the ISO chronology.
      * <p>
      * This returns a formatter that will format or parse a time.
      * The exact format pattern used varies by locale.
@@ -343,17 +545,22 @@
      * Note that the localized pattern is looked up lazily.
      * This {@code DateTimeFormatter} holds the style required and the locale,
      * looking up the pattern required on demand.
+     * <p>
+     * The returned formatter has a chronology of ISO set to ensure dates in
+     * other calendar systems are correctly converted.
+     * It has no override zone and uses the {@link ResolverStyle#SMART SMART} resolver style.
      *
      * @param timeStyle  the formatter style to obtain, not null
      * @return the time formatter, not null
      */
     public static DateTimeFormatter ofLocalizedTime(FormatStyle timeStyle) {
         Objects.requireNonNull(timeStyle, "timeStyle");
-        return new DateTimeFormatterBuilder().appendLocalized(null, timeStyle).toFormatter();
+        return new DateTimeFormatterBuilder().appendLocalized(null, timeStyle)
+                .toFormatter(ResolverStyle.SMART, IsoChronology.INSTANCE);
     }
 
     /**
-     * Returns a locale specific date-time formatter, which is typically of short length.
+     * Returns a locale specific date-time formatter for the ISO chronology.
      * <p>
      * This returns a formatter that will format or parse a date-time.
      * The exact format pattern used varies by locale.
@@ -366,17 +573,22 @@
      * Note that the localized pattern is looked up lazily.
      * This {@code DateTimeFormatter} holds the style required and the locale,
      * looking up the pattern required on demand.
+     * <p>
+     * The returned formatter has a chronology of ISO set to ensure dates in
+     * other calendar systems are correctly converted.
+     * It has no override zone and uses the {@link ResolverStyle#SMART SMART} resolver style.
      *
      * @param dateTimeStyle  the formatter style to obtain, not null
      * @return the date-time formatter, not null
      */
     public static DateTimeFormatter ofLocalizedDateTime(FormatStyle dateTimeStyle) {
         Objects.requireNonNull(dateTimeStyle, "dateTimeStyle");
-        return new DateTimeFormatterBuilder().appendLocalized(dateTimeStyle, dateTimeStyle).toFormatter();
+        return new DateTimeFormatterBuilder().appendLocalized(dateTimeStyle, dateTimeStyle)
+                .toFormatter(ResolverStyle.SMART, IsoChronology.INSTANCE);
     }
 
     /**
-     * Returns a locale specific date and time format.
+     * Returns a locale specific date and time format for the ISO chronology.
      * <p>
      * This returns a formatter that will format or parse a date-time.
      * The exact format pattern used varies by locale.
@@ -389,6 +601,10 @@
      * Note that the localized pattern is looked up lazily.
      * This {@code DateTimeFormatter} holds the style required and the locale,
      * looking up the pattern required on demand.
+     * <p>
+     * The returned formatter has a chronology of ISO set to ensure dates in
+     * other calendar systems are correctly converted.
+     * It has no override zone and uses the {@link ResolverStyle#SMART SMART} resolver style.
      *
      * @param dateStyle  the date formatter style to obtain, not null
      * @param timeStyle  the time formatter style to obtain, not null
@@ -397,13 +613,14 @@
     public static DateTimeFormatter ofLocalizedDateTime(FormatStyle dateStyle, FormatStyle timeStyle) {
         Objects.requireNonNull(dateStyle, "dateStyle");
         Objects.requireNonNull(timeStyle, "timeStyle");
-        return new DateTimeFormatterBuilder().appendLocalized(dateStyle, timeStyle).toFormatter();
+        return new DateTimeFormatterBuilder().appendLocalized(dateStyle, timeStyle)
+                .toFormatter(ResolverStyle.SMART, IsoChronology.INSTANCE);
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the ISO date formatter that formats or parses a date without an offset,
-     * such as '2011-12-03'.
+     * The ISO date formatter that formats or parses a date without an
+     * offset, such as '2011-12-03'.
      * <p>
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended local date format.
@@ -418,23 +635,27 @@
      * <li>A dash
      * <li>Two digits for the {@link ChronoField#DAY_OF_MONTH day-of-month}.
      *  This is pre-padded by zero to ensure two digits.
-     * </ul></p>
+     * </ul>
+     * <p>
+     * The returned formatter has a chronology of ISO set to ensure dates in
+     * other calendar systems are correctly converted.
+     * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style.
      */
     public static final DateTimeFormatter ISO_LOCAL_DATE;
     static {
         ISO_LOCAL_DATE = new DateTimeFormatterBuilder()
-            .appendValue(YEAR, 4, 10, SignStyle.EXCEEDS_PAD)
-            .appendLiteral('-')
-            .appendValue(MONTH_OF_YEAR, 2)
-            .appendLiteral('-')
-            .appendValue(DAY_OF_MONTH, 2)
-            .toFormatter();
+                .appendValue(YEAR, 4, 10, SignStyle.EXCEEDS_PAD)
+                .appendLiteral('-')
+                .appendValue(MONTH_OF_YEAR, 2)
+                .appendLiteral('-')
+                .appendValue(DAY_OF_MONTH, 2)
+                .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the ISO date formatter that formats or parses a date with an offset,
-     * such as '2011-12-03+01:00'.
+     * The ISO date formatter that formats or parses a date with an
+     * offset, such as '2011-12-03+01:00'.
      * <p>
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended offset date format.
@@ -444,20 +665,24 @@
      * <li>The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then
      *  they will be handled even though this is not part of the ISO-8601 standard.
      *  Parsing is case insensitive.
-     * </ul></p>
+     * </ul>
+     * <p>
+     * The returned formatter has a chronology of ISO set to ensure dates in
+     * other calendar systems are correctly converted.
+     * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style.
      */
     public static final DateTimeFormatter ISO_OFFSET_DATE;
     static {
         ISO_OFFSET_DATE = new DateTimeFormatterBuilder()
-            .parseCaseInsensitive()
-            .append(ISO_LOCAL_DATE)
-            .appendOffsetId()
-            .toFormatter();
+                .parseCaseInsensitive()
+                .append(ISO_LOCAL_DATE)
+                .appendOffsetId()
+                .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the ISO date formatter that formats or parses a date with the
+     * The ISO date formatter that formats or parses a date with the
      * offset if available, such as '2011-12-03' or '2011-12-03+01:00'.
      * <p>
      * This returns an immutable formatter capable of formatting and parsing
@@ -469,25 +694,29 @@
      * <li>The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then
      *  they will be handled even though this is not part of the ISO-8601 standard.
      *  Parsing is case insensitive.
-     * </ul></p>
+     * </ul>
      * <p>
      * As this formatter has an optional element, it may be necessary to parse using
      * {@link DateTimeFormatter#parseBest}.
+     * <p>
+     * The returned formatter has a chronology of ISO set to ensure dates in
+     * other calendar systems are correctly converted.
+     * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style.
      */
     public static final DateTimeFormatter ISO_DATE;
     static {
         ISO_DATE = new DateTimeFormatterBuilder()
-            .parseCaseInsensitive()
-            .append(ISO_LOCAL_DATE)
-            .optionalStart()
-            .appendOffsetId()
-            .toFormatter();
+                .parseCaseInsensitive()
+                .append(ISO_LOCAL_DATE)
+                .optionalStart()
+                .appendOffsetId()
+                .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the ISO time formatter that formats or parses a time without an offset,
-     * such as '10:15' or '10:15:30'.
+     * The ISO time formatter that formats or parses a time without an
+     * offset, such as '10:15' or '10:15:30'.
      * <p>
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended local time format.
@@ -506,26 +735,29 @@
      * <li>A decimal point
      * <li>One to nine digits for the {@link ChronoField#NANO_OF_SECOND nano-of-second}.
      *  As many digits will be output as required.
-     * </ul></p>
+     * </ul>
+     * <p>
+     * The returned formatter has no override chronology or zone.
+     * It uses the {@link ResolverStyle#STRICT STRICT} resolver style.
      */
     public static final DateTimeFormatter ISO_LOCAL_TIME;
     static {
         ISO_LOCAL_TIME = new DateTimeFormatterBuilder()
-            .appendValue(HOUR_OF_DAY, 2)
-            .appendLiteral(':')
-            .appendValue(MINUTE_OF_HOUR, 2)
-            .optionalStart()
-            .appendLiteral(':')
-            .appendValue(SECOND_OF_MINUTE, 2)
-            .optionalStart()
-            .appendFraction(NANO_OF_SECOND, 0, 9, true)
-            .toFormatter();
+                .appendValue(HOUR_OF_DAY, 2)
+                .appendLiteral(':')
+                .appendValue(MINUTE_OF_HOUR, 2)
+                .optionalStart()
+                .appendLiteral(':')
+                .appendValue(SECOND_OF_MINUTE, 2)
+                .optionalStart()
+                .appendFraction(NANO_OF_SECOND, 0, 9, true)
+                .toFormatter(ResolverStyle.STRICT, null);
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the ISO time formatter that formats or parses a time with an offset,
-     * such as '10:15+01:00' or '10:15:30+01:00'.
+     * The ISO time formatter that formats or parses a time with an
+     * offset, such as '10:15+01:00' or '10:15:30+01:00'.
      * <p>
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended offset time format.
@@ -535,20 +767,23 @@
      * <li>The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then
      *  they will be handled even though this is not part of the ISO-8601 standard.
      *  Parsing is case insensitive.
-     * </ul></p>
+     * </ul>
+     * <p>
+     * The returned formatter has no override chronology or zone.
+     * It uses the {@link ResolverStyle#STRICT STRICT} resolver style.
      */
     public static final DateTimeFormatter ISO_OFFSET_TIME;
     static {
         ISO_OFFSET_TIME = new DateTimeFormatterBuilder()
-            .parseCaseInsensitive()
-            .append(ISO_LOCAL_TIME)
-            .appendOffsetId()
-            .toFormatter();
+                .parseCaseInsensitive()
+                .append(ISO_LOCAL_TIME)
+                .appendOffsetId()
+                .toFormatter(ResolverStyle.STRICT, null);
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the ISO time formatter that formats or parses a time, with the
+     * The ISO time formatter that formats or parses a time, with the
      * offset if available, such as '10:15', '10:15:30' or '10:15:30+01:00'.
      * <p>
      * This returns an immutable formatter capable of formatting and parsing
@@ -560,25 +795,28 @@
      * <li>The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then
      *  they will be handled even though this is not part of the ISO-8601 standard.
      *  Parsing is case insensitive.
-     * </ul></p>
+     * </ul>
      * <p>
      * As this formatter has an optional element, it may be necessary to parse using
      * {@link DateTimeFormatter#parseBest}.
+     * <p>
+     * The returned formatter has no override chronology or zone.
+     * It uses the {@link ResolverStyle#STRICT STRICT} resolver style.
      */
     public static final DateTimeFormatter ISO_TIME;
     static {
         ISO_TIME = new DateTimeFormatterBuilder()
-            .parseCaseInsensitive()
-            .append(ISO_LOCAL_TIME)
-            .optionalStart()
-            .appendOffsetId()
-            .toFormatter();
+                .parseCaseInsensitive()
+                .append(ISO_LOCAL_TIME)
+                .optionalStart()
+                .appendOffsetId()
+                .toFormatter(ResolverStyle.STRICT, null);
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the ISO date formatter that formats or parses a date-time
-     * without an offset, such as '2011-12-03T10:15:30'.
+     * The ISO date-time formatter that formats or parses a date-time without
+     * an offset, such as '2011-12-03T10:15:30'.
      * <p>
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended offset date-time format.
@@ -587,22 +825,26 @@
      * <li>The {@link #ISO_LOCAL_DATE}
      * <li>The letter 'T'. Parsing is case insensitive.
      * <li>The {@link #ISO_LOCAL_TIME}
-     * </ul></p>
+     * </ul>
+     * <p>
+     * The returned formatter has a chronology of ISO set to ensure dates in
+     * other calendar systems are correctly converted.
+     * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style.
      */
     public static final DateTimeFormatter ISO_LOCAL_DATE_TIME;
     static {
         ISO_LOCAL_DATE_TIME = new DateTimeFormatterBuilder()
-            .parseCaseInsensitive()
-            .append(ISO_LOCAL_DATE)
-            .appendLiteral('T')
-            .append(ISO_LOCAL_TIME)
-            .toFormatter();
+                .parseCaseInsensitive()
+                .append(ISO_LOCAL_DATE)
+                .appendLiteral('T')
+                .append(ISO_LOCAL_TIME)
+                .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the ISO date formatter that formats or parses a date-time
-     * with an offset, such as '2011-12-03T10:15:30+01:00'.
+     * The ISO date-time formatter that formats or parses a date-time with an
+     * offset, such as '2011-12-03T10:15:30+01:00'.
      * <p>
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 extended offset date-time format.
@@ -612,25 +854,30 @@
      * <li>The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then
      *  they will be handled even though this is not part of the ISO-8601 standard.
      *  Parsing is case insensitive.
-     * </ul></p>
+     * </ul>
+     * <p>
+     * The returned formatter has a chronology of ISO set to ensure dates in
+     * other calendar systems are correctly converted.
+     * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style.
      */
     public static final DateTimeFormatter ISO_OFFSET_DATE_TIME;
     static {
         ISO_OFFSET_DATE_TIME = new DateTimeFormatterBuilder()
-            .parseCaseInsensitive()
-            .append(ISO_LOCAL_DATE_TIME)
-            .appendOffsetId()
-            .toFormatter();
+                .parseCaseInsensitive()
+                .append(ISO_LOCAL_DATE_TIME)
+                .appendOffsetId()
+                .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the ISO date formatter that formats or parses a date-time with
+     * The ISO-like date-time formatter that formats or parses a date-time with
      * offset and zone, such as '2011-12-03T10:15:30+01:00[Europe/Paris]'.
      * <p>
      * This returns an immutable formatter capable of formatting and parsing
      * a format that extends the ISO-8601 extended offset date-time format
      * to add the time-zone.
+     * The section in square brackets is not part of the ISO-8601 standard.
      * The format consists of:
      * <p><ul>
      * <li>The {@link #ISO_OFFSET_DATE_TIME}
@@ -639,28 +886,33 @@
      * <li>The {@link ZoneId#getId() zone ID}. This is not part of the ISO-8601 standard.
      *  Parsing is case sensitive.
      * <li>A close square bracket ']'.
-     * </ul></p>
+     * </ul>
+     * <p>
+     * The returned formatter has a chronology of ISO set to ensure dates in
+     * other calendar systems are correctly converted.
+     * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style.
      */
     public static final DateTimeFormatter ISO_ZONED_DATE_TIME;
     static {
         ISO_ZONED_DATE_TIME = new DateTimeFormatterBuilder()
-            .append(ISO_OFFSET_DATE_TIME)
-            .optionalStart()
-            .appendLiteral('[')
-            .parseCaseSensitive()
-            .appendZoneRegionId()
-            .appendLiteral(']')
-            .toFormatter();
+                .append(ISO_OFFSET_DATE_TIME)
+                .optionalStart()
+                .appendLiteral('[')
+                .parseCaseSensitive()
+                .appendZoneRegionId()
+                .appendLiteral(']')
+                .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the ISO date formatter that formats or parses a date-time
-     * with the offset and zone if available, such as '2011-12-03T10:15:30',
+     * The ISO-like date-time formatter that formats or parses a date-time with
+     * the offset and zone if available, such as '2011-12-03T10:15:30',
      * '2011-12-03T10:15:30+01:00' or '2011-12-03T10:15:30+01:00[Europe/Paris]'.
      * <p>
      * This returns an immutable formatter capable of formatting and parsing
-     * the ISO-8601 extended offset date-time format.
+     * the ISO-8601 extended local or offset date-time format, as well as the
+     * extended non-ISO form specifying the time-zone.
      * The format consists of:
      * <p><ul>
      * <li>The {@link #ISO_LOCAL_DATE_TIME}
@@ -672,28 +924,32 @@
      * <li>The {@link ZoneId#getId() zone ID}. This is not part of the ISO-8601 standard.
      *  Parsing is case sensitive.
      * <li>A close square bracket ']'.
-     * </ul></p>
+     * </ul>
      * <p>
      * As this formatter has an optional element, it may be necessary to parse using
      * {@link DateTimeFormatter#parseBest}.
+     * <p>
+     * The returned formatter has a chronology of ISO set to ensure dates in
+     * other calendar systems are correctly converted.
+     * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style.
      */
     public static final DateTimeFormatter ISO_DATE_TIME;
     static {
         ISO_DATE_TIME = new DateTimeFormatterBuilder()
-            .append(ISO_LOCAL_DATE_TIME)
-            .optionalStart()
-            .appendOffsetId()
-            .optionalStart()
-            .appendLiteral('[')
-            .parseCaseSensitive()
-            .appendZoneRegionId()
-            .appendLiteral(']')
-            .toFormatter();
+                .append(ISO_LOCAL_DATE_TIME)
+                .optionalStart()
+                .appendOffsetId()
+                .optionalStart()
+                .appendLiteral('[')
+                .parseCaseSensitive()
+                .appendZoneRegionId()
+                .appendLiteral(']')
+                .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the ISO date formatter that formats or parses the ordinal date
+     * The ISO date formatter that formats or parses the ordinal date
      * without an offset, such as '2012-337'.
      * <p>
      * This returns an immutable formatter capable of formatting and parsing
@@ -710,26 +966,30 @@
      * <li>The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then
      *  they will be handled even though this is not part of the ISO-8601 standard.
      *  Parsing is case insensitive.
-     * </ul></p>
+     * </ul>
      * <p>
      * As this formatter has an optional element, it may be necessary to parse using
      * {@link DateTimeFormatter#parseBest}.
+     * <p>
+     * The returned formatter has a chronology of ISO set to ensure dates in
+     * other calendar systems are correctly converted.
+     * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style.
      */
     public static final DateTimeFormatter ISO_ORDINAL_DATE;
     static {
         ISO_ORDINAL_DATE = new DateTimeFormatterBuilder()
-            .parseCaseInsensitive()
-            .appendValue(YEAR, 4, 10, SignStyle.EXCEEDS_PAD)
-            .appendLiteral('-')
-            .appendValue(DAY_OF_YEAR, 3)
-            .optionalStart()
-            .appendOffsetId()
-            .toFormatter();
+                .parseCaseInsensitive()
+                .appendValue(YEAR, 4, 10, SignStyle.EXCEEDS_PAD)
+                .appendLiteral('-')
+                .appendValue(DAY_OF_YEAR, 3)
+                .optionalStart()
+                .appendOffsetId()
+                .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the ISO date formatter that formats or parses the week-based date
+     * The ISO date formatter that formats or parses the week-based date
      * without an offset, such as '2012-W48-6'.
      * <p>
      * This returns an immutable formatter capable of formatting and parsing
@@ -750,50 +1010,67 @@
      * <li>The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then
      *  they will be handled even though this is not part of the ISO-8601 standard.
      *  Parsing is case insensitive.
-     * </ul></p>
+     * </ul>
      * <p>
      * As this formatter has an optional element, it may be necessary to parse using
      * {@link DateTimeFormatter#parseBest}.
+     * <p>
+     * The returned formatter has a chronology of ISO set to ensure dates in
+     * other calendar systems are correctly converted.
+     * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style.
      */
     public static final DateTimeFormatter ISO_WEEK_DATE;
     static {
         ISO_WEEK_DATE = new DateTimeFormatterBuilder()
-            .parseCaseInsensitive()
-            .appendValue(IsoFields.WEEK_BASED_YEAR, 4, 10, SignStyle.EXCEEDS_PAD)
-            .appendLiteral("-W")
-            .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR, 2)
-            .appendLiteral('-')
-            .appendValue(DAY_OF_WEEK, 1)
-            .optionalStart()
-            .appendOffsetId()
-            .toFormatter();
+                .parseCaseInsensitive()
+                .appendValue(IsoFields.WEEK_BASED_YEAR, 4, 10, SignStyle.EXCEEDS_PAD)
+                .appendLiteral("-W")
+                .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR, 2)
+                .appendLiteral('-')
+                .appendValue(DAY_OF_WEEK, 1)
+                .optionalStart()
+                .appendOffsetId()
+                .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the ISO instant formatter that formats or parses an instant in UTC.
+     * The ISO instant formatter that formats or parses an instant in UTC,
+     * such as '2011-12-03T10:15:30Z'.
      * <p>
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 instant format.
+     * <p>
+     * This is a special case formatter intended to allow a human readable form
+     * of an {@link java.time.Instant}. The {@code Instant} class is designed to
+     * only represent a point in time and internally stores a value in nanoseconds
+     * from a fixed epoch of 1970-01-01Z. As such, an {@code Instant} cannot be
+     * formatted as a date or time without providing some form of time-zone.
+     * This formatter allows the {@code Instant} to be formatted, by providing
+     * a suitable conversion using {@code ZoneOffset.UTC}.
+     * <p>
      * The format consists of:
      * <p><ul>
      * <li>The {@link #ISO_OFFSET_DATE_TIME} where the instant is converted from
      *  {@link ChronoField#INSTANT_SECONDS} and {@link ChronoField#NANO_OF_SECOND}
      *  using the {@code UTC} offset. Parsing is case insensitive.
-     * </ul></p>
+     * </ul>
+     * <p>
+     * The returned formatter has no override chronology or zone.
+     * It uses the {@link ResolverStyle#STRICT STRICT} resolver style.
      */
     public static final DateTimeFormatter ISO_INSTANT;
     static {
         ISO_INSTANT = new DateTimeFormatterBuilder()
-            .parseCaseInsensitive()
-            .appendInstant()
-            .toFormatter();
+                .parseCaseInsensitive()
+                .appendInstant()
+                .toFormatter(ResolverStyle.STRICT, null);
     }
 
     //-----------------------------------------------------------------------
     /**
-     * Returns the ISO date formatter that formats or parses a date without an offset,
-     * such as '20111203'.
+     * The ISO date formatter that formats or parses a date without an
+     * offset, such as '20111203'.
      * <p>
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 basic local date format.
@@ -809,21 +1086,25 @@
      * <li>The {@link ZoneOffset#getId() offset ID} without colons. If the offset has
      *  seconds then they will be handled even though this is not part of the ISO-8601 standard.
      *  Parsing is case insensitive.
-     * </ul></p>
+     * </ul>
      * <p>
      * As this formatter has an optional element, it may be necessary to parse using
      * {@link DateTimeFormatter#parseBest}.
+     * <p>
+     * The returned formatter has a chronology of ISO set to ensure dates in
+     * other calendar systems are correctly converted.
+     * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style.
      */
     public static final DateTimeFormatter BASIC_ISO_DATE;
     static {
         BASIC_ISO_DATE = new DateTimeFormatterBuilder()
-            .parseCaseInsensitive()
-            .appendValue(YEAR, 4)
-            .appendValue(MONTH_OF_YEAR, 2)
-            .appendValue(DAY_OF_MONTH, 2)
-            .optionalStart()
-            .appendOffset("+HHMMss", "Z")
-            .toFormatter();
+                .parseCaseInsensitive()
+                .appendValue(YEAR, 4)
+                .appendValue(MONTH_OF_YEAR, 2)
+                .appendValue(DAY_OF_MONTH, 2)
+                .optionalStart()
+                .appendOffset("+HHMMss", "Z")
+                .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
     }
 
     //-----------------------------------------------------------------------
@@ -862,9 +1143,13 @@
      * <li>A space
      * <li>The {@link ZoneOffset#getId() offset ID} without colons or seconds.
      *  An offset of zero uses "GMT". North American zone names and military zone names are not handled.
-     * </ul></p>
+     * </ul>
      * <p>
      * Parsing is case insensitive.
+     * <p>
+     * The returned formatter has a chronology of ISO set to ensure dates in
+     * other calendar systems are correctly converted.
+     * It has no override zone and uses the {@link ResolverStyle#SMART SMART} resolver style.
      */
     public static final DateTimeFormatter RFC_1123_DATE_TIME;
     static {
@@ -892,28 +1177,28 @@
         moy.put(11L, "Nov");
         moy.put(12L, "Dec");
         RFC_1123_DATE_TIME = new DateTimeFormatterBuilder()
-            .parseCaseInsensitive()
-            .parseLenient()
-            .optionalStart()
-            .appendText(DAY_OF_WEEK, dow)
-            .appendLiteral(", ")
-            .optionalEnd()
-            .appendValue(DAY_OF_MONTH, 1, 2, SignStyle.NOT_NEGATIVE)
-            .appendLiteral(' ')
-            .appendText(MONTH_OF_YEAR, moy)
-            .appendLiteral(' ')
-            .appendValue(YEAR, 4)  // 2 digit year not handled
-            .appendLiteral(' ')
-            .appendValue(HOUR_OF_DAY, 2)
-            .appendLiteral(':')
-            .appendValue(MINUTE_OF_HOUR, 2)
-            .optionalStart()
-            .appendLiteral(':')
-            .appendValue(SECOND_OF_MINUTE, 2)
-            .optionalEnd()
-            .appendLiteral(' ')
-            .appendOffset("+HHMM", "GMT")  // should handle UT/Z/EST/EDT/CST/CDT/MST/MDT/PST/MDT
-            .toFormatter();
+                .parseCaseInsensitive()
+                .parseLenient()
+                .optionalStart()
+                .appendText(DAY_OF_WEEK, dow)
+                .appendLiteral(", ")
+                .optionalEnd()
+                .appendValue(DAY_OF_MONTH, 1, 2, SignStyle.NOT_NEGATIVE)
+                .appendLiteral(' ')
+                .appendText(MONTH_OF_YEAR, moy)
+                .appendLiteral(' ')
+                .appendValue(YEAR, 4)  // 2 digit year not handled
+                .appendLiteral(' ')
+                .appendValue(HOUR_OF_DAY, 2)
+                .appendLiteral(':')
+                .appendValue(MINUTE_OF_HOUR, 2)
+                .optionalStart()
+                .appendLiteral(':')
+                .appendValue(SECOND_OF_MINUTE, 2)
+                .optionalEnd()
+                .appendLiteral(' ')
+                .appendOffset("+HHMM", "GMT")  // should handle UT/Z/EST/EDT/CST/CDT/MST/MDT/PST/MDT
+                .toFormatter(ResolverStyle.SMART, IsoChronology.INSTANCE);
     }
 
     /**
@@ -922,14 +1207,20 @@
      * @param printerParser  the printer/parser to use, not null
      * @param locale  the locale to use, not null
      * @param symbols  the symbols to use, not null
+     * @param resolverStyle  the resolver style to use, not null
+     * @param resolverFields  the fields to use during resolving, null for all fields
      * @param chrono  the chronology to use, null for no override
      * @param zone  the zone to use, null for no override
      */
-    DateTimeFormatter(CompositePrinterParser printerParser, Locale locale,
-                      DateTimeFormatSymbols symbols, Chronology chrono, ZoneId zone) {
+    DateTimeFormatter(CompositePrinterParser printerParser,
+            Locale locale, DateTimeFormatSymbols symbols,
+            ResolverStyle resolverStyle, Set<TemporalField> resolverFields,
+            Chronology chrono, ZoneId zone) {
         this.printerParser = Objects.requireNonNull(printerParser, "printerParser");
+        this.resolverFields = resolverFields;
         this.locale = Objects.requireNonNull(locale, "locale");
         this.symbols = Objects.requireNonNull(symbols, "symbols");
+        this.resolverStyle = Objects.requireNonNull(resolverStyle, "resolverStyle");
         this.chrono = chrono;
         this.zone = zone;
     }
@@ -962,7 +1253,7 @@
         if (this.locale.equals(locale)) {
             return this;
         }
-        return new DateTimeFormatter(printerParser, locale, symbols, chrono, zone);
+        return new DateTimeFormatter(printerParser, locale, symbols, resolverStyle, resolverFields, chrono, zone);
     }
 
     //-----------------------------------------------------------------------
@@ -987,7 +1278,7 @@
         if (this.symbols.equals(symbols)) {
             return this;
         }
-        return new DateTimeFormatter(printerParser, locale, symbols, chrono, zone);
+        return new DateTimeFormatter(printerParser, locale, symbols, resolverStyle, resolverFields, chrono, zone);
     }
 
     //-----------------------------------------------------------------------
@@ -998,7 +1289,7 @@
      * By default, a formatter has no override chronology, returning null.
      * See {@link #withChronology(Chronology)} for more details on overriding.
      *
-     * @return the chronology of this formatter, null if no override
+     * @return the override chronology of this formatter, null if no override
      */
     public Chronology getChronology() {
         return chrono;
@@ -1013,26 +1304,35 @@
      * <p>
      * If an override is added, then any date that is formatted or parsed will be affected.
      * <p>
-     * When formatting, if the {@code Temporal} object contains a date then it will
+     * When formatting, if the temporal object contains a date, then it will
      * be converted to a date in the override chronology.
-     * Any time or zone will be retained unless overridden.
-     * The converted result will behave in a manner equivalent to an implementation
-     * of {@code ChronoLocalDate},{@code ChronoLocalDateTime} or {@code ChronoZonedDateTime}.
+     * Whether the temporal contains a date is determined by querying the
+     * {@link ChronoField#EPOCH_DAY EPOCH_DAY} field.
+     * Any time or zone will be retained unaltered unless overridden.
      * <p>
-     * When parsing, the override chronology will be used to interpret the
-     * {@link java.time.temporal.ChronoField fields} into a date unless the
-     * formatter directly parses a valid chronology.
+     * If the temporal object does not contain a date, but does contain one
+     * or more {@code ChronoField} date fields, then a {@code DateTimeException}
+     * is thrown. In all other cases, the override chronology is added to the temporal,
+     * replacing any previous chronology, but without changing the date/time.
+     * <p>
+     * When parsing, there are two distinct cases to consider.
+     * If a chronology has been parsed directly from the text, perhaps because
+     * {@link DateTimeFormatterBuilder#appendChronologyId()} was used, then
+     * this override chronology has no effect.
+     * If no zone has been parsed, then this override chronology will be used
+     * to interpret the {@code ChronoField} values into a date according to the
+     * date resolving rules of the chronology.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param chrono  the new chronology, not null
+     * @param chrono  the new chronology, null if no override
      * @return a formatter based on this formatter with the requested override chronology, not null
      */
     public DateTimeFormatter withChronology(Chronology chrono) {
         if (Objects.equals(this.chrono, chrono)) {
             return this;
         }
-        return new DateTimeFormatter(printerParser, locale, symbols, chrono, zone);
+        return new DateTimeFormatter(printerParser, locale, symbols, resolverStyle, resolverFields, chrono, zone);
     }
 
     //-----------------------------------------------------------------------
@@ -1043,7 +1343,7 @@
      * By default, a formatter has no override zone, returning null.
      * See {@link #withZone(ZoneId)} for more details on overriding.
      *
-     * @return the chronology of this formatter, null if no override
+     * @return the override zone of this formatter, null if no override
      */
     public ZoneId getZone() {
         return zone;
@@ -1058,28 +1358,192 @@
      * <p>
      * If an override is added, then any instant that is formatted or parsed will be affected.
      * <p>
-     * When formatting, if the {@code Temporal} object contains an instant then it will
+     * When formatting, if the temporal object contains an instant, then it will
      * be converted to a zoned date-time using the override zone.
+     * Whether the temporal is an instant is determined by querying the
+     * {@link ChronoField#INSTANT_SECONDS INSTANT_SECONDS} field.
      * If the input has a chronology then it will be retained unless overridden.
      * If the input does not have a chronology, such as {@code Instant}, then
      * the ISO chronology will be used.
-     * The converted result will behave in a manner equivalent to an implementation
-     * of {@code ChronoZonedDateTime}.
      * <p>
-     * When parsing, the override zone will be used to interpret the
-     * {@link java.time.temporal.ChronoField fields} into an instant unless the
-     * formatter directly parses a valid zone.
+     * If the temporal object does not contain an instant, but does contain
+     * an offset then an additional check is made. If the normalized override
+     * zone is an offset that differs from the offset of the temporal, then
+     * a {@code DateTimeException} is thrown. In all other cases, the override
+     * zone is added to the temporal, replacing any previous zone, but without
+     * changing the date/time.
+     * <p>
+     * When parsing, there are two distinct cases to consider.
+     * If a zone has been parsed directly from the text, perhaps because
+     * {@link DateTimeFormatterBuilder#appendZoneId()} was used, then
+     * this override zone has no effect.
+     * If no zone has been parsed, then this override zone will be included in
+     * the result of the parse where it can be used to build instants and date-times.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param zone  the new override zone, not null
+     * @param zone  the new override zone, null if no override
      * @return a formatter based on this formatter with the requested override zone, not null
      */
     public DateTimeFormatter withZone(ZoneId zone) {
         if (Objects.equals(this.zone, zone)) {
             return this;
         }
-        return new DateTimeFormatter(printerParser, locale, symbols, chrono, zone);
+        return new DateTimeFormatter(printerParser, locale, symbols, resolverStyle, resolverFields, chrono, zone);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Gets the resolver style to use during parsing.
+     * <p>
+     * This returns the resolver style, used during the second phase of parsing
+     * when fields are resolved into dates and times.
+     * By default, a formatter has the {@link ResolverStyle#SMART SMART} resolver style.
+     * See {@link #withResolverStyle(ResolverStyle)} for more details.
+     *
+     * @return the resolver style of this formatter, not null
+     */
+    public ResolverStyle getResolverStyle() {
+        return resolverStyle;
+    }
+
+    /**
+     * Returns a copy of this formatter with a new resolver style.
+     * <p>
+     * This returns a formatter with similar state to this formatter but
+     * with the resolver style set. By default, a formatter has the
+     * {@link ResolverStyle#SMART SMART} resolver style.
+     * <p>
+     * Changing the resolver style only has an effect during parsing.
+     * Parsing a text string occurs in two phases.
+     * Phase 1 is a basic text parse according to the fields added to the builder.
+     * Phase 2 resolves the parsed field-value pairs into date and/or time objects.
+     * The resolver style is used to control how phase 2, resolving, happens.
+     * See {@code ResolverStyle} for more information on the options available.
+     * <p>
+     * This instance is immutable and unaffected by this method call.
+     *
+     * @param resolverStyle  the new resolver style, not null
+     * @return a formatter based on this formatter with the requested resolver style, not null
+     */
+    public DateTimeFormatter withResolverStyle(ResolverStyle resolverStyle) {
+        Objects.requireNonNull(resolverStyle, "resolverStyle");
+        if (Objects.equals(this.resolverStyle, resolverStyle)) {
+            return this;
+        }
+        return new DateTimeFormatter(printerParser, locale, symbols, resolverStyle, resolverFields, chrono, zone);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Gets the resolver fields to use during parsing.
+     * <p>
+     * This returns the resolver fields, used during the second phase of parsing
+     * when fields are resolved into dates and times.
+     * By default, a formatter has no resolver fields, and thus returns null.
+     * See {@link #withResolverFields(Set)} for more details.
+     *
+     * @return the immutable set of resolver fields of this formatter, null if no fields
+     */
+    public Set<TemporalField> getResolverFields() {
+        return resolverFields;
+    }
+
+    /**
+     * Returns a copy of this formatter with a new set of resolver fields.
+     * <p>
+     * This returns a formatter with similar state to this formatter but with
+     * the resolver fields set. By default, a formatter has no resolver fields.
+     * <p>
+     * Changing the resolver fields only has an effect during parsing.
+     * Parsing a text string occurs in two phases.
+     * Phase 1 is a basic text parse according to the fields added to the builder.
+     * Phase 2 resolves the parsed field-value pairs into date and/or time objects.
+     * The resolver fields are used to filter the field-value pairs between phase 1 and 2.
+     * <p>
+     * This can be used to select between two or more ways that a date or time might
+     * be resolved. For example, if the formatter consists of year, month, day-of-month
+     * and day-of-year, then there are two ways to resolve a date.
+     * Calling this method with the arguments {@link ChronoField#YEAR YEAR} and
+     * {@link ChronoField#DAY_OF_YEAR DAY_OF_YEAR} will ensure that the date is
+     * resolved using the year and day-of-year, effectively meaning that the month
+     * and day-of-month are ignored during the resolving phase.
+     * <p>
+     * In a similar manner, this method can be used to ignore secondary fields that
+     * would otherwise be cross-checked. For example, if the formatter consists of year,
+     * month, day-of-month and day-of-week, then there is only one way to resolve a
+     * date, but the parsed value for day-of-week will be cross-checked against the
+     * resolved date. Calling this method with the arguments {@link ChronoField#YEAR YEAR},
+     * {@link ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR} and
+     * {@link ChronoField#DAY_OF_MONTH DAY_OF_MONTH} will ensure that the date is
+     * resolved correctly, but without any cross-check for the day-of-week.
+     * <p>
+     * In implementation terms, this method behaves as follows. The result of the
+     * parsing phase can be considered to be a map of field to value. The behavior
+     * of this method is to cause that map to be filtered between phase 1 and 2,
+     * removing all fields other than those specified as arguments to this method.
+     * <p>
+     * This instance is immutable and unaffected by this method call.
+     *
+     * @param resolverFields  the new set of resolver fields, null if no fields
+     * @return a formatter based on this formatter with the requested resolver style, not null
+     */
+    public DateTimeFormatter withResolverFields(TemporalField... resolverFields) {
+        Objects.requireNonNull(resolverFields, "resolverFields");
+        Set<TemporalField> fields = new HashSet<>(Arrays.asList(resolverFields));
+        if (Objects.equals(this.resolverFields, fields)) {
+            return this;
+        }
+        fields = Collections.unmodifiableSet(fields);
+        return new DateTimeFormatter(printerParser, locale, symbols, resolverStyle, fields, chrono, zone);
+    }
+
+    /**
+     * Returns a copy of this formatter with a new set of resolver fields.
+     * <p>
+     * This returns a formatter with similar state to this formatter but with
+     * the resolver fields set. By default, a formatter has no resolver fields.
+     * <p>
+     * Changing the resolver fields only has an effect during parsing.
+     * Parsing a text string occurs in two phases.
+     * Phase 1 is a basic text parse according to the fields added to the builder.
+     * Phase 2 resolves the parsed field-value pairs into date and/or time objects.
+     * The resolver fields are used to filter the field-value pairs between phase 1 and 2.
+     * <p>
+     * This can be used to select between two or more ways that a date or time might
+     * be resolved. For example, if the formatter consists of year, month, day-of-month
+     * and day-of-year, then there are two ways to resolve a date.
+     * Calling this method with the arguments {@link ChronoField#YEAR YEAR} and
+     * {@link ChronoField#DAY_OF_YEAR DAY_OF_YEAR} will ensure that the date is
+     * resolved using the year and day-of-year, effectively meaning that the month
+     * and day-of-month are ignored during the resolving phase.
+     * <p>
+     * In a similar manner, this method can be used to ignore secondary fields that
+     * would otherwise be cross-checked. For example, if the formatter consists of year,
+     * month, day-of-month and day-of-week, then there is only one way to resolve a
+     * date, but the parsed value for day-of-week will be cross-checked against the
+     * resolved date. Calling this method with the arguments {@link ChronoField#YEAR YEAR},
+     * {@link ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR} and
+     * {@link ChronoField#DAY_OF_MONTH DAY_OF_MONTH} will ensure that the date is
+     * resolved correctly, but without any cross-check for the day-of-week.
+     * <p>
+     * In implementation terms, this method behaves as follows. The result of the
+     * parsing phase can be considered to be a map of field to value. The behavior
+     * of this method is to cause that map to be filtered between phase 1 and 2,
+     * removing all fields other than those specified as arguments to this method.
+     * <p>
+     * This instance is immutable and unaffected by this method call.
+     *
+     * @param resolverFields  the new set of resolver fields, null if no fields
+     * @return a formatter based on this formatter with the requested resolver style, not null
+     */
+    public DateTimeFormatter withResolverFields(Set<TemporalField> resolverFields) {
+        Objects.requireNonNull(resolverFields, "resolverFields");
+        if (Objects.equals(this.resolverFields, resolverFields)) {
+            return this;
+        }
+        resolverFields = Collections.unmodifiableSet(new HashSet<>(resolverFields));
+        return new DateTimeFormatter(printerParser, locale, symbols, resolverStyle, resolverFields, chrono, zone);
     }
 
     //-----------------------------------------------------------------------
@@ -1151,7 +1615,7 @@
     public TemporalAccessor parse(CharSequence text) {
         Objects.requireNonNull(text, "text");
         try {
-            return parseToBuilder(text, null).resolve();
+            return parseResolved0(text, null);
         } catch (DateTimeParseException ex) {
             throw ex;
         } catch (RuntimeException ex) {
@@ -1193,7 +1657,7 @@
         Objects.requireNonNull(text, "text");
         Objects.requireNonNull(position, "position");
         try {
-            return parseToBuilder(text, position).resolve();
+            return parseResolved0(text, position);
         } catch (DateTimeParseException | IndexOutOfBoundsException ex) {
             throw ex;
         } catch (RuntimeException ex) {
@@ -1225,8 +1689,7 @@
         Objects.requireNonNull(text, "text");
         Objects.requireNonNull(query, "query");
         try {
-            DateTimeBuilder builder = parseToBuilder(text, null).resolve();
-            return builder.query(query);
+            return parseResolved0(text, null).query(query);
         } catch (DateTimeParseException ex) {
             throw ex;
         } catch (RuntimeException ex) {
@@ -1238,7 +1701,7 @@
      * Fully parses the text producing an object of one of the specified types.
      * <p>
      * This parse method is convenient for use when the parser can handle optional elements.
-     * For example, a pattern of 'yyyy-MM-dd HH.mm[Z]]' can be fully parsed to a {@code ZonedDateTime},
+     * For example, a pattern of 'uuuu-MM-dd HH.mm[ VV]' can be fully parsed to a {@code ZonedDateTime},
      * or partially parsed to a {@code LocalDateTime}.
      * The queries must be specified in order, starting from the best matching full-parse option
      * and ending with the worst matching minimal parse option.
@@ -1272,10 +1735,10 @@
             throw new IllegalArgumentException("At least two queries must be specified");
         }
         try {
-            DateTimeBuilder builder = parseToBuilder(text, null).resolve();
+            TemporalAccessor resolved = parseResolved0(text, null);
             for (TemporalQuery<?> query : queries) {
                 try {
-                    return (TemporalAccessor) builder.query(query);
+                    return (TemporalAccessor) resolved.query(query);
                 } catch (RuntimeException ex) {
                     // continue
                 }
@@ -1289,7 +1752,7 @@
     }
 
     private DateTimeParseException createError(CharSequence text, RuntimeException ex) {
-        String abbr = "";
+        String abbr;
         if (text.length() > 64) {
             abbr = text.subSequence(0, 64).toString() + "...";
         } else {
@@ -1300,23 +1763,23 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Parses the text to a builder.
+     * Parses and resolves the specified text.
      * <p>
-     * This parses to a {@code DateTimeBuilder} ensuring that the text is fully parsed.
-     * This method throws {@link DateTimeParseException} if unable to parse, or
-     * some other {@code DateTimeException} if another date/time problem occurs.
+     * This parses to a {@code TemporalAccessor} ensuring that the text is fully parsed.
      *
      * @param text  the text to parse, not null
      * @param position  the position to parse from, updated with length parsed
      *  and the index of any error, null if parsing whole string
-     * @return the engine representing the result of the parse, not null
+     * @return the resolved result of the parse, not null
      * @throws DateTimeParseException if the parse fails
+     * @throws DateTimeException if an error occurs while resolving the date or time
+     * @throws IndexOutOfBoundsException if the position is invalid
      */
-    private DateTimeBuilder parseToBuilder(final CharSequence text, final ParsePosition position) {
+    private TemporalAccessor parseResolved0(final CharSequence text, final ParsePosition position) {
         ParsePosition pos = (position != null ? position : new ParsePosition(0));
-        DateTimeParseContext result = parseUnresolved0(text, pos);
-        if (result == null || pos.getErrorIndex() >= 0 || (position == null && pos.getIndex() < text.length())) {
-            String abbr = "";
+        Parsed unresolved = parseUnresolved0(text, pos);
+        if (unresolved == null || pos.getErrorIndex() >= 0 || (position == null && pos.getIndex() < text.length())) {
+            String abbr;
             if (text.length() > 64) {
                 abbr = text.subSequence(0, 64).toString() + "...";
             } else {
@@ -1330,7 +1793,7 @@
                         pos.getIndex(), text, pos.getIndex());
             }
         }
-        return result.resolveFields().toBuilder();
+        return unresolved.resolve(resolverStyle, resolverFields);
     }
 
     /**
@@ -1376,7 +1839,7 @@
         return parseUnresolved0(text, position);
     }
 
-    private DateTimeParseContext parseUnresolved0(CharSequence text, ParsePosition position) {
+    private Parsed parseUnresolved0(CharSequence text, ParsePosition position) {
         Objects.requireNonNull(text, "text");
         Objects.requireNonNull(position, "position");
         DateTimeParseContext context = new DateTimeParseContext(this);
@@ -1387,7 +1850,7 @@
             return null;
         }
         position.setIndex(pos);  // errorIndex not updated from input
-        return context;
+        return context.toParsed();
     }
 
     //-----------------------------------------------------------------------
@@ -1496,7 +1959,7 @@
             Objects.requireNonNull(text, "text");
             try {
                 if (parseType == null) {
-                    return formatter.parseToBuilder(text, null).resolve();
+                    return formatter.parseResolved0(text, null);
                 }
                 return formatter.parse(text, parseType);
             } catch (DateTimeParseException ex) {
@@ -1508,7 +1971,7 @@
         @Override
         public Object parseObject(String text, ParsePosition pos) {
             Objects.requireNonNull(text, "text");
-            DateTimeParseContext unresolved;
+            Parsed unresolved;
             try {
                 unresolved = formatter.parseUnresolved0(text, pos);
             } catch (IndexOutOfBoundsException ex) {
@@ -1524,11 +1987,11 @@
                 return null;
             }
             try {
-                DateTimeBuilder builder = unresolved.resolveFields().toBuilder().resolve();
+                TemporalAccessor resolved = unresolved.resolve(formatter.resolverStyle, formatter.resolverFields);
                 if (parseType == null) {
-                    return builder;
+                    return resolved;
                 }
-                return builder.query(parseType);
+                return resolved.query(parseType);
             } catch (RuntimeException ex) {
                 pos.setErrorIndex(0);
                 return null;
--- a/src/share/classes/java/time/format/DateTimeFormatterBuilder.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/format/DateTimeFormatterBuilder.java	Wed Apr 17 21:48:04 2013 -0700
@@ -83,11 +83,9 @@
 import java.time.ZoneOffset;
 import java.time.chrono.Chronology;
 import java.time.chrono.IsoChronology;
-import java.time.chrono.JapaneseChronology;
 import java.time.format.DateTimeTextProvider.LocaleStore;
 import java.time.temporal.ChronoField;
 import java.time.temporal.IsoFields;
-import java.time.temporal.Queries;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
@@ -111,7 +109,10 @@
 import java.util.Set;
 import java.util.TimeZone;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
 
+import sun.util.locale.provider.LocaleProviderAdapter;
+import sun.util.locale.provider.LocaleResources;
 import sun.util.locale.provider.TimeZoneNameUtility;
 
 /**
@@ -129,6 +130,8 @@
  * <li>OffsetId/Offset - the {@linkplain ZoneOffset zone offset}</li>
  * <li>ZoneId - the {@linkplain ZoneId time-zone} id</li>
  * <li>ZoneText - the name of the time-zone</li>
+ * <li>ChronologyId - the {@linkplain Chronology chronology} id</li>
+ * <li>ChronologyText - the name of the chronology</li>
  * <li>Literal - a text literal</li>
  * <li>Nested and Optional - formats can be nested or made optional</li>
  * <li>Other - the printer and parser interfaces can be used to add user supplied formatting</li>
@@ -150,7 +153,7 @@
      * Query for a time-zone that is region-only.
      */
     private static final TemporalQuery<ZoneId> QUERY_REGION_ONLY = (temporal) -> {
-        ZoneId zone = temporal.query(Queries.zoneId());
+        ZoneId zone = temporal.query(TemporalQuery.zoneId());
         return (zone != null && zone instanceof ZoneOffset == false ? zone : null);
     };
 
@@ -288,6 +291,40 @@
 
     //-----------------------------------------------------------------------
     /**
+     * Appends a default value for a field to the formatter for use in parsing.
+     * <p>
+     * This appends an instruction to the builder to inject a default value
+     * into the parsed result. This is especially useful in conjunction with
+     * optional parts of the formatter.
+     * <p>
+     * For example, consider a formatter that parses the year, followed by
+     * an optional month, with a further optional day-of-month. Using such a
+     * formatter would require the calling code to check whether a full date,
+     * year-month or just a year had been parsed. This method can be used to
+     * default the month and day-of-month to a sensible value, such as the
+     * first of the month, allowing the calling code to always get a date.
+     * <p>
+     * During formatting, this method has no effect.
+     * <p>
+     * During parsing, the current state of the parse is inspected.
+     * If the specified field has no associated value, because it has not been
+     * parsed successfully at that point, then the specified value is injected
+     * into the parse result. Injection is immediate, thus the field-value pair
+     * will be visible to any subsequent elements in the formatter.
+     * As such, this method is normally called at the end of the builder.
+     *
+     * @param field  the field to default the value of, not null
+     * @param value  the value to default the field to
+     * @return this, for chaining, not null
+     */
+    public DateTimeFormatterBuilder parseDefaulting(TemporalField field, long value) {
+        Objects.requireNonNull(field, "field");
+        appendInternal(new DefaultValueParser(field, value));
+        return this;
+    }
+
+    //-----------------------------------------------------------------------
+    /**
      * Appends the value of a date-time field to the formatter using a normal
      * output style.
      * <p>
@@ -655,7 +692,7 @@
      * This appends an instruction to format/parse the offset ID to the builder.
      * <p>
      * During formatting, the offset is obtained using a mechanism equivalent
-     * to querying the temporal with {@link Queries#offset()}.
+     * to querying the temporal with {@link TemporalQuery#offset()}.
      * It will be printed using the format defined below.
      * If the offset cannot be obtained then an exception is thrown unless the
      * section of the formatter is optional.
@@ -692,6 +729,44 @@
         return this;
     }
 
+    /**
+     * Appends the localized zone offset, such as 'GMT+01:00', to the formatter.
+     * <p>
+     * This appends a localized zone offset to the builder, the format of the
+     * localized offset is controlled by the specified {@link FormatStyle style}
+     * to this method:
+     * <p><ul>
+     * <li>{@link TextStyle#FULL full} - formats with localized offset text, such
+     * as 'GMT, 2-digit hour and minute field, optional second field if non-zero,
+     * and colon.
+     * <li>{@link TextStyle#SHORT short} - formats with localized offset text,
+     * such as 'GMT, hour without leading zero, optional 2-digit minute and
+     * second if non-zero, and colon.
+     * </ul><p>
+     * <p>
+     * During formatting, the offset is obtained using a mechanism equivalent
+     * to querying the temporal with {@link TemporalQuery#offset()}.
+     * If the offset cannot be obtained then an exception is thrown unless the
+     * section of the formatter is optional.
+     * <p>
+     * During parsing, the offset is parsed using the format defined above.
+     * If the offset cannot be parsed then an exception is thrown unless the
+     * section of the formatter is optional.
+     * <p>
+     * @param style  the format style to use, not null
+     * @return this, for chaining, not null
+     * @throws IllegalArgumentException if style is neither {@link TextStyle#FULL
+     * full} nor {@link TextStyle#SHORT short}
+     */
+    public DateTimeFormatterBuilder appendLocalizedOffset(TextStyle style) {
+        Objects.requireNonNull(style, "style");
+        if (style != TextStyle.FULL && style != TextStyle.SHORT) {
+            throw new IllegalArgumentException("Style must be either full or short");
+        }
+        appendInternal(new LocalizedOffsetIdPrinterParser(style));
+        return this;
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Appends the time-zone ID, such as 'Europe/Paris' or '+02:00', to the formatter.
@@ -702,7 +777,7 @@
      * for use with this method, see {@link #appendZoneOrOffsetId()}.
      * <p>
      * During formatting, the zone is obtained using a mechanism equivalent
-     * to querying the temporal with {@link Queries#zoneId()}.
+     * to querying the temporal with {@link TemporalQuery#zoneId()}.
      * It will be printed using the result of {@link ZoneId#getId()}.
      * If the zone cannot be obtained then an exception is thrown unless the
      * section of the formatter is optional.
@@ -725,25 +800,25 @@
      * <p>
      * For example, the following will parse:
      * <pre>
-     *   "Europe/London"           -> ZoneId.of("Europe/London")
-     *   "Z"                       -> ZoneOffset.UTC
-     *   "UT"                      -> ZoneOffset.UTC
-     *   "UTC"                     -> ZoneOffset.UTC
-     *   "GMT"                     -> ZoneOffset.UTC
-     *   "UT0"                     -> ZoneOffset.UTC
-     *   "UTC0"                    -> ZoneOffset.UTC
-     *   "GMT0"                    -> ZoneOffset.UTC
-     *   "+01:30"                  -> ZoneOffset.of("+01:30")
-     *   "UT+01:30"                -> ZoneOffset.of("+01:30")
-     *   "UTC+01:30"               -> ZoneOffset.of("+01:30")
-     *   "GMT+01:30"               -> ZoneOffset.of("+01:30")
+     *   "Europe/London"           -- ZoneId.of("Europe/London")
+     *   "Z"                       -- ZoneOffset.UTC
+     *   "UT"                      -- ZoneOffset.UTC
+     *   "UTC"                     -- ZoneOffset.UTC
+     *   "GMT"                     -- ZoneOffset.UTC
+     *   "UT0"                     -- ZoneOffset.UTC
+     *   "UTC0"                    -- ZoneOffset.UTC
+     *   "GMT0"                    -- ZoneOffset.UTC
+     *   "+01:30"                  -- ZoneOffset.of("+01:30")
+     *   "UT+01:30"                -- ZoneOffset.of("+01:30")
+     *   "UTC+01:30"               -- ZoneOffset.of("+01:30")
+     *   "GMT+01:30"               -- ZoneOffset.of("+01:30")
      * </pre>
      *
      * @return this, for chaining, not null
      * @see #appendZoneRegionId()
      */
     public DateTimeFormatterBuilder appendZoneId() {
-        appendInternal(new ZoneIdPrinterParser(Queries.zoneId(), "ZoneId()"));
+        appendInternal(new ZoneIdPrinterParser(TemporalQuery.zoneId(), "ZoneId()"));
         return this;
     }
 
@@ -755,7 +830,7 @@
      * only if it is a region-based ID.
      * <p>
      * During formatting, the zone is obtained using a mechanism equivalent
-     * to querying the temporal with {@link Queries#zoneId()}.
+     * to querying the temporal with {@link TemporalQuery#zoneId()}.
      * If the zone is a {@code ZoneOffset} or it cannot be obtained then
      * an exception is thrown unless the section of the formatter is optional.
      * If the zone is not an offset, then the zone will be printed using
@@ -779,18 +854,18 @@
      * <p>
      * For example, the following will parse:
      * <pre>
-     *   "Europe/London"           -> ZoneId.of("Europe/London")
-     *   "Z"                       -> ZoneOffset.UTC
-     *   "UT"                      -> ZoneOffset.UTC
-     *   "UTC"                     -> ZoneOffset.UTC
-     *   "GMT"                     -> ZoneOffset.UTC
-     *   "UT0"                     -> ZoneOffset.UTC
-     *   "UTC0"                    -> ZoneOffset.UTC
-     *   "GMT0"                    -> ZoneOffset.UTC
-     *   "+01:30"                  -> ZoneOffset.of("+01:30")
-     *   "UT+01:30"                -> ZoneOffset.of("+01:30")
-     *   "UTC+01:30"               -> ZoneOffset.of("+01:30")
-     *   "GMT+01:30"               -> ZoneOffset.of("+01:30")
+     *   "Europe/London"           -- ZoneId.of("Europe/London")
+     *   "Z"                       -- ZoneOffset.UTC
+     *   "UT"                      -- ZoneOffset.UTC
+     *   "UTC"                     -- ZoneOffset.UTC
+     *   "GMT"                     -- ZoneOffset.UTC
+     *   "UT0"                     -- ZoneOffset.UTC
+     *   "UTC0"                    -- ZoneOffset.UTC
+     *   "GMT0"                    -- ZoneOffset.UTC
+     *   "+01:30"                  -- ZoneOffset.of("+01:30")
+     *   "UT+01:30"                -- ZoneOffset.of("+01:30")
+     *   "UTC+01:30"               -- ZoneOffset.of("+01:30")
+     *   "GMT+01:30"               -- ZoneOffset.of("+01:30")
      * </pre>
      * <p>
      * Note that this method is is identical to {@code appendZoneId()} except
@@ -817,7 +892,7 @@
      * then attempts to find an offset, such as that on {@code OffsetDateTime}.
      * <p>
      * During formatting, the zone is obtained using a mechanism equivalent
-     * to querying the temporal with {@link Queries#zone()}.
+     * to querying the temporal with {@link TemporalQuery#zone()}.
      * It will be printed using the result of {@link ZoneId#getId()}.
      * If the zone cannot be obtained then an exception is thrown unless the
      * section of the formatter is optional.
@@ -840,18 +915,18 @@
      * <p>
      * For example, the following will parse:
      * <pre>
-     *   "Europe/London"           -> ZoneId.of("Europe/London")
-     *   "Z"                       -> ZoneOffset.UTC
-     *   "UT"                      -> ZoneOffset.UTC
-     *   "UTC"                     -> ZoneOffset.UTC
-     *   "GMT"                     -> ZoneOffset.UTC
-     *   "UT0"                     -> ZoneOffset.UTC
-     *   "UTC0"                    -> ZoneOffset.UTC
-     *   "GMT0"                    -> ZoneOffset.UTC
-     *   "+01:30"                  -> ZoneOffset.of("+01:30")
-     *   "UT+01:30"                -> ZoneOffset.of("+01:30")
-     *   "UTC+01:30"               -> ZoneOffset.of("+01:30")
-     *   "GMT+01:30"               -> ZoneOffset.of("+01:30")
+     *   "Europe/London"           -- ZoneId.of("Europe/London")
+     *   "Z"                       -- ZoneOffset.UTC
+     *   "UT"                      -- ZoneOffset.UTC
+     *   "UTC"                     -- ZoneOffset.UTC
+     *   "GMT"                     -- ZoneOffset.UTC
+     *   "UT0"                     -- ZoneOffset.UTC
+     *   "UTC0"                    -- ZoneOffset.UTC
+     *   "GMT0"                    -- ZoneOffset.UTC
+     *   "+01:30"                  -- ZoneOffset.of("+01:30")
+     *   "UT+01:30"                -- ZoneOffset.of("+01:30")
+     *   "UTC+01:30"               -- ZoneOffset.of("+01:30")
+     *   "GMT+01:30"               -- ZoneOffset.of("+01:30")
      * </pre>
      * <p>
      * Note that this method is is identical to {@code appendZoneId()} except
@@ -861,7 +936,7 @@
      * @see #appendZoneId()
      */
     public DateTimeFormatterBuilder appendZoneOrOffsetId() {
-        appendInternal(new ZoneIdPrinterParser(Queries.zone(), "ZoneOrOffsetId()"));
+        appendInternal(new ZoneIdPrinterParser(TemporalQuery.zone(), "ZoneOrOffsetId()"));
         return this;
     }
 
@@ -872,7 +947,7 @@
      * the builder.
      * <p>
      * During formatting, the zone is obtained using a mechanism equivalent
-     * to querying the temporal with {@link Queries#zoneId()}.
+     * to querying the temporal with {@link TemporalQuery#zoneId()}.
      * If the zone is a {@code ZoneOffset} it will be printed using the
      * result of {@link ZoneOffset#getId()}.
      * If the zone is not an offset, the textual name will be looked up
@@ -908,7 +983,7 @@
      * the builder.
      * <p>
      * During formatting, the zone is obtained using a mechanism equivalent
-     * to querying the temporal with {@link Queries#zoneId()}.
+     * to querying the temporal with {@link TemporalQuery#zoneId()}.
      * If the zone is a {@code ZoneOffset} it will be printed using the
      * result of {@link ZoneOffset#getId()}.
      * If the zone is not an offset, the textual name will be looked up
@@ -951,7 +1026,7 @@
      * This appends an instruction to format/parse the chronology ID to the builder.
      * <p>
      * During formatting, the chronology is obtained using a mechanism equivalent
-     * to querying the temporal with {@link Queries#chronology()}.
+     * to querying the temporal with {@link TemporalQuery#chronology()}.
      * It will be printed using the result of {@link Chronology#getId()}.
      * If the chronology cannot be obtained then an exception is thrown unless the
      * section of the formatter is optional.
@@ -1098,24 +1173,25 @@
      * Appends the elements defined by the specified pattern to the builder.
      * <p>
      * All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters.
-     * The characters '{' and '}' are reserved for future use.
+     * The characters '#', '{' and '}' are reserved for future use.
      * The characters '[' and ']' indicate optional patterns.
      * The following pattern letters are defined:
      * <pre>
      *  Symbol  Meaning                     Presentation      Examples
      *  ------  -------                     ------------      -------
-     *   G       era                         text              A; AD; Anno Domini
-     *   y       year                        year              2004; 04
+     *   G       era                         text              AD; Anno Domini; A
+     *   u       year                        year              2004; 04
+     *   y       year-of-era                 year              2004; 04
      *   D       day-of-year                 number            189
-     *   M       month-of-year               number/text       7; 07; Jul; July; J
+     *   M/L     month-of-year               number/text       7; 07; Jul; July; J
      *   d       day-of-month                number            10
      *
-     *   Q       quarter-of-year             number/text       3; 03; Q3
+     *   Q/q     quarter-of-year             number/text       3; 03; Q3; 3rd quarter
      *   Y       week-based-year             year              1996; 96
-     *   w       week-of-year                number            27
-     *   W       week-of-month               number            27
-     *   e       localized day-of-week       number            2; Tue; Tuesday; T
-     *   E       day-of-week                 number/text       2; Tue; Tuesday; T
+     *   w       week-of-week-based-year     number            27
+     *   W       week-of-month               number            4
+     *   E       day-of-week                 text              Tue; Tuesday; T
+     *   e/c     localized day-of-week       number/text       2; 02; Tue; Tuesday; T
      *   F       week-of-month               number            3
      *
      *   a       am-pm-of-day                text              PM
@@ -1133,6 +1209,7 @@
      *
      *   V       time-zone ID                zone-id           America/Los_Angeles; Z; -08:30
      *   z       time-zone name              zone-name         Pacific Standard Time; PST
+     *   O       localized zone-offset       offset-O          GMT+8; GMT+08:00; UTC-08:00;
      *   X       zone-offset 'Z' for zero    offset-X          Z; -08; -0830; -08:30; -083015; -08:30:15;
      *   x       zone-offset                 offset-x          +0000; -08; -0830; -08:30; -083015; -08:30:15;
      *   Z       zone-offset                 offset-Z          +0000; -0800; -08:00;
@@ -1143,116 +1220,169 @@
      *   ''      single quote                literal           '
      *   [       optional section start
      *   ]       optional section end
-     *   {}      reserved for future use
+     *   #       reserved for future use
+     *   {       reserved for future use
+     *   }       reserved for future use
      * </pre>
      * <p>
      * The count of pattern letters determine the format.
-     * <p>
-     * <b>Text</b>: The text style is determined based on the number of pattern letters used.
-     * Less than 4 pattern letters will use the {@link TextStyle#SHORT short form}.
-     * Exactly 4 pattern letters will use the {@link TextStyle#FULL full form}.
-     * Exactly 5 pattern letters will use the {@link TextStyle#NARROW narrow form}.
-     * <p>
-     * <b>Number</b>: If the count of letters is one, then the value is printed using the minimum number
-     * of digits and without padding as per {@link #appendValue(java.time.temporal.TemporalField)}. Otherwise, the
-     * count of digits is used as the width of the output field as per {@link #appendValue(java.time.temporal.TemporalField, int)}.
-     * <p>
-     * <b>Number/Text</b>: If the count of pattern letters is 3 or greater, use the Text rules above.
-     * Otherwise use the Number rules above.
-     * <p>
-     * <b>Fraction</b>: Outputs the nano-of-second field as a fraction-of-second.
-     * The nano-of-second value has nine digits, thus the count of pattern letters is from 1 to 9.
-     * If it is less than 9, then the nano-of-second value is truncated, with only the most
-     * significant digits being output.
-     * When parsing in strict mode, the number of parsed digits must match the count of pattern letters.
-     * When parsing in lenient mode, the number of parsed digits must be at least the count of pattern
-     * letters, up to 9 digits.
+     * See <a href="DateTimeFormatter.html#patterns">DateTimeFormatter</a> for a user-focused description of the patterns.
+     * The following tables define how the pattern letters map to the builder.
      * <p>
-     * <b>Year</b>: The count of letters determines the minimum field width below which padding is used.
-     * If the count of letters is two, then a {@link #appendValueReduced reduced} two digit form is used.
-     * For formatting, this outputs the rightmost two digits. For parsing, this will parse using the
-     * base value of 2000, resulting in a year within the range 2000 to 2099 inclusive.
-     * If the count of letters is less than four (but not two), then the sign is only output for negative
-     * years as per {@link SignStyle#NORMAL}.
-     * Otherwise, the sign is output if the pad width is exceeded, as per {@link SignStyle#EXCEEDS_PAD}
-     * <p>
-     * <b>ZoneId</b>: This outputs the time-zone ID, such as 'Europe/Paris'.
-     * If the count of letters is two, then the time-zone ID is output.
-     * Any other count of letters throws {@code IllegalArgumentException}.
+     * <b>Date fields</b>: Pattern letters to output a date.
      * <pre>
-     *  Pattern     Equivalent builder methods
-     *   VV          appendZoneId()
-     * </pre>
-     * <p>
-     * <b>Zone names</b>: This outputs the display name of the time-zone ID.
-     * If the count of letters is one, two or three, then the short name is output.
-     * If the count of letters is four, then the full name is output.
-     * Five or more letters throws {@code IllegalArgumentException}.
-     * <pre>
-     *  Pattern     Equivalent builder methods
-     *   z           appendZoneText(TextStyle.SHORT)
-     *   zz          appendZoneText(TextStyle.SHORT)
-     *   zzz         appendZoneText(TextStyle.SHORT)
-     *   zzzz        appendZoneText(TextStyle.FULL)
+     *  Pattern  Count  Equivalent builder methods
+     *  -------  -----  --------------------------
+     *    G       1      appendText(ChronoField.ERA, TextStyle.SHORT)
+     *    GG      2      appendText(ChronoField.ERA, TextStyle.SHORT)
+     *    GGG     3      appendText(ChronoField.ERA, TextStyle.SHORT)
+     *    GGGG    4      appendText(ChronoField.ERA, TextStyle.FULL)
+     *    GGGGG   5      appendText(ChronoField.ERA, TextStyle.NARROW)
+     *
+     *    u       1      appendValue(ChronoField.YEAR, 1, 19, SignStyle.NORMAL);
+     *    uu      2      appendValueReduced(ChronoField.YEAR, 2, 2000);
+     *    uuu     3      appendValue(ChronoField.YEAR, 3, 19, SignStyle.NORMAL);
+     *    u..u    4..n   appendValue(ChronoField.YEAR, n, 19, SignStyle.EXCEEDS_PAD);
+     *    y       1      appendValue(ChronoField.YEAR_OF_ERA, 1, 19, SignStyle.NORMAL);
+     *    yy      2      appendValueReduced(ChronoField.YEAR_OF_ERA, 2, 2000);
+     *    yyy     3      appendValue(ChronoField.YEAR_OF_ERA, 3, 19, SignStyle.NORMAL);
+     *    y..y    4..n   appendValue(ChronoField.YEAR_OF_ERA, n, 19, SignStyle.EXCEEDS_PAD);
+     *    Y       1      append special localized WeekFields element for numeric week-based-year
+     *    YY      2      append special localized WeekFields element for reduced numeric week-based-year 2 digits;
+     *    YYY     3      append special localized WeekFields element for numeric week-based-year (3, 19, SignStyle.NORMAL);
+     *    Y..Y    4..n   append special localized WeekFields element for numeric week-based-year (n, 19, SignStyle.EXCEEDS_PAD);
+     *
+     *    Q       1      appendValue(IsoFields.QUARTER_OF_YEAR);
+     *    QQ      2      appendValue(IsoFields.QUARTER_OF_YEAR, 2);
+     *    QQQ     3      appendText(IsoFields.QUARTER_OF_YEAR, TextStyle.SHORT)
+     *    QQQQ    4      appendText(IsoFields.QUARTER_OF_YEAR, TextStyle.FULL)
+     *    QQQQQ   5      appendText(IsoFields.QUARTER_OF_YEAR, TextStyle.NARROW)
+     *    q       1      appendValue(IsoFields.QUARTER_OF_YEAR);
+     *    qq      2      appendValue(IsoFields.QUARTER_OF_YEAR, 2);
+     *    qqq     3      appendText(IsoFields.QUARTER_OF_YEAR, TextStyle.SHORT_STANDALONE)
+     *    qqqq    4      appendText(IsoFields.QUARTER_OF_YEAR, TextStyle.FULL_STANDALONE)
+     *    qqqqq   5      appendText(IsoFields.QUARTER_OF_YEAR, TextStyle.NARROW_STANDALONE)
+     *
+     *    M       1      appendValue(ChronoField.MONTH_OF_YEAR);
+     *    MM      2      appendValue(ChronoField.MONTH_OF_YEAR, 2);
+     *    MMM     3      appendText(ChronoField.MONTH_OF_YEAR, TextStyle.SHORT)
+     *    MMMM    4      appendText(ChronoField.MONTH_OF_YEAR, TextStyle.FULL)
+     *    MMMMM   5      appendText(ChronoField.MONTH_OF_YEAR, TextStyle.NARROW)
+     *    L       1      appendValue(ChronoField.MONTH_OF_YEAR);
+     *    LL      2      appendValue(ChronoField.MONTH_OF_YEAR, 2);
+     *    LLL     3      appendText(ChronoField.MONTH_OF_YEAR, TextStyle.SHORT_STANDALONE)
+     *    LLLL    4      appendText(ChronoField.MONTH_OF_YEAR, TextStyle.FULL_STANDALONE)
+     *    LLLLL   5      appendText(ChronoField.MONTH_OF_YEAR, TextStyle.NARROW_STANDALONE)
+     *
+     *    w       1      append special localized WeekFields element for numeric week-of-year
+     *    ww      1      append special localized WeekFields element for numeric week-of-year, zero-padded
+     *    W       1      append special localized WeekFields element for numeric week-of-month
+     *    d       1      appendValue(ChronoField.DAY_OF_MONTH)
+     *    dd      2      appendValue(ChronoField.DAY_OF_MONTH, 2)
+     *    D       1      appendValue(ChronoField.DAY_OF_YEAR)
+     *    DD      2      appendValue(ChronoField.DAY_OF_YEAR, 2)
+     *    DDD     3      appendValue(ChronoField.DAY_OF_YEAR, 3)
+     *    F       1      appendValue(ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH)
+     *    E       1      appendText(ChronoField.DAY_OF_WEEK, TextStyle.SHORT)
+     *    EE      2      appendText(ChronoField.DAY_OF_WEEK, TextStyle.SHORT)
+     *    EEE     3      appendText(ChronoField.DAY_OF_WEEK, TextStyle.SHORT)
+     *    EEEE    4      appendText(ChronoField.DAY_OF_WEEK, TextStyle.FULL)
+     *    EEEEE   5      appendText(ChronoField.DAY_OF_WEEK, TextStyle.NARROW)
+     *    e       1      append special localized WeekFields element for numeric day-of-week
+     *    ee      2      append special localized WeekFields element for numeric day-of-week, zero-padded
+     *    eee     3      appendText(ChronoField.DAY_OF_WEEK, TextStyle.SHORT)
+     *    eeee    4      appendText(ChronoField.DAY_OF_WEEK, TextStyle.FULL)
+     *    eeeee   5      appendText(ChronoField.DAY_OF_WEEK, TextStyle.NARROW)
+     *    c       1      append special localized WeekFields element for numeric day-of-week
+     *    ccc     3      appendText(ChronoField.DAY_OF_WEEK, TextStyle.SHORT_STANDALONE)
+     *    cccc    4      appendText(ChronoField.DAY_OF_WEEK, TextStyle.FULL_STANDALONE)
+     *    ccccc   5      appendText(ChronoField.DAY_OF_WEEK, TextStyle.NARROW_STANDALONE)
      * </pre>
      * <p>
-     * <b>Offset X and x</b>: This formats the offset based on the number of pattern letters.
-     * One letter outputs just the hour', such as '+01', unless the minute is non-zero
-     * in which case the minute is also output, such as '+0130'.
-     * Two letters outputs the hour and minute, without a colon, such as '+0130'.
-     * Three letters outputs the hour and minute, with a colon, such as '+01:30'.
-     * Four letters outputs the hour and minute and optional second, without a colon, such as '+013015'.
-     * Five letters outputs the hour and minute and optional second, with a colon, such as '+01:30:15'.
-     * Six or more letters throws {@code IllegalArgumentException}.
-     * Pattern letter 'X' (upper case) will output 'Z' when the offset to be output would be zero,
-     * whereas pattern letter 'x' (lower case) will output '+00', '+0000', or '+00:00'.
+     * <b>Time fields</b>: Pattern letters to output a time.
      * <pre>
-     *  Pattern     Equivalent builder methods
-     *   X           appendOffset("+HHmm","Z")
-     *   XX          appendOffset("+HHMM","Z")
-     *   XXX         appendOffset("+HH:MM","Z")
-     *   XXXX        appendOffset("+HHMMss","Z")
-     *   XXXXX       appendOffset("+HH:MM:ss","Z")
-     *   x           appendOffset("+HHmm","+00")
-     *   xx          appendOffset("+HHMM","+0000")
-     *   xxx         appendOffset("+HH:MM","+00:00")
-     *   xxxx        appendOffset("+HHMMss","+0000")
-     *   xxxxx       appendOffset("+HH:MM:ss","+00:00")
+     *  Pattern  Count  Equivalent builder methods
+     *  -------  -----  --------------------------
+     *    a       1      appendText(ChronoField.AMPM_OF_DAY, TextStyle.SHORT)
+     *    h       1      appendValue(ChronoField.CLOCK_HOUR_OF_AMPM)
+     *    hh      2      appendValue(ChronoField.CLOCK_HOUR_OF_AMPM, 2)
+     *    H       1      appendValue(ChronoField.HOUR_OF_DAY)
+     *    HH      2      appendValue(ChronoField.HOUR_OF_DAY, 2)
+     *    k       1      appendValue(ChronoField.CLOCK_HOUR_OF_DAY)
+     *    kk      2      appendValue(ChronoField.CLOCK_HOUR_OF_DAY, 2)
+     *    K       1      appendValue(ChronoField.HOUR_OF_AMPM)
+     *    KK      2      appendValue(ChronoField.HOUR_OF_AMPM, 2)
+     *    m       1      appendValue(ChronoField.MINUTE_OF_HOUR)
+     *    mm      2      appendValue(ChronoField.MINUTE_OF_HOUR, 2)
+     *    s       1      appendValue(ChronoField.SECOND_OF_MINUTE)
+     *    ss      2      appendValue(ChronoField.SECOND_OF_MINUTE, 2)
+     *
+     *    S..S    1..n   appendFraction(ChronoField.NANO_OF_SECOND, n, n, false)
+     *    A       1      appendValue(ChronoField.MILLI_OF_DAY)
+     *    A..A    2..n   appendValue(ChronoField.MILLI_OF_DAY, n)
+     *    n       1      appendValue(ChronoField.NANO_OF_SECOND)
+     *    n..n    2..n   appendValue(ChronoField.NANO_OF_SECOND, n)
+     *    N       1      appendValue(ChronoField.NANO_OF_DAY)
+     *    N..N    2..n   appendValue(ChronoField.NANO_OF_DAY, n)
+     * </pre>
+     * <p>
+     * <b>Zone ID</b>: Pattern letters to output {@code ZoneId}.
+     * <pre>
+     *  Pattern  Count  Equivalent builder methods
+     *  -------  -----  --------------------------
+     *    VV      2      appendZoneId()
+     *    z       1      appendZoneText(TextStyle.SHORT)
+     *    zz      2      appendZoneText(TextStyle.SHORT)
+     *    zzz     3      appendZoneText(TextStyle.SHORT)
+     *    zzzz    4      appendZoneText(TextStyle.FULL)
      * </pre>
      * <p>
-     * <b>Offset Z</b>: This formats the offset based on the number of pattern letters.
-     * One, two or three letters outputs the hour and minute, without a colon, such as '+0130'.
-     * Four or more letters throws {@code IllegalArgumentException}.
-     * The output will be '+0000' when the offset is zero.
+     * <b>Zone offset</b>: Pattern letters to output {@code ZoneOffset}.
      * <pre>
-     *  Pattern     Equivalent builder methods
-     *   Z           appendOffset("+HHMM","+0000")
-     *   ZZ          appendOffset("+HHMM","+0000")
-     *   ZZZ         appendOffset("+HHMM","+0000")
+     *  Pattern  Count  Equivalent builder methods
+     *  -------  -----  --------------------------
+     *    O       1      appendLocalizedOffsetPrefixed(TextStyle.SHORT);
+     *    OOOO    4      appendLocalizedOffsetPrefixed(TextStyle.FULL);
+     *    X       1      appendOffset("+HHmm","Z")
+     *    XX      2      appendOffset("+HHMM","Z")
+     *    XXX     3      appendOffset("+HH:MM","Z")
+     *    XXXX    4      appendOffset("+HHMMss","Z")
+     *    XXXXX   5      appendOffset("+HH:MM:ss","Z")
+     *    x       1      appendOffset("+HHmm","+00")
+     *    xx      2      appendOffset("+HHMM","+0000")
+     *    xxx     3      appendOffset("+HH:MM","+00:00")
+     *    xxxx    4      appendOffset("+HHMMss","+0000")
+     *    xxxxx   5      appendOffset("+HH:MM:ss","+00:00")
+     *    Z       1      appendOffset("+HHMM","+0000")
+     *    ZZ      2      appendOffset("+HHMM","+0000")
+     *    ZZZ     3      appendOffset("+HHMM","+0000")
+     *    ZZZZ    4      appendLocalizedOffset(TextStyle.FULL);
+     *    ZZZZZ   5      appendOffset("+HH:MM:ss","Z")
      * </pre>
      * <p>
-     * <b>Optional section</b>: The optional section markers work exactly like calling {@link #optionalStart()}
-     * and {@link #optionalEnd()}.
-     * <p>
-     * <b>Pad modifier</b>: Modifies the pattern that immediately follows to be padded with spaces.
-     * The pad width is determined by the number of pattern letters.
-     * This is the same as calling {@link #padNext(int)}.
+     * <b>Modifiers</b>: Pattern letters that modify the rest of the pattern:
+     * <pre>
+     *  Pattern  Count  Equivalent builder methods
+     *  -------  -----  --------------------------
+     *    [       1      optionalStart()
+     *    ]       1      optionalEnd()
+     *    p..p    1..n   padNext(n)
+     * </pre>
      * <p>
-     * For example, 'ppH' outputs the hour-of-day padded on the left with spaces to a width of 2.
-     * <p>
-     * Any unrecognized letter is an error.
-     * Any non-letter character, other than '[', ']', '{', '}' and the single quote will be output directly.
-     * Despite this, it is recommended to use single quotes around all characters that you want to
-     * output directly to ensure that future changes do not break your application.
+     * Any sequence of letters not specified above, unrecognized letter or
+     * reserved character will throw an exception.
+     * Future versions may add to the set of patterns.
+     * It is recommended to use single quotes around all characters that you want
+     * to output directly to ensure that future changes do not break your application.
      * <p>
      * Note that the pattern string is similar, but not identical, to
      * {@link java.text.SimpleDateFormat SimpleDateFormat}.
      * The pattern string is also similar, but not identical, to that defined by the
      * Unicode Common Locale Data Repository (CLDR/LDML).
-     * Pattern letters 'E' and 'u' are merged, which changes the meaning of "E" and "EE" to be numeric.
-     * Pattern letters 'X' is aligned with Unicode CLDR/LDML, which affects pattern 'X'.
-     * Pattern letter 'y' and 'Y' parse years of two digits and more than 4 digits differently.
-     * Pattern letters 'n', 'A', 'N', 'I' and 'p' are added.
+     * Pattern letters 'X' and 'u' are aligned with Unicode CLDR/LDML.
+     * By contrast, {@code SimpleDateFormat} uses 'u' for the numeric day of week.
+     * Pattern letters 'y' and 'Y' parse years of two digits and more than 4 digits differently.
+     * Pattern letters 'n', 'A', 'N', and 'p' are added.
      * Number types will reject large numbers.
      *
      * @param pattern  the pattern to add, not null
@@ -1308,10 +1438,23 @@
                     }
                     appendZoneId();
                 } else if (cur == 'Z') {
-                    if (count > 3) {
+                    if (count < 4) {
+                        appendOffset("+HHMM", "+0000");
+                    } else if (count == 4) {
+                        appendLocalizedOffset(TextStyle.FULL);
+                    } else if (count == 5) {
+                        appendOffset("+HH:MM:ss","Z");
+                    } else {
                         throw new IllegalArgumentException("Too many pattern letters: " + cur);
                     }
-                    appendOffset("+HHMM", "+0000");
+                } else if (cur == 'O') {
+                    if (count == 1) {
+                        appendLocalizedOffset(TextStyle.SHORT);
+                    } else if (count == 4) {
+                        appendLocalizedOffset(TextStyle.FULL);
+                    } else {
+                        throw new IllegalArgumentException("Pattern letter count must be 1 or 4: " + cur);
+                    }
                 } else if (cur == 'X') {
                     if (count > 5) {
                         throw new IllegalArgumentException("Too many pattern letters: " + cur);
@@ -1323,18 +1466,21 @@
                     }
                     String zero = (count == 1 ? "+00" : (count % 2 == 0 ? "+0000" : "+00:00"));
                     appendOffset(OffsetIdPrinterParser.PATTERNS[count + (count == 1 ? 0 : 1)], zero);
-                } else if (cur == 'w' || cur == 'e') {
+                } else if (cur == 'W') {
                     // Fields defined by Locale
                     if (count > 1) {
                         throw new IllegalArgumentException("Too many pattern letters: " + cur);
                     }
                     appendInternal(new WeekBasedFieldPrinterParser(cur, count));
-                } else if (cur == 'W') {
+                } else if (cur == 'w') {
                     // Fields defined by Locale
                     if (count > 2) {
                         throw new IllegalArgumentException("Too many pattern letters: " + cur);
                     }
                     appendInternal(new WeekBasedFieldPrinterParser(cur, count));
+                } else if (cur == 'Y') {
+                    // Fields defined by Locale
+                    appendInternal(new WeekBasedFieldPrinterParser(cur, count));
                 } else {
                     throw new IllegalArgumentException("Unknown pattern letter: " + cur);
                 }
@@ -1371,7 +1517,7 @@
                 }
                 optionalEnd();
 
-            } else if (cur == '{' || cur == '}') {
+            } else if (cur == '{' || cur == '}' || cur == '#') {
                 throw new IllegalArgumentException("Pattern includes reserved character: '" + cur + "'");
             } else {
                 appendLiteral(cur);
@@ -1379,10 +1525,12 @@
         }
     }
 
+    @SuppressWarnings("fallthrough")
     private void parseField(char cur, int count, TemporalField field) {
+        boolean standalone = false;
         switch (cur) {
+            case 'u':
             case 'y':
-            case 'Y':
                 if (count == 2) {
                     appendValueReduced(field, 2, 2000);
                 } else if (count < 4) {
@@ -1391,31 +1539,55 @@
                     appendValue(field, count, 19, SignStyle.EXCEEDS_PAD);
                 }
                 break;
+            case 'c':
+                if (count == 2) {
+                    throw new IllegalArgumentException("Invalid pattern \"cc\"");
+                }
+                /*fallthrough*/
+            case 'L':
+            case 'q':
+                standalone = true;
+                /*fallthrough*/
             case 'M':
             case 'Q':
             case 'E':
+            case 'e':
                 switch (count) {
                     case 1:
-                        appendValue(field);
-                        break;
                     case 2:
-                        appendValue(field, 2);
+                        if (cur == 'c' || cur == 'e') {
+                            appendInternal(new WeekBasedFieldPrinterParser(cur, count));
+                        } else if (cur == 'E') {
+                            appendText(field, TextStyle.SHORT);
+                        } else {
+                            if (count == 1) {
+                                appendValue(field);
+                            } else {
+                                appendValue(field, 2);
+                            }
+                        }
                         break;
                     case 3:
-                        appendText(field, TextStyle.SHORT);
+                        appendText(field, standalone ? TextStyle.SHORT_STANDALONE : TextStyle.SHORT);
                         break;
                     case 4:
-                        appendText(field, TextStyle.FULL);
+                        appendText(field, standalone ? TextStyle.FULL_STANDALONE : TextStyle.FULL);
                         break;
                     case 5:
-                        appendText(field, TextStyle.NARROW);
+                        appendText(field, standalone ? TextStyle.NARROW_STANDALONE : TextStyle.NARROW);
                         break;
                     default:
                         throw new IllegalArgumentException("Too many pattern letters: " + cur);
                 }
                 break;
+            case 'a':
+                if (count == 1) {
+                    appendText(field, TextStyle.SHORT);
+                } else {
+                    throw new IllegalArgumentException("Too many pattern letters: " + cur);
+                }
+                break;
             case 'G':
-            case 'a':
                 switch (count) {
                     case 1:
                     case 2:
@@ -1435,6 +1607,37 @@
             case 'S':
                 appendFraction(NANO_OF_SECOND, count, count, false);
                 break;
+            case 'F':
+                if (count == 1) {
+                    appendValue(field);
+                } else {
+                    throw new IllegalArgumentException("Too many pattern letters: " + cur);
+                }
+                break;
+            case 'd':
+            case 'h':
+            case 'H':
+            case 'k':
+            case 'K':
+            case 'm':
+            case 's':
+                if (count == 1) {
+                    appendValue(field);
+                } else if (count == 2) {
+                    appendValue(field, count);
+                } else {
+                    throw new IllegalArgumentException("Too many pattern letters: " + cur);
+                }
+                break;
+            case 'D':
+                if (count == 1) {
+                    appendValue(field);
+                } else if (count <= 3) {
+                    appendValue(field, count);
+                } else {
+                    throw new IllegalArgumentException("Too many pattern letters: " + cur);
+                }
+                break;
             default:
                 if (count == 1) {
                     appendValue(field);
@@ -1448,44 +1651,43 @@
     /** Map of letters to fields. */
     private static final Map<Character, TemporalField> FIELD_MAP = new HashMap<>();
     static {
-        FIELD_MAP.put('G', ChronoField.ERA);                       // Java, LDML (different to both for 1/2 chars)
-        FIELD_MAP.put('y', ChronoField.YEAR);                      // LDML
-        // FIELD_MAP.put('y', ChronoField.YEAR_OF_ERA);            // Java, LDML  // TODO redefine from above
-        // FIELD_MAP.put('u', ChronoField.YEAR);                   // LDML  // TODO
-        // FIELD_MAP.put('Y', IsoFields.WEEK_BASED_YEAR);          // Java7, LDML (needs localized week number)  // TODO
+        // SDF = SimpleDateFormat
+        FIELD_MAP.put('G', ChronoField.ERA);                       // SDF, LDML (different to both for 1/2 chars)
+        FIELD_MAP.put('y', ChronoField.YEAR_OF_ERA);               // SDF, LDML
+        FIELD_MAP.put('u', ChronoField.YEAR);                      // LDML (different in SDF)
         FIELD_MAP.put('Q', IsoFields.QUARTER_OF_YEAR);             // LDML (removed quarter from 310)
-        FIELD_MAP.put('M', ChronoField.MONTH_OF_YEAR);             // Java, LDML
-        // FIELD_MAP.put('w', WeekFields.weekOfYear());            // Java, LDML (needs localized week number)
-        // FIELD_MAP.put('W', WeekFields.weekOfMonth());           // Java, LDML (needs localized week number)
-        FIELD_MAP.put('D', ChronoField.DAY_OF_YEAR);               // Java, LDML
-        FIELD_MAP.put('d', ChronoField.DAY_OF_MONTH);              // Java, LDML
-        FIELD_MAP.put('F', ChronoField.ALIGNED_WEEK_OF_MONTH);     // Java, LDML
-        FIELD_MAP.put('E', ChronoField.DAY_OF_WEEK);               // Java, LDML (different to both for 1/2 chars)
-        // FIELD_MAP.put('e', WeekFields.dayOfWeek());             // LDML (needs localized week number)
-        FIELD_MAP.put('a', ChronoField.AMPM_OF_DAY);               // Java, LDML
-        FIELD_MAP.put('H', ChronoField.HOUR_OF_DAY);               // Java, LDML
-        FIELD_MAP.put('k', ChronoField.CLOCK_HOUR_OF_DAY);         // Java, LDML
-        FIELD_MAP.put('K', ChronoField.HOUR_OF_AMPM);              // Java, LDML
-        FIELD_MAP.put('h', ChronoField.CLOCK_HOUR_OF_AMPM);        // Java, LDML
-        FIELD_MAP.put('m', ChronoField.MINUTE_OF_HOUR);            // Java, LDML
-        FIELD_MAP.put('s', ChronoField.SECOND_OF_MINUTE);          // Java, LDML
-        FIELD_MAP.put('S', ChronoField.NANO_OF_SECOND);            // LDML (Java uses milli-of-second number)
+        FIELD_MAP.put('q', IsoFields.QUARTER_OF_YEAR);             // LDML (stand-alone)
+        FIELD_MAP.put('M', ChronoField.MONTH_OF_YEAR);             // SDF, LDML
+        FIELD_MAP.put('L', ChronoField.MONTH_OF_YEAR);             // SDF, LDML (stand-alone)
+        FIELD_MAP.put('D', ChronoField.DAY_OF_YEAR);               // SDF, LDML
+        FIELD_MAP.put('d', ChronoField.DAY_OF_MONTH);              // SDF, LDML
+        FIELD_MAP.put('F', ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH);  // SDF, LDML
+        FIELD_MAP.put('E', ChronoField.DAY_OF_WEEK);               // SDF, LDML (different to both for 1/2 chars)
+        FIELD_MAP.put('c', ChronoField.DAY_OF_WEEK);               // LDML (stand-alone)
+        FIELD_MAP.put('e', ChronoField.DAY_OF_WEEK);               // LDML (needs localized week number)
+        FIELD_MAP.put('a', ChronoField.AMPM_OF_DAY);               // SDF, LDML
+        FIELD_MAP.put('H', ChronoField.HOUR_OF_DAY);               // SDF, LDML
+        FIELD_MAP.put('k', ChronoField.CLOCK_HOUR_OF_DAY);         // SDF, LDML
+        FIELD_MAP.put('K', ChronoField.HOUR_OF_AMPM);              // SDF, LDML
+        FIELD_MAP.put('h', ChronoField.CLOCK_HOUR_OF_AMPM);        // SDF, LDML
+        FIELD_MAP.put('m', ChronoField.MINUTE_OF_HOUR);            // SDF, LDML
+        FIELD_MAP.put('s', ChronoField.SECOND_OF_MINUTE);          // SDF, LDML
+        FIELD_MAP.put('S', ChronoField.NANO_OF_SECOND);            // LDML (SDF uses milli-of-second number)
         FIELD_MAP.put('A', ChronoField.MILLI_OF_DAY);              // LDML
         FIELD_MAP.put('n', ChronoField.NANO_OF_SECOND);            // 310 (proposed for LDML)
         FIELD_MAP.put('N', ChronoField.NANO_OF_DAY);               // 310 (proposed for LDML)
         // 310 - z - time-zone names, matches LDML and SimpleDateFormat 1 to 4
         // 310 - Z - matches SimpleDateFormat and LDML
-        // 310 - V - time-zone id, matches proposed LDML
+        // 310 - V - time-zone id, matches LDML
         // 310 - p - prefix for padding
-        // 310 - X - matches proposed LDML, almost matches JavaSDF for 1, exact match 2&3, extended 4&5
-        // 310 - x - matches proposed LDML
-        // Java - u - clashes with LDML, go with LDML (year-proleptic) here
+        // 310 - X - matches LDML, almost matches SDF for 1, exact match 2&3, extended 4&5
+        // 310 - x - matches LDML
+        // 310 - w, W, and Y are localized forms matching LDML
         // LDML - U - cycle year name, not supported by 310 yet
         // LDML - l - deprecated
         // LDML - j - not relevant
         // LDML - g - modified-julian-day
         // LDML - v,V - extended time-zone names
-        // LDML - q/c/L - standalone quarter/day-of-week/month
     }
 
     //-----------------------------------------------------------------------
@@ -1632,10 +1834,12 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Completes this builder by creating the DateTimeFormatter using the default locale.
+     * Completes this builder by creating the {@code DateTimeFormatter}
+     * using the default locale.
      * <p>
-     * This will create a formatter with the {@link Locale#getDefault(Locale.Category) default FORMAT locale}.
+     * This will create a formatter with the {@linkplain Locale#getDefault(Locale.Category) default FORMAT locale}.
      * Numbers will be printed and parsed using the standard non-localized set of symbols.
+     * The resolver style will be {@link ResolverStyle#SMART SMART}.
      * <p>
      * Calling this method will end any open optional sections by repeatedly
      * calling {@link #optionalEnd()} before creating the formatter.
@@ -1650,10 +1854,12 @@
     }
 
     /**
-     * Completes this builder by creating the DateTimeFormatter using the specified locale.
+     * Completes this builder by creating the {@code DateTimeFormatter}
+     * using the specified locale.
      * <p>
      * This will create a formatter with the specified locale.
      * Numbers will be printed and parsed using the standard non-localized set of symbols.
+     * The resolver style will be {@link ResolverStyle#SMART SMART}.
      * <p>
      * Calling this method will end any open optional sections by repeatedly
      * calling {@link #optionalEnd()} before creating the formatter.
@@ -1665,12 +1871,35 @@
      * @return the created formatter, not null
      */
     public DateTimeFormatter toFormatter(Locale locale) {
+        return toFormatter(locale, ResolverStyle.SMART, null);
+    }
+
+    /**
+     * Completes this builder by creating the formatter.
+     * This uses the default locale.
+     *
+     * @param resolverStyle  the resolver style to use, not null
+     * @return the created formatter, not null
+     */
+    DateTimeFormatter toFormatter(ResolverStyle resolverStyle, Chronology chrono) {
+        return toFormatter(Locale.getDefault(Locale.Category.FORMAT), resolverStyle, chrono);
+    }
+
+    /**
+     * Completes this builder by creating the formatter.
+     *
+     * @param locale  the locale to use for formatting, not null
+     * @param chrono  the chronology to use, may be null
+     * @return the created formatter, not null
+     */
+    private DateTimeFormatter toFormatter(Locale locale, ResolverStyle resolverStyle, Chronology chrono) {
         Objects.requireNonNull(locale, "locale");
         while (active.parent != null) {
             optionalEnd();
         }
         CompositePrinterParser pp = new CompositePrinterParser(printerParsers, false);
-        return new DateTimeFormatter(pp, locale, DateTimeFormatSymbols.STANDARD, null, null);
+        return new DateTimeFormatter(pp, locale, DateTimeFormatSymbols.STANDARD,
+                resolverStyle, null, chrono, null);
     }
 
     //-----------------------------------------------------------------------
@@ -1942,6 +2171,31 @@
 
     //-----------------------------------------------------------------------
     /**
+     * Defaults a value into the parse if not currently present.
+     */
+    static class DefaultValueParser implements DateTimePrinterParser {
+        private final TemporalField field;
+        private final long value;
+
+        DefaultValueParser(TemporalField field, long value) {
+            this.field = field;
+            this.value = value;
+        }
+
+        public boolean format(DateTimePrintContext context, StringBuilder buf) {
+            return true;
+        }
+
+        public int parse(DateTimeParseContext context, CharSequence text, int position) {
+            if (context.getParsed(field) == null) {
+                context.setParsedField(field, value, position, position);
+            }
+            return position;
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    /**
      * Prints or parses a character literal.
      */
     static final class CharLiteralPrinterParser implements DateTimePrinterParser {
@@ -2104,13 +2358,7 @@
 
         @Override
         public boolean format(DateTimePrintContext context, StringBuilder buf) {
-            Chronology chrono = context.getTemporal().query(Queries.chronology());
-            Long valueLong;
-            if (chrono == JapaneseChronology.INSTANCE && field == ChronoField.YEAR) {
-                valueLong = context.getValue(ChronoField.YEAR_OF_ERA);
-            } else {
-                valueLong = context.getValue(field);
-            }
+            Long valueLong = context.getValue(field);
             if (valueLong == null) {
                 return false;
             }
@@ -2281,14 +2529,7 @@
          * @return the new position
          */
         int setValue(DateTimeParseContext context, long value, int errorPos, int successPos) {
-            TemporalField f = field;
-            if (field == ChronoField.YEAR) {
-                Chronology chrono = context.getEffectiveChronology();
-                if (chrono == JapaneseChronology.INSTANCE) {
-                    f = ChronoField.YEAR_OF_ERA;
-                }
-            }
-            return context.setParsedField(f, value, errorPos, successPos);
+            return context.setParsedField(field, value, errorPos, successPos);
         }
 
         @Override
@@ -2570,7 +2811,7 @@
                 return false;
             }
             String text;
-            Chronology chrono = context.getTemporal().query(Queries.chronology());
+            Chronology chrono = context.getTemporal().query(TemporalQuery.chronology());
             if (chrono == null || chrono == IsoChronology.INSTANCE) {
                 text = provider.getText(field, value, textStyle, context.getLocale());
             } else {
@@ -2887,6 +3128,167 @@
 
     //-----------------------------------------------------------------------
     /**
+     * Prints or parses an offset ID.
+     */
+    static final class LocalizedOffsetIdPrinterParser implements DateTimePrinterParser {
+        private final TextStyle style;
+
+        /**
+         * Constructor.
+         *
+         * @param style  the style, not null
+         */
+        LocalizedOffsetIdPrinterParser(TextStyle style) {
+            this.style = style;
+        }
+
+        private static StringBuilder appendHMS(StringBuilder buf, int t) {
+            return buf.append((char)(t / 10 + '0'))
+                      .append((char)(t % 10 + '0'));
+        }
+
+        @Override
+        public boolean format(DateTimePrintContext context, StringBuilder buf) {
+            Long offsetSecs = context.getValue(OFFSET_SECONDS);
+            if (offsetSecs == null) {
+                return false;
+            }
+            String gmtText = "GMT";  // TODO: get localized version of 'GMT'
+            if (gmtText != null) {
+                buf.append(gmtText);
+            }
+            int totalSecs = Math.toIntExact(offsetSecs);
+            if (totalSecs != 0) {
+                int absHours = Math.abs((totalSecs / 3600) % 100);  // anything larger than 99 silently dropped
+                int absMinutes = Math.abs((totalSecs / 60) % 60);
+                int absSeconds = Math.abs(totalSecs % 60);
+                buf.append(totalSecs < 0 ? "-" : "+");
+                if (style == TextStyle.FULL) {
+                    appendHMS(buf, absHours);
+                    buf.append(':');
+                    appendHMS(buf, absMinutes);
+                    if (absSeconds != 0) {
+                       buf.append(':');
+                       appendHMS(buf, absSeconds);
+                    }
+                } else {
+                    if (absHours >= 10) {
+                        buf.append((char)(absHours / 10 + '0'));
+                    }
+                    buf.append((char)(absHours % 10 + '0'));
+                    if (absMinutes != 0 || absSeconds != 0) {
+                        buf.append(':');
+                        appendHMS(buf, absMinutes);
+                        if (absSeconds != 0) {
+                            buf.append(':');
+                            appendHMS(buf, absSeconds);
+                        }
+                    }
+                }
+            }
+            return true;
+        }
+
+        int getDigit(CharSequence text, int position) {
+            char c = text.charAt(position);
+            if (c < '0' || c > '9') {
+                return -1;
+            }
+            return c - '0';
+        }
+
+        @Override
+        public int parse(DateTimeParseContext context, CharSequence text, int position) {
+            int pos = position;
+            int end = pos + text.length();
+            String gmtText = "GMT";  // TODO: get localized version of 'GMT'
+            if (gmtText != null) {
+                if (!context.subSequenceEquals(text, pos, gmtText, 0, gmtText.length())) {
+                    return ~position;
+                }
+                pos += gmtText.length();
+            }
+            // parse normal plus/minus offset
+            int negative = 0;
+            if (pos == end) {
+                return context.setParsedField(OFFSET_SECONDS, 0, position, pos);
+            }
+            char sign = text.charAt(pos);  // IOOBE if invalid position
+            if (sign == '+') {
+                negative = 1;
+            } else if (sign == '-') {
+                negative = -1;
+            } else {
+                return context.setParsedField(OFFSET_SECONDS, 0, position, pos);
+            }
+            pos++;
+            int h = 0;
+            int m = 0;
+            int s = 0;
+            if (style == TextStyle.FULL) {
+                int h1 = getDigit(text, pos++);
+                int h2 = getDigit(text, pos++);
+                if (h1 < 0 || h2 < 0 || text.charAt(pos++) != ':') {
+                    return ~position;
+                }
+                h = h1 * 10 + h2;
+                int m1 = getDigit(text, pos++);
+                int m2 = getDigit(text, pos++);
+                if (m1 < 0 || m2 < 0) {
+                    return ~position;
+                }
+                m = m1 * 10 + m2;
+                if (pos + 2 < end && text.charAt(pos) == ':') {
+                    int s1 = getDigit(text, pos + 1);
+                    int s2 = getDigit(text, pos + 2);
+                    if (s1 >= 0 && s2 >= 0) {
+                        s = s1 * 10 + s2;
+                        pos += 3;
+                    }
+                }
+            } else {
+                h = getDigit(text, pos++);
+                if (h < 0) {
+                    return ~position;
+                }
+                if (pos < end) {
+                    int h2 = getDigit(text, pos);
+                    if (h2 >=0) {
+                        h = h * 10 + h2;
+                        pos++;
+                    }
+                    if (pos + 2 < end && text.charAt(pos) == ':') {
+                        if (pos + 2 < end && text.charAt(pos) == ':') {
+                            int m1 = getDigit(text, pos + 1);
+                            int m2 = getDigit(text, pos + 2);
+                            if (m1 >= 0 && m2 >= 0) {
+                                m = m1 * 10 + m2;
+                                pos += 3;
+                                if (pos + 2 < end && text.charAt(pos) == ':') {
+                                    int s1 = getDigit(text, pos + 1);
+                                    int s2 = getDigit(text, pos + 2);
+                                    if (s1 >= 0 && s2 >= 0) {
+                                        s = s1 * 10 + s2;
+                                        pos += 3;
+                                   }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            long offsetSecs = negative * (h * 3600L + m * 60L + s);
+            return context.setParsedField(OFFSET_SECONDS, offsetSecs, position, pos);
+        }
+
+        @Override
+        public String toString() {
+            return "LocalizedOffset(" + style + ")";
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    /**
      * Prints or parses a zone ID.
      */
     static final class ZoneTextPrinterParser extends ZoneIdPrinterParser {
@@ -2898,7 +3300,7 @@
         private Set<String> preferredZones;
 
         ZoneTextPrinterParser(TextStyle textStyle, Set<ZoneId> preferredZones) {
-            super(Queries.zone(), "ZoneText(" + textStyle + ")");
+            super(TemporalQuery.zone(), "ZoneText(" + textStyle + ")");
             this.textStyle = Objects.requireNonNull(textStyle, "textStyle");
             if (preferredZones != null && preferredZones.size() != 0) {
                 this.preferredZones = new HashSet<>();
@@ -2929,12 +3331,12 @@
                 }
                 names = Arrays.copyOfRange(names, 0, 7);
                 names[5] =
-                    TimeZoneNameUtility.retrieveGenericDisplayName(id, TimeZone.LONG,locale);
+                    TimeZoneNameUtility.retrieveGenericDisplayName(id, TimeZone.LONG, locale);
                 if (names[5] == null) {
                     names[5] = names[0]; // use the id
                 }
                 names[6] =
-                    TimeZoneNameUtility.retrieveGenericDisplayName(id, TimeZone.SHORT,locale);
+                    TimeZoneNameUtility.retrieveGenericDisplayName(id, TimeZone.SHORT, locale);
                 if (names[6] == null) {
                     names[6] = names[0];
                 }
@@ -2946,16 +3348,16 @@
             }
             switch (type) {
             case STD:
-                return names[textStyle.ordinal() + 1];
+                return names[textStyle.zoneNameStyleIndex() + 1];
             case DST:
-                return names[textStyle.ordinal() + 3];
+                return names[textStyle.zoneNameStyleIndex() + 3];
             }
-            return names[textStyle.ordinal() + 5];
+            return names[textStyle.zoneNameStyleIndex() + 5];
         }
 
         @Override
         public boolean format(DateTimePrintContext context, StringBuilder buf) {
-            ZoneId zone = context.getValue(Queries.zoneId());
+            ZoneId zone = context.getValue(TemporalQuery.zoneId());
             if (zone == null) {
                 return false;
             }
@@ -3507,14 +3909,14 @@
 
         @Override
         public boolean format(DateTimePrintContext context, StringBuilder buf) {
-            Chronology chrono = context.getValue(Queries.chronology());
+            Chronology chrono = context.getValue(TemporalQuery.chronology());
             if (chrono == null) {
                 return false;
             }
             if (textStyle == null) {
                 buf.append(chrono.getId());
             } else {
-                buf.append(chrono.getId());  // TODO: Use symbols
+                buf.append(getChronologyName(chrono, context.getLocale()));
             }
             return true;
         }
@@ -3529,11 +3931,16 @@
             Chronology bestMatch = null;
             int matchLen = -1;
             for (Chronology chrono : chronos) {
-                String id = chrono.getId();
-                int idLen = id.length();
-                if (idLen > matchLen && context.subSequenceEquals(text, position, id, 0, idLen)) {
+                String name;
+                if (textStyle == null) {
+                    name = chrono.getId();
+                } else {
+                    name = getChronologyName(chrono, context.getLocale());
+                }
+                int nameLen = name.length();
+                if (nameLen > matchLen && context.subSequenceEquals(text, position, name, 0, nameLen)) {
                     bestMatch = chrono;
-                    matchLen = idLen;
+                    matchLen = nameLen;
                 }
             }
             if (bestMatch == null) {
@@ -3542,6 +3949,22 @@
             context.setParsed(bestMatch);
             return position + matchLen;
         }
+
+        /**
+         * Returns the chronology name of the given chrono in the given locale
+         * if available, or the chronology Id otherwise. The regular ResourceBundle
+         * search path is used for looking up the chronology name.
+         *
+         * @param chrono  the chronology, not null
+         * @param locale  the locale, not null
+         * @return the chronology name of chrono in locale, or the id if no name is available
+         * @throws NullPointerException if chrono or locale is null
+         */
+        private String getChronologyName(Chronology chrono, Locale locale) {
+            String key = "calendarname." + chrono.getCalendarType();
+            String name = DateTimeTextProvider.getLocalizedResource(key, locale);
+            return name != null ? name : chrono.getId();
+        }
     }
 
     //-----------------------------------------------------------------------
@@ -3549,6 +3972,9 @@
      * Prints or parses a localized pattern.
      */
     static final class LocalizedPrinterParser implements DateTimePrinterParser {
+        /** Cache of formatters. */
+        private static final ConcurrentMap<String, DateTimeFormatter> FORMATTER_CACHE = new ConcurrentHashMap<>(16, 0.75f, 2);
+
         private final FormatStyle dateStyle;
         private final FormatStyle timeStyle;
 
@@ -3578,6 +4004,9 @@
 
         /**
          * Gets the formatter to use.
+         * <p>
+         * The formatter will be the most appropriate to use for the date and time style in the locale.
+         * For example, some locales will use the month name while others will use the number.
          *
          * @param locale  the locale to use, not null
          * @param chrono  the chronology to use, not null
@@ -3585,8 +4014,32 @@
          * @throws IllegalArgumentException if the formatter cannot be found
          */
         private DateTimeFormatter formatter(Locale locale, Chronology chrono) {
-            return DateTimeFormatStyleProvider.getInstance()
-                                              .getFormatter(dateStyle, timeStyle, chrono, locale);
+            String key = chrono.getId() + '|' + locale.toString() + '|' + dateStyle + timeStyle;
+            DateTimeFormatter formatter = FORMATTER_CACHE.get(key);
+            if (formatter == null) {
+                LocaleResources lr = LocaleProviderAdapter.getResourceBundleBased().getLocaleResources(locale);
+                String pattern = lr.getJavaTimeDateTimePattern(
+                        convertStyle(timeStyle), convertStyle(dateStyle), chrono.getCalendarType());
+                formatter = new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter(locale);
+                DateTimeFormatter old = FORMATTER_CACHE.putIfAbsent(key, formatter);
+                if (old != null) {
+                    formatter = old;
+                }
+            }
+            return formatter;
+        }
+
+        /**
+         * Converts the given FormatStyle to the java.text.DateFormat style.
+         *
+         * @param style  the FormatStyle style
+         * @return the int style, or -1 if style is null, indicating unrequired
+         */
+        private int convertStyle(FormatStyle style) {
+            if (style == null) {
+                return -1;
+            }
+            return style.ordinal();  // indices happen to align
         }
 
         @Override
@@ -3596,7 +4049,6 @@
         }
     }
 
-
     //-----------------------------------------------------------------------
     /**
      * Prints or parses a localized pattern from a localized field.
@@ -3641,14 +4093,23 @@
             WeekFields weekDef = WeekFields.of(locale);
             TemporalField field = null;
             switch (chr) {
+                case 'Y':
+                    field = weekDef.weekBasedYear();
+                    if (count == 2) {
+                        return new ReducedPrinterParser(field, 2, 2000);
+                    } else {
+                        return new NumberPrinterParser(field, count, 19,
+                                (count < 4) ? SignStyle.NORMAL : SignStyle.EXCEEDS_PAD, -1);
+                    }
                 case 'e':
+                case 'c':
                     field = weekDef.dayOfWeek();
                     break;
                 case 'w':
-                    field = weekDef.weekOfMonth();
+                    field = weekDef.weekOfWeekBasedYear();
                     break;
                 case 'W':
-                    field = weekDef.weekOfYear();
+                    field = weekDef.weekOfMonth();
                     break;
                 default:
                     throw new IllegalStateException("unreachable");
@@ -3658,11 +4119,41 @@
 
         @Override
         public String toString() {
-            return String.format("WeekBased(%c%d)", chr, count);
+            StringBuilder sb = new StringBuilder(30);
+            sb.append("Localized(");
+            if (chr == 'Y') {
+                if (count == 1) {
+                    sb.append("WeekBasedYear");
+                } else if (count == 2) {
+                    sb.append("ReducedValue(WeekBasedYear,2,2000)");
+                } else {
+                    sb.append("WeekBasedYear,").append(count).append(",")
+                            .append(19).append(",")
+                            .append((count < 4) ? SignStyle.NORMAL : SignStyle.EXCEEDS_PAD);
+                }
+            } else {
+                switch (chr) {
+                    case 'c':
+                    case 'e':
+                        sb.append("DayOfWeek");
+                        break;
+                    case 'w':
+                        sb.append("WeekOfWeekBasedYear");
+                        break;
+                    case 'W':
+                        sb.append("WeekOfMonth");
+                        break;
+                    default:
+                        break;
+                }
+                sb.append(",");
+                sb.append(count);
+            }
+            sb.append(")");
+            return sb.toString();
         }
     }
 
-
     //-------------------------------------------------------------------------
     /**
      * Length comparator.
@@ -3673,5 +4164,4 @@
             return str1.length() == str2.length() ? str1.compareTo(str2) : str1.length() - str2.length();
         }
     };
-
 }
--- a/src/share/classes/java/time/format/DateTimeParseContext.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/format/DateTimeParseContext.java	Wed Apr 17 21:48:04 2013 -0700
@@ -61,19 +61,12 @@
  */
 package java.time.format;
 
-import java.time.DateTimeException;
 import java.time.ZoneId;
 import java.time.chrono.Chronology;
 import java.time.chrono.IsoChronology;
-import java.time.temporal.ChronoField;
-import java.time.temporal.Queries;
-import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
-import java.time.temporal.TemporalQuery;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.Locale;
-import java.util.Map;
 import java.util.Objects;
 
 /**
@@ -83,8 +76,8 @@
  * It has the ability to store and retrieve the parsed values and manage optional segments.
  * It also provides key information to the parsing methods.
  * <p>
- * Once parsing is complete, the {@link #toBuilder()} is typically used
- * to obtain a builder that can combine the separate parsed fields into meaningful values.
+ * Once parsing is complete, the {@link #toParsed()} is used to obtain the data.
+ * It contains a method to resolve  the separate parsed fields into meaningful values.
  *
  * <h3>Specification for implementors</h3>
  * This class is a mutable context intended for use from a single thread.
@@ -93,7 +86,7 @@
  *
  * @since 1.8
  */
-final class DateTimeParseContext implements TemporalAccessor {
+final class DateTimeParseContext {
 
     /**
      * The formatter, not null.
@@ -306,6 +299,17 @@
         return parsed.get(parsed.size() - 1);
     }
 
+    /**
+     * Gets the result of the parse.
+     *
+     * @return the result of the parse, not null
+     */
+    Parsed toParsed() {
+        Parsed parsed = currentParsed();
+        parsed.effectiveChrono = getEffectiveChronology();
+        return parsed;
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Gets the first value that was parsed for the specified field.
@@ -368,111 +372,6 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a {@code DateTimeBuilder} that can be used to interpret
-     * the results of the parse.
-     * <p>
-     * This method is typically used once parsing is complete to obtain the parsed data.
-     * Parsing will typically result in separate fields, such as year, month and day.
-     * The returned builder can be used to combine the parsed data into meaningful
-     * objects such as {@code LocalDate}, potentially applying complex processing
-     * to handle invalid parsed data.
-     *
-     * @return a new builder with the results of the parse, not null
-     */
-    DateTimeBuilder toBuilder() {
-        Parsed parsed = currentParsed();
-        DateTimeBuilder builder = new DateTimeBuilder();
-        for (Map.Entry<TemporalField, Long> fv : parsed.fieldValues.entrySet()) {
-            builder.addFieldValue(fv.getKey(), fv.getValue());
-        }
-        builder.addObject(getEffectiveChronology());
-        if (parsed.zone != null) {
-            builder.addObject(parsed.zone);
-        }
-        return builder;
-    }
-
-    /**
-     * Resolves the fields in this context.
-     *
-     * @return this, for method chaining
-     * @throws DateTimeException if resolving one field results in a value for
-     *  another field that is in conflict
-     */
-    DateTimeParseContext resolveFields() {
-        Parsed data = currentParsed();
-        outer:
-        while (true) {
-            for (Map.Entry<TemporalField, Long> entry : data.fieldValues.entrySet()) {
-                TemporalField targetField = entry.getKey();
-                Map<TemporalField, Long> changes = targetField.resolve(this, entry.getValue());
-                if (changes != null) {
-                    resolveMakeChanges(data, targetField, changes);
-                    data.fieldValues.remove(targetField);  // helps avoid infinite loops
-                    continue outer;  // have to restart to avoid concurrent modification
-                }
-            }
-            break;
-        }
-        return this;
-    }
-
-    private void resolveMakeChanges(Parsed data, TemporalField targetField, Map<TemporalField, Long> changes) {
-        for (Map.Entry<TemporalField, Long> change : changes.entrySet()) {
-            TemporalField changeField = change.getKey();
-            Long changeValue = change.getValue();
-            Objects.requireNonNull(changeField, "changeField");
-            if (changeValue != null) {
-                Long old = currentParsed().fieldValues.put(changeField, changeValue);
-                if (old != null && old.longValue() != changeValue.longValue()) {
-                    throw new DateTimeException("Conflict found: " + changeField + " " + old +
-                            " differs from " + changeField + " " + changeValue +
-                            " while resolving  " + targetField);
-                }
-            } else {
-                data.fieldValues.remove(changeField);
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // TemporalAccessor methods
-    // should only to be used once parsing is complete
-    @Override
-    public boolean isSupported(TemporalField field) {
-        if (currentParsed().fieldValues.containsKey(field)) {
-            return true;
-        }
-        return (field instanceof ChronoField == false) && field.isSupportedBy(this);
-    }
-
-    @Override
-    public long getLong(TemporalField field) {
-        Long value = currentParsed().fieldValues.get(field);
-        if (value != null) {
-            return value;
-        }
-        if (field instanceof ChronoField) {
-            throw new DateTimeException("Unsupported field: " + field.getName());
-        }
-        return field.getFrom(this);
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.chronology()) {
-            return (R) currentParsed().chrono;
-        } else if (query == Queries.zoneId()) {
-            return (R) currentParsed().zone;
-        } else if (query == Queries.precision()) {
-            return null;
-        }
-        return query.queryFrom(this);
-    }
-
-    //-----------------------------------------------------------------------
-    /**
      * Returns a string version of the context for debugging.
      *
      * @return a string representation of the context data, not null
@@ -482,27 +381,4 @@
         return currentParsed().toString();
     }
 
-    //-----------------------------------------------------------------------
-    /**
-     * Temporary store of parsed data.
-     */
-    private static final class Parsed {
-        Chronology chrono = null;
-        ZoneId zone = null;
-        final Map<TemporalField, Long> fieldValues = new HashMap<>();
-        private Parsed() {
-        }
-        protected Parsed copy() {
-            Parsed cloned = new Parsed();
-            cloned.chrono = this.chrono;
-            cloned.zone = this.zone;
-            cloned.fieldValues.putAll(this.fieldValues);
-            return cloned;
-        }
-        @Override
-        public String toString() {
-            return fieldValues.toString() + "," + chrono + "," + zone;
-        }
-    }
-
 }
--- a/src/share/classes/java/time/format/DateTimePrintContext.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/format/DateTimePrintContext.java	Wed Apr 17 21:48:04 2013 -0700
@@ -63,14 +63,16 @@
 
 import static java.time.temporal.ChronoField.EPOCH_DAY;
 import static java.time.temporal.ChronoField.INSTANT_SECONDS;
+import static java.time.temporal.ChronoField.OFFSET_SECONDS;
 
 import java.time.DateTimeException;
 import java.time.Instant;
 import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.chrono.ChronoLocalDate;
 import java.time.chrono.Chronology;
+import java.time.chrono.IsoChronology;
 import java.time.temporal.ChronoField;
-import java.time.chrono.ChronoLocalDate;
-import java.time.temporal.Queries;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
@@ -118,20 +120,20 @@
     }
 
     private static TemporalAccessor adjust(final TemporalAccessor temporal, DateTimeFormatter formatter) {
-        // normal case first
+        // normal case first (early return is an optimization)
         Chronology overrideChrono = formatter.getChronology();
         ZoneId overrideZone = formatter.getZone();
         if (overrideChrono == null && overrideZone == null) {
             return temporal;
         }
 
-        // ensure minimal change
-        Chronology temporalChrono = Chronology.from(temporal);  // default to ISO, handles Instant
-        ZoneId temporalZone = temporal.query(Queries.zone());  // zone then offset, handles OffsetDateTime
-        if (temporal.isSupported(EPOCH_DAY) == false || Objects.equals(overrideChrono, temporalChrono)) {
+        // ensure minimal change (early return is an optimization)
+        Chronology temporalChrono = temporal.query(TemporalQuery.chronology());
+        ZoneId temporalZone = temporal.query(TemporalQuery.zoneId());
+        if (Objects.equals(overrideChrono, temporalChrono)) {
             overrideChrono = null;
         }
-        if (temporal.isSupported(INSTANT_SECONDS) == false || Objects.equals(overrideZone, temporalZone)) {
+        if (Objects.equals(overrideZone, temporalZone)) {
             overrideZone = null;
         }
         if (overrideChrono == null && overrideZone == null) {
@@ -139,53 +141,83 @@
         }
 
         // make adjustment
-        if (overrideChrono != null && overrideZone != null) {
-            return overrideChrono.zonedDateTime(Instant.from(temporal), overrideZone);
-        } else if (overrideZone != null) {
-            return temporalChrono.zonedDateTime(Instant.from(temporal), overrideZone);
-        } else {  // overrideChrono != null
-            // need class here to handle non-standard cases
-            final ChronoLocalDate date = overrideChrono.date(temporal);
-            return new TemporalAccessor() {
-                @Override
-                public boolean isSupported(TemporalField field) {
-                    return temporal.isSupported(field);
-                }
-                @Override
-                public ValueRange range(TemporalField field) {
-                    if (field instanceof ChronoField) {
-                        if (((ChronoField) field).isDateField()) {
-                            return date.range(field);
-                        } else {
-                            return temporal.range(field);
+        final Chronology effectiveChrono = (overrideChrono != null ? overrideChrono : temporalChrono);
+        if (overrideZone != null) {
+            // if have zone and instant, calculation is simple, defaulting chrono if necessary
+            if (temporal.isSupported(INSTANT_SECONDS)) {
+                Chronology chrono = (effectiveChrono != null ? effectiveChrono : IsoChronology.INSTANCE);
+                return chrono.zonedDateTime(Instant.from(temporal), overrideZone);
+            }
+            // block changing zone on OffsetTime, and similar problem cases
+            if (overrideZone.normalized() instanceof ZoneOffset && temporal.isSupported(OFFSET_SECONDS) &&
+                    temporal.get(OFFSET_SECONDS) != overrideZone.getRules().getOffset(Instant.EPOCH).getTotalSeconds()) {
+                throw new DateTimeException("Unable to apply override zone '" + overrideZone +
+                        "' because the temporal object being formatted has a different offset but" +
+                        " does not represent an instant: " + temporal);
+            }
+        }
+        final ZoneId effectiveZone = (overrideZone != null ? overrideZone : temporalZone);
+        final ChronoLocalDate<?> effectiveDate;
+        if (overrideChrono != null) {
+            if (temporal.isSupported(EPOCH_DAY)) {
+                effectiveDate = effectiveChrono.date(temporal);
+            } else {
+                // check for date fields other than epoch-day, ignoring case of converting null to ISO
+                if (!(overrideChrono == IsoChronology.INSTANCE && temporalChrono == null)) {
+                    for (ChronoField f : ChronoField.values()) {
+                        if (f.isDateBased() && temporal.isSupported(f)) {
+                            throw new DateTimeException("Unable to apply override chronology '" + overrideChrono +
+                                    "' because the temporal object being formatted contains date fields but" +
+                                    " does not represent a whole date: " + temporal);
                         }
                     }
-                    return field.rangeRefinedBy(this);
                 }
-                @Override
-                public long getLong(TemporalField field) {
-                    if (field instanceof ChronoField) {
-                        if (((ChronoField) field).isDateField()) {
-                            return date.getLong(field);
-                        } else {
-                            return temporal.getLong(field);
-                        }
-                    }
-                    return field.getFrom(this);
+                effectiveDate = null;
+            }
+        } else {
+            effectiveDate = null;
+        }
+
+        // combine available data
+        // this is a non-standard temporal that is almost a pure delegate
+        // this better handles map-like underlying temporal instances
+        return new TemporalAccessor() {
+            @Override
+            public boolean isSupported(TemporalField field) {
+                if (effectiveDate != null && field.isDateBased()) {
+                    return effectiveDate.isSupported(field);
+                }
+                return temporal.isSupported(field);
+            }
+            @Override
+            public ValueRange range(TemporalField field) {
+                if (effectiveDate != null && field.isDateBased()) {
+                    return effectiveDate.range(field);
                 }
-                @SuppressWarnings("unchecked")
-                @Override
-                public <R> R query(TemporalQuery<R> query) {
-                    if (query == Queries.chronology()) {
-                        return (R) date.getChronology();
-                    }
-                    if (query == Queries.zoneId() || query == Queries.precision()) {
-                        return temporal.query(query);
-                    }
-                    return query.queryFrom(this);
+                return temporal.range(field);
+            }
+            @Override
+            public long getLong(TemporalField field) {
+                if (effectiveDate != null && field.isDateBased()) {
+                    return effectiveDate.getLong(field);
                 }
-            };
-        }
+                return temporal.getLong(field);
+            }
+            @SuppressWarnings("unchecked")
+            @Override
+            public <R> R query(TemporalQuery<R> query) {
+                if (query == TemporalQuery.chronology()) {
+                    return (R) effectiveChrono;
+                }
+                if (query == TemporalQuery.zoneId()) {
+                    return (R) effectiveZone;
+                }
+                if (query == TemporalQuery.precision()) {
+                    return temporal.query(query);
+                }
+                return query.queryFrom(this);
+            }
+        };
     }
 
     //-----------------------------------------------------------------------
--- a/src/share/classes/java/time/format/DateTimeTextProvider.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/format/DateTimeTextProvider.java	Wed Apr 17 21:48:04 2013 -0700
@@ -70,6 +70,7 @@
 import java.time.chrono.IsoChronology;
 import java.time.chrono.JapaneseChronology;
 import java.time.temporal.ChronoField;
+import java.time.temporal.IsoFields;
 import java.time.temporal.TemporalField;
 import java.util.AbstractMap.SimpleImmutableEntry;
 import java.util.ArrayList;
@@ -82,10 +83,13 @@
 import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.ResourceBundle;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
 import sun.util.locale.provider.CalendarDataUtility;
+import sun.util.locale.provider.LocaleProviderAdapter;
+import sun.util.locale.provider.LocaleResources;
 
 /**
  * A provider to obtain the textual form of a date-time field.
@@ -141,15 +145,6 @@
         return null;
     }
 
-    private static int toStyle(TextStyle style) {
-        if (style == TextStyle.FULL) {
-            return Calendar.LONG_FORMAT;
-        } else if (style == TextStyle.SHORT) {
-            return Calendar.SHORT_FORMAT;
-        }
-        return Calendar.NARROW_STANDALONE;
-    }
-
     /**
      * Gets the text for the specified chrono, field, locale and style
      * for the purpose of formatting.
@@ -158,7 +153,7 @@
      * The null return value should be used if there is no applicable text, or
      * if the text would be a numeric representation of the value.
      *
-     * @param chrono the Chronology to get text for, not null
+     * @param chrono  the Chronology to get text for, not null
      * @param field  the field to get text for, not null
      * @param value  the field value to get text for, not null
      * @param style  the style to get text for, not null
@@ -200,8 +195,8 @@
         } else {
             return null;
         }
-        return CalendarDataUtility.retrieveCldrFieldValueName(
-                chrono.getCalendarType(), fieldIndex, fieldValue, toStyle(style), locale);
+        return CalendarDataUtility.retrieveJavaTimeFieldValueName(
+                chrono.getCalendarType(), fieldIndex, fieldValue, style.toCalendarStyle(), locale);
     }
 
     /**
@@ -238,7 +233,7 @@
      * if the text would be a numeric representation of the value.
      * Text can only be parsed if all the values for that field-style-locale combination are unique.
      *
-     * @param chrono the Chronology to get text for, not null
+     * @param chrono  the Chronology to get text for, not null
      * @param field  the field to get text for, not null
      * @param style  the style to get text for, null for all parsable text
      * @param locale  the locale to get text for, not null
@@ -270,17 +265,17 @@
             return null;
         }
 
-        Map<String, Integer> map = CalendarDataUtility.retrieveCldrFieldValueNames(
-                chrono.getCalendarType(), fieldIndex, toStyle(style), locale);
+        int calendarStyle = (style == null) ? Calendar.ALL_STYLES : style.toCalendarStyle();
+        Map<String, Integer> map = CalendarDataUtility.retrieveJavaTimeFieldValueNames(
+                chrono.getCalendarType(), fieldIndex, calendarStyle, locale);
         if (map == null) {
             return null;
         }
-
         List<Entry<String, Long>> list = new ArrayList<>(map.size());
         switch (fieldIndex) {
         case Calendar.ERA:
-            for (String key : map.keySet()) {
-                int era = map.get(key);
+            for (Map.Entry<String, Integer> entry : map.entrySet()) {
+                int era = entry.getValue();
                 if (chrono == JapaneseChronology.INSTANCE) {
                     if (era == 0) {
                         era = -999;
@@ -288,22 +283,22 @@
                         era -= 2;
                     }
                 }
-                list.add(createEntry(key, (long) era));
+                list.add(createEntry(entry.getKey(), (long)era));
             }
             break;
         case Calendar.MONTH:
-            for (String key : map.keySet()) {
-                list.add(createEntry(key, (long)(map.get(key) + 1)));
+            for (Map.Entry<String, Integer> entry : map.entrySet()) {
+                list.add(createEntry(entry.getKey(), (long)(entry.getValue() + 1)));
             }
             break;
         case Calendar.DAY_OF_WEEK:
-            for (String key : map.keySet()) {
-                list.add(createEntry(key, (long)toWeekDay(map.get(key))));
+            for (Map.Entry<String, Integer> entry : map.entrySet()) {
+                list.add(createEntry(entry.getKey(), (long)toWeekDay(entry.getValue())));
             }
             break;
         default:
-            for (String key : map.keySet()) {
-                list.add(createEntry(key, (long)map.get(key)));
+            for (Map.Entry<String, Integer> entry : map.entrySet()) {
+                list.add(createEntry(entry.getKey(), (long)entry.getValue()));
             }
             break;
         }
@@ -333,11 +328,47 @@
         Map<TextStyle, Map<Long, String>> styleMap = new HashMap<>();
         if (field == ERA) {
             for (TextStyle textStyle : TextStyle.values()) {
+                if (textStyle.isStandalone()) {
+                    // Stand-alone isn't applicable to era names.
+                    continue;
+                }
+                Map<String, Integer> displayNames = CalendarDataUtility.retrieveJavaTimeFieldValueNames(
+                        "gregory", Calendar.ERA, textStyle.toCalendarStyle(), locale);
+                if (displayNames != null) {
+                    Map<Long, String> map = new HashMap<>();
+                    for (Entry<String, Integer> entry : displayNames.entrySet()) {
+                        map.put((long) entry.getValue(), entry.getKey());
+                    }
+                    if (!map.isEmpty()) {
+                        styleMap.put(textStyle, map);
+                    }
+                }
+            }
+            return new LocaleStore(styleMap);
+        }
+
+        if (field == MONTH_OF_YEAR) {
+            for (TextStyle textStyle : TextStyle.values()) {
+                Map<String, Integer> displayNames = CalendarDataUtility.retrieveJavaTimeFieldValueNames(
+                        "gregory", Calendar.MONTH, textStyle.toCalendarStyle(), locale);
                 Map<Long, String> map = new HashMap<>();
-                for (Entry<String, Integer> entry :
-                        CalendarDataUtility.retrieveCldrFieldValueNames(
-                        "gregory", Calendar.ERA, toStyle(textStyle), locale).entrySet()) {
-                    map.put((long) entry.getValue(), entry.getKey());
+                if (displayNames != null) {
+                    for (Entry<String, Integer> entry : displayNames.entrySet()) {
+                        map.put((long) (entry.getValue() + 1), entry.getKey());
+                    }
+
+                } else {
+                    // Narrow names may have duplicated names, such as "J" for January, Jun, July.
+                    // Get names one by one in that case.
+                    for (int month = Calendar.JANUARY; month <= Calendar.DECEMBER; month++) {
+                        String name;
+                        name = CalendarDataUtility.retrieveJavaTimeFieldValueName(
+                                "gregory", Calendar.MONTH, month, textStyle.toCalendarStyle(), locale);
+                        if (name == null) {
+                            break;
+                        }
+                        map.put((long) (month + 1), name);
+                    }
                 }
                 if (!map.isEmpty()) {
                     styleMap.put(textStyle, map);
@@ -346,72 +377,77 @@
             return new LocaleStore(styleMap);
         }
 
-        if (field == MONTH_OF_YEAR) {
-            Map<Long, String> map = new HashMap<>();
-            for (Entry<String, Integer> entry :
-                    CalendarDataUtility.retrieveCldrFieldValueNames(
-                    "gregory", Calendar.MONTH, Calendar.LONG_FORMAT, locale).entrySet()) {
-                map.put((long) (entry.getValue() + 1), entry.getKey());
-            }
-            styleMap.put(TextStyle.FULL, map);
+        if (field == DAY_OF_WEEK) {
+            for (TextStyle textStyle : TextStyle.values()) {
+                Map<String, Integer> displayNames = CalendarDataUtility.retrieveJavaTimeFieldValueNames(
+                        "gregory", Calendar.DAY_OF_WEEK, textStyle.toCalendarStyle(), locale);
+                Map<Long, String> map = new HashMap<>();
+                if (displayNames != null) {
+                    for (Entry<String, Integer> entry : displayNames.entrySet()) {
+                        map.put((long)toWeekDay(entry.getValue()), entry.getKey());
+                    }
 
-            map = new HashMap<>();
-            for (Entry<String, Integer> entry :
-                    CalendarDataUtility.retrieveCldrFieldValueNames(
-                    "gregory", Calendar.MONTH, Calendar.SHORT_FORMAT, locale).entrySet()) {
-                map.put((long) (entry.getValue() + 1), entry.getKey());
-            }
-            styleMap.put(TextStyle.SHORT, map);
-
-            map = new HashMap<>();
-            for (int month = Calendar.JANUARY; month <= Calendar.DECEMBER; month++) {
-                String name;
-                name = CalendarDataUtility.retrieveCldrFieldValueName(
-                        "gregory", Calendar.MONTH, month, Calendar.NARROW_STANDALONE, locale);
-                if (name != null) {
-                    map.put((long)(month + 1), name);
+                } else {
+                    // Narrow names may have duplicated names, such as "S" for Sunday and Saturday.
+                    // Get names one by one in that case.
+                    for (int wday = Calendar.SUNDAY; wday <= Calendar.SATURDAY; wday++) {
+                        String name;
+                        name = CalendarDataUtility.retrieveJavaTimeFieldValueName(
+                            "gregory", Calendar.DAY_OF_WEEK, wday, textStyle.toCalendarStyle(), locale);
+                        if (name == null) {
+                            break;
+                        }
+                        map.put((long)toWeekDay(wday), name);
+                    }
                 }
-            }
-            if (!map.isEmpty()) {
-                styleMap.put(TextStyle.NARROW, map);
+                if (!map.isEmpty()) {
+                    styleMap.put(textStyle, map);
+                }
             }
             return new LocaleStore(styleMap);
         }
 
-        if (field == DAY_OF_WEEK) {
-            Map<Long, String> map = new HashMap<>();
-            for (Entry<String, Integer> entry :
-                 CalendarDataUtility.retrieveCldrFieldValueNames(
-                    "gregory", Calendar.DAY_OF_WEEK, Calendar.LONG_FORMAT, locale).entrySet()) {
-                map.put((long)toWeekDay(entry.getValue()), entry.getKey());
+        if (field == AMPM_OF_DAY) {
+            for (TextStyle textStyle : TextStyle.values()) {
+                if (textStyle.isStandalone()) {
+                    // Stand-alone isn't applicable to AM/PM.
+                    continue;
+                }
+                Map<String, Integer> displayNames = CalendarDataUtility.retrieveJavaTimeFieldValueNames(
+                        "gregory", Calendar.AM_PM, textStyle.toCalendarStyle(), locale);
+                if (displayNames != null) {
+                    Map<Long, String> map = new HashMap<>();
+                    for (Entry<String, Integer> entry : displayNames.entrySet()) {
+                        map.put((long) entry.getValue(), entry.getKey());
+                    }
+                    if (!map.isEmpty()) {
+                        styleMap.put(textStyle, map);
+                    }
+                }
             }
-            styleMap.put(TextStyle.FULL, map);
-            map = new HashMap<>();
-            for (Entry<String, Integer> entry :
-                    CalendarDataUtility.retrieveCldrFieldValueNames(
-                    "gregory", Calendar.DAY_OF_WEEK, Calendar.SHORT_FORMAT, locale).entrySet()) {
-                map.put((long) toWeekDay(entry.getValue()), entry.getKey());
-            }
-            styleMap.put(TextStyle.SHORT, map);
-            map = new HashMap<>();
-            for (int wday = Calendar.SUNDAY; wday <= Calendar.SATURDAY; wday++) {
-                map.put((long) toWeekDay(wday),
-                        CalendarDataUtility.retrieveCldrFieldValueName(
-                        "gregory", Calendar.DAY_OF_WEEK, wday, Calendar.NARROW_FORMAT, locale));
-            }
-            styleMap.put(TextStyle.NARROW, map);
             return new LocaleStore(styleMap);
         }
 
-        if (field == AMPM_OF_DAY) {
-            Map<Long, String> map = new HashMap<>();
-            for (Entry<String, Integer> entry :
-                    CalendarDataUtility.retrieveCldrFieldValueNames(
-                    "gregory", Calendar.AM_PM, Calendar.LONG_FORMAT, locale).entrySet()) {
-                map.put((long) entry.getValue(), entry.getKey());
+        if (field == IsoFields.QUARTER_OF_YEAR) {
+            // The order of keys must correspond to the TextStyle.values() order.
+            final String[] keys = {
+                "QuarterNames",
+                "standalone.QuarterNames",
+                "QuarterAbbreviations",
+                "standalone.QuarterAbbreviations",
+                "QuarterNarrows",
+                "standalone.QuarterNarrows",
+            };
+            for (int i = 0; i < keys.length; i++) {
+                String[] names = getLocalizedResource(keys[i], locale);
+                if (names != null) {
+                    Map<Long, String> map = new HashMap<>();
+                    for (int q = 0; q < names.length; q++) {
+                        map.put((long) (q + 1), names[q]);
+                    }
+                    styleMap.put(TextStyle.values()[i], map);
+                }
             }
-            styleMap.put(TextStyle.FULL, map);
-            styleMap.put(TextStyle.SHORT, map);  // re-use, as we don't have different data
             return new LocaleStore(styleMap);
         }
 
@@ -430,6 +466,23 @@
     }
 
     /**
+     * Returns the localized resource of the given key and locale, or null
+     * if no localized resource is available.
+     *
+     * @param key  the key of the localized resource, not null
+     * @param locale  the locale, not null
+     * @return the localized resource, or null if not available
+     * @throws NullPointerException if key or locale is null
+     */
+    @SuppressWarnings("unchecked")
+    static <T> T getLocalizedResource(String key, Locale locale) {
+        LocaleResources lr = LocaleProviderAdapter.getResourceBundleBased()
+                                    .getLocaleResources(locale);
+        ResourceBundle rb = lr.getJavaTimeFormatData();
+        return rb.containsKey(key) ? (T) rb.getObject(key) : null;
+    }
+
+    /**
      * Stores the text for a single locale.
      * <p>
      * Some fields have a textual representation, such as day-of-week or month-of-year.
@@ -457,9 +510,9 @@
             this.valueTextMap = valueTextMap;
             Map<TextStyle, List<Entry<String, Long>>> map = new HashMap<>();
             List<Entry<String, Long>> allList = new ArrayList<>();
-            for (TextStyle style : valueTextMap.keySet()) {
+            for (Map.Entry<TextStyle, Map<Long, String>> vtmEntry : valueTextMap.entrySet()) {
                 Map<String, Entry<String, Long>> reverse = new HashMap<>();
-                for (Map.Entry<Long, String> entry : valueTextMap.get(style).entrySet()) {
+                for (Map.Entry<Long, String> entry : vtmEntry.getValue().entrySet()) {
                     if (reverse.put(entry.getValue(), createEntry(entry.getValue(), entry.getKey())) != null) {
                         // TODO: BUG: this has no effect
                         continue;  // not parsable, try next style
@@ -467,7 +520,7 @@
                 }
                 List<Entry<String, Long>> list = new ArrayList<>(reverse.values());
                 Collections.sort(list, COMPARATOR);
-                map.put(style, list);
+                map.put(vtmEntry.getKey(), list);
                 allList.addAll(list);
                 map.put(null, allList);
             }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/time/format/Parsed.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,482 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2013, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package java.time.format;
+
+import static java.time.temporal.ChronoField.AMPM_OF_DAY;
+import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_AMPM;
+import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_DAY;
+import static java.time.temporal.ChronoField.HOUR_OF_AMPM;
+import static java.time.temporal.ChronoField.HOUR_OF_DAY;
+import static java.time.temporal.ChronoField.MICRO_OF_DAY;
+import static java.time.temporal.ChronoField.MICRO_OF_SECOND;
+import static java.time.temporal.ChronoField.MILLI_OF_DAY;
+import static java.time.temporal.ChronoField.MILLI_OF_SECOND;
+import static java.time.temporal.ChronoField.MINUTE_OF_DAY;
+import static java.time.temporal.ChronoField.MINUTE_OF_HOUR;
+import static java.time.temporal.ChronoField.NANO_OF_DAY;
+import static java.time.temporal.ChronoField.NANO_OF_SECOND;
+import static java.time.temporal.ChronoField.SECOND_OF_DAY;
+import static java.time.temporal.ChronoField.SECOND_OF_MINUTE;
+
+import java.time.DateTimeException;
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.time.ZoneId;
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.Chronology;
+import java.time.temporal.ChronoField;
+import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQuery;
+import java.time.temporal.UnsupportedTemporalTypeException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Objects;
+import java.util.Set;
+
+/**
+ * A store of parsed data.
+ * <p>
+ * This class is used during parsing to collect the data. Part of the parsing process
+ * involves handling optional blocks and multiple copies of the data get created to
+ * support the necessary backtracking.
+ * <p>
+ * Once parsing is completed, this class can be used as the resultant {@code TemporalAccessor}.
+ * In most cases, it is only exposed once the fields have been resolved.
+ *
+ * <h3>Specification for implementors</h3>
+ * This class is a mutable context intended for use from a single thread.
+ * Usage of the class is thread-safe within standard parsing as a new instance of this class
+ * is automatically created for each parse and parsing is single-threaded
+ *
+ * @since 1.8
+ */
+final class Parsed implements TemporalAccessor {
+    // some fields are accessed using package scope from DateTimeParseContext
+
+    /**
+     * The parsed fields.
+     */
+    final Map<TemporalField, Long> fieldValues = new HashMap<>();
+    /**
+     * The parsed zone.
+     */
+    ZoneId zone;
+    /**
+     * The parsed chronology.
+     */
+    Chronology chrono;
+    /**
+     * The effective chronology.
+     */
+    Chronology effectiveChrono;
+    /**
+     * The resolver style to use.
+     */
+    private ResolverStyle resolverStyle;
+    /**
+     * The resolved date.
+     */
+    private ChronoLocalDate<?> date;
+    /**
+     * The resolved time.
+     */
+    private LocalTime time;
+
+    /**
+     * Creates an instance.
+     */
+    Parsed() {
+    }
+
+    /**
+     * Creates a copy.
+     */
+    Parsed copy() {
+        // only copy fields used in parsing stage
+        Parsed cloned = new Parsed();
+        cloned.fieldValues.putAll(this.fieldValues);
+        cloned.zone = this.zone;
+        cloned.chrono = this.chrono;
+        return cloned;
+    }
+
+    //-----------------------------------------------------------------------
+    @Override
+    public boolean isSupported(TemporalField field) {
+        if (fieldValues.containsKey(field) ||
+                (date != null && date.isSupported(field)) ||
+                (time != null && time.isSupported(field))) {
+            return true;
+        }
+        return field != null && (field instanceof ChronoField == false) && field.isSupportedBy(this);
+    }
+
+    @Override
+    public long getLong(TemporalField field) {
+        Objects.requireNonNull(field, "field");
+        Long value = fieldValues.get(field);
+        if (value != null) {
+            return value;
+        }
+        if (date != null && date.isSupported(field)) {
+            return date.getLong(field);
+        }
+        if (time != null && time.isSupported(field)) {
+            return time.getLong(field);
+        }
+        if (field instanceof ChronoField) {
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
+        }
+        return field.getFrom(this);
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public <R> R query(TemporalQuery<R> query) {
+        if (query == TemporalQuery.zoneId()) {
+            return (R) zone;
+        } else if (query == TemporalQuery.chronology()) {
+            return (R) chrono;
+        } else if (query == TemporalQuery.localDate()) {
+            return (R) (date != null ? LocalDate.from(date) : null);
+        } else if (query == TemporalQuery.localTime()) {
+            return (R) time;
+        } else if (query == TemporalQuery.zone() || query == TemporalQuery.offset()) {
+            return query.queryFrom(this);
+        } else if (query == TemporalQuery.precision()) {
+            return null;  // not a complete date/time
+        }
+        // inline TemporalAccessor.super.query(query) as an optimization
+        // non-JDK classes are not permitted to make this optimization
+        return query.queryFrom(this);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Resolves the fields in this context.
+     *
+     * @param resolverStyle  the resolver style, not null
+     * @param resolverFields  the fields to use for resolving, null for all fields
+     * @return this, for method chaining
+     * @throws DateTimeException if resolving one field results in a value for
+     *  another field that is in conflict
+     */
+    TemporalAccessor resolve(ResolverStyle resolverStyle, Set<TemporalField> resolverFields) {
+        if (resolverFields != null) {
+            fieldValues.keySet().retainAll(resolverFields);
+        }
+        this.resolverStyle = resolverStyle;
+        chrono = effectiveChrono;
+        resolveFields();
+        resolveTimeLenient();
+        crossCheck();
+        return this;
+    }
+
+    //-----------------------------------------------------------------------
+    private void resolveFields() {
+        // resolve ChronoField
+        resolveDateFields();
+        resolveTimeFields();
+
+        // if any other fields, handle them
+        // any lenient date resolution should return epoch-day
+        if (fieldValues.size() > 0) {
+            boolean changed = false;
+            outer:
+            while (true) {
+                for (Map.Entry<TemporalField, Long> entry : fieldValues.entrySet()) {
+                    TemporalField targetField = entry.getKey();
+                    Map<TemporalField, Long> changes = targetField.resolve(this, entry.getValue(), resolverStyle);
+                    if (changes != null) {
+                        changed = true;
+                        resolveFieldsMakeChanges(targetField, changes);
+                        fieldValues.remove(targetField);  // helps avoid infinite loops
+                        continue outer;  // have to restart to avoid concurrent modification
+                    }
+                }
+                break;
+            }
+            // if something changed then have to redo ChronoField resolve
+            if (changed) {
+                resolveDateFields();
+                resolveTimeFields();
+            }
+        }
+    }
+
+    private void resolveFieldsMakeChanges(TemporalField targetField, Map<TemporalField, Long> changes) {
+        for (Map.Entry<TemporalField, Long> change : changes.entrySet()) {
+            TemporalField changeField = change.getKey();
+            Long changeValue = change.getValue();
+            Objects.requireNonNull(changeField, "changeField");
+            if (changeValue != null) {
+                updateCheckConflict(targetField, changeField, changeValue);
+            } else {
+                fieldValues.remove(changeField);
+            }
+        }
+    }
+
+    private void updateCheckConflict(TemporalField targetField, TemporalField changeField, Long changeValue) {
+        Long old = fieldValues.put(changeField, changeValue);
+        if (old != null && old.longValue() != changeValue.longValue()) {
+            throw new DateTimeException("Conflict found: " + changeField + " " + old +
+                    " differs from " + changeField + " " + changeValue +
+                    " while resolving  " + targetField);
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    private void resolveDateFields() {
+        updateCheckConflict(chrono.resolveDate(fieldValues, resolverStyle));
+    }
+
+    private void updateCheckConflict(ChronoLocalDate<?> cld) {
+        if (date != null) {
+            if (cld != null && date.equals(cld) == false) {
+                throw new DateTimeException("Conflict found: Fields resolved to two different dates: " + date + " " + cld);
+            }
+        } else {
+            date = cld;
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    private void resolveTimeFields() {
+        // simplify fields
+        if (fieldValues.containsKey(CLOCK_HOUR_OF_DAY)) {
+            long ch = fieldValues.remove(CLOCK_HOUR_OF_DAY);
+            updateCheckConflict(CLOCK_HOUR_OF_DAY, HOUR_OF_DAY, ch == 24 ? 0 : ch);
+        }
+        if (fieldValues.containsKey(CLOCK_HOUR_OF_AMPM)) {
+            long ch = fieldValues.remove(CLOCK_HOUR_OF_AMPM);
+            updateCheckConflict(CLOCK_HOUR_OF_AMPM, HOUR_OF_AMPM, ch == 12 ? 0 : ch);
+        }
+        if (fieldValues.containsKey(AMPM_OF_DAY) && fieldValues.containsKey(HOUR_OF_AMPM)) {
+            long ap = fieldValues.remove(AMPM_OF_DAY);
+            long hap = fieldValues.remove(HOUR_OF_AMPM);
+            updateCheckConflict(AMPM_OF_DAY, HOUR_OF_DAY, ap * 12 + hap);
+        }
+        if (fieldValues.containsKey(MICRO_OF_DAY)) {
+            long cod = fieldValues.remove(MICRO_OF_DAY);
+            updateCheckConflict(MICRO_OF_DAY, SECOND_OF_DAY, cod / 1_000_000L);
+            updateCheckConflict(MICRO_OF_DAY, MICRO_OF_SECOND, cod % 1_000_000L);
+        }
+        if (fieldValues.containsKey(MILLI_OF_DAY)) {
+            long lod = fieldValues.remove(MILLI_OF_DAY);
+            updateCheckConflict(MILLI_OF_DAY, SECOND_OF_DAY, lod / 1_000);
+            updateCheckConflict(MILLI_OF_DAY, MILLI_OF_SECOND, lod % 1_000);
+        }
+        if (fieldValues.containsKey(SECOND_OF_DAY)) {
+            long sod = fieldValues.remove(SECOND_OF_DAY);
+            updateCheckConflict(SECOND_OF_DAY, HOUR_OF_DAY, sod / 3600);
+            updateCheckConflict(SECOND_OF_DAY, MINUTE_OF_HOUR, (sod / 60) % 60);
+            updateCheckConflict(SECOND_OF_DAY, SECOND_OF_MINUTE, sod % 60);
+        }
+        if (fieldValues.containsKey(MINUTE_OF_DAY)) {
+            long mod = fieldValues.remove(MINUTE_OF_DAY);
+            updateCheckConflict(MINUTE_OF_DAY, HOUR_OF_DAY, mod / 60);
+            updateCheckConflict(MINUTE_OF_DAY, MINUTE_OF_HOUR, mod % 60);
+        }
+
+        // combine partial second fields strictly, leaving lenient expansion to later
+        if (fieldValues.containsKey(NANO_OF_SECOND)) {
+            long nos = fieldValues.get(NANO_OF_SECOND);
+            if (fieldValues.containsKey(MICRO_OF_SECOND)) {
+                long cos = fieldValues.remove(MICRO_OF_SECOND);
+                nos = cos * 1000 + (nos % 1000);
+                updateCheckConflict(MICRO_OF_SECOND, NANO_OF_SECOND, nos);
+            }
+            if (fieldValues.containsKey(MILLI_OF_SECOND)) {
+                long los = fieldValues.remove(MILLI_OF_SECOND);
+                updateCheckConflict(MILLI_OF_SECOND, NANO_OF_SECOND, los * 1_000_000L + (nos % 1_000_000L));
+            }
+        }
+
+        // convert to time if possible
+        if (fieldValues.containsKey(NANO_OF_DAY)) {
+            long nod = fieldValues.remove(NANO_OF_DAY);
+            updateCheckConflict(LocalTime.ofNanoOfDay(nod));
+        }
+        if (fieldValues.containsKey(HOUR_OF_DAY) && fieldValues.containsKey(MINUTE_OF_HOUR) &&
+                fieldValues.containsKey(SECOND_OF_MINUTE) && fieldValues.containsKey(NANO_OF_SECOND)) {
+            int hodVal = HOUR_OF_DAY.checkValidIntValue(fieldValues.remove(HOUR_OF_DAY));
+            int mohVal = MINUTE_OF_HOUR.checkValidIntValue(fieldValues.remove(MINUTE_OF_HOUR));
+            int somVal = SECOND_OF_MINUTE.checkValidIntValue(fieldValues.remove(SECOND_OF_MINUTE));
+            int nosVal = NANO_OF_SECOND.checkValidIntValue(fieldValues.remove(NANO_OF_SECOND));
+            updateCheckConflict(LocalTime.of(hodVal, mohVal, somVal, nosVal));
+        }
+    }
+
+    private void resolveTimeLenient() {
+        // leniently create a time from incomplete information
+        // done after everything else as it creates information from nothing
+        // which would break updateCheckConflict(field)
+
+        if (time == null) {
+            // can only get here if NANO_OF_SECOND not present
+            if (fieldValues.containsKey(MILLI_OF_SECOND)) {
+                long los = fieldValues.remove(MILLI_OF_SECOND);
+                if (fieldValues.containsKey(MICRO_OF_SECOND)) {
+                    // merge milli-of-second and micro-of-second for better error message
+                    long cos = los * 1_000 + (fieldValues.get(MICRO_OF_SECOND) % 1_000);
+                    updateCheckConflict(MILLI_OF_SECOND, MICRO_OF_SECOND, cos);
+                    fieldValues.remove(MICRO_OF_SECOND);
+                    fieldValues.put(NANO_OF_SECOND, cos * 1_000L);
+                } else {
+                    // convert milli-of-second to nano-of-second
+                    fieldValues.put(NANO_OF_SECOND, los * 1_000_000L);
+                }
+            } else if (fieldValues.containsKey(MICRO_OF_SECOND)) {
+                // convert micro-of-second to nano-of-second
+                long cos = fieldValues.remove(MICRO_OF_SECOND);
+                fieldValues.put(NANO_OF_SECOND, cos * 1_000L);
+            }
+        }
+
+        // merge hour/minute/second/nano leniently
+        Long hod = fieldValues.get(HOUR_OF_DAY);
+        if (hod != null) {
+            int hodVal = HOUR_OF_DAY.checkValidIntValue(hod);
+            Long moh = fieldValues.get(MINUTE_OF_HOUR);
+            Long som = fieldValues.get(SECOND_OF_MINUTE);
+            Long nos = fieldValues.get(NANO_OF_SECOND);
+
+            // check for invalid combinations that cannot be defaulted
+            if (time == null) {
+                if ((moh == null && (som != null || nos != null)) ||
+                        (moh != null && som == null && nos != null)) {
+                    return;
+                }
+            }
+
+            // default as necessary and build time
+            int mohVal = (moh != null ? MINUTE_OF_HOUR.checkValidIntValue(moh) : (time != null ? time.getMinute() : 0));
+            int somVal = (som != null ? SECOND_OF_MINUTE.checkValidIntValue(som) : (time != null ? time.getSecond() : 0));
+            int nosVal = (nos != null ? NANO_OF_SECOND.checkValidIntValue(nos) : (time != null ? time.getNano() : 0));
+            updateCheckConflict(LocalTime.of(hodVal, mohVal, somVal, nosVal));
+            fieldValues.remove(HOUR_OF_DAY);
+            fieldValues.remove(MINUTE_OF_HOUR);
+            fieldValues.remove(SECOND_OF_MINUTE);
+            fieldValues.remove(NANO_OF_SECOND);
+        }
+    }
+
+    private void updateCheckConflict(LocalTime lt) {
+        if (time != null) {
+            if (lt != null && time.equals(lt) == false) {
+                throw new DateTimeException("Conflict found: Fields resolved to two different times: " + time + " " + lt);
+            }
+        } else {
+            time = lt;
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    private void crossCheck() {
+        // only cross-check date, time and date-time
+        // avoid object creation if possible
+        if (date != null) {
+            crossCheck(date);
+        }
+        if (time != null) {
+            crossCheck(time);
+            if (date != null && fieldValues.size() > 0) {
+                crossCheck(date.atTime(time));
+            }
+        }
+    }
+
+    private void crossCheck(TemporalAccessor target) {
+        for (Iterator<Entry<TemporalField, Long>> it = fieldValues.entrySet().iterator(); it.hasNext(); ) {
+            Entry<TemporalField, Long> entry = it.next();
+            TemporalField field = entry.getKey();
+            long val1;
+            try {
+                val1 = target.getLong(field);
+            } catch (RuntimeException ex) {
+                continue;
+            }
+            long val2 = entry.getValue();
+            if (val1 != val2) {
+                throw new DateTimeException("Conflict found: Field " + field + " " + val1 +
+                        " differs from " + field + " " + val2 + " derived from " + target);
+            }
+            it.remove();
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    @Override
+    public String toString() {
+        String str = fieldValues.toString() + "," + chrono + "," + zone;
+        if (date != null || time != null) {
+            str += " resolved to " + date + "," + time;
+        }
+        return str;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/time/format/ResolverStyle.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2013, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package java.time.format;
+
+/**
+ * Enumeration of different ways to resolve dates and times.
+ * <p>
+ * Parsing a text string occurs in two phases.
+ * Phase 1 is a basic text parse according to the fields added to the builder.
+ * Phase 2 resolves the parsed field-value pairs into date and/or time objects.
+ * This style is used to control how phase 2, resolving, happens.
+ *
+ * <h3>Specification for implementors</h3>
+ * This is an immutable and thread-safe enum.
+ *
+ * @since 1.8
+ */
+public enum ResolverStyle {
+
+    /**
+     * Style to resolve dates and times strictly.
+     * <p>
+     * Using strict resolution will ensure that all parsed values are within
+     * the outer range of valid values for the field. Individual fields may
+     * be further processed for strictness.
+     * <p>
+     * For example, resolving year-month and day-of-month in the ISO calendar
+     * system using strict mode will ensure that the day-of-month is valid
+     * for the year-month, rejecting invalid values.
+     */
+    STRICT,
+    /**
+     * Style to resolve dates and times in a smart, or intelligent, manner.
+     * <p>
+     * Using smart resolution will perform the sensible default for each
+     * field, which may be the same as strict, the same as lenient, or a third
+     * behavior. Individual fields will interpret this differently.
+     * <p>
+     * For example, resolving year-month and day-of-month in the ISO calendar
+     * system using smart mode will ensure that the day-of-month is valid
+     * for the year-month, rejecting invalid values, with the exception that
+     * February 29th in a year other than a leap year will be converted to
+     * February 28th.
+     */
+    SMART,
+    /**
+     * Style to resolve dates and times leniently.
+     * <p>
+     * Using lenient resolution will resolve the values in an appropriate
+     * lenient manner. Individual fields will interpret this differently.
+     * <p>
+     * For example, lenient mode allows the month in the ISO calendar system
+     * to be outside the range 1 to 12.
+     */
+    LENIENT;
+
+}
--- a/src/share/classes/java/time/format/TextStyle.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/format/TextStyle.java	Wed Apr 17 21:48:04 2013 -0700
@@ -61,33 +61,115 @@
  */
 package java.time.format;
 
+import java.util.Calendar;
+
 /**
- * Enumeration of the style of text output to use.
+ * Enumeration of the style of text formatting and parsing.
+ * <p>
+ * Text styles define three sizes for the formatted text - 'full', 'short' and 'narrow'.
+ * Each of these three sizes is available in both 'standard' and 'stand-alone' variations.
  * <p>
- * This defines the "size" of the text to be output.
+ * The difference between the three sizes is obvious in most languages.
+ * For example, in English the 'full' month is 'January', the 'short' month is 'Jan'
+ * and the 'narrow' month is 'J'. Note that the narrow size is often not unique.
+ * For example, 'January', 'June' and 'July' all have the 'narrow' text 'J'.
+ * <p>
+ * The difference between the 'standard' and 'stand-alone' forms is trickier to describe
+ * as there is no difference in English. However, in other languages there is a difference
+ * in the word used when the text is used alone, as opposed to in a complete date.
+ * For example, the word used for a month when used alone in a date picker is different
+ * to the word used for month in association with a day and year in a date.
  *
  * <h3>Specification for implementors</h3>
  * This is immutable and thread-safe enum.
- *
- * @since 1.8
  */
 public enum TextStyle {
     // ordered from large to small
+    // ordered so that bit 0 of the ordinal indicates stand-alone.
 
     /**
      * Full text, typically the full description.
      * For example, day-of-week Monday might output "Monday".
      */
-    FULL,
+    FULL(Calendar.LONG_FORMAT, 0),
+    /**
+     * Full text for stand-alone use, typically the full description.
+     * For example, day-of-week Monday might output "Monday".
+     */
+    FULL_STANDALONE(Calendar.LONG_STANDALONE, 0),
     /**
      * Short text, typically an abbreviation.
      * For example, day-of-week Monday might output "Mon".
      */
-    SHORT,
+    SHORT(Calendar.SHORT_FORMAT, 1),
+    /**
+     * Short text for stand-alone use, typically an abbreviation.
+     * For example, day-of-week Monday might output "Mon".
+     */
+    SHORT_STANDALONE(Calendar.SHORT_STANDALONE, 1),
     /**
      * Narrow text, typically a single letter.
      * For example, day-of-week Monday might output "M".
      */
-    NARROW;
+    NARROW(Calendar.NARROW_FORMAT, 1),
+    /**
+     * Narrow text for stand-alone use, typically a single letter.
+     * For example, day-of-week Monday might output "M".
+     */
+    NARROW_STANDALONE(Calendar.NARROW_STANDALONE, 1);
+
+    private final int calendarStyle;
+    private final int zoneNameStyleIndex;
+
+    private TextStyle(int calendarStyle, int zoneNameStyleIndex) {
+        this.calendarStyle = calendarStyle;
+        this.zoneNameStyleIndex = zoneNameStyleIndex;
+    }
+
+    /**
+     * Returns true if the Style is a stand-alone style.
+     * @return true if the style is a stand-alone style.
+     */
+    public boolean isStandalone() {
+        return (ordinal() & 1) == 1;
+    }
+
+    /**
+     * Returns the stand-alone style with the same size.
+     * @return the stand-alone style with the same size
+     */
+    public TextStyle asStandalone() {
+        return TextStyle.values()[ordinal()  | 1];
+    }
 
+    /**
+     * Returns the normal style with the same size.
+     *
+     * @return the normal style with the same size
+     */
+    public TextStyle asNormal() {
+        return TextStyle.values()[ordinal() & ~1];
+    }
+
+    /**
+     * Returns the {@code Calendar} style corresponding to this {@code TextStyle}.
+     *
+     * @return the corresponding {@code Calendar} style
+     */
+    int toCalendarStyle() {
+        return calendarStyle;
+    }
+
+    /**
+     * Returns the relative index value to an element of the {@link
+     * java.text.DateFormatSymbols#getZoneStrings() DateFormatSymbols.getZoneStrings()}
+     * value, 0 for long names and 1 for short names (abbreviations). Note that these values
+     * do <em>not</em> correspond to the {@link java.util.TimeZone#LONG} and {@link
+     * java.util.TimeZone#SHORT} values.
+     *
+     * @return the relative index value to time zone names array
+     */
+    int zoneNameStyleIndex() {
+        return zoneNameStyleIndex;
+    }
 }
--- a/src/share/classes/java/time/temporal/Adjusters.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,502 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package java.time.temporal;
-
-import static java.time.temporal.ChronoField.DAY_OF_MONTH;
-import static java.time.temporal.ChronoField.DAY_OF_WEEK;
-import static java.time.temporal.ChronoField.DAY_OF_YEAR;
-import static java.time.temporal.ChronoUnit.DAYS;
-import static java.time.temporal.ChronoUnit.MONTHS;
-import static java.time.temporal.ChronoUnit.YEARS;
-
-import java.time.DayOfWeek;
-import java.util.Objects;
-
-/**
- * Common implementations of {@code TemporalAdjuster}.
- * <p>
- * This class provides common implementations of {@link TemporalAdjuster}.
- * They are especially useful to document the intent of business logic and
- * often link well to requirements.
- * For example, these two pieces of code do the same thing, but the second
- * one is clearer (assuming that there is a static import of this class):
- * <pre>
- *  // direct manipulation
- *  date.withDayOfMonth(1).plusMonths(1).minusDays(1);
- *  // use of an adjuster from this class
- *  date.with(lastDayOfMonth());
- * </pre>
- * There are two equivalent ways of using a {@code TemporalAdjuster}.
- * The first is to invoke the method on the interface directly.
- * The second is to use {@link Temporal#with(TemporalAdjuster)}:
- * <pre>
- *   // these two lines are equivalent, but the second approach is recommended
- *   dateTime = adjuster.adjustInto(dateTime);
- *   dateTime = dateTime.with(adjuster);
- * </pre>
- * It is recommended to use the second approach, {@code with(TemporalAdjuster)},
- * as it is a lot clearer to read in code.
- *
- * <h3>Specification for implementors</h3>
- * This is a thread-safe utility class.
- * All returned adjusters are immutable and thread-safe.
- *
- * @since 1.8
- */
-public final class Adjusters {
-
-    /**
-     * Private constructor since this is a utility class.
-     */
-    private Adjusters() {
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Returns the "first day of month" adjuster, which returns a new date set to
-     * the first day of the current month.
-     * <p>
-     * The ISO calendar system behaves as follows:<br>
-     * The input 2011-01-15 will return 2011-01-01.<br>
-     * The input 2011-02-15 will return 2011-02-01.
-     * <p>
-     * The behavior is suitable for use with most calendar systems.
-     * It is equivalent to:
-     * <pre>
-     *  temporal.with(DAY_OF_MONTH, 1);
-     * </pre>
-     *
-     * @return the first day-of-month adjuster, not null
-     */
-    public static TemporalAdjuster firstDayOfMonth() {
-        return Impl.FIRST_DAY_OF_MONTH;
-    }
-
-    /**
-     * Returns the "last day of month" adjuster, which returns a new date set to
-     * the last day of the current month.
-     * <p>
-     * The ISO calendar system behaves as follows:<br>
-     * The input 2011-01-15 will return 2011-01-31.<br>
-     * The input 2011-02-15 will return 2011-02-28.<br>
-     * The input 2012-02-15 will return 2012-02-29 (leap year).<br>
-     * The input 2011-04-15 will return 2011-04-30.
-     * <p>
-     * The behavior is suitable for use with most calendar systems.
-     * It is equivalent to:
-     * <pre>
-     *  long lastDay = temporal.range(DAY_OF_MONTH).getMaximum();
-     *  temporal.with(DAY_OF_MONTH, lastDay);
-     * </pre>
-     *
-     * @return the last day-of-month adjuster, not null
-     */
-    public static TemporalAdjuster lastDayOfMonth() {
-        return Impl.LAST_DAY_OF_MONTH;
-    }
-
-    /**
-     * Returns the "first day of next month" adjuster, which returns a new date set to
-     * the first day of the next month.
-     * <p>
-     * The ISO calendar system behaves as follows:<br>
-     * The input 2011-01-15 will return 2011-02-01.<br>
-     * The input 2011-02-15 will return 2011-03-01.
-     * <p>
-     * The behavior is suitable for use with most calendar systems.
-     * It is equivalent to:
-     * <pre>
-     *  temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS);
-     * </pre>
-     *
-     * @return the first day of next month adjuster, not null
-     */
-    public static TemporalAdjuster firstDayOfNextMonth() {
-        return Impl.FIRST_DAY_OF_NEXT_MONTH;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Returns the "first day of year" adjuster, which returns a new date set to
-     * the first day of the current year.
-     * <p>
-     * The ISO calendar system behaves as follows:<br>
-     * The input 2011-01-15 will return 2011-01-01.<br>
-     * The input 2011-02-15 will return 2011-01-01.<br>
-     * <p>
-     * The behavior is suitable for use with most calendar systems.
-     * It is equivalent to:
-     * <pre>
-     *  temporal.with(DAY_OF_YEAR, 1);
-     * </pre>
-     *
-     * @return the first day-of-year adjuster, not null
-     */
-    public static TemporalAdjuster firstDayOfYear() {
-        return Impl.FIRST_DAY_OF_YEAR;
-    }
-
-    /**
-     * Returns the "last day of year" adjuster, which returns a new date set to
-     * the last day of the current year.
-     * <p>
-     * The ISO calendar system behaves as follows:<br>
-     * The input 2011-01-15 will return 2011-12-31.<br>
-     * The input 2011-02-15 will return 2011-12-31.<br>
-     * <p>
-     * The behavior is suitable for use with most calendar systems.
-     * It is equivalent to:
-     * <pre>
-     *  long lastDay = temporal.range(DAY_OF_YEAR).getMaximum();
-     *  temporal.with(DAY_OF_YEAR, lastDay);
-     * </pre>
-     *
-     * @return the last day-of-year adjuster, not null
-     */
-    public static TemporalAdjuster lastDayOfYear() {
-        return Impl.LAST_DAY_OF_YEAR;
-    }
-
-    /**
-     * Returns the "first day of next year" adjuster, which returns a new date set to
-     * the first day of the next year.
-     * <p>
-     * The ISO calendar system behaves as follows:<br>
-     * The input 2011-01-15 will return 2012-01-01.
-     * <p>
-     * The behavior is suitable for use with most calendar systems.
-     * It is equivalent to:
-     * <pre>
-     *  temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS);
-     * </pre>
-     *
-     * @return the first day of next month adjuster, not null
-     */
-    public static TemporalAdjuster firstDayOfNextYear() {
-        return Impl.FIRST_DAY_OF_NEXT_YEAR;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Enum implementing the adjusters.
-     */
-    private static class Impl implements TemporalAdjuster {
-        /** First day of month adjuster. */
-        private static final Impl FIRST_DAY_OF_MONTH = new Impl(0);
-        /** Last day of month adjuster. */
-        private static final Impl LAST_DAY_OF_MONTH = new Impl(1);
-        /** First day of next month adjuster. */
-        private static final Impl FIRST_DAY_OF_NEXT_MONTH = new Impl(2);
-        /** First day of year adjuster. */
-        private static final Impl FIRST_DAY_OF_YEAR = new Impl(3);
-        /** Last day of year adjuster. */
-        private static final Impl LAST_DAY_OF_YEAR = new Impl(4);
-        /** First day of next month adjuster. */
-        private static final Impl FIRST_DAY_OF_NEXT_YEAR = new Impl(5);
-        /** The ordinal. */
-        private final int ordinal;
-        private Impl(int ordinal) {
-            this.ordinal = ordinal;
-        }
-        @Override
-        public Temporal adjustInto(Temporal temporal) {
-            switch (ordinal) {
-                case 0: return temporal.with(DAY_OF_MONTH, 1);
-                case 1: return temporal.with(DAY_OF_MONTH, temporal.range(DAY_OF_MONTH).getMaximum());
-                case 2: return temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS);
-                case 3: return temporal.with(DAY_OF_YEAR, 1);
-                case 4: return temporal.with(DAY_OF_YEAR, temporal.range(DAY_OF_YEAR).getMaximum());
-                case 5: return temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS);
-            }
-            throw new IllegalStateException("Unreachable");
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Returns the first in month adjuster, which returns a new date
-     * in the same month with the first matching day-of-week.
-     * This is used for expressions like 'first Tuesday in March'.
-     * <p>
-     * The ISO calendar system behaves as follows:<br>
-     * The input 2011-12-15 for (MONDAY) will return 2011-12-05.<br>
-     * The input 2011-12-15 for (FRIDAY) will return 2011-12-02.<br>
-     * <p>
-     * The behavior is suitable for use with most calendar systems.
-     * It uses the {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields
-     * and the {@code DAYS} unit, and assumes a seven day week.
-     *
-     * @param dayOfWeek  the day-of-week, not null
-     * @return the first in month adjuster, not null
-     */
-    public static TemporalAdjuster firstInMonth(DayOfWeek dayOfWeek) {
-        Objects.requireNonNull(dayOfWeek, "dayOfWeek");
-        return new DayOfWeekInMonth(1, dayOfWeek);
-    }
-
-    /**
-     * Returns the last in month adjuster, which returns a new date
-     * in the same month with the last matching day-of-week.
-     * This is used for expressions like 'last Tuesday in March'.
-     * <p>
-     * The ISO calendar system behaves as follows:<br>
-     * The input 2011-12-15 for (MONDAY) will return 2011-12-26.<br>
-     * The input 2011-12-15 for (FRIDAY) will return 2011-12-30.<br>
-     * <p>
-     * The behavior is suitable for use with most calendar systems.
-     * It uses the {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields
-     * and the {@code DAYS} unit, and assumes a seven day week.
-     *
-     * @param dayOfWeek  the day-of-week, not null
-     * @return the first in month adjuster, not null
-     */
-    public static TemporalAdjuster lastInMonth(DayOfWeek dayOfWeek) {
-        Objects.requireNonNull(dayOfWeek, "dayOfWeek");
-        return new DayOfWeekInMonth(-1, dayOfWeek);
-    }
-
-    /**
-     * Returns the day-of-week in month adjuster, which returns a new date
-     * in the same month with the ordinal day-of-week.
-     * This is used for expressions like the 'second Tuesday in March'.
-     * <p>
-     * The ISO calendar system behaves as follows:<br>
-     * The input 2011-12-15 for (1,TUESDAY) will return 2011-12-06.<br>
-     * The input 2011-12-15 for (2,TUESDAY) will return 2011-12-13.<br>
-     * The input 2011-12-15 for (3,TUESDAY) will return 2011-12-20.<br>
-     * The input 2011-12-15 for (4,TUESDAY) will return 2011-12-27.<br>
-     * The input 2011-12-15 for (5,TUESDAY) will return 2012-01-03.<br>
-     * The input 2011-12-15 for (-1,TUESDAY) will return 2011-12-27 (last in month).<br>
-     * The input 2011-12-15 for (-4,TUESDAY) will return 2011-12-06 (3 weeks before last in month).<br>
-     * The input 2011-12-15 for (-5,TUESDAY) will return 2011-11-29 (4 weeks before last in month).<br>
-     * The input 2011-12-15 for (0,TUESDAY) will return 2011-11-29 (last in previous month).<br>
-     * <p>
-     * For a positive or zero ordinal, the algorithm is equivalent to finding the first
-     * day-of-week that matches within the month and then adding a number of weeks to it.
-     * For a negative ordinal, the algorithm is equivalent to finding the last
-     * day-of-week that matches within the month and then subtracting a number of weeks to it.
-     * The ordinal number of weeks is not validated and is interpreted leniently
-     * according to this algorithm. This definition means that an ordinal of zero finds
-     * the last matching day-of-week in the previous month.
-     * <p>
-     * The behavior is suitable for use with most calendar systems.
-     * It uses the {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields
-     * and the {@code DAYS} unit, and assumes a seven day week.
-     *
-     * @param ordinal  the week within the month, unbound but typically from -5 to 5
-     * @param dayOfWeek  the day-of-week, not null
-     * @return the day-of-week in month adjuster, not null
-     * @throws IllegalArgumentException if the ordinal is invalid
-     */
-    public static TemporalAdjuster dayOfWeekInMonth(int ordinal, DayOfWeek dayOfWeek) {
-        Objects.requireNonNull(dayOfWeek, "dayOfWeek");
-        return new DayOfWeekInMonth(ordinal, dayOfWeek);
-    }
-
-    /**
-     * Class implementing day-of-week in month adjuster.
-     */
-    private static final class DayOfWeekInMonth implements TemporalAdjuster {
-        /** The ordinal. */
-        private final int ordinal;
-        /** The day-of-week value, from 1 to 7. */
-        private final int dowValue;
-
-        private DayOfWeekInMonth(int ordinal, DayOfWeek dow) {
-            super();
-            this.ordinal = ordinal;
-            this.dowValue = dow.getValue();
-        }
-        @Override
-        public Temporal adjustInto(Temporal temporal) {
-            if (ordinal >= 0) {
-                Temporal temp = temporal.with(DAY_OF_MONTH, 1);
-                int curDow = temp.get(DAY_OF_WEEK);
-                int dowDiff = (dowValue - curDow + 7) % 7;
-                dowDiff += (ordinal - 1L) * 7L;  // safe from overflow
-                return temp.plus(dowDiff, DAYS);
-            } else {
-                Temporal temp = temporal.with(DAY_OF_MONTH, temporal.range(DAY_OF_MONTH).getMaximum());
-                int curDow = temp.get(DAY_OF_WEEK);
-                int daysDiff = dowValue - curDow;
-                daysDiff = (daysDiff == 0 ? 0 : (daysDiff > 0 ? daysDiff - 7 : daysDiff));
-                daysDiff -= (-ordinal - 1L) * 7L;  // safe from overflow
-                return temp.plus(daysDiff, DAYS);
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Returns the next day-of-week adjuster, which adjusts the date to the
-     * first occurrence of the specified day-of-week after the date being adjusted.
-     * <p>
-     * The ISO calendar system behaves as follows:<br>
-     * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-17 (two days later).<br>
-     * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-19 (four days later).<br>
-     * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-22 (seven days later).
-     * <p>
-     * The behavior is suitable for use with most calendar systems.
-     * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit,
-     * and assumes a seven day week.
-     *
-     * @param dayOfWeek  the day-of-week to move the date to, not null
-     * @return the next day-of-week adjuster, not null
-     */
-    public static TemporalAdjuster next(DayOfWeek dayOfWeek) {
-        return new RelativeDayOfWeek(2, dayOfWeek);
-    }
-
-    /**
-     * Returns the next-or-same day-of-week adjuster, which adjusts the date to the
-     * first occurrence of the specified day-of-week after the date being adjusted
-     * unless it is already on that day in which case the same object is returned.
-     * <p>
-     * The ISO calendar system behaves as follows:<br>
-     * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-17 (two days later).<br>
-     * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-19 (four days later).<br>
-     * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-15 (same as input).
-     * <p>
-     * The behavior is suitable for use with most calendar systems.
-     * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit,
-     * and assumes a seven day week.
-     *
-     * @param dayOfWeek  the day-of-week to check for or move the date to, not null
-     * @return the next-or-same day-of-week adjuster, not null
-     */
-    public static TemporalAdjuster nextOrSame(DayOfWeek dayOfWeek) {
-        return new RelativeDayOfWeek(0, dayOfWeek);
-    }
-
-    /**
-     * Returns the previous day-of-week adjuster, which adjusts the date to the
-     * first occurrence of the specified day-of-week before the date being adjusted.
-     * <p>
-     * The ISO calendar system behaves as follows:<br>
-     * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-10 (five days earlier).<br>
-     * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-12 (three days earlier).<br>
-     * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-08 (seven days earlier).
-     * <p>
-     * The behavior is suitable for use with most calendar systems.
-     * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit,
-     * and assumes a seven day week.
-     *
-     * @param dayOfWeek  the day-of-week to move the date to, not null
-     * @return the previous day-of-week adjuster, not null
-     */
-    public static TemporalAdjuster previous(DayOfWeek dayOfWeek) {
-        return new RelativeDayOfWeek(3, dayOfWeek);
-    }
-
-    /**
-     * Returns the previous-or-same day-of-week adjuster, which adjusts the date to the
-     * first occurrence of the specified day-of-week before the date being adjusted
-     * unless it is already on that day in which case the same object is returned.
-     * <p>
-     * The ISO calendar system behaves as follows:<br>
-     * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-10 (five days earlier).<br>
-     * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-12 (three days earlier).<br>
-     * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-15 (same as input).
-     * <p>
-     * The behavior is suitable for use with most calendar systems.
-     * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit,
-     * and assumes a seven day week.
-     *
-     * @param dayOfWeek  the day-of-week to check for or move the date to, not null
-     * @return the previous-or-same day-of-week adjuster, not null
-     */
-    public static TemporalAdjuster previousOrSame(DayOfWeek dayOfWeek) {
-        return new RelativeDayOfWeek(1, dayOfWeek);
-    }
-
-    /**
-     * Implementation of next, previous or current day-of-week.
-     */
-    private static final class RelativeDayOfWeek implements TemporalAdjuster {
-        /** Whether the current date is a valid answer. */
-        private final int relative;
-        /** The day-of-week value, from 1 to 7. */
-        private final int dowValue;
-
-        private RelativeDayOfWeek(int relative, DayOfWeek dayOfWeek) {
-            Objects.requireNonNull(dayOfWeek, "dayOfWeek");
-            this.relative = relative;
-            this.dowValue = dayOfWeek.getValue();
-        }
-
-        @Override
-        public Temporal adjustInto(Temporal temporal) {
-            int calDow = temporal.get(DAY_OF_WEEK);
-            if (relative < 2 && calDow == dowValue) {
-                return temporal;
-            }
-            if ((relative & 1) == 0) {
-                int daysDiff = calDow - dowValue;
-                return temporal.plus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, DAYS);
-            } else {
-                int daysDiff = dowValue - calDow;
-                return temporal.minus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, DAYS);
-            }
-        }
-    }
-
-}
--- a/src/share/classes/java/time/temporal/ChronoField.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/temporal/ChronoField.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,6 +76,11 @@
 import java.time.ZoneOffset;
 import java.time.chrono.ChronoLocalDate;
 import java.time.chrono.Chronology;
+import java.util.Locale;
+import java.util.Objects;
+import java.util.ResourceBundle;
+import sun.util.locale.provider.LocaleProviderAdapter;
+import sun.util.locale.provider.LocaleResources;
 
 /**
  * A standard set of fields.
@@ -187,7 +192,7 @@
      * This counts the second within the minute, from 0 to 59.
      * This field has the same meaning for all calendar systems.
      */
-    SECOND_OF_MINUTE("SecondOfMinute", SECONDS, MINUTES, ValueRange.of(0, 59)),
+    SECOND_OF_MINUTE("SecondOfMinute", SECONDS, MINUTES, ValueRange.of(0, 59), "second"),
     /**
      * The second-of-day.
      * <p>
@@ -201,7 +206,7 @@
      * This counts the minute within the hour, from 0 to 59.
      * This field has the same meaning for all calendar systems.
      */
-    MINUTE_OF_HOUR("MinuteOfHour", MINUTES, HOURS, ValueRange.of(0, 59)),
+    MINUTE_OF_HOUR("MinuteOfHour", MINUTES, HOURS, ValueRange.of(0, 59), "minute"),
     /**
      * The minute-of-day.
      * <p>
@@ -232,7 +237,7 @@
      * This is the hour that would be observed on a standard 24-hour digital clock.
      * This field has the same meaning for all calendar systems.
      */
-    HOUR_OF_DAY("HourOfDay", HOURS, DAYS, ValueRange.of(0, 23)),
+    HOUR_OF_DAY("HourOfDay", HOURS, DAYS, ValueRange.of(0, 23), "hour"),
     /**
      * The clock-hour-of-day.
      * <p>
@@ -247,7 +252,7 @@
      * This counts the AM/PM within the day, from 0 (AM) to 1 (PM).
      * This field has the same meaning for all calendar systems.
      */
-    AMPM_OF_DAY("AmPmOfDay", HALF_DAYS, DAYS, ValueRange.of(0, 1)),
+    AMPM_OF_DAY("AmPmOfDay", HALF_DAYS, DAYS, ValueRange.of(0, 1), "dayperiod"),
     /**
      * The day-of-week, such as Tuesday.
      * <p>
@@ -263,7 +268,7 @@
      * if they have a similar concept of named or numbered days within a period similar
      * to a week. It is recommended that the numbering starts from 1.
      */
-    DAY_OF_WEEK("DayOfWeek", DAYS, WEEKS, ValueRange.of(1, 7)),
+    DAY_OF_WEEK("DayOfWeek", DAYS, WEEKS, ValueRange.of(1, 7), "weekday"),
     /**
      * The aligned day-of-week within a month.
      * <p>
@@ -312,7 +317,7 @@
      * day-of-month values for users of the calendar system.
      * Normally, this is a count of days from 1 to the length of the month.
      */
-    DAY_OF_MONTH("DayOfMonth", DAYS, MONTHS, ValueRange.of(1, 28, 31)),
+    DAY_OF_MONTH("DayOfMonth", DAYS, MONTHS, ValueRange.of(1, 28, 31), "day"),
     /**
      * The day-of-year.
      * <p>
@@ -377,17 +382,27 @@
      * month-of-year values for users of the calendar system.
      * Normally, this is a count of months starting from 1.
      */
-    MONTH_OF_YEAR("MonthOfYear", MONTHS, YEARS, ValueRange.of(1, 12)),
+    MONTH_OF_YEAR("MonthOfYear", MONTHS, YEARS, ValueRange.of(1, 12), "month"),
     /**
-     * The epoch-month based on the Java epoch of 1970-01-01.
+     * The proleptic-month based, counting months sequentially from year 0.
      * <p>
-     * This field is the sequential count of months where January 1970 (ISO) is zero.
+     * This field is the sequential count of months where the first month
+     * in proleptic-year zero has the value zero.
+     * Later months have increasingly larger values.
+     * Earlier months have increasingly small values.
+     * There are no gaps or breaks in the sequence of months.
      * Note that this uses the <i>local</i> time-line, ignoring offset and time-zone.
      * <p>
-     * Non-ISO calendar systems should also implement this field to represent a sequential
-     * count of months. It is recommended to define zero as the month of 1970-01-01 (ISO).
+     * In the default ISO calendar system, June 2012 would have the value
+     * {@code (2012 * 12 + 6 - 1)}. This field is primarily for internal use.
+     * <p>
+     * Non-ISO calendar systems must implement this field as per the definition above.
+     * It is just a simple zero-based count of elapsed months from the start of proleptic-year 0.
+     * All calendar systems with a full proleptic-year definition will have a year zero.
+     * If the calendar system has a minimum year that excludes year zero, then one must
+     * be extrapolated in order for this method to be defined.
      */
-    EPOCH_MONTH("EpochMonth", MONTHS, FOREVER, ValueRange.of((Year.MIN_VALUE - 1970L) * 12, (Year.MAX_VALUE - 1970L) * 12L - 1L)),
+    PROLEPTIC_MONTH("ProlepticMonth", MONTHS, FOREVER, ValueRange.of(Year.MIN_VALUE * 12L, Year.MAX_VALUE * 12L + 11)),
     /**
      * The year within the era.
      * <p>
@@ -446,7 +461,7 @@
      * defined with any appropriate value, although defining it to be the same as ISO may be
      * the best option.
      */
-    YEAR("Year", YEARS, FOREVER, ValueRange.of(Year.MIN_VALUE, Year.MAX_VALUE)),
+    YEAR("Year", YEARS, FOREVER, ValueRange.of(Year.MIN_VALUE, Year.MAX_VALUE), "year"),
     /**
      * The era.
      * <p>
@@ -463,7 +478,7 @@
      * Earlier eras must have sequentially smaller values.
      * Later eras must have sequentially larger values,
      */
-    ERA("Era", ERAS, FOREVER, ValueRange.of(0, 1)),
+    ERA("Era", ERAS, FOREVER, ValueRange.of(0, 1), "era"),
     /**
      * The instant epoch-seconds.
      * <p>
@@ -499,12 +514,23 @@
     private final TemporalUnit baseUnit;
     private final TemporalUnit rangeUnit;
     private final ValueRange range;
+    private final String displayNameKey;
 
     private ChronoField(String name, TemporalUnit baseUnit, TemporalUnit rangeUnit, ValueRange range) {
         this.name = name;
         this.baseUnit = baseUnit;
         this.rangeUnit = rangeUnit;
         this.range = range;
+        this.displayNameKey = null;
+    }
+
+    private ChronoField(String name, TemporalUnit baseUnit, TemporalUnit rangeUnit,
+            ValueRange range, String displayNameKey) {
+        this.name = name;
+        this.baseUnit = baseUnit;
+        this.rangeUnit = rangeUnit;
+        this.range = range;
+        this.displayNameKey = displayNameKey;
     }
 
     //-----------------------------------------------------------------------
@@ -514,6 +540,20 @@
     }
 
     @Override
+    public String getDisplayName(Locale locale) {
+        Objects.requireNonNull(locale, "locale");
+        if (displayNameKey == null) {
+            return getName();
+        }
+
+        LocaleResources lr = LocaleProviderAdapter.getResourceBundleBased()
+                                    .getLocaleResources(locale);
+        ResourceBundle rb = lr.getJavaTimeFormatData();
+        String key = "field." + displayNameKey;
+        return rb.containsKey(key) ? rb.getString(key) : getName();
+    }
+
+    @Override
     public TemporalUnit getBaseUnit() {
         return baseUnit;
     }
@@ -548,19 +588,25 @@
     //-----------------------------------------------------------------------
     /**
      * Checks if this field represents a component of a date.
+     * <p>
+     * Fields from day-of-week to era are date-based.
      *
      * @return true if it is a component of a date
      */
-    public boolean isDateField() {
+    @Override
+    public boolean isDateBased() {
         return ordinal() >= DAY_OF_WEEK.ordinal() && ordinal() <= ERA.ordinal();
     }
 
     /**
      * Checks if this field represents a component of a time.
+     * <p>
+     * Fields from nano-of-second to am-pm-of-day are time-based.
      *
      * @return true if it is a component of a time
      */
-    public boolean isTimeField() {
+    @Override
+    public boolean isTimeBased() {
         return ordinal() < DAY_OF_WEEK.ordinal();
     }
 
--- a/src/share/classes/java/time/temporal/ChronoUnit.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/temporal/ChronoUnit.java	Wed Apr 17 21:48:04 2013 -0700
@@ -178,7 +178,7 @@
      * Unit that represents the concept of an era.
      * The ISO calendar system doesn't have eras thus it is impossible to add
      * an era to a date or date-time.
-     * The estimated duration of the era is artificially defined as {@code 1,000,00,000 Years}.
+     * The estimated duration of the era is artificially defined as {@code 1,000,000,000 Years}.
      * <p>
      * When used with other calendar systems there are no restrictions on the unit.
      */
--- a/src/share/classes/java/time/temporal/IsoFields.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/temporal/IsoFields.java	Wed Apr 17 21:48:04 2013 -0700
@@ -69,13 +69,19 @@
 import static java.time.temporal.ChronoUnit.WEEKS;
 import static java.time.temporal.ChronoUnit.YEARS;
 
-import java.time.DateTimeException;
 import java.time.Duration;
 import java.time.LocalDate;
 import java.time.chrono.Chronology;
 import java.time.chrono.IsoChronology;
+import java.time.format.ResolverStyle;
 import java.util.HashMap;
+import java.util.Locale;
 import java.util.Map;
+import java.util.Objects;
+import java.util.ResourceBundle;
+
+import sun.util.locale.provider.LocaleProviderAdapter;
+import sun.util.locale.provider.LocaleResources;
 
 /**
  * Fields and units specific to the ISO-8601 calendar system,
@@ -162,6 +168,27 @@
      * value from 1 to 92. If the quarter has less than 92 days, then day 92, and
      * potentially day 91, is in the following quarter.
      * <p>
+     * In the resolving phase of parsing, a date can be created from a year,
+     * quarter-of-year and day-of-quarter.
+     * <p>
+     * In {@linkplain ResolverStyle#STRICT strict mode}, all three fields are
+     * validated against their range of valid values. The day-of-quarter field
+     * is validated from 1 to 90, 91 or 92 depending on the year and quarter.
+     * <p>
+     * In {@linkplain ResolverStyle#SMART smart mode}, all three fields are
+     * validated against their range of valid values. The day-of-quarter field is
+     * validated between 1 and 92, ignoring the actual range based on the year and quarter.
+     * If the day-of-quarter exceeds the actual range by one day, then the resulting date
+     * is one day later. If the day-of-quarter exceeds the actual range by two days,
+     * then the resulting date is two days later.
+     * <p>
+     * In {@linkplain ResolverStyle#LENIENT lenient mode}, only the year is validated
+     * against the range of valid values. The resulting date is calculated equivalent to
+     * the following three stage approach. First, create a date on the first of January
+     * in the requested year. Then take the quarter-of-year, subtract one, and add the
+     * amount in quarters to the date. Finally, take the day-of-quarter, subtract one,
+     * and add the amount in days to the date.
+     * <p>
      * This unit is an immutable and thread-safe singleton.
      */
     public static final TemporalField DAY_OF_QUARTER = Field.DAY_OF_QUARTER;
@@ -171,7 +198,11 @@
      * This field allows the quarter-of-year value to be queried and set.
      * The quarter-of-year has values from 1 to 4.
      * <p>
-     * The day-of-quarter can only be calculated if the month-of-year is available.
+     * The quarter-of-year can only be calculated if the month-of-year is available.
+     * <p>
+     * In the resolving phase of parsing, a date can be created from a year,
+     * quarter-of-year and day-of-quarter.
+     * See {@link #DAY_OF_QUARTER} for details.
      * <p>
      * This unit is an immutable and thread-safe singleton.
      */
@@ -180,6 +211,28 @@
      * The field that represents the week-of-week-based-year.
      * <p>
      * This field allows the week of the week-based-year value to be queried and set.
+     * The week-of-week-based-year has values from 1 to 52, or 53 if the
+     * week-based-year has 53 weeks.
+     * <p>
+     * In the resolving phase of parsing, a date can be created from a
+     * week-based-year, week-of-week-based-year and day-of-week.
+     * <p>
+     * In {@linkplain ResolverStyle#STRICT strict mode}, all three fields are
+     * validated against their range of valid values. The week-of-week-based-year
+     * field is validated from 1 to 52 or 53 depending on the week-based-year.
+     * <p>
+     * In {@linkplain ResolverStyle#SMART smart mode}, all three fields are
+     * validated against their range of valid values. The week-of-week-based-year
+     * field is validated between 1 and 53, ignoring the week-based-year.
+     * If the week-of-week-based-year is 53, but the week-based-year only has
+     * 52 weeks, then the resulting date is in week 1 of the following week-based-year.
+     * <p>
+     * In {@linkplain ResolverStyle#LENIENT lenient mode}, only the week-based-year
+     * is validated against the range of valid values. If the day-of-week is outside
+     * the range 1 to 7, then the resulting date is adjusted by a suitable number of
+     * weeks to reduce the day-of-week to the range 1 to 7. If the week-of-week-based-year
+     * value is outside the range 1 to 52, then any excess weeks are added or subtracted
+     * from the resulting date.
      * <p>
      * This unit is an immutable and thread-safe singleton.
      */
@@ -189,6 +242,12 @@
      * <p>
      * This field allows the week-based-year value to be queried and set.
      * <p>
+     * The field has a range that matches {@link LocalDate#MAX} and {@link LocalDate#MIN}.
+     * <p>
+     * In the resolving phase of parsing, a date can be created from a
+     * week-based-year, week-of-week-based-year and day-of-week.
+     * See {@link #WEEK_OF_WEEK_BASED_YEAR} for details.
+     * <p>
      * This unit is an immutable and thread-safe singleton.
      */
     public static final TemporalField WEEK_BASED_YEAR = Field.WEEK_BASED_YEAR;
@@ -253,7 +312,7 @@
             @Override
             public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
                 if (isSupportedBy(temporal) == false) {
-                    throw new DateTimeException("Unsupported field: DayOfQuarter");
+                    throw new UnsupportedTemporalTypeException("Unsupported field: DayOfQuarter");
                 }
                 long qoy = temporal.getLong(QUARTER_OF_YEAR);
                 if (qoy == 1) {
@@ -269,7 +328,7 @@
             @Override
             public long getFrom(TemporalAccessor temporal) {
                 if (isSupportedBy(temporal) == false) {
-                    throw new DateTimeException("Unsupported field: DayOfQuarter");
+                    throw new UnsupportedTemporalTypeException("Unsupported field: DayOfQuarter");
                 }
                 int doy = temporal.get(DAY_OF_YEAR);
                 int moy = temporal.get(MONTH_OF_YEAR);
@@ -285,16 +344,29 @@
                 return (R) temporal.with(DAY_OF_YEAR, temporal.getLong(DAY_OF_YEAR) + (newValue - curValue));
             }
             @Override
-            public Map<TemporalField, Long> resolve(TemporalAccessor temporal, long value) {
-                if ((temporal.isSupported(YEAR) && temporal.isSupported(DAY_OF_QUARTER)) == false) {
+            public Map<TemporalField, Long> resolve(TemporalAccessor temporal, long doq, ResolverStyle resolverStyle) {
+                if ((temporal.isSupported(YEAR) && temporal.isSupported(QUARTER_OF_YEAR)) == false) {
                     return null;
                 }
-                int y = temporal.get(YEAR);
-                int qoy = temporal.get(QUARTER_OF_YEAR);
-                range().checkValidValue(value, this);  // leniently check from 1 to 92 TODO: check
-                LocalDate date = LocalDate.of(y, ((qoy - 1) * 3) + 1, 1).plusDays(value - 1);
+                int y = temporal.get(YEAR);  // validated
+                LocalDate date;
+                if (resolverStyle == ResolverStyle.LENIENT) {
+                    long qoy = temporal.getLong(QUARTER_OF_YEAR);  // unvalidated
+                    date = LocalDate.of(y, 1, 1).plusMonths(Math.multiplyExact(Math.subtractExact(qoy, 1), 3));
+                } else {
+                    int qoy = temporal.get(QUARTER_OF_YEAR);  // validated
+                    date = LocalDate.of(y, ((qoy - 1) * 3) + 1, 1);
+                    if (doq < 1 || doq > 90) {
+                        if (resolverStyle == ResolverStyle.STRICT) {
+                            rangeRefinedBy(date).checkValidValue(doq, this);  // only allow exact range
+                        } else {  // SMART
+                            range().checkValidValue(doq, this);  // allow 1-92 rolling into next quarter
+                        }
+                    }
+                }
+                long epochDay = Math.addExact(date.toEpochDay(), Math.subtractExact(doq, 1));
                 Map<TemporalField, Long> result = new HashMap<>(4, 1.0f);
-                result.put(EPOCH_DAY, date.toEpochDay());
+                result.put(EPOCH_DAY, epochDay);
                 result.put(YEAR, null);
                 result.put(QUARTER_OF_YEAR, null);
                 return result;
@@ -324,7 +396,7 @@
             @Override
             public long getFrom(TemporalAccessor temporal) {
                 if (isSupportedBy(temporal) == false) {
-                    throw new DateTimeException("Unsupported field: QuarterOfYear");
+                    throw new UnsupportedTemporalTypeException("Unsupported field: QuarterOfYear");
                 }
                 long moy = temporal.getLong(MONTH_OF_YEAR);
                 return ((moy + 2) / 3);
@@ -343,6 +415,16 @@
             public String getName() {
                 return "WeekOfWeekBasedYear";
             }
+
+            @Override
+            public String getDisplayName(Locale locale) {
+                Objects.requireNonNull(locale, "locale");
+                LocaleResources lr = LocaleProviderAdapter.getResourceBundleBased()
+                                            .getLocaleResources(locale);
+                ResourceBundle rb = lr.getJavaTimeFormatData();
+                return rb.containsKey("field.week") ? rb.getString("field.week") : getName();
+            }
+
             @Override
             public TemporalUnit getBaseUnit() {
                 return WEEKS;
@@ -362,14 +444,14 @@
             @Override
             public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
                 if (isSupportedBy(temporal) == false) {
-                    throw new DateTimeException("Unsupported field: WeekOfWeekBasedYear");
+                    throw new UnsupportedTemporalTypeException("Unsupported field: WeekOfWeekBasedYear");
                 }
                 return getWeekRange(LocalDate.from(temporal));
             }
             @Override
             public long getFrom(TemporalAccessor temporal) {
                 if (isSupportedBy(temporal) == false) {
-                    throw new DateTimeException("Unsupported field: WeekOfWeekBasedYear");
+                    throw new UnsupportedTemporalTypeException("Unsupported field: WeekOfWeekBasedYear");
                 }
                 return getWeek(LocalDate.from(temporal));
             }
@@ -381,14 +463,33 @@
                 return (R) temporal.plus(Math.subtractExact(newValue, getFrom(temporal)), WEEKS);
             }
             @Override
-            public Map<TemporalField, Long> resolve(TemporalAccessor temporal, long value) {
+            public Map<TemporalField, Long> resolve(TemporalAccessor temporal, long wowby, ResolverStyle resolverStyle) {
                 if ((temporal.isSupported(WEEK_BASED_YEAR) && temporal.isSupported(DAY_OF_WEEK)) == false) {
                     return null;
                 }
-                int wby = temporal.get(WEEK_BASED_YEAR);
-                int dow = temporal.get(DAY_OF_WEEK);
-                range().checkValidValue(value, this);  // lenient range
-                LocalDate date = LocalDate.of(wby, 1, 4).plusWeeks(value - 1).with(DAY_OF_WEEK, dow);
+                int wby = temporal.get(WEEK_BASED_YEAR);  // validated
+                LocalDate date = LocalDate.of(wby, 1, 4);
+                if (resolverStyle == ResolverStyle.LENIENT) {
+                    long dow = temporal.getLong(DAY_OF_WEEK);  // unvalidated
+                    if (dow > 7) {
+                        date = date.plusWeeks((dow - 1) / 7);
+                        dow = ((dow - 1) % 7) + 1;
+                    } else if (dow < 1) {
+                        date = date.plusWeeks(Math.subtractExact(dow,  7) / 7);
+                        dow = ((dow + 6) % 7) + 1;
+                    }
+                    date = date.plusWeeks(Math.subtractExact(wowby, 1)).with(DAY_OF_WEEK, dow);
+                } else {
+                    int dow = temporal.get(DAY_OF_WEEK);  // validated
+                    if (wowby < 1 || wowby > 52) {
+                        if (resolverStyle == ResolverStyle.STRICT) {
+                            getWeekRange(date).checkValidValue(wowby, this);  // only allow exact range
+                        } else {  // SMART
+                            range().checkValidValue(wowby, this);  // allow 1-53 rolling into next year
+                        }
+                    }
+                    date = date.plusWeeks(wowby - 1).with(DAY_OF_WEEK, dow);
+                }
                 Map<TemporalField, Long> result = new HashMap<>(2, 1.0f);
                 result.put(EPOCH_DAY, date.toEpochDay());
                 result.put(WEEK_BASED_YEAR, null);
@@ -420,7 +521,7 @@
             @Override
             public long getFrom(TemporalAccessor temporal) {
                 if (isSupportedBy(temporal) == false) {
-                    throw new DateTimeException("Unsupported field: WeekBasedYear");
+                    throw new UnsupportedTemporalTypeException("Unsupported field: WeekBasedYear");
                 }
                 return getWeekBasedYear(LocalDate.from(temporal));
             }
@@ -428,7 +529,7 @@
             @Override
             public <R extends Temporal> R adjustInto(R temporal, long newValue) {
                 if (isSupportedBy(temporal) == false) {
-                    throw new DateTimeException("Unsupported field: WeekBasedYear");
+                    throw new UnsupportedTemporalTypeException("Unsupported field: WeekBasedYear");
                 }
                 int newVal = range().checkValidIntValue(newValue, WEEK_BASED_YEAR);  // strict check
                 LocalDate date = LocalDate.from(temporal);
@@ -439,6 +540,11 @@
         };
 
         @Override
+        public boolean isDateBased() {
+            return true;
+        }
+
+        @Override
         public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
             return range();
         }
--- a/src/share/classes/java/time/temporal/JulianFields.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/temporal/JulianFields.java	Wed Apr 17 21:48:04 2013 -0700
@@ -66,6 +66,7 @@
 import static java.time.temporal.ChronoUnit.FOREVER;
 
 import java.time.DateTimeException;
+import java.time.format.ResolverStyle;
 import java.util.Collections;
 import java.util.Map;
 
@@ -106,7 +107,12 @@
      * When 'JULIAN_DAY.adjustInto()' is applied to a date-time, the time of day portion remains unaltered.
      * 'JULIAN_DAY.adjustInto()' and 'JULIAN_DAY.getFrom()' only apply to {@code Temporal} objects that
      * can be converted into {@link ChronoField#EPOCH_DAY}.
-     * A {@link DateTimeException} is thrown for any other type of object.
+     * An {@link UnsupportedTemporalTypeException} is thrown for any other type of object.
+     * <p>
+     * In the resolving phase of parsing, a date can be created from a Julian Day field.
+     * In {@linkplain ResolverStyle#STRICT strict mode} and {@linkplain ResolverStyle#SMART smart mode}
+     * the Julian Day value is validated against the range of valid values.
+     * In {@linkplain ResolverStyle#LENIENT lenient mode} no validation occurs.
      * <p>
      * <h3>Astronomical and Scientific Notes</h3>
      * The standard astronomical definition uses a fraction to indicate the time-of-day,
@@ -147,10 +153,15 @@
      * When 'MODIFIED_JULIAN_DAY.adjustInto()' is applied to a date-time, the time of day portion remains unaltered.
      * 'MODIFIED_JULIAN_DAY.adjustInto()' and 'MODIFIED_JULIAN_DAY.getFrom()' only apply to {@code Temporal} objects
      * that can be converted into {@link ChronoField#EPOCH_DAY}.
-     * A {@link DateTimeException} is thrown for any other type of object.
+     * An {@link UnsupportedTemporalTypeException} is thrown for any other type of object.
      * <p>
      * This implementation is an integer version of MJD with the decimal part rounded to floor.
      * <p>
+     * In the resolving phase of parsing, a date can be created from a Modified Julian Day field.
+     * In {@linkplain ResolverStyle#STRICT strict mode} and {@linkplain ResolverStyle#SMART smart mode}
+     * the Modified Julian Day value is validated against the range of valid values.
+     * In {@linkplain ResolverStyle#LENIENT lenient mode} no validation occurs.
+     * <p>
      * <h3>Astronomical and Scientific Notes</h3>
      * <pre>
      *  | ISO date          | Modified Julian Day |      Decimal MJD |
@@ -180,7 +191,12 @@
      * When 'RATA_DIE.adjustInto()' is applied to a date-time, the time of day portion remains unaltered.
      * 'RATA_DIE.adjustInto()' and 'RATA_DIE.getFrom()' only apply to {@code Temporal} objects
      * that can be converted into {@link ChronoField#EPOCH_DAY}.
-     * A {@link DateTimeException} is thrown for any other type of object.
+     * An {@link UnsupportedTemporalTypeException} is thrown for any other type of object.
+     * <p>
+     * In the resolving phase of parsing, a date can be created from a Rata Die field.
+     * In {@linkplain ResolverStyle#STRICT strict mode} and {@linkplain ResolverStyle#SMART smart mode}
+     * the Rata Die value is validated against the range of valid values.
+     * In {@linkplain ResolverStyle#LENIENT lenient mode} no validation occurs.
      */
     public static final TemporalField RATA_DIE = Field.RATA_DIE;
 
@@ -232,6 +248,11 @@
         }
 
         @Override
+        public boolean isDateBased() {
+            return true;
+        }
+
+        @Override
         public ValueRange range() {
             return range;
         }
@@ -266,8 +287,15 @@
 
         //-----------------------------------------------------------------------
         @Override
-        public Map<TemporalField, Long> resolve(TemporalAccessor temporal, long value) {
-            return Collections.<TemporalField, Long>singletonMap(EPOCH_DAY, Math.subtractExact(value, offset));
+        public Map<TemporalField, Long> resolve(TemporalAccessor temporal, long value, ResolverStyle resolverStyle) {
+            long epochDay;
+            if (resolverStyle == ResolverStyle.LENIENT) {
+                epochDay = Math.subtractExact(value, offset);
+            } else {
+                range().checkValidValue(value, this);
+                epochDay = value - offset;
+            }
+            return Collections.<TemporalField, Long>singletonMap(EPOCH_DAY, epochDay);
         }
 
         //-----------------------------------------------------------------------
--- a/src/share/classes/java/time/temporal/Queries.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,356 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package java.time.temporal;
-
-import static java.time.temporal.ChronoField.EPOCH_DAY;
-import static java.time.temporal.ChronoField.NANO_OF_DAY;
-import static java.time.temporal.ChronoField.OFFSET_SECONDS;
-
-import java.time.LocalDate;
-import java.time.LocalTime;
-import java.time.OffsetDateTime;
-import java.time.ZoneId;
-import java.time.ZoneOffset;
-import java.time.ZonedDateTime;
-import java.time.chrono.Chronology;
-
-/**
- * Common implementations of {@code TemporalQuery}.
- * <p>
- * This class provides common implementations of {@link TemporalQuery}.
- * These queries are primarily used as optimizations, allowing the internals
- * of other objects to be extracted effectively. Note that application code
- * can also use the {@code from(TemporalAccessor)} method on most temporal
- * objects as a method reference matching the query interface, such as
- * {@code LocalDate::from} and {@code ZoneId::from}.
- * <p>
- * There are two equivalent ways of using a {@code TemporalQuery}.
- * The first is to invoke the method on the interface directly.
- * The second is to use {@link TemporalAccessor#query(TemporalQuery)}:
- * <pre>
- *   // these two lines are equivalent, but the second approach is recommended
- *   dateTime = query.queryFrom(dateTime);
- *   dateTime = dateTime.query(query);
- * </pre>
- * It is recommended to use the second approach, {@code query(TemporalQuery)},
- * as it is a lot clearer to read in code.
- *
- * <h3>Specification for implementors</h3>
- * This is a thread-safe utility class.
- * All returned adjusters are immutable and thread-safe.
- *
- * @since 1.8
- */
-public final class Queries {
-    // note that it is vital that each method supplies a constant, not a
-    // calculated value, as they will be checked for using ==
-    // it is also vital that each constant is different (due to the == checking)
-    // as such, alterations to use lambdas must be done with extreme care
-
-    /**
-     * Private constructor since this is a utility class.
-     */
-    private Queries() {
-    }
-
-    //-----------------------------------------------------------------------
-    // special constants should be used to extract information from a TemporalAccessor
-    // that cannot be derived in other ways
-    // Javadoc added here, so as to pretend they are more normal than they really are
-
-    /**
-     * A strict query for the {@code ZoneId}.
-     * <p>
-     * This queries a {@code TemporalAccessor} for the zone.
-     * The zone is only returned if the date-time conceptually contains a {@code ZoneId}.
-     * It will not be returned if the date-time only conceptually has an {@code ZoneOffset}.
-     * Thus a {@link ZonedDateTime} will return the result of {@code getZone()},
-     * but an {@link OffsetDateTime} will return null.
-     * <p>
-     * In most cases, applications should use {@link #ZONE} as this query is too strict.
-     * <p>
-     * The result from JDK classes implementing {@code TemporalAccessor} is as follows:<br>
-     * {@code LocalDate} returns null<br>
-     * {@code LocalTime} returns null<br>
-     * {@code LocalDateTime} returns null<br>
-     * {@code ZonedDateTime} returns the associated zone<br>
-     * {@code OffsetTime} returns null<br>
-     * {@code OffsetDateTime} returns null<br>
-     * {@code ChronoLocalDate} returns null<br>
-     * {@code ChronoLocalDateTime} returns null<br>
-     * {@code ChronoZonedDateTime} returns the associated zone<br>
-     * {@code Era} returns null<br>
-     * {@code DayOfWeek} returns null<br>
-     * {@code Month} returns null<br>
-     * {@code Year} returns null<br>
-     * {@code YearMonth} returns null<br>
-     * {@code MonthDay} returns null<br>
-     * {@code ZoneOffset} returns null<br>
-     * {@code Instant} returns null<br>
-     *
-     * @return a query that can obtain the zone ID of a temporal, not null
-     */
-    public static final TemporalQuery<ZoneId> zoneId() {
-        return ZONE_ID;
-    }
-    static final TemporalQuery<ZoneId> ZONE_ID = (temporal) -> {
-        return temporal.query(ZONE_ID);
-    };
-
-    /**
-     * A query for the {@code Chronology}.
-     * <p>
-     * This queries a {@code TemporalAccessor} for the chronology.
-     * If the target {@code TemporalAccessor} represents a date, or part of a date,
-     * then it should return the chronology that the date is expressed in.
-     * As a result of this definition, objects only representing time, such as
-     * {@code LocalTime}, will return null.
-     * <p>
-     * The result from JDK classes implementing {@code TemporalAccessor} is as follows:<br>
-     * {@code LocalDate} returns {@code IsoChronology.INSTANCE}<br>
-     * {@code LocalTime} returns null (does not represent a date)<br>
-     * {@code LocalDateTime} returns {@code IsoChronology.INSTANCE}<br>
-     * {@code ZonedDateTime} returns {@code IsoChronology.INSTANCE}<br>
-     * {@code OffsetTime} returns null (does not represent a date)<br>
-     * {@code OffsetDateTime} returns {@code IsoChronology.INSTANCE}<br>
-     * {@code ChronoLocalDate} returns the associated chronology<br>
-     * {@code ChronoLocalDateTime} returns the associated chronology<br>
-     * {@code ChronoZonedDateTime} returns the associated chronology<br>
-     * {@code Era} returns the associated chronology<br>
-     * {@code DayOfWeek} returns null (shared across chronologies)<br>
-     * {@code Month} returns {@code IsoChronology.INSTANCE}<br>
-     * {@code Year} returns {@code IsoChronology.INSTANCE}<br>
-     * {@code YearMonth} returns {@code IsoChronology.INSTANCE}<br>
-     * {@code MonthDay} returns null {@code IsoChronology.INSTANCE}<br>
-     * {@code ZoneOffset} returns null (does not represent a date)<br>
-     * {@code Instant} returns null (does not represent a date)<br>
-     * <p>
-     * The method {@link Chronology#from(TemporalAccessor)} can be used as a
-     * {@code TemporalQuery} via a method reference, {@code Chronology::from}.
-     * That method is equivalent to this query, except that it throws an
-     * exception if a chronology cannot be obtained.
-     *
-     * @return a query that can obtain the chronology of a temporal, not null
-     */
-    public static final TemporalQuery<Chronology> chronology() {
-        return CHRONO;
-    }
-    static final TemporalQuery<Chronology> CHRONO = (temporal) -> {
-        return temporal.query(CHRONO);
-    };
-
-    /**
-     * A query for the smallest supported unit.
-     * <p>
-     * This queries a {@code TemporalAccessor} for the time precision.
-     * If the target {@code TemporalAccessor} represents a consistent or complete date-time,
-     * date or time then this must return the smallest precision actually supported.
-     * Note that fields such as {@code NANO_OF_DAY} and {@code NANO_OF_SECOND}
-     * are defined to always return ignoring the precision, thus this is the only
-     * way to find the actual smallest supported unit.
-     * For example, were {@code GregorianCalendar} to implement {@code TemporalAccessor}
-     * it would return a precision of {@code MILLIS}.
-     * <p>
-     * The result from JDK classes implementing {@code TemporalAccessor} is as follows:<br>
-     * {@code LocalDate} returns {@code DAYS}<br>
-     * {@code LocalTime} returns {@code NANOS}<br>
-     * {@code LocalDateTime} returns {@code NANOS}<br>
-     * {@code ZonedDateTime} returns {@code NANOS}<br>
-     * {@code OffsetTime} returns {@code NANOS}<br>
-     * {@code OffsetDateTime} returns {@code NANOS}<br>
-     * {@code ChronoLocalDate} returns {@code DAYS}<br>
-     * {@code ChronoLocalDateTime} returns {@code NANOS}<br>
-     * {@code ChronoZonedDateTime} returns {@code NANOS}<br>
-     * {@code Era} returns {@code ERAS}<br>
-     * {@code DayOfWeek} returns {@code DAYS}<br>
-     * {@code Month} returns {@code MONTHS}<br>
-     * {@code Year} returns {@code YEARS}<br>
-     * {@code YearMonth} returns {@code MONTHS}<br>
-     * {@code MonthDay} returns null (does not represent a complete date or time)<br>
-     * {@code ZoneOffset} returns null (does not represent a date or time)<br>
-     * {@code Instant} returns {@code NANOS}<br>
-     *
-     * @return a query that can obtain the precision of a temporal, not null
-     */
-    public static final TemporalQuery<TemporalUnit> precision() {
-        return PRECISION;
-    }
-    static final TemporalQuery<TemporalUnit> PRECISION = (temporal) -> {
-        return temporal.query(PRECISION);
-    };
-
-    //-----------------------------------------------------------------------
-    // non-special constants are standard queries that derive information from other information
-    /**
-     * A lenient query for the {@code ZoneId}, falling back to the {@code ZoneOffset}.
-     * <p>
-     * This queries a {@code TemporalAccessor} for the zone.
-     * It first tries to obtain the zone, using {@link #zoneId()}.
-     * If that is not found it tries to obtain the {@link #offset()}.
-     * Thus a {@link ZonedDateTime} will return the result of {@code getZone()},
-     * while an {@link OffsetDateTime} will return the result of {@code getOffset()}.
-     * <p>
-     * In most cases, applications should use this query rather than {@code #zoneId()}.
-     * <p>
-     * The method {@link ZoneId#from(TemporalAccessor)} can be used as a
-     * {@code TemporalQuery} via a method reference, {@code ZoneId::from}.
-     * That method is equivalent to this query, except that it throws an
-     * exception if a zone cannot be obtained.
-     *
-     * @return a query that can obtain the zone ID or offset of a temporal, not null
-     */
-    public static final TemporalQuery<ZoneId> zone() {
-        return ZONE;
-    }
-    static final TemporalQuery<ZoneId> ZONE = (temporal) -> {
-        ZoneId zone = temporal.query(ZONE_ID);
-        return (zone != null ? zone : temporal.query(OFFSET));
-    };
-
-    /**
-     * A query for {@code ZoneOffset} returning null if not found.
-     * <p>
-     * This returns a {@code TemporalQuery} that can be used to query a temporal
-     * object for the offset. The query will return null if the temporal
-     * object cannot supply an offset.
-     * <p>
-     * The query implementation examines the {@link ChronoField#OFFSET_SECONDS OFFSET_SECONDS}
-     * field and uses it to create a {@code ZoneOffset}.
-     * <p>
-     * The method {@link ZoneOffset#from(TemporalAccessor)} can be used as a
-     * {@code TemporalQuery} via a method reference, {@code ZoneOffset::from}.
-     * This query and {@code ZoneOffset::from} will return the same result if the
-     * temporal object contains an offset. If the temporal object does not contain
-     * an offset, then the method reference will throw an exception, whereas this
-     * query will return null.
-     *
-     * @return a query that can obtain the offset of a temporal, not null
-     */
-    public static final TemporalQuery<ZoneOffset> offset() {
-        return OFFSET;
-    }
-    static final TemporalQuery<ZoneOffset> OFFSET = (temporal) -> {
-        if (temporal.isSupported(OFFSET_SECONDS)) {
-            return ZoneOffset.ofTotalSeconds(temporal.get(OFFSET_SECONDS));
-        }
-        return null;
-    };
-
-    /**
-     * A query for {@code LocalDate} returning null if not found.
-     * <p>
-     * This returns a {@code TemporalQuery} that can be used to query a temporal
-     * object for the local date. The query will return null if the temporal
-     * object cannot supply a local date.
-     * <p>
-     * The query implementation examines the {@link ChronoField#EPOCH_DAY EPOCH_DAY}
-     * field and uses it to create a {@code LocalDate}.
-     * <p>
-     * The method {@link ZoneOffset#from(TemporalAccessor)} can be used as a
-     * {@code TemporalQuery} via a method reference, {@code LocalDate::from}.
-     * This query and {@code LocalDate::from} will return the same result if the
-     * temporal object contains a date. If the temporal object does not contain
-     * a date, then the method reference will throw an exception, whereas this
-     * query will return null.
-     *
-     * @return a query that can obtain the date of a temporal, not null
-     */
-    public static final TemporalQuery<LocalDate> localDate() {
-        return LOCAL_DATE;
-    }
-    static final TemporalQuery<LocalDate> LOCAL_DATE = (temporal) -> {
-        if (temporal.isSupported(EPOCH_DAY)) {
-            return LocalDate.ofEpochDay(temporal.getLong(EPOCH_DAY));
-        }
-        return null;
-    };
-
-    /**
-     * A query for {@code LocalTime} returning null if not found.
-     * <p>
-     * This returns a {@code TemporalQuery} that can be used to query a temporal
-     * object for the local time. The query will return null if the temporal
-     * object cannot supply a local time.
-     * <p>
-     * The query implementation examines the {@link ChronoField#NANO_OF_DAY NANO_OF_DAY}
-     * field and uses it to create a {@code LocalTime}.
-     * <p>
-     * The method {@link ZoneOffset#from(TemporalAccessor)} can be used as a
-     * {@code TemporalQuery} via a method reference, {@code LocalTime::from}.
-     * This query and {@code LocalTime::from} will return the same result if the
-     * temporal object contains a time. If the temporal object does not contain
-     * a time, then the method reference will throw an exception, whereas this
-     * query will return null.
-     *
-     * @return a query that can obtain the time of a temporal, not null
-     */
-    public static final TemporalQuery<LocalTime> localTime() {
-        return LOCAL_TIME;
-    }
-    static final TemporalQuery<LocalTime> LOCAL_TIME = (temporal) -> {
-        if (temporal.isSupported(NANO_OF_DAY)) {
-            return LocalTime.ofNanoOfDay(temporal.getLong(NANO_OF_DAY));
-        }
-        return null;
-    };
-
-}
--- a/src/share/classes/java/time/temporal/Temporal.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/temporal/Temporal.java	Wed Apr 17 21:48:04 2013 -0700
@@ -83,7 +83,7 @@
  * Two pieces of date/time information cannot be represented by numbers,
  * the {@linkplain java.time.chrono.Chronology chronology} and the {@linkplain ZoneId time-zone}.
  * These can be accessed via {@link #query(TemporalQuery) queries} using
- * the static methods defined on {@link Queries}.
+ * the static methods defined on {@link TemporalQuery}.
  * <p>
  * This interface is a framework-level interface that should not be widely
  * used in application code. Instead, applications should create and pass
@@ -134,7 +134,7 @@
      * This adjusts this date-time according to the rules of the specified adjuster.
      * A simple adjuster might simply set the one of the fields, such as the year field.
      * A more complex adjuster might set the date to the last day of the month.
-     * A selection of common adjustments is provided in {@link Adjusters}.
+     * A selection of common adjustments is provided in {@link TemporalAdjuster}.
      * These include finding the "last day of the month" and "next Wednesday".
      * The adjuster is responsible for handling special cases, such as the varying
      * lengths of month and leap years.
@@ -161,7 +161,7 @@
      * @throws DateTimeException if unable to make the adjustment
      * @throws ArithmeticException if numeric overflow occurs
      */
-    public default Temporal with(TemporalAdjuster adjuster) {
+    default Temporal with(TemporalAdjuster adjuster) {
         return adjuster.adjustInto(this);
     }
 
@@ -180,7 +180,7 @@
      * <h3>Specification for implementors</h3>
      * Implementations must check and handle all fields defined in {@link ChronoField}.
      * If the field is supported, then the adjustment must be performed.
-     * If unsupported, then a {@code DateTimeException} must be thrown.
+     * If unsupported, then an {@code UnsupportedTemporalTypeException} must be thrown.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)}
@@ -194,6 +194,7 @@
      * @param newValue  the new value of the field in the result
      * @return an object of the same type with the specified field set, not null
      * @throws DateTimeException if the field cannot be set
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     Temporal with(TemporalField field, long newValue);
@@ -210,7 +211,6 @@
      * <pre>
      *  date = date.plus(period);                      // add a Period instance
      *  date = date.plus(duration);                    // add a Duration instance
-     *  date = date.plus(MONTHS.between(start, end));  // static import of MONTHS field
      *  date = date.plus(workingDays(6));              // example user-written workingDays method
      * </pre>
      * <p>
@@ -232,7 +232,7 @@
      * @throws DateTimeException if the addition cannot be made
      * @throws ArithmeticException if numeric overflow occurs
      */
-    public default Temporal plus(TemporalAmount amount) {
+    default Temporal plus(TemporalAmount amount) {
         return amount.addTo(this);
     }
 
@@ -255,7 +255,7 @@
      * <h3>Specification for implementors</h3>
      * Implementations must check and handle all units defined in {@link ChronoUnit}.
      * If the unit is supported, then the addition must be performed.
-     * If unsupported, then a {@code DateTimeException} must be thrown.
+     * If unsupported, then an {@code UnsupportedTemporalTypeException} must be thrown.
      * <p>
      * If the unit is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.addTo(Temporal, long)}
@@ -269,6 +269,7 @@
      * @param unit  the unit of the period to add, not null
      * @return an object of the same type with the specified period added, not null
      * @throws DateTimeException if the unit cannot be added
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     Temporal plus(long amountToAdd, TemporalUnit unit);
@@ -285,7 +286,6 @@
      * <pre>
      *  date = date.minus(period);                      // subtract a Period instance
      *  date = date.minus(duration);                    // subtract a Duration instance
-     *  date = date.minus(MONTHS.between(start, end));  // static import of MONTHS field
      *  date = date.minus(workingDays(6));              // example user-written workingDays method
      * </pre>
      * <p>
@@ -307,7 +307,7 @@
      * @throws DateTimeException if the subtraction cannot be made
      * @throws ArithmeticException if numeric overflow occurs
      */
-    public default Temporal minus(TemporalAmount amount) {
+    default Temporal minus(TemporalAmount amount) {
         return amount.subtractFrom(this);
     }
 
@@ -344,9 +344,10 @@
      * @param unit  the unit of the period to subtract, not null
      * @return an object of the same type with the specified period subtracted, not null
      * @throws DateTimeException if the unit cannot be subtracted
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
-    public default Temporal minus(long amountToSubtract, TemporalUnit unit) {
+    default Temporal minus(long amountToSubtract, TemporalUnit unit) {
         return (amountToSubtract == Long.MIN_VALUE ? plus(Long.MAX_VALUE, unit).plus(1, unit) : plus(-amountToSubtract, unit));
     }
 
@@ -388,7 +389,7 @@
      * Implementations must begin by checking to ensure that the input temporal
      * object is of the same observable type as the implementation.
      * They must then perform the calculation for all instances of {@link ChronoUnit}.
-     * A {@code DateTimeException} must be thrown for {@code ChronoUnit}
+     * An {@code UnsupportedTemporalTypeException} must be thrown for {@code ChronoUnit}
      * instances that are unsupported.
      * <p>
      * If the unit is not a {@code ChronoUnit}, then the result of this method
@@ -401,7 +402,7 @@
      *  // check input temporal is the same type as this class
      *  if (unit instanceof ChronoUnit) {
      *    // if unit is supported, then calculate and return result
-     *    // else throw DateTimeException for unsupported units
+     *    // else throw UnsupportedTemporalTypeException for unsupported units
      *  }
      *  return unit.between(this, endTemporal);
      * </pre>
@@ -414,6 +415,7 @@
      *  the unit; positive if the specified object is later than this one, negative if
      *  it is earlier than this one
      * @throws DateTimeException if the period cannot be calculated
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     long periodUntil(Temporal endTemporal, TemporalUnit unit);
--- a/src/share/classes/java/time/temporal/TemporalAccessor.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/temporal/TemporalAccessor.java	Wed Apr 17 21:48:04 2013 -0700
@@ -63,6 +63,7 @@
 
 import java.time.DateTimeException;
 import java.time.ZoneId;
+import java.util.Objects;
 
 /**
  * Framework-level interface defining read-only access to a temporal object,
@@ -80,8 +81,8 @@
  * <p>
  * Two pieces of date/time information cannot be represented by numbers,
  * the {@linkplain java.time.chrono.Chronology chronology} and the {@linkplain ZoneId time-zone}.
- * These can be accessed via {@link #query(TemporalQuery) queries} using
- * the static methods defined on {@link Queries}.
+ * These can be accessed via {@linkplain #query(TemporalQuery) queries} using
+ * the static methods defined on {@link TemporalQuery}.
  * <p>
  * A sub-interface, {@link Temporal}, extends this definition to one that also
  * supports adjustment and manipulation on more complete temporal objects.
@@ -139,7 +140,7 @@
      * <h3>Specification for implementors</h3>
      * Implementations must check and handle all fields defined in {@link ChronoField}.
      * If the field is supported, then the range of the field must be returned.
-     * If unsupported, then a {@code DateTimeException} must be thrown.
+     * If unsupported, then an {@code UnsupportedTemporalTypeException} must be thrown.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessorl)}
@@ -153,7 +154,7 @@
      *    if (isSupported(field)) {
      *      return field.range();
      *    }
-     *    throw new DateTimeException("Unsupported field: " + field.getName());
+     *    throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
      *  }
      *  return field.rangeRefinedBy(this);
      * </pre>
@@ -161,14 +162,16 @@
      * @param field  the field to query the range for, not null
      * @return the range of valid values for the field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      */
-    public default ValueRange range(TemporalField field) {
+    default ValueRange range(TemporalField field) {
         if (field instanceof ChronoField) {
             if (isSupported(field)) {
                 return field.range();
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
+        Objects.requireNonNull(field, "field");
         return field.rangeRefinedBy(this);
     }
 
@@ -184,28 +187,40 @@
      * Implementations must check and handle all fields defined in {@link ChronoField}.
      * If the field is supported and has an {@code int} range, then the value of
      * the field must be returned.
-     * If unsupported, then a {@code DateTimeException} must be thrown.
+     * If unsupported, then an {@code UnsupportedTemporalTypeException} must be thrown.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
      * passing {@code this} as the argument.
      * <p>
-     * Implementations must not alter either this object.
+     * Implementations must not alter this object.
      * <p>
      * The default implementation must behave equivalent to this code:
      * <pre>
-     *  return range(field).checkValidIntValue(getLong(field), field);
+     *  if (range(field).isIntValue()) {
+     *    return range(field).checkValidIntValue(getLong(field), field);
+     *  }
+     *  throw new UnsupportedTemporalTypeException("Invalid field " + field + " + for get() method, use getLong() instead");
      * </pre>
      *
      * @param field  the field to get, not null
      * @return the value for the field, within the valid range of values
-     * @throws DateTimeException if a value for the field cannot be obtained
-     * @throws DateTimeException if the range of valid values for the field exceeds an {@code int}
-     * @throws DateTimeException if the value is outside the range of valid values for the field
+     * @throws DateTimeException if a value for the field cannot be obtained or
+     *         the value is outside the range of valid values for the field
+     * @throws UnsupportedTemporalTypeException if the field is not supported or
+     *         the range of values exceeds an {@code int}
      * @throws ArithmeticException if numeric overflow occurs
      */
-    public default int get(TemporalField field) {
-        return range(field).checkValidIntValue(getLong(field), field);
+    default int get(TemporalField field) {
+        ValueRange range = range(field);
+        if (range.isIntValue() == false) {
+            throw new UnsupportedTemporalTypeException("Invalid field " + field + " + for get() method, use getLong() instead");
+        }
+        long value = getLong(field);
+        if (range.isValidValue(value) == false) {
+            throw new DateTimeException("Invalid value for " + field + " (valid values " + range + "): " + value);
+        }
+        return (int) value;
     }
 
     /**
@@ -219,7 +234,7 @@
      * <h3>Specification for implementors</h3>
      * Implementations must check and handle all fields defined in {@link ChronoField}.
      * If the field is supported, then the value of the field must be returned.
-     * If unsupported, then a {@code DateTimeException} must be thrown.
+     * If unsupported, then an {@code UnsupportedTemporalTypeException} must be thrown.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
      * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}
@@ -230,6 +245,7 @@
      * @param field  the field to get, not null
      * @return the value for the field
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     long getLong(TemporalField field);
@@ -247,13 +263,13 @@
      * <p>
      * The most common query implementations are method references, such as
      * {@code LocalDate::from} and {@code ZoneId::from}.
-     * Further implementations are on {@link Queries}.
-     * Queries may also be defined by applications.
+     * Additional implementations are provided as static methods on {@link TemporalQuery}.
      *
      * <h3>Specification for implementors</h3>
      * The default implementation must behave equivalent to this code:
      * <pre>
-     *  if (query == Queries.zoneId() || query == Queries.chronology() || query == Queries.precision()) {
+     *  if (query == TemporalQuery.zoneId() ||
+     *        query == TemporalQuery.chronology() || query == TemporalQuery.precision()) {
      *    return null;
      *  }
      *  return query.queryFrom(this);
@@ -270,7 +286,7 @@
      * For example, an application-defined {@code HourMin} class storing the hour
      * and minute must override this method as follows:
      * <pre>
-     *  if (query == Queries.precision()) {
+     *  if (query == TemporalQuery.precision()) {
      *    return MINUTES;
      *  }
      *  return TemporalAccessor.super.query(query);
@@ -282,8 +298,8 @@
      * @throws DateTimeException if unable to query
      * @throws ArithmeticException if numeric overflow occurs
      */
-    public default <R> R query(TemporalQuery<R> query) {
-        if (query == Queries.zoneId() || query == Queries.chronology() || query == Queries.precision()) {
+    default <R> R query(TemporalQuery<R> query) {
+        if (query == TemporalQuery.zoneId() || query == TemporalQuery.chronology() || query == TemporalQuery.precision()) {
             return null;
         }
         return query.queryFrom(this);
--- a/src/share/classes/java/time/temporal/TemporalAdjuster.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/temporal/TemporalAdjuster.java	Wed Apr 17 21:48:04 2013 -0700
@@ -62,6 +62,9 @@
 package java.time.temporal;
 
 import java.time.DateTimeException;
+import java.time.DayOfWeek;
+import java.time.LocalDate;
+import java.util.function.UnaryOperator;
 
 /**
  * Strategy for adjusting a temporal object.
@@ -83,13 +86,22 @@
  * It is recommended to use the second approach, {@code with(TemporalAdjuster)},
  * as it is a lot clearer to read in code.
  * <p>
- * See {@link Adjusters} for a standard set of adjusters, including finding the
- * last day of the month.
- * Adjusters may also be defined by applications.
+ * This class also contains a standard set of adjusters, available as static methods.
+ * These include:
+ * <ul>
+ * <li>finding the first or last day of the month
+ * <li>finding the first day of next month
+ * <li>finding the first or last day of the year
+ * <li>finding the first day of next year
+ * <li>finding the first or last day-of-week within a month, such as "first Wednesday in June"
+ * <li>finding the next or previous day-of-week, such as "next Thursday"
+ * </ul>
  *
  * <h3>Specification for implementors</h3>
  * This interface places no restrictions on the mutability of implementations,
  * however immutability is strongly recommended.
+ * <p>
+ * All the implementations supplied by the static methods on this interface are immutable.
  *
  * @since 1.8
  */
@@ -128,7 +140,7 @@
      * <p>
      * The input temporal object may be in a calendar system other than ISO.
      * Implementations may choose to document compatibility with other calendar systems,
-     * or reject non-ISO temporal objects by {@link Queries#chronology() querying the chronology}.
+     * or reject non-ISO temporal objects by {@link TemporalQuery#chronology() querying the chronology}.
      * <p>
      * This method may be called from multiple threads in parallel.
      * It must be thread-safe when invoked.
@@ -140,4 +152,311 @@
      */
     Temporal adjustInto(Temporal temporal);
 
+    //-----------------------------------------------------------------------
+    /**
+     * Obtains a {@code TemporalAdjuster} that wraps a date adjuster.
+     * <p>
+     * The {@code TemporalAdjuster} is based on the low level {@code Temporal} interface.
+     * This method allows an adjustment from {@code LocalDate} to {@code LocalDate}
+     * to be wrapped to match the temporal-based interface.
+     * This is provided for convenience to make user-written adjusters simpler.
+     * <p>
+     * In general, user-written adjusters should be static constants:
+     * <pre>
+     *  static TemporalAdjuster TWO_DAYS_LATER = TemporalAdjuster.ofDateAdjuster(
+     *    date -> date.plusDays(2));
+     * </pre>
+     *
+     * @param dateBasedAdjuster  the date-based adjuster, not null
+     * @return the temporal adjuster wrapping on the date adjuster, not null
+     */
+    static TemporalAdjuster ofDateAdjuster(UnaryOperator<LocalDate> dateBasedAdjuster) {
+        return TemporalAdjusters.ofDateAdjuster(dateBasedAdjuster);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Returns the "first day of month" adjuster, which returns a new date set to
+     * the first day of the current month.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 will return 2011-01-01.<br>
+     * The input 2011-02-15 will return 2011-02-01.
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It is equivalent to:
+     * <pre>
+     *  temporal.with(DAY_OF_MONTH, 1);
+     * </pre>
+     *
+     * @return the first day-of-month adjuster, not null
+     */
+    static TemporalAdjuster firstDayOfMonth() {
+        return TemporalAdjusters.firstDayOfMonth();
+    }
+
+    /**
+     * Returns the "last day of month" adjuster, which returns a new date set to
+     * the last day of the current month.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 will return 2011-01-31.<br>
+     * The input 2011-02-15 will return 2011-02-28.<br>
+     * The input 2012-02-15 will return 2012-02-29 (leap year).<br>
+     * The input 2011-04-15 will return 2011-04-30.
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It is equivalent to:
+     * <pre>
+     *  long lastDay = temporal.range(DAY_OF_MONTH).getMaximum();
+     *  temporal.with(DAY_OF_MONTH, lastDay);
+     * </pre>
+     *
+     * @return the last day-of-month adjuster, not null
+     */
+    static TemporalAdjuster lastDayOfMonth() {
+        return TemporalAdjusters.lastDayOfMonth();
+    }
+
+    /**
+     * Returns the "first day of next month" adjuster, which returns a new date set to
+     * the first day of the next month.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 will return 2011-02-01.<br>
+     * The input 2011-02-15 will return 2011-03-01.
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It is equivalent to:
+     * <pre>
+     *  temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS);
+     * </pre>
+     *
+     * @return the first day of next month adjuster, not null
+     */
+    static TemporalAdjuster firstDayOfNextMonth() {
+        return TemporalAdjusters.firstDayOfNextMonth();
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Returns the "first day of year" adjuster, which returns a new date set to
+     * the first day of the current year.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 will return 2011-01-01.<br>
+     * The input 2011-02-15 will return 2011-01-01.<br>
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It is equivalent to:
+     * <pre>
+     *  temporal.with(DAY_OF_YEAR, 1);
+     * </pre>
+     *
+     * @return the first day-of-year adjuster, not null
+     */
+    static TemporalAdjuster firstDayOfYear() {
+        return TemporalAdjusters.firstDayOfYear();
+    }
+
+    /**
+     * Returns the "last day of year" adjuster, which returns a new date set to
+     * the last day of the current year.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 will return 2011-12-31.<br>
+     * The input 2011-02-15 will return 2011-12-31.<br>
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It is equivalent to:
+     * <pre>
+     *  long lastDay = temporal.range(DAY_OF_YEAR).getMaximum();
+     *  temporal.with(DAY_OF_YEAR, lastDay);
+     * </pre>
+     *
+     * @return the last day-of-year adjuster, not null
+     */
+    static TemporalAdjuster lastDayOfYear() {
+        return TemporalAdjusters.lastDayOfYear();
+    }
+
+    /**
+     * Returns the "first day of next year" adjuster, which returns a new date set to
+     * the first day of the next year.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 will return 2012-01-01.
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It is equivalent to:
+     * <pre>
+     *  temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS);
+     * </pre>
+     *
+     * @return the first day of next month adjuster, not null
+     */
+    static TemporalAdjuster firstDayOfNextYear() {
+        return TemporalAdjusters.firstDayOfNextYear();
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Returns the first in month adjuster, which returns a new date
+     * in the same month with the first matching day-of-week.
+     * This is used for expressions like 'first Tuesday in March'.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-12-15 for (MONDAY) will return 2011-12-05.<br>
+     * The input 2011-12-15 for (FRIDAY) will return 2011-12-02.<br>
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It uses the {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields
+     * and the {@code DAYS} unit, and assumes a seven day week.
+     *
+     * @param dayOfWeek  the day-of-week, not null
+     * @return the first in month adjuster, not null
+     */
+    static TemporalAdjuster firstInMonth(DayOfWeek dayOfWeek) {
+        return TemporalAdjuster.dayOfWeekInMonth(1, dayOfWeek);
+    }
+
+    /**
+     * Returns the last in month adjuster, which returns a new date
+     * in the same month with the last matching day-of-week.
+     * This is used for expressions like 'last Tuesday in March'.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-12-15 for (MONDAY) will return 2011-12-26.<br>
+     * The input 2011-12-15 for (FRIDAY) will return 2011-12-30.<br>
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It uses the {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields
+     * and the {@code DAYS} unit, and assumes a seven day week.
+     *
+     * @param dayOfWeek  the day-of-week, not null
+     * @return the first in month adjuster, not null
+     */
+    static TemporalAdjuster lastInMonth(DayOfWeek dayOfWeek) {
+        return TemporalAdjuster.dayOfWeekInMonth(-1, dayOfWeek);
+    }
+
+    /**
+     * Returns the day-of-week in month adjuster, which returns a new date
+     * in the same month with the ordinal day-of-week.
+     * This is used for expressions like the 'second Tuesday in March'.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-12-15 for (1,TUESDAY) will return 2011-12-06.<br>
+     * The input 2011-12-15 for (2,TUESDAY) will return 2011-12-13.<br>
+     * The input 2011-12-15 for (3,TUESDAY) will return 2011-12-20.<br>
+     * The input 2011-12-15 for (4,TUESDAY) will return 2011-12-27.<br>
+     * The input 2011-12-15 for (5,TUESDAY) will return 2012-01-03.<br>
+     * The input 2011-12-15 for (-1,TUESDAY) will return 2011-12-27 (last in month).<br>
+     * The input 2011-12-15 for (-4,TUESDAY) will return 2011-12-06 (3 weeks before last in month).<br>
+     * The input 2011-12-15 for (-5,TUESDAY) will return 2011-11-29 (4 weeks before last in month).<br>
+     * The input 2011-12-15 for (0,TUESDAY) will return 2011-11-29 (last in previous month).<br>
+     * <p>
+     * For a positive or zero ordinal, the algorithm is equivalent to finding the first
+     * day-of-week that matches within the month and then adding a number of weeks to it.
+     * For a negative ordinal, the algorithm is equivalent to finding the last
+     * day-of-week that matches within the month and then subtracting a number of weeks to it.
+     * The ordinal number of weeks is not validated and is interpreted leniently
+     * according to this algorithm. This definition means that an ordinal of zero finds
+     * the last matching day-of-week in the previous month.
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It uses the {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields
+     * and the {@code DAYS} unit, and assumes a seven day week.
+     *
+     * @param ordinal  the week within the month, unbounded but typically from -5 to 5
+     * @param dayOfWeek  the day-of-week, not null
+     * @return the day-of-week in month adjuster, not null
+     */
+    static TemporalAdjuster dayOfWeekInMonth(final int ordinal, DayOfWeek dayOfWeek) {
+        return TemporalAdjusters.dayOfWeekInMonth(ordinal, dayOfWeek);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Returns the next day-of-week adjuster, which adjusts the date to the
+     * first occurrence of the specified day-of-week after the date being adjusted.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-17 (two days later).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-19 (four days later).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-22 (seven days later).
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit,
+     * and assumes a seven day week.
+     *
+     * @param dayOfWeek  the day-of-week to move the date to, not null
+     * @return the next day-of-week adjuster, not null
+     */
+    static TemporalAdjuster next(DayOfWeek dayOfWeek) {
+        return TemporalAdjusters.next(dayOfWeek);
+    }
+
+    /**
+     * Returns the next-or-same day-of-week adjuster, which adjusts the date to the
+     * first occurrence of the specified day-of-week after the date being adjusted
+     * unless it is already on that day in which case the same object is returned.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-17 (two days later).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-19 (four days later).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-15 (same as input).
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit,
+     * and assumes a seven day week.
+     *
+     * @param dayOfWeek  the day-of-week to check for or move the date to, not null
+     * @return the next-or-same day-of-week adjuster, not null
+     */
+    static TemporalAdjuster nextOrSame(DayOfWeek dayOfWeek) {
+        return TemporalAdjusters.nextOrSame(dayOfWeek);
+    }
+
+    /**
+     * Returns the previous day-of-week adjuster, which adjusts the date to the
+     * first occurrence of the specified day-of-week before the date being adjusted.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-10 (five days earlier).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-12 (three days earlier).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-08 (seven days earlier).
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit,
+     * and assumes a seven day week.
+     *
+     * @param dayOfWeek  the day-of-week to move the date to, not null
+     * @return the previous day-of-week adjuster, not null
+     */
+    static TemporalAdjuster previous(DayOfWeek dayOfWeek) {
+        return TemporalAdjusters.previous(dayOfWeek);
+    }
+
+    /**
+     * Returns the previous-or-same day-of-week adjuster, which adjusts the date to the
+     * first occurrence of the specified day-of-week before the date being adjusted
+     * unless it is already on that day in which case the same object is returned.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-10 (five days earlier).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-12 (three days earlier).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-15 (same as input).
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit,
+     * and assumes a seven day week.
+     *
+     * @param dayOfWeek  the day-of-week to check for or move the date to, not null
+     * @return the previous-or-same day-of-week adjuster, not null
+     */
+    static TemporalAdjuster previousOrSame(DayOfWeek dayOfWeek) {
+        return TemporalAdjusters.previousOrSame(dayOfWeek);
+    }
+
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/time/temporal/TemporalAdjusters.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,444 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2012-2013, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package java.time.temporal;
+
+import static java.time.temporal.ChronoField.DAY_OF_MONTH;
+import static java.time.temporal.ChronoField.DAY_OF_WEEK;
+import static java.time.temporal.ChronoField.DAY_OF_YEAR;
+import static java.time.temporal.ChronoUnit.DAYS;
+import static java.time.temporal.ChronoUnit.MONTHS;
+import static java.time.temporal.ChronoUnit.YEARS;
+
+import java.time.DayOfWeek;
+import java.time.LocalDate;
+import java.util.Objects;
+import java.util.function.UnaryOperator;
+
+/**
+ * Implementations of the static methods in {@code TemporalAdjuster}
+ *
+ * @since 1.8
+ */
+final class TemporalAdjusters {
+    // work around compiler bug not allowing lambdas in static methods
+
+    private TemporalAdjusters() {
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Obtains a {@code TemporalAdjuster} that wraps a date adjuster.
+     * <p>
+     * The {@code TemporalAdjuster} is based on the low level {@code Temporal} interface.
+     * This method allows an adjustment from {@code LocalDate} to {@code LocalDate}
+     * to be wrapped to match the temporal-based interface.
+     * This is provided for convenience to make user-written adjusters simpler.
+     * <p>
+     * In general, user-written adjusters should be static constants:
+     * <pre>
+     *  public static TemporalAdjuster TWO_DAYS_LATER = TemporalAdjuster.ofDateAdjuster(
+     *    date -> date.plusDays(2));
+     * </pre>
+     *
+     * @param dateBasedAdjuster  the date-based adjuster, not null
+     * @return the temporal adjuster wrapping on the date adjuster, not null
+     */
+    static TemporalAdjuster ofDateAdjuster(UnaryOperator<LocalDate> dateBasedAdjuster) {
+        Objects.requireNonNull(dateBasedAdjuster, "dateBasedAdjuster");
+        return (temporal) -> {
+            LocalDate input = LocalDate.from(temporal);
+            LocalDate output = dateBasedAdjuster.apply(input);
+            return temporal.with(output);
+        };
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Returns the "first day of month" adjuster, which returns a new date set to
+     * the first day of the current month.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 will return 2011-01-01.<br>
+     * The input 2011-02-15 will return 2011-02-01.
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It is equivalent to:
+     * <pre>
+     *  temporal.with(DAY_OF_MONTH, 1);
+     * </pre>
+     *
+     * @return the first day-of-month adjuster, not null
+     */
+    static TemporalAdjuster firstDayOfMonth() {
+        return (temporal) -> temporal.with(DAY_OF_MONTH, 1);
+    }
+
+    /**
+     * Returns the "last day of month" adjuster, which returns a new date set to
+     * the last day of the current month.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 will return 2011-01-31.<br>
+     * The input 2011-02-15 will return 2011-02-28.<br>
+     * The input 2012-02-15 will return 2012-02-29 (leap year).<br>
+     * The input 2011-04-15 will return 2011-04-30.
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It is equivalent to:
+     * <pre>
+     *  long lastDay = temporal.range(DAY_OF_MONTH).getMaximum();
+     *  temporal.with(DAY_OF_MONTH, lastDay);
+     * </pre>
+     *
+     * @return the last day-of-month adjuster, not null
+     */
+    static TemporalAdjuster lastDayOfMonth() {
+        return (temporal) -> temporal.with(DAY_OF_MONTH, temporal.range(DAY_OF_MONTH).getMaximum());
+    }
+
+    /**
+     * Returns the "first day of next month" adjuster, which returns a new date set to
+     * the first day of the next month.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 will return 2011-02-01.<br>
+     * The input 2011-02-15 will return 2011-03-01.
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It is equivalent to:
+     * <pre>
+     *  temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS);
+     * </pre>
+     *
+     * @return the first day of next month adjuster, not null
+     */
+    static TemporalAdjuster firstDayOfNextMonth() {
+        return (temporal) -> temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Returns the "first day of year" adjuster, which returns a new date set to
+     * the first day of the current year.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 will return 2011-01-01.<br>
+     * The input 2011-02-15 will return 2011-01-01.<br>
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It is equivalent to:
+     * <pre>
+     *  temporal.with(DAY_OF_YEAR, 1);
+     * </pre>
+     *
+     * @return the first day-of-year adjuster, not null
+     */
+    static TemporalAdjuster firstDayOfYear() {
+        return (temporal) -> temporal.with(DAY_OF_YEAR, 1);
+    }
+
+    /**
+     * Returns the "last day of year" adjuster, which returns a new date set to
+     * the last day of the current year.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 will return 2011-12-31.<br>
+     * The input 2011-02-15 will return 2011-12-31.<br>
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It is equivalent to:
+     * <pre>
+     *  long lastDay = temporal.range(DAY_OF_YEAR).getMaximum();
+     *  temporal.with(DAY_OF_YEAR, lastDay);
+     * </pre>
+     *
+     * @return the last day-of-year adjuster, not null
+     */
+    static TemporalAdjuster lastDayOfYear() {
+        return (temporal) -> temporal.with(DAY_OF_YEAR, temporal.range(DAY_OF_YEAR).getMaximum());
+    }
+
+    /**
+     * Returns the "first day of next year" adjuster, which returns a new date set to
+     * the first day of the next year.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 will return 2012-01-01.
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It is equivalent to:
+     * <pre>
+     *  temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS);
+     * </pre>
+     *
+     * @return the first day of next month adjuster, not null
+     */
+    static TemporalAdjuster firstDayOfNextYear() {
+        return (temporal) -> temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Returns the first in month adjuster, which returns a new date
+     * in the same month with the first matching day-of-week.
+     * This is used for expressions like 'first Tuesday in March'.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-12-15 for (MONDAY) will return 2011-12-05.<br>
+     * The input 2011-12-15 for (FRIDAY) will return 2011-12-02.<br>
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It uses the {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields
+     * and the {@code DAYS} unit, and assumes a seven day week.
+     *
+     * @param dayOfWeek  the day-of-week, not null
+     * @return the first in month adjuster, not null
+     */
+    static TemporalAdjuster firstInMonth(DayOfWeek dayOfWeek) {
+        return TemporalAdjusters.dayOfWeekInMonth(1, dayOfWeek);
+    }
+
+    /**
+     * Returns the last in month adjuster, which returns a new date
+     * in the same month with the last matching day-of-week.
+     * This is used for expressions like 'last Tuesday in March'.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-12-15 for (MONDAY) will return 2011-12-26.<br>
+     * The input 2011-12-15 for (FRIDAY) will return 2011-12-30.<br>
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It uses the {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields
+     * and the {@code DAYS} unit, and assumes a seven day week.
+     *
+     * @param dayOfWeek  the day-of-week, not null
+     * @return the first in month adjuster, not null
+     */
+    static TemporalAdjuster lastInMonth(DayOfWeek dayOfWeek) {
+        return TemporalAdjusters.dayOfWeekInMonth(-1, dayOfWeek);
+    }
+
+    /**
+     * Returns the day-of-week in month adjuster, which returns a new date
+     * in the same month with the ordinal day-of-week.
+     * This is used for expressions like the 'second Tuesday in March'.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-12-15 for (1,TUESDAY) will return 2011-12-06.<br>
+     * The input 2011-12-15 for (2,TUESDAY) will return 2011-12-13.<br>
+     * The input 2011-12-15 for (3,TUESDAY) will return 2011-12-20.<br>
+     * The input 2011-12-15 for (4,TUESDAY) will return 2011-12-27.<br>
+     * The input 2011-12-15 for (5,TUESDAY) will return 2012-01-03.<br>
+     * The input 2011-12-15 for (-1,TUESDAY) will return 2011-12-27 (last in month).<br>
+     * The input 2011-12-15 for (-4,TUESDAY) will return 2011-12-06 (3 weeks before last in month).<br>
+     * The input 2011-12-15 for (-5,TUESDAY) will return 2011-11-29 (4 weeks before last in month).<br>
+     * The input 2011-12-15 for (0,TUESDAY) will return 2011-11-29 (last in previous month).<br>
+     * <p>
+     * For a positive or zero ordinal, the algorithm is equivalent to finding the first
+     * day-of-week that matches within the month and then adding a number of weeks to it.
+     * For a negative ordinal, the algorithm is equivalent to finding the last
+     * day-of-week that matches within the month and then subtracting a number of weeks to it.
+     * The ordinal number of weeks is not validated and is interpreted leniently
+     * according to this algorithm. This definition means that an ordinal of zero finds
+     * the last matching day-of-week in the previous month.
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It uses the {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields
+     * and the {@code DAYS} unit, and assumes a seven day week.
+     *
+     * @param ordinal  the week within the month, unbounded but typically from -5 to 5
+     * @param dayOfWeek  the day-of-week, not null
+     * @return the day-of-week in month adjuster, not null
+     */
+    static TemporalAdjuster dayOfWeekInMonth(int ordinal, DayOfWeek dayOfWeek) {
+        Objects.requireNonNull(dayOfWeek, "dayOfWeek");
+        int dowValue = dayOfWeek.getValue();
+        if (ordinal >= 0) {
+            return (temporal) -> {
+                Temporal temp = temporal.with(DAY_OF_MONTH, 1);
+                int curDow = temp.get(DAY_OF_WEEK);
+                int dowDiff = (dowValue - curDow + 7) % 7;
+                dowDiff += (ordinal - 1L) * 7L;  // safe from overflow
+                return temp.plus(dowDiff, DAYS);
+            };
+        } else {
+            return (temporal) -> {
+                Temporal temp = temporal.with(DAY_OF_MONTH, temporal.range(DAY_OF_MONTH).getMaximum());
+                int curDow = temp.get(DAY_OF_WEEK);
+                int daysDiff = dowValue - curDow;
+                daysDiff = (daysDiff == 0 ? 0 : (daysDiff > 0 ? daysDiff - 7 : daysDiff));
+                daysDiff -= (-ordinal - 1L) * 7L;  // safe from overflow
+                return temp.plus(daysDiff, DAYS);
+            };
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Returns the next day-of-week adjuster, which adjusts the date to the
+     * first occurrence of the specified day-of-week after the date being adjusted.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-17 (two days later).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-19 (four days later).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-22 (seven days later).
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit,
+     * and assumes a seven day week.
+     *
+     * @param dayOfWeek  the day-of-week to move the date to, not null
+     * @return the next day-of-week adjuster, not null
+     */
+    static TemporalAdjuster next(DayOfWeek dayOfWeek) {
+        int dowValue = dayOfWeek.getValue();
+        return (temporal) -> {
+            int calDow = temporal.get(DAY_OF_WEEK);
+            int daysDiff = calDow - dowValue;
+            return temporal.plus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, DAYS);
+        };
+    }
+
+    /**
+     * Returns the next-or-same day-of-week adjuster, which adjusts the date to the
+     * first occurrence of the specified day-of-week after the date being adjusted
+     * unless it is already on that day in which case the same object is returned.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-17 (two days later).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-19 (four days later).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-15 (same as input).
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit,
+     * and assumes a seven day week.
+     *
+     * @param dayOfWeek  the day-of-week to check for or move the date to, not null
+     * @return the next-or-same day-of-week adjuster, not null
+     */
+    static TemporalAdjuster nextOrSame(DayOfWeek dayOfWeek) {
+        int dowValue = dayOfWeek.getValue();
+        return (temporal) -> {
+            int calDow = temporal.get(DAY_OF_WEEK);
+            if (calDow == dowValue) {
+                return temporal;
+            }
+            int daysDiff = calDow - dowValue;
+            return temporal.plus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, DAYS);
+        };
+    }
+
+    /**
+     * Returns the previous day-of-week adjuster, which adjusts the date to the
+     * first occurrence of the specified day-of-week before the date being adjusted.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-10 (five days earlier).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-12 (three days earlier).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-08 (seven days earlier).
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit,
+     * and assumes a seven day week.
+     *
+     * @param dayOfWeek  the day-of-week to move the date to, not null
+     * @return the previous day-of-week adjuster, not null
+     */
+    static TemporalAdjuster previous(DayOfWeek dayOfWeek) {
+        int dowValue = dayOfWeek.getValue();
+        return (temporal) -> {
+            int calDow = temporal.get(DAY_OF_WEEK);
+            int daysDiff = dowValue - calDow;
+            return temporal.minus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, DAYS);
+        };
+    }
+
+    /**
+     * Returns the previous-or-same day-of-week adjuster, which adjusts the date to the
+     * first occurrence of the specified day-of-week before the date being adjusted
+     * unless it is already on that day in which case the same object is returned.
+     * <p>
+     * The ISO calendar system behaves as follows:<br>
+     * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-10 (five days earlier).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-12 (three days earlier).<br>
+     * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-15 (same as input).
+     * <p>
+     * The behavior is suitable for use with most calendar systems.
+     * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit,
+     * and assumes a seven day week.
+     *
+     * @param dayOfWeek  the day-of-week to check for or move the date to, not null
+     * @return the previous-or-same day-of-week adjuster, not null
+     */
+    static TemporalAdjuster previousOrSame(DayOfWeek dayOfWeek) {
+        int dowValue = dayOfWeek.getValue();
+        return (temporal) -> {
+            int calDow = temporal.get(DAY_OF_WEEK);
+            if (calDow == dowValue) {
+                return temporal;
+            }
+            int daysDiff = dowValue - calDow;
+            return temporal.minus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, DAYS);
+        };
+    }
+
+}
--- a/src/share/classes/java/time/temporal/TemporalAmount.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/temporal/TemporalAmount.java	Wed Apr 17 21:48:04 2013 -0700
@@ -75,7 +75,7 @@
  * to any specific point on the time-line.
  * <p>
  * The amount can be thought of as a {@code Map} of {@link TemporalUnit} to
- * {@code long}, exposed via {@link #getUnits()}and {@link #get(TemporalUnit)}.
+ * {@code long}, exposed via {@link #getUnits()} and {@link #get(TemporalUnit)}.
  * A simple case might have a single unit-value pair, such as "6 hours".
  * A more complex case may have multiple unit-value pairs, such as
  * "7 years, 3 months and 5 days".
@@ -111,9 +111,10 @@
      *
      * @param unit the {@code TemporalUnit} for which to return the value
      * @return the long value of the unit
-     * @throws DateTimeException if the {@code unit} is not supported
+     * @throws DateTimeException if a value for the unit cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the {@code unit} is not supported
      */
-    public long get(TemporalUnit unit);
+    long get(TemporalUnit unit);
 
     /**
      * Returns the list of units uniquely defining the value of this TemporalAmount.
@@ -130,7 +131,7 @@
      *
      * @return the List of {@code TemporalUnits}; not null
      */
-    public List<TemporalUnit> getUnits();
+    List<TemporalUnit> getUnits();
 
     /**
      * Adds to the specified temporal object.
@@ -162,7 +163,7 @@
      * <p>
      * The input temporal object may be in a calendar system other than ISO.
      * Implementations may choose to document compatibility with other calendar systems,
-     * or reject non-ISO temporal objects by {@link Queries#chronology() querying the chronology}.
+     * or reject non-ISO temporal objects by {@link TemporalQuery#chronology() querying the chronology}.
      * <p>
      * This method may be called from multiple threads in parallel.
      * It must be thread-safe when invoked.
@@ -172,7 +173,7 @@
      * @throws DateTimeException if unable to add
      * @throws ArithmeticException if numeric overflow occurs
      */
-    public Temporal addTo(Temporal temporal);
+    Temporal addTo(Temporal temporal);
 
     /**
      * Subtracts this object from the specified temporal object.
@@ -204,7 +205,7 @@
      * <p>
      * The input temporal object may be in a calendar system other than ISO.
      * Implementations may choose to document compatibility with other calendar systems,
-     * or reject non-ISO temporal objects by {@link Queries#chronology() querying the chronology}.
+     * or reject non-ISO temporal objects by {@link TemporalQuery#chronology() querying the chronology}.
      * <p>
      * This method may be called from multiple threads in parallel.
      * It must be thread-safe when invoked.
@@ -214,5 +215,5 @@
      * @throws DateTimeException if unable to subtract
      * @throws ArithmeticException if numeric overflow occurs
      */
-    public Temporal subtractFrom(Temporal temporal);
+    Temporal subtractFrom(Temporal temporal);
 }
--- a/src/share/classes/java/time/temporal/TemporalField.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/temporal/TemporalField.java	Wed Apr 17 21:48:04 2013 -0700
@@ -62,8 +62,10 @@
 package java.time.temporal;
 
 import java.time.DateTimeException;
-import java.util.Comparator;
+import java.time.format.ResolverStyle;
+import java.util.Locale;
 import java.util.Map;
+import java.util.Objects;
 
 /**
  * A field of date-time, such as month-of-year or hour-of-minute.
@@ -88,7 +90,7 @@
  *
  * @since 1.8
  */
-public interface TemporalField extends Comparator<TemporalAccessor> {
+public interface TemporalField {
 
     /**
      * Gets a descriptive name for the field.
@@ -102,6 +104,21 @@
     String getName();
 
     /**
+     * Gets the display name for the field in the requested locale.
+     * <p>
+     * If there is no display name for the locale the value of {@code getName}
+     * is returned.
+     *
+     * @param locale  the locale to use, not null
+     * @return the display name for the locale or the value of {@code getName},
+     *     not null
+     */
+    default String getDisplayName(Locale locale) {
+        Objects.requireNonNull(locale, "local");
+        return getName();
+    }
+
+    /**
      * Gets the unit that the field is measured in.
      * <p>
      * The unit of the field is the period that varies within the range.
@@ -126,28 +143,6 @@
      */
     TemporalUnit getRangeUnit();
 
-    //-----------------------------------------------------------------------
-    /**
-     * Compares the value of this field in two temporal objects.
-     * <p>
-     * All fields implement {@link Comparator} on {@link TemporalAccessor}.
-     * This allows a list of date-times to be compared using the value of a field.
-     * For example, you could sort a list of arbitrary temporal objects by the value of
-     * the month-of-year field - {@code Collections.sort(list, MONTH_OF_YEAR)}
-     * <p>
-     * The default implementation must behave equivalent to this code:
-     * <pre>
-     *  return Long.compare(temporal1.getLong(this), temporal2.getLong(this));
-     * </pre>
-     *
-     * @param temporal1  the first temporal object to compare, not null
-     * @param temporal2  the second temporal object to compare, not null
-     * @throws DateTimeException if unable to obtain the value for this field
-     */
-    public default int compare(TemporalAccessor temporal1, TemporalAccessor temporal2) {
-         return Long.compare(temporal1.getLong(this), temporal2.getLong(this));
-    }
-
     /**
      * Gets the range of valid values for the field.
      * <p>
@@ -165,6 +160,35 @@
 
     //-----------------------------------------------------------------------
     /**
+     * Checks if this field represents a component of a date.
+     * <p>
+     * A field is date-based if it can be derived from
+     * {@link ChronoField#EPOCH_DAY EPOCH_DAY}.
+     * <p>
+     * The default implementation must return false.
+     *
+     * @return true if this field is a component of a date
+     */
+    default boolean isDateBased() {
+        return false;
+    }
+
+    /**
+     * Checks if this field represents a component of a time.
+     * <p>
+     * A field is time-based if it can be derived from
+     * {@link ChronoField#NANO_OF_DAY NANO_OF_DAY}.
+     * <p>
+     * The default implementation must return false.
+     *
+     * @return true if this field is a component of a time
+     */
+    default boolean isTimeBased() {
+        return false;
+    }
+
+    //-----------------------------------------------------------------------
+    /**
      * Checks if this field is supported by the temporal object.
      * <p>
      * This determines whether the temporal accessor supports this field.
@@ -213,11 +237,12 @@
      * <p>
      * Implementations should perform any queries or calculations using the fields
      * available in {@link ChronoField}.
-     * If the field is not supported a {@code DateTimeException} must be thrown.
+     * If the field is not supported an {@code UnsupportedTemporalTypeException} must be thrown.
      *
      * @param temporal  the temporal object used to refine the result, not null
      * @return the range of valid values for this field, not null
      * @throws DateTimeException if the range for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported by the temporal
      */
     ValueRange rangeRefinedBy(TemporalAccessor temporal);
 
@@ -240,11 +265,12 @@
      * <p>
      * Implementations should perform any queries or calculations using the fields
      * available in {@link ChronoField}.
-     * If the field is not supported a {@code DateTimeException} must be thrown.
+     * If the field is not supported an {@code UnsupportedTemporalTypeException} must be thrown.
      *
      * @param temporal  the temporal object to query, not null
      * @return the value of this field, not null
      * @throws DateTimeException if a value for the field cannot be obtained
+     * @throws UnsupportedTemporalTypeException if the field is not supported by the temporal
      * @throws ArithmeticException if numeric overflow occurs
      */
     long getFrom(TemporalAccessor temporal);
@@ -276,7 +302,7 @@
      * <p>
      * Implementations should perform any queries or calculations using the fields
      * available in {@link ChronoField}.
-     * If the field is not supported a {@code DateTimeException} must be thrown.
+     * If the field is not supported an {@code UnsupportedTemporalTypeException} must be thrown.
      * <p>
      * Implementations must not alter the specified temporal object.
      * Instead, an adjusted copy of the original must be returned.
@@ -287,6 +313,7 @@
      * @param newValue the new value of the field
      * @return the adjusted temporal object, not null
      * @throws DateTimeException if the field cannot be set
+     * @throws UnsupportedTemporalTypeException if the field is not supported by the temporal
      * @throws ArithmeticException if numeric overflow occurs
      */
     <R extends Temporal> R adjustInto(R temporal, long newValue);
@@ -314,17 +341,22 @@
      * If the result is non-null, this field will be removed from the temporal.
      * This field should not be added to the result map.
      * <p>
+     * The {@link ResolverStyle} should be used by implementations to determine
+     * how to perform the resolve.
+     * <p>
      * The default implementation must return null.
      *
      * @param temporal  the temporal to resolve, not null
      * @param value  the value of this field
+     * @param resolverStyle  the requested type of resolve, not null
      * @return a map of fields to update in the temporal, with a mapping to null
      *  indicating a deletion. The whole map must be null if no resolving occurred
      * @throws DateTimeException if resolving results in an error. This must not be thrown
      *  by querying a field on the temporal without first checking if it is supported
      * @throws ArithmeticException if numeric overflow occurs
      */
-    public default Map<TemporalField, Long> resolve(TemporalAccessor temporal, long value) {
+    default Map<TemporalField, Long> resolve(
+            TemporalAccessor temporal, long value, ResolverStyle resolverStyle) {
         return null;
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/time/temporal/TemporalQueries.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package java.time.temporal;
+
+import static java.time.temporal.ChronoField.EPOCH_DAY;
+import static java.time.temporal.ChronoField.NANO_OF_DAY;
+import static java.time.temporal.ChronoField.OFFSET_SECONDS;
+
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.chrono.Chronology;
+
+/**
+ * Common implementations of {@code TemporalQuery}.
+ * <p>
+ * This class provides common implementations of {@link TemporalQuery}.
+ * These are defined here as they must be constants, and the definition
+ * of lambdas does not guarantee that. By assigning them once here,
+ * they become 'normal' Java constants.
+ *
+ * @since 1.8
+ */
+final class TemporalQueries {
+    // note that it is vital that each method supplies a constant, not a
+    // calculated value, as they will be checked for using ==
+    // it is also vital that each constant is different (due to the == checking)
+    // as such, alterations to this code must be done with care
+
+    /**
+     * Private constructor since this is a utility class.
+     */
+    private TemporalQueries() {
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * A strict query for the {@code ZoneId}.
+     */
+    static final TemporalQuery<ZoneId> ZONE_ID = (temporal) -> {
+        return temporal.query(ZONE_ID);
+    };
+
+    /**
+     * A query for the {@code Chronology}.
+     */
+    static final TemporalQuery<Chronology> CHRONO = (temporal) -> {
+        return temporal.query(CHRONO);
+    };
+
+    /**
+     * A query for the smallest supported unit.
+     */
+    static final TemporalQuery<TemporalUnit> PRECISION = (temporal) -> {
+        return temporal.query(PRECISION);
+    };
+
+    //-----------------------------------------------------------------------
+    /**
+     * A lenient query for the {@code ZoneId}, falling back to the {@code ZoneOffset}.
+     */
+    static final TemporalQuery<ZoneId> ZONE = (temporal) -> {
+        ZoneId zone = temporal.query(ZONE_ID);
+        return (zone != null ? zone : temporal.query(OFFSET));
+    };
+
+    /**
+     * A query for {@code ZoneOffset} returning null if not found.
+     */
+    static final TemporalQuery<ZoneOffset> OFFSET = (temporal) -> {
+        if (temporal.isSupported(OFFSET_SECONDS)) {
+            return ZoneOffset.ofTotalSeconds(temporal.get(OFFSET_SECONDS));
+        }
+        return null;
+    };
+
+    /**
+     * A query for {@code LocalDate} returning null if not found.
+     */
+    static final TemporalQuery<LocalDate> LOCAL_DATE = (temporal) -> {
+        if (temporal.isSupported(EPOCH_DAY)) {
+            return LocalDate.ofEpochDay(temporal.getLong(EPOCH_DAY));
+        }
+        return null;
+    };
+
+    /**
+     * A query for {@code LocalTime} returning null if not found.
+     */
+    static final TemporalQuery<LocalTime> LOCAL_TIME = (temporal) -> {
+        if (temporal.isSupported(NANO_OF_DAY)) {
+            return LocalTime.ofNanoOfDay(temporal.getLong(NANO_OF_DAY));
+        }
+        return null;
+    };
+
+}
--- a/src/share/classes/java/time/temporal/TemporalQuery.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/temporal/TemporalQuery.java	Wed Apr 17 21:48:04 2013 -0700
@@ -62,6 +62,11 @@
 package java.time.temporal;
 
 import java.time.DateTimeException;
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.chrono.Chronology;
 
 /**
  * Strategy for querying a temporal object.
@@ -89,8 +94,7 @@
  * <p>
  * The most common implementations are method references, such as
  * {@code LocalDate::from} and {@code ZoneId::from}.
- * Further implementations are on {@link Queries}.
- * Queries may also be defined by applications.
+ * Additional common implementations are provided on this interface as static methods.
  *
  * <h3>Specification for implementors</h3>
  * This interface places no restrictions on the mutability of implementations,
@@ -129,7 +133,7 @@
      * <p>
      * The input temporal object may be in a calendar system other than ISO.
      * Implementations may choose to document compatibility with other calendar systems,
-     * or reject non-ISO temporal objects by {@link Queries#chronology() querying the chronology}.
+     * or reject non-ISO temporal objects by {@link TemporalQuery#chronology() querying the chronology}.
      * <p>
      * This method may be called from multiple threads in parallel.
      * It must be thread-safe when invoked.
@@ -141,4 +145,214 @@
      */
     R queryFrom(TemporalAccessor temporal);
 
+    //-----------------------------------------------------------------------
+    // special constants should be used to extract information from a TemporalAccessor
+    // that cannot be derived in other ways
+    // Javadoc added here, so as to pretend they are more normal than they really are
+
+    /**
+     * A strict query for the {@code ZoneId}.
+     * <p>
+     * This queries a {@code TemporalAccessor} for the zone.
+     * The zone is only returned if the date-time conceptually contains a {@code ZoneId}.
+     * It will not be returned if the date-time only conceptually has an {@code ZoneOffset}.
+     * Thus a {@link java.time.ZonedDateTime} will return the result of {@code getZone()},
+     * but an {@link java.time.OffsetDateTime} will return null.
+     * <p>
+     * In most cases, applications should use {@link #zone()} as this query is too strict.
+     * <p>
+     * The result from JDK classes implementing {@code TemporalAccessor} is as follows:<br>
+     * {@code LocalDate} returns null<br>
+     * {@code LocalTime} returns null<br>
+     * {@code LocalDateTime} returns null<br>
+     * {@code ZonedDateTime} returns the associated zone<br>
+     * {@code OffsetTime} returns null<br>
+     * {@code OffsetDateTime} returns null<br>
+     * {@code ChronoLocalDate} returns null<br>
+     * {@code ChronoLocalDateTime} returns null<br>
+     * {@code ChronoZonedDateTime} returns the associated zone<br>
+     * {@code Era} returns null<br>
+     * {@code DayOfWeek} returns null<br>
+     * {@code Month} returns null<br>
+     * {@code Year} returns null<br>
+     * {@code YearMonth} returns null<br>
+     * {@code MonthDay} returns null<br>
+     * {@code ZoneOffset} returns null<br>
+     * {@code Instant} returns null<br>
+     *
+     * @return a query that can obtain the zone ID of a temporal, not null
+     */
+    static TemporalQuery<ZoneId> zoneId() {
+        return TemporalQueries.ZONE_ID;
+    }
+
+    /**
+     * A query for the {@code Chronology}.
+     * <p>
+     * This queries a {@code TemporalAccessor} for the chronology.
+     * If the target {@code TemporalAccessor} represents a date, or part of a date,
+     * then it should return the chronology that the date is expressed in.
+     * As a result of this definition, objects only representing time, such as
+     * {@code LocalTime}, will return null.
+     * <p>
+     * The result from JDK classes implementing {@code TemporalAccessor} is as follows:<br>
+     * {@code LocalDate} returns {@code IsoChronology.INSTANCE}<br>
+     * {@code LocalTime} returns null (does not represent a date)<br>
+     * {@code LocalDateTime} returns {@code IsoChronology.INSTANCE}<br>
+     * {@code ZonedDateTime} returns {@code IsoChronology.INSTANCE}<br>
+     * {@code OffsetTime} returns null (does not represent a date)<br>
+     * {@code OffsetDateTime} returns {@code IsoChronology.INSTANCE}<br>
+     * {@code ChronoLocalDate} returns the associated chronology<br>
+     * {@code ChronoLocalDateTime} returns the associated chronology<br>
+     * {@code ChronoZonedDateTime} returns the associated chronology<br>
+     * {@code Era} returns the associated chronology<br>
+     * {@code DayOfWeek} returns null (shared across chronologies)<br>
+     * {@code Month} returns {@code IsoChronology.INSTANCE}<br>
+     * {@code Year} returns {@code IsoChronology.INSTANCE}<br>
+     * {@code YearMonth} returns {@code IsoChronology.INSTANCE}<br>
+     * {@code MonthDay} returns null {@code IsoChronology.INSTANCE}<br>
+     * {@code ZoneOffset} returns null (does not represent a date)<br>
+     * {@code Instant} returns null (does not represent a date)<br>
+     * <p>
+     * The method {@link java.time.chrono.Chronology#from(TemporalAccessor)} can be used as a
+     * {@code TemporalQuery} via a method reference, {@code Chronology::from}.
+     * That method is equivalent to this query, except that it throws an
+     * exception if a chronology cannot be obtained.
+     *
+     * @return a query that can obtain the chronology of a temporal, not null
+     */
+    static TemporalQuery<Chronology> chronology() {
+        return TemporalQueries.CHRONO;
+    }
+
+    /**
+     * A query for the smallest supported unit.
+     * <p>
+     * This queries a {@code TemporalAccessor} for the time precision.
+     * If the target {@code TemporalAccessor} represents a consistent or complete date-time,
+     * date or time then this must return the smallest precision actually supported.
+     * Note that fields such as {@code NANO_OF_DAY} and {@code NANO_OF_SECOND}
+     * are defined to always return ignoring the precision, thus this is the only
+     * way to find the actual smallest supported unit.
+     * For example, were {@code GregorianCalendar} to implement {@code TemporalAccessor}
+     * it would return a precision of {@code MILLIS}.
+     * <p>
+     * The result from JDK classes implementing {@code TemporalAccessor} is as follows:<br>
+     * {@code LocalDate} returns {@code DAYS}<br>
+     * {@code LocalTime} returns {@code NANOS}<br>
+     * {@code LocalDateTime} returns {@code NANOS}<br>
+     * {@code ZonedDateTime} returns {@code NANOS}<br>
+     * {@code OffsetTime} returns {@code NANOS}<br>
+     * {@code OffsetDateTime} returns {@code NANOS}<br>
+     * {@code ChronoLocalDate} returns {@code DAYS}<br>
+     * {@code ChronoLocalDateTime} returns {@code NANOS}<br>
+     * {@code ChronoZonedDateTime} returns {@code NANOS}<br>
+     * {@code Era} returns {@code ERAS}<br>
+     * {@code DayOfWeek} returns {@code DAYS}<br>
+     * {@code Month} returns {@code MONTHS}<br>
+     * {@code Year} returns {@code YEARS}<br>
+     * {@code YearMonth} returns {@code MONTHS}<br>
+     * {@code MonthDay} returns null (does not represent a complete date or time)<br>
+     * {@code ZoneOffset} returns null (does not represent a date or time)<br>
+     * {@code Instant} returns {@code NANOS}<br>
+     *
+     * @return a query that can obtain the precision of a temporal, not null
+     */
+    static TemporalQuery<TemporalUnit> precision() {
+        return TemporalQueries.PRECISION;
+    }
+
+    //-----------------------------------------------------------------------
+    // non-special constants are standard queries that derive information from other information
+    /**
+     * A lenient query for the {@code ZoneId}, falling back to the {@code ZoneOffset}.
+     * <p>
+     * This queries a {@code TemporalAccessor} for the zone.
+     * It first tries to obtain the zone, using {@link #zoneId()}.
+     * If that is not found it tries to obtain the {@link #offset()}.
+     * Thus a {@link java.time.ZonedDateTime} will return the result of {@code getZone()},
+     * while an {@link java.time.OffsetDateTime} will return the result of {@code getOffset()}.
+     * <p>
+     * In most cases, applications should use this query rather than {@code #zoneId()}.
+     * <p>
+     * The method {@link ZoneId#from(TemporalAccessor)} can be used as a
+     * {@code TemporalQuery} via a method reference, {@code ZoneId::from}.
+     * That method is equivalent to this query, except that it throws an
+     * exception if a zone cannot be obtained.
+     *
+     * @return a query that can obtain the zone ID or offset of a temporal, not null
+     */
+    static TemporalQuery<ZoneId> zone() {
+        return TemporalQueries.ZONE;
+    }
+
+    /**
+     * A query for {@code ZoneOffset} returning null if not found.
+     * <p>
+     * This returns a {@code TemporalQuery} that can be used to query a temporal
+     * object for the offset. The query will return null if the temporal
+     * object cannot supply an offset.
+     * <p>
+     * The query implementation examines the {@link ChronoField#OFFSET_SECONDS OFFSET_SECONDS}
+     * field and uses it to create a {@code ZoneOffset}.
+     * <p>
+     * The method {@link java.time.ZoneOffset#from(TemporalAccessor)} can be used as a
+     * {@code TemporalQuery} via a method reference, {@code ZoneOffset::from}.
+     * This query and {@code ZoneOffset::from} will return the same result if the
+     * temporal object contains an offset. If the temporal object does not contain
+     * an offset, then the method reference will throw an exception, whereas this
+     * query will return null.
+     *
+     * @return a query that can obtain the offset of a temporal, not null
+     */
+    static TemporalQuery<ZoneOffset> offset() {
+        return TemporalQueries.OFFSET;
+    }
+
+    /**
+     * A query for {@code LocalDate} returning null if not found.
+     * <p>
+     * This returns a {@code TemporalQuery} that can be used to query a temporal
+     * object for the local date. The query will return null if the temporal
+     * object cannot supply a local date.
+     * <p>
+     * The query implementation examines the {@link ChronoField#EPOCH_DAY EPOCH_DAY}
+     * field and uses it to create a {@code LocalDate}.
+     * <p>
+     * The method {@link ZoneOffset#from(TemporalAccessor)} can be used as a
+     * {@code TemporalQuery} via a method reference, {@code LocalDate::from}.
+     * This query and {@code LocalDate::from} will return the same result if the
+     * temporal object contains a date. If the temporal object does not contain
+     * a date, then the method reference will throw an exception, whereas this
+     * query will return null.
+     *
+     * @return a query that can obtain the date of a temporal, not null
+     */
+    static TemporalQuery<LocalDate> localDate() {
+        return TemporalQueries.LOCAL_DATE;
+    }
+
+    /**
+     * A query for {@code LocalTime} returning null if not found.
+     * <p>
+     * This returns a {@code TemporalQuery} that can be used to query a temporal
+     * object for the local time. The query will return null if the temporal
+     * object cannot supply a local time.
+     * <p>
+     * The query implementation examines the {@link ChronoField#NANO_OF_DAY NANO_OF_DAY}
+     * field and uses it to create a {@code LocalTime}.
+     * <p>
+     * The method {@link ZoneOffset#from(TemporalAccessor)} can be used as a
+     * {@code TemporalQuery} via a method reference, {@code LocalTime::from}.
+     * This query and {@code LocalTime::from} will return the same result if the
+     * temporal object contains a time. If the temporal object does not contain
+     * a time, then the method reference will throw an exception, whereas this
+     * query will return null.
+     *
+     * @return a query that can obtain the time of a temporal, not null
+     */
+    static TemporalQuery<LocalTime> localTime() {
+        return TemporalQueries.LOCAL_TIME;
+    }
+
 }
--- a/src/share/classes/java/time/temporal/TemporalUnit.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/temporal/TemporalUnit.java	Wed Apr 17 21:48:04 2013 -0700
@@ -143,10 +143,12 @@
      * @param temporal  the temporal object to check, not null
      * @return true if the unit is supported
      */
-    public default boolean isSupportedBy(Temporal temporal) {
+    default boolean isSupportedBy(Temporal temporal) {
         try {
             temporal.plus(1, this);
             return true;
+        } catch (UnsupportedTemporalTypeException ex) {
+            return false;
         } catch (RuntimeException ex) {
             try {
                 temporal.plus(-1, this);
@@ -178,7 +180,7 @@
      * <p>
      * Implementations should perform any queries or calculations using the units
      * available in {@link ChronoUnit} or the fields available in {@link ChronoField}.
-     * If the unit is not supported a {@code DateTimeException} must be thrown.
+     * If the unit is not supported an {@code UnsupportedTemporalTypeException} must be thrown.
      * <p>
      * Implementations must not alter the specified temporal object.
      * Instead, an adjusted copy of the original must be returned.
@@ -189,6 +191,7 @@
      * @param amount  the amount of this unit to add, positive or negative
      * @return the adjusted temporal object, not null
      * @throws DateTimeException if the period cannot be added
+     * @throws UnsupportedTemporalTypeException if the unit is not supported by the temporal
      */
     <R extends Temporal> R addTo(R temporal, long amount);
 
@@ -214,8 +217,8 @@
      * The second is to use {@link Temporal#periodUntil(Temporal, TemporalUnit)}:
      * <pre>
      *   // these two lines are equivalent
-     *   temporal = thisUnit.between(start, end);
-     *   temporal = start.periodUntil(end, thisUnit);
+     *   between = thisUnit.between(start, end);
+     *   between = start.periodUntil(end, thisUnit);
      * </pre>
      * The choice should be made based on which makes the code more readable.
      * <p>
@@ -229,14 +232,15 @@
      * <p>
      * Implementations should perform any queries or calculations using the units
      * available in {@link ChronoUnit} or the fields available in {@link ChronoField}.
-     * If the unit is not supported a {@code DateTimeException} must be thrown.
+     * If the unit is not supported an {@code UnsupportedTemporalTypeException} must be thrown.
      * Implementations must not alter the specified temporal objects.
      *
      * @param temporal1  the base temporal object, not null
      * @param temporal2  the other temporal object, not null
-     * @return the period between datetime1 and datetime2 in terms of this unit;
-     *  positive if datetime2 is later than datetime1, negative if earlier
+     * @return the period between temporal1 and temporal2 in terms of this unit;
+     *  positive if temporal2 is later than temporal1, negative if earlier
      * @throws DateTimeException if the period cannot be calculated
+     * @throws UnsupportedTemporalTypeException if the unit is not supported by the temporal
      * @throws ArithmeticException if numeric overflow occurs
      */
     long between(Temporal temporal1, Temporal temporal2);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/time/temporal/UnsupportedTemporalTypeException.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2013, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package java.time.temporal;
+
+import java.time.DateTimeException;
+
+/**
+ * UnsupportedTemporalTypeException indicates that a ChronoField or ChronoUnit is
+ * not supported for a Temporal class.
+ *
+ * <h3>Specification for implementors</h3>
+ * This class is intended for use in a single thread.
+ *
+ * @since 1.8
+ */
+public class UnsupportedTemporalTypeException extends DateTimeException {
+
+    /**
+     * Serialization version.
+     */
+    private static final long serialVersionUID = -6158898438688206006L;
+
+    /**
+     * Constructs a new UnsupportedTemporalTypeException with the specified message.
+     *
+     * @param message  the message to use for this exception, may be null
+     */
+    public UnsupportedTemporalTypeException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructs a new UnsupportedTemporalTypeException with the specified message and cause.
+     *
+     * @param message  the message to use for this exception, may be null
+     * @param cause  the cause of the exception, may be null
+     */
+    public UnsupportedTemporalTypeException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+}
--- a/src/share/classes/java/time/temporal/ValueRange.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/temporal/ValueRange.java	Wed Apr 17 21:48:04 2013 -0700
@@ -305,11 +305,7 @@
      */
     public long checkValidValue(long value, TemporalField field) {
         if (isValidValue(value) == false) {
-            if (field != null) {
-                throw new DateTimeException("Invalid value for " + field.getName() + " (valid values " + this + "): " + value);
-            } else {
-                throw new DateTimeException("Invalid value (valid values " + this + "): " + value);
-            }
+            throw new DateTimeException(genInvalidFieldMessage(field, value));
         }
         return value;
     }
@@ -328,11 +324,19 @@
      */
     public int checkValidIntValue(long value, TemporalField field) {
         if (isValidIntValue(value) == false) {
-            throw new DateTimeException("Invalid int value for " + field.getName() + ": " + value);
+            throw new DateTimeException(genInvalidFieldMessage(field, value));
         }
         return (int) value;
     }
 
+    private String genInvalidFieldMessage(TemporalField field, long value) {
+        if (field != null) {
+            return "Invalid value for " + field.getName() + " (valid values " + this + "): " + value;
+        } else {
+            return "Invalid value (valid values " + this + "): " + value;
+        }
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Checks if this range is equal to another range.
--- a/src/share/classes/java/time/temporal/WeekFields.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/temporal/WeekFields.java	Wed Apr 17 21:48:04 2013 -0700
@@ -68,6 +68,7 @@
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
 import static java.time.temporal.ChronoField.YEAR;
 import static java.time.temporal.ChronoUnit.DAYS;
+import static java.time.temporal.ChronoUnit.FOREVER;
 import static java.time.temporal.ChronoUnit.MONTHS;
 import static java.time.temporal.ChronoUnit.WEEKS;
 import static java.time.temporal.ChronoUnit.YEARS;
@@ -77,14 +78,18 @@
 import java.time.DayOfWeek;
 import java.time.chrono.ChronoLocalDate;
 import java.time.chrono.Chronology;
+import java.time.format.ResolverStyle;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Objects;
+import java.util.ResourceBundle;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import sun.util.locale.provider.CalendarDataUtility;
+import sun.util.locale.provider.LocaleProviderAdapter;
+import sun.util.locale.provider.LocaleResources;
 
 /**
  * Localized definitions of the day-of-week, week-of-month and week-of-year fields.
@@ -93,8 +98,9 @@
  * other aspects of a week. This class represents the definition of the week, for the
  * purpose of providing {@link TemporalField} instances.
  * <p>
- * WeekFields provides three fields,
- * {@link #dayOfWeek()}, {@link #weekOfMonth()}, and {@link #weekOfYear()}
+ * WeekFields provides five fields,
+ * {@link #dayOfWeek()}, {@link #weekOfMonth()}, {@link #weekOfYear()},
+ * {@link #weekOfWeekBasedYear()}, and {@link #weekBasedYear()}
  * that provide access to the values from any {@linkplain Temporal temporal object}.
  * <p>
  * The computations for day-of-week, week-of-month, and week-of-year are based
@@ -110,7 +116,7 @@
  * <li>The first day-of-week.
  * For example, the ISO-8601 standard considers Monday to be the first day-of-week.
  * <li>The minimal number of days in the first week.
- * For example, the ISO-08601 standard counts the first week as needing at least 4 days.
+ * For example, the ISO-8601 standard counts the first week as needing at least 4 days.
  * </ul><p>
  * Together these two values allow a year or month to be divided into weeks.
  * <p>
@@ -134,14 +140,37 @@
  * <tr><th>2009-01-05</th><td>Monday</td>
  *  <td>Week 2 of January 2009</td><td>Week 1 of January 2009</td></tr>
  * </table>
- * <p>
+ *
  * <h3>Week of Year</h3>
  * One field is used: week-of-year.
  * The calculation ensures that weeks never overlap a year boundary.
  * The year is divided into periods where each period starts on the defined first day-of-week.
  * The earliest period is referred to as week 0 if it has less than the minimal number of days
  * and week 1 if it has at least the minimal number of days.
- * <p>
+ *
+ * <h3>Week Based Year</h3>
+ * Two fields are used for week-based-year, one for the
+ * {@link #weekOfWeekBasedYear() week-of-week-based-year} and one for
+ * {@link #weekBasedYear() week-based-year}.  In a week-based-year, each week
+ * belongs to only a single year.  Week 1 of a year is the first week that
+ * starts on the first day-of-week and has at least the minimum number of days.
+ * The first and last weeks of a year may contain days from the
+ * previous calendar year or next calendar year respectively.
+ *
+ * <table cellpadding="0" cellspacing="3" border="0" style="text-align: left; width: 50%;">
+ * <caption>Examples of WeekFields for week-based-year</caption>
+ * <tr><th>Date</th><td>Day-of-week</td>
+ *  <td>First day: Monday<br>Minimal days: 4</td><td>First day: Monday<br>Minimal days: 5</td></tr>
+ * <tr><th>2008-12-31</th><td>Wednesday</td>
+ *  <td>Week 1 of 2009</td><td>Week 53 of 2008</td></tr>
+ * <tr><th>2009-01-01</th><td>Thursday</td>
+ *  <td>Week 1 of 2009</td><td>Week 53 of 2008</td></tr>
+ * <tr><th>2009-01-04</th><td>Sunday</td>
+ *  <td>Week 1 of 2009</td><td>Week 53 of 2008</td></tr>
+ * <tr><th>2009-01-05</th><td>Monday</td>
+ *  <td>Week 2 of 2009</td><td>Week 1 of 2009</td></tr>
+ * </table>
+ * <h3>Specification for implementors</h3>
  * This class is immutable and thread-safe.
  *
  * @since 1.8
@@ -171,19 +200,41 @@
      * Note that the first week may start in the previous calendar year.
      * Note also that the first few days of a calendar year may be in the
      * week-based-year corresponding to the previous calendar year.
+     * <p>
+     * This field is an immutable and thread-safe singleton.
      */
     public static final WeekFields ISO = new WeekFields(DayOfWeek.MONDAY, 4);
 
     /**
-     * The common definition of a week that starts on Sunday.
+     * The common definition of a week that starts on Sunday and the first week
+     * has a minimum of 1 day.
      * <p>
      * Defined as starting on Sunday and with a minimum of 1 day in the month.
      * This week definition is in use in the US and other European countries.
-     *
+     * <p>
+     * This field is an immutable and thread-safe singleton.
      */
     public static final WeekFields SUNDAY_START = WeekFields.of(DayOfWeek.SUNDAY, 1);
 
     /**
+     * The unit that represents week-based-years for the purpose of addition and subtraction.
+     * <p>
+     * This allows a number of week-based-years to be added to, or subtracted from, a date.
+     * The unit is equal to either 52 or 53 weeks.
+     * The estimated duration of a week-based-year is the same as that of a standard ISO
+     * year at {@code 365.2425 Days}.
+     * <p>
+     * The rules for addition add the number of week-based-years to the existing value
+     * for the week-based-year field retaining the week-of-week-based-year
+     * and day-of-week, unless the week number it too large for the target year.
+     * In that case, the week is set to the last week of the year
+     * with the same day-of-week.
+     * <p>
+     * This field is an immutable and thread-safe singleton.
+     */
+    public static final TemporalUnit WEEK_BASED_YEARS = IsoFields.WEEK_BASED_YEARS;
+
+    /**
      * Serialization version.
      */
     private static final long serialVersionUID = -1177360819670808121L;
@@ -213,6 +264,24 @@
     private transient final TemporalField weekOfYear = ComputedDayOfField.ofWeekOfYearField(this);
 
     /**
+     * The field that represents the week-of-week-based-year.
+     * <p>
+     * This field allows the week of the week-based-year value to be queried and set.
+     * <p>
+     * This unit is an immutable and thread-safe singleton.
+     */
+    private transient final TemporalField weekOfWeekBasedYear = ComputedDayOfField.ofWeekOfWeekBasedYearField(this);
+
+    /**
+     * The field that represents the week-based-year.
+     * <p>
+     * This field allows the week-based-year value to be queried and set.
+     * <p>
+     * This unit is an immutable and thread-safe singleton.
+     */
+    private transient final TemporalField weekBasedYear = ComputedDayOfField.ofWeekBasedYearField(this);
+
+    /**
      * Obtains an instance of {@code WeekFields} appropriate for a locale.
      * <p>
      * This will look up appropriate values from the provider of localization data.
@@ -341,7 +410,7 @@
      * Returns a field to access the week of month,
      * computed based on this WeekFields.
      * <p>
-     * This represents concept of the count of weeks within the month where weeks
+     * This represents the concept of the count of weeks within the month where weeks
      * start on a fixed day-of-week, such as Monday.
      * This field is typically used with {@link WeekFields#dayOfWeek()}.
      * <p>
@@ -367,12 +436,12 @@
      * Returns a field to access the week of year,
      * computed based on this WeekFields.
      * <p>
-     * This represents concept of the count of weeks within the year where weeks
+     * This represents the concept of the count of weeks within the year where weeks
      * start on a fixed day-of-week, such as Monday.
      * This field is typically used with {@link WeekFields#dayOfWeek()}.
      * <p>
      * Week one(1) is the week starting on the {@link WeekFields#getFirstDayOfWeek}
-     * where there are at least {@link WeekFields#getMinimalDaysInFirstWeek()} days in the month.
+     * where there are at least {@link WeekFields#getMinimalDaysInFirstWeek()} days in the year.
      * Thus, week one may start up to {@code minDays} days before the start of the year.
      * If the first week starts after the start of the year then the period before is week zero (0).
      * <p>
@@ -390,7 +459,59 @@
     }
 
     /**
-     * Checks if these rules are equal to the specified rules.
+     * Returns a field to access the week of a week-based-year,
+     * computed based on this WeekFields.
+     * <p>
+     * This represents the concept of the count of weeks within the year where weeks
+     * start on a fixed day-of-week, such as Monday and each week belongs to exactly one year.
+     * This field is typically used with {@link WeekFields#dayOfWeek()} and
+     * {@link WeekFields#weekBasedYear()}.
+     * <p>
+     * Week one(1) is the week starting on the {@link WeekFields#getFirstDayOfWeek}
+     * where there are at least {@link WeekFields#getMinimalDaysInFirstWeek()} days in the year.
+     * If the first week starts after the start of the year then the period before
+     * is in the last week of the previous year.
+     * <p>
+     * For example:<br>
+     * - if the 1st day of the year is a Monday, week one starts on the 1st<br>
+     * - if the 2nd day of the year is a Monday, week one starts on the 2nd and
+     *   the 1st is in the last week of the previous year<br>
+     * - if the 4th day of the year is a Monday, week one starts on the 4th and
+     *   the 1st to 3rd is in the last week of the previous year<br>
+     * - if the 5th day of the year is a Monday, week two starts on the 5th and
+     *   the 1st to 4th is in week one<br>
+     * <p>
+     * This field can be used with any calendar system.
+     * @return a TemporalField to access the week of week-based-year, not null
+     */
+    public TemporalField weekOfWeekBasedYear() {
+        return weekOfWeekBasedYear;
+    }
+
+    /**
+     * Returns a field to access the year of a week-based-year,
+     * computed based on this WeekFields.
+     * <p>
+     * This represents the concept of the year where weeks start on a fixed day-of-week,
+     * such as Monday and each week belongs to exactly one year.
+     * This field is typically used with {@link WeekFields#dayOfWeek()} and
+     * {@link WeekFields#weekOfWeekBasedYear()}.
+     * <p>
+     * Week one(1) is the week starting on the {@link WeekFields#getFirstDayOfWeek}
+     * where there are at least {@link WeekFields#getMinimalDaysInFirstWeek()} days in the year.
+     * Thus, week one may start before the start of the year.
+     * If the first week starts after the start of the year then the period before
+     * is in the last week of the previous year.
+     * <p>
+     * This field can be used with any calendar system.
+     * @return a TemporalField to access the year of week-based-year, not null
+     */
+    public TemporalField weekBasedYear() {
+        return weekBasedYear;
+    }
+
+    /**
+     * Checks if this WeekFields is equal to the specified object.
      * <p>
      * The comparison is based on the entire state of the rules, which is
      * the first day-of-week and minimal days.
@@ -469,6 +590,49 @@
         static ComputedDayOfField ofWeekOfYearField(WeekFields weekDef) {
             return new ComputedDayOfField("WeekOfYear", weekDef, WEEKS, YEARS, WEEK_OF_YEAR_RANGE);
         }
+
+        /**
+         * Returns a field to access the week of week-based-year,
+         * computed based on a WeekFields.
+         * @see WeekFields#weekOfWeekBasedYear()
+         */
+        static ComputedDayOfField ofWeekOfWeekBasedYearField(WeekFields weekDef) {
+            return new ComputedDayOfField("WeekOfWeekBasedYear", weekDef, WEEKS, IsoFields.WEEK_BASED_YEARS, WEEK_OF_YEAR_RANGE);
+        }
+
+        /**
+         * Returns a field to access the week of week-based-year,
+         * computed based on a WeekFields.
+         * @see WeekFields#weekBasedYear()
+         */
+        static ComputedDayOfField ofWeekBasedYearField(WeekFields weekDef) {
+            return new ComputedDayOfField("WeekBasedYear", weekDef, IsoFields.WEEK_BASED_YEARS, FOREVER, ChronoField.YEAR.range());
+        }
+
+        /**
+         * Return a new week-based-year date of the Chronology, year, week-of-year,
+         * and dow of week.
+         * @param chrono The chronology of the new date
+         * @param yowby the year of the week-based-year
+         * @param wowby the week of the week-based-year
+         * @param dow the day of the week
+         * @return a ChronoLocalDate for the requested year, week of year, and day of week
+         */
+        private ChronoLocalDate<?> ofWeekBasedYear(Chronology chrono,
+                int yowby, int wowby, int dow) {
+            ChronoLocalDate<?> date = chrono.date(yowby, 1, 1);
+            int ldow = localizedDayOfWeek(date);
+            int offset = startOfWeekOffset(1, ldow);
+
+            // Clamp the week of year to keep it in the same year
+            int yearLen = date.lengthOfYear();
+            int newYearWeek = computeWeek(offset, yearLen + weekDef.getMinimalDaysInFirstWeek());
+            wowby = Math.min(wowby, newYearWeek - 1);
+
+            int days = -offset + (dow - 1) + (wowby - 1) * 7;
+            return date.plus(days, DAYS);
+        }
+
         private final String name;
         private final WeekFields weekDef;
         private final TemporalUnit baseUnit;
@@ -489,44 +653,109 @@
 
         @Override
         public long getFrom(TemporalAccessor temporal) {
-            // Offset the ISO DOW by the start of this week
-            int sow = weekDef.getFirstDayOfWeek().getValue();
-            int dow = localizedDayOfWeek(temporal, sow);
-
             if (rangeUnit == WEEKS) {  // day-of-week
-                return dow;
+                return localizedDayOfWeek(temporal);
             } else if (rangeUnit == MONTHS) {  // week-of-month
-                return localizedWeekOfMonth(temporal, dow);
+                return localizedWeekOfMonth(temporal);
             } else if (rangeUnit == YEARS) {  // week-of-year
-                return localizedWeekOfYear(temporal, dow);
+                return localizedWeekOfYear(temporal);
+            } else if (rangeUnit == WEEK_BASED_YEARS) {
+                return localizedWeekOfWeekBasedYear(temporal);
+            } else if (rangeUnit == FOREVER) {
+                return localizedWeekBasedYear(temporal);
             } else {
-                throw new IllegalStateException("unreachable");
+                throw new IllegalStateException("unreachable, rangeUnit: " + rangeUnit + ", this: " + this);
             }
         }
 
-        private int localizedDayOfWeek(TemporalAccessor temporal, int sow) {
+        private int localizedDayOfWeek(TemporalAccessor temporal) {
+            int sow = weekDef.getFirstDayOfWeek().getValue();
             int isoDow = temporal.get(DAY_OF_WEEK);
             return Math.floorMod(isoDow - sow, 7) + 1;
         }
 
-        private long localizedWeekOfMonth(TemporalAccessor temporal, int dow) {
+        private long localizedWeekOfMonth(TemporalAccessor temporal) {
+            int dow = localizedDayOfWeek(temporal);
             int dom = temporal.get(DAY_OF_MONTH);
             int offset = startOfWeekOffset(dom, dow);
             return computeWeek(offset, dom);
         }
 
-        private long localizedWeekOfYear(TemporalAccessor temporal, int dow) {
+        private long localizedWeekOfYear(TemporalAccessor temporal) {
+            int dow = localizedDayOfWeek(temporal);
             int doy = temporal.get(DAY_OF_YEAR);
             int offset = startOfWeekOffset(doy, dow);
             return computeWeek(offset, doy);
         }
 
         /**
+         * Returns the year of week-based-year for the temporal.
+         * The year can be the previous year, the current year, or the next year.
+         * @param temporal a date of any chronology, not null
+         * @return the year of week-based-year for the date
+         */
+        private int localizedWeekBasedYear(TemporalAccessor temporal) {
+            int dow = localizedDayOfWeek(temporal);
+            int year = temporal.get(YEAR);
+            int doy = temporal.get(DAY_OF_YEAR);
+            int offset = startOfWeekOffset(doy, dow);
+            int week = computeWeek(offset, doy);
+            if (week == 0) {
+                // Day is in end of week of previous year; return the previous year
+                return year - 1;
+            } else {
+                // If getting close to end of year, use higher precision logic
+                // Check if date of year is in partial week associated with next year
+                ValueRange dayRange = temporal.range(DAY_OF_YEAR);
+                int yearLen = (int)dayRange.getMaximum();
+                int newYearWeek = computeWeek(offset, yearLen + weekDef.getMinimalDaysInFirstWeek());
+                if (week >= newYearWeek) {
+                    return year + 1;
+                }
+            }
+            return year;
+        }
+
+        /**
+         * Returns the week of week-based-year for the temporal.
+         * The week can be part of the previous year, the current year,
+         * or the next year depending on the week start and minimum number
+         * of days.
+         * @param temporal  a date of any chronology
+         * @return the week of the year
+         * @see #localizedWeekBasedYear(java.time.temporal.TemporalAccessor)
+         */
+        private int localizedWeekOfWeekBasedYear(TemporalAccessor temporal) {
+            int dow = localizedDayOfWeek(temporal);
+            int doy = temporal.get(DAY_OF_YEAR);
+            int offset = startOfWeekOffset(doy, dow);
+            int week = computeWeek(offset, doy);
+            if (week == 0) {
+                // Day is in end of week of previous year
+                // Recompute from the last day of the previous year
+                ChronoLocalDate date = Chronology.from(temporal).date(temporal);
+                date = date.minus(doy, DAYS);   // Back down into previous year
+                return localizedWeekOfWeekBasedYear(date);
+            } else if (week > 50) {
+                // If getting close to end of year, use higher precision logic
+                // Check if date of year is in partial week associated with next year
+                ValueRange dayRange = temporal.range(DAY_OF_YEAR);
+                int yearLen = (int)dayRange.getMaximum();
+                int newYearWeek = computeWeek(offset, yearLen + weekDef.getMinimalDaysInFirstWeek());
+                if (week >= newYearWeek) {
+                    // Overlaps with week of following year; reduce to week in following year
+                    week = week - newYearWeek + 1;
+                }
+            }
+            return week;
+        }
+
+        /**
          * Returns an offset to align week start with a day of month or day of year.
          *
-         * @param day the day; 1 through infinity
-         * @param dow the day of the week of that day; 1 through 7
-         * @return an offset in days to align a day with the start of the first 'full' week
+         * @param day  the day; 1 through infinity
+         * @param dow  the day of the week of that day; 1 through 7
+         * @return  an offset in days to align a day with the start of the first 'full' week
          */
         private int startOfWeekOffset(int day, int dow) {
             // offset of first day corresponding to the day of week in first 7 days (zero origin)
@@ -560,54 +789,81 @@
             if (newVal == currentVal) {
                 return temporal;
             }
-            // Compute the difference and add that using the base using of the field
-            return (R) temporal.plus(newVal - currentVal, baseUnit);
+
+            if (rangeUnit == FOREVER) {     // replace year of WeekBasedYear
+                // Create a new date object with the same chronology,
+                // the desired year and the same week and dow.
+                int idow = temporal.get(weekDef.dayOfWeek);
+                int wowby = temporal.get(weekDef.weekOfWeekBasedYear);
+                return (R) ofWeekBasedYear(Chronology.from(temporal), (int)newValue, wowby, idow);
+            } else {
+                // Compute the difference and add that using the base unit of the field
+                return (R) temporal.plus(newVal - currentVal, baseUnit);
+            }
         }
 
         @Override
-        public Map<TemporalField, Long> resolve(TemporalAccessor temporal, long value) {
+        public Map<TemporalField, Long> resolve(TemporalAccessor temporal, long value, ResolverStyle resolverStyle) {
             int newValue = range.checkValidIntValue(value, this);
             int sow = weekDef.getFirstDayOfWeek().getValue();
             if (rangeUnit == WEEKS) {  // day-of-week
                 int isoDow = Math.floorMod((sow - 1) + (newValue - 1), 7) + 1;
                 return Collections.<TemporalField, Long>singletonMap(DAY_OF_WEEK, (long) isoDow);
             }
-            if ((temporal.isSupported(YEAR) && temporal.isSupported(DAY_OF_WEEK)) == false) {
+            if (temporal.isSupported(DAY_OF_WEEK) == false) {
                 return null;
             }
-            int dow = localizedDayOfWeek(temporal, sow);
-            int year = temporal.get(YEAR);
             Chronology chrono = Chronology.from(temporal);  // defaults to ISO
-            if (rangeUnit == MONTHS) {  // week-of-month
-                if (temporal.isSupported(MONTH_OF_YEAR) == false) {
-                    return null;
+            int dow = localizedDayOfWeek(temporal);
+            if (temporal.isSupported(YEAR)) {
+                int year = temporal.get(YEAR);
+                if (rangeUnit == MONTHS) {  // week-of-month
+                    if (temporal.isSupported(MONTH_OF_YEAR) == false) {
+                        return null;
+                    }
+                    int month = temporal.get(ChronoField.MONTH_OF_YEAR);
+                @SuppressWarnings("rawtypes")
+                    ChronoLocalDate date = chrono.date(year, month, 1);
+                    int dateDow = localizedDayOfWeek(date);
+                    long weeks = newValue - localizedWeekOfMonth(date);
+                    int days = dow - dateDow;
+                    date = date.plus(weeks * 7 + days, DAYS);
+                    Map<TemporalField, Long> result = new HashMap<>(4, 1.0f);
+                    result.put(EPOCH_DAY, date.toEpochDay());
+                    result.put(YEAR, null);
+                    result.put(MONTH_OF_YEAR, null);
+                    result.put(DAY_OF_WEEK, null);
+                    return result;
+                } else if (rangeUnit == YEARS) {  // week-of-year
+                @SuppressWarnings("rawtypes")
+                    ChronoLocalDate date = chrono.date(year, 1, 1);
+                    int dateDow = localizedDayOfWeek(date);
+                    long weeks = newValue - localizedWeekOfYear(date);
+                    int days = dow - dateDow;
+                    date = date.plus(weeks * 7 + days, DAYS);
+                    Map<TemporalField, Long> result = new HashMap<>(4, 1.0f);
+                    result.put(EPOCH_DAY, date.toEpochDay());
+                    result.put(YEAR, null);
+                    result.put(DAY_OF_WEEK, null);
+                    return result;
                 }
-                int month = temporal.get(ChronoField.MONTH_OF_YEAR);
-                ChronoLocalDate date = chrono.date(year, month, 1);
-                int dateDow = localizedDayOfWeek(date, sow);
-                long weeks = newValue - localizedWeekOfMonth(date, dateDow);
-                int days = dow - dateDow;
-                date = date.plus(weeks * 7 + days, DAYS);
-                Map<TemporalField, Long> result = new HashMap<>(4, 1.0f);
-                result.put(EPOCH_DAY, date.toEpochDay());
-                result.put(YEAR, null);
-                result.put(MONTH_OF_YEAR, null);
-                result.put(DAY_OF_WEEK, null);
-                return result;
-            } else if (rangeUnit == YEARS) {  // week-of-year
-                ChronoLocalDate date = chrono.date(year, 1, 1);
-                int dateDow = localizedDayOfWeek(date, sow);
-                long weeks = newValue - localizedWeekOfYear(date, dateDow);
-                int days = dow - dateDow;
-                date = date.plus(weeks * 7 + days, DAYS);
-                Map<TemporalField, Long> result = new HashMap<>(4, 1.0f);
-                result.put(EPOCH_DAY, date.toEpochDay());
-                result.put(YEAR, null);
-                result.put(DAY_OF_WEEK, null);
-                return result;
-            } else {
-                throw new IllegalStateException("unreachable");
+            } else if (rangeUnit == WEEK_BASED_YEARS || rangeUnit == FOREVER) {
+                if (temporal.isSupported(weekDef.weekBasedYear) &&
+                    temporal.isSupported(weekDef.weekOfWeekBasedYear)) {
+                    // week-of-week-based-year and year-of-week-based-year
+                    int yowby = temporal.get(weekDef.weekBasedYear);
+                    int wowby = temporal.get(weekDef.weekOfWeekBasedYear);
+                    ChronoLocalDate<?> date = ofWeekBasedYear(Chronology.from(temporal), yowby, wowby, dow);
+
+                    Map<TemporalField, Long> result = new HashMap<>(4, 1.0f);
+                    result.put(EPOCH_DAY, date.toEpochDay());
+                    result.put(DAY_OF_WEEK, null);
+                    result.put(weekDef.weekOfWeekBasedYear, null);
+                    result.put(weekDef.weekBasedYear, null);
+                    return result;
+                }
             }
+            return null;
         }
 
         //-----------------------------------------------------------------------
@@ -617,6 +873,18 @@
         }
 
         @Override
+        public String getDisplayName(Locale locale) {
+            Objects.requireNonNull(locale, "locale");
+            if (rangeUnit == YEARS) {  // only have values for week-of-year
+                LocaleResources lr = LocaleProviderAdapter.getResourceBundleBased()
+                        .getLocaleResources(locale);
+                ResourceBundle rb = lr.getJavaTimeFormatData();
+                return rb.containsKey("field.week") ? rb.getString("field.week") : getName();
+            }
+            return getName();
+        }
+
+        @Override
         public TemporalUnit getBaseUnit() {
             return baseUnit;
         }
@@ -627,6 +895,11 @@
         }
 
         @Override
+        public boolean isDateBased() {
+            return true;
+        }
+
+        @Override
         public ValueRange range() {
             return range;
         }
@@ -641,6 +914,10 @@
                     return temporal.isSupported(DAY_OF_MONTH);
                 } else if (rangeUnit == YEARS) {  // week-of-year
                     return temporal.isSupported(DAY_OF_YEAR);
+                } else if (rangeUnit == WEEK_BASED_YEARS) {
+                    return temporal.isSupported(DAY_OF_YEAR);
+                } else if (rangeUnit == FOREVER) {
+                    return temporal.isSupported(YEAR);
                 }
             }
             return false;
@@ -650,27 +927,68 @@
         public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
             if (rangeUnit == ChronoUnit.WEEKS) {  // day-of-week
                 return range;
-            }
-
-            TemporalField field = null;
-            if (rangeUnit == MONTHS) {  // week-of-month
-                field = DAY_OF_MONTH;
+            } else if (rangeUnit == MONTHS) {  // week-of-month
+                return rangeByWeek(temporal, DAY_OF_MONTH);
             } else if (rangeUnit == YEARS) {  // week-of-year
-                field = DAY_OF_YEAR;
+                return rangeByWeek(temporal, DAY_OF_YEAR);
+            } else if (rangeUnit == WEEK_BASED_YEARS) {
+                return rangeWeekOfWeekBasedYear(temporal);
+            } else if (rangeUnit == FOREVER) {
+                return YEAR.range();
             } else {
-                throw new IllegalStateException("unreachable");
+                throw new IllegalStateException("unreachable, rangeUnit: " + rangeUnit + ", this: " + this);
             }
+        }
 
-            // Offset the ISO DOW by the start of this week
-            int sow = weekDef.getFirstDayOfWeek().getValue();
-            int dow = localizedDayOfWeek(temporal, sow);
-
+        /**
+         * Map the field range to a week range
+         * @param temporal the temporal
+         * @param field the field to get the range of
+         * @return the ValueRange with the range adjusted to weeks.
+         */
+        private ValueRange rangeByWeek(TemporalAccessor temporal, TemporalField field) {
+            int dow = localizedDayOfWeek(temporal);
             int offset = startOfWeekOffset(temporal.get(field), dow);
             ValueRange fieldRange = temporal.range(field);
             return ValueRange.of(computeWeek(offset, (int) fieldRange.getMinimum()),
                     computeWeek(offset, (int) fieldRange.getMaximum()));
         }
 
+        /**
+         * Map the field range to a week range of a week year.
+         * @param temporal  the temporal
+         * @param field  the field to get the range of
+         * @return the ValueRange with the range adjusted to weeks.
+         */
+        private ValueRange rangeWeekOfWeekBasedYear(TemporalAccessor temporal) {
+            if (!temporal.isSupported(DAY_OF_YEAR)) {
+                return WEEK_OF_YEAR_RANGE;
+            }
+            int dow = localizedDayOfWeek(temporal);
+            int doy = temporal.get(DAY_OF_YEAR);
+            int offset = startOfWeekOffset(doy, dow);
+            int week = computeWeek(offset, doy);
+            if (week == 0) {
+                // Day is in end of week of previous year
+                // Recompute from the last day of the previous year
+                ChronoLocalDate date = Chronology.from(temporal).date(temporal);
+                date = date.minus(doy + 7, DAYS);   // Back down into previous year
+                return rangeWeekOfWeekBasedYear(date);
+            }
+            // Check if day of year is in partial week associated with next year
+            ValueRange dayRange = temporal.range(DAY_OF_YEAR);
+            int yearLen = (int)dayRange.getMaximum();
+            int newYearWeek = computeWeek(offset, yearLen + weekDef.getMinimalDaysInFirstWeek());
+
+            if (week >= newYearWeek) {
+                // Overlaps with weeks of following year; recompute from a week in following year
+                ChronoLocalDate date = Chronology.from(temporal).date(temporal);
+                date = date.plus(yearLen - doy + 1 + 7, ChronoUnit.DAYS);
+                return rangeWeekOfWeekBasedYear(date);
+            }
+            return ValueRange.of(1, newYearWeek-1);
+        }
+
         //-----------------------------------------------------------------------
         @Override
         public String toString() {
--- a/src/share/classes/java/time/temporal/package-info.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/temporal/package-info.java	Wed Apr 17 21:48:04 2013 -0700
@@ -112,9 +112,9 @@
  * such as the "last day of the month", or "next Wednesday".
  * These are modeled as functions that adjust a base date-time.
  * The functions implement {@link java.time.temporal.TemporalAdjuster} and operate on {@code Temporal}.
- * A set of common functions are provided in {@link java.time.temporal.Adjusters}.
+ * A set of common functions are provided in {@code TemporalAdjuster}.
  * For example, to find the first occurrence of a day-of-week after a given date, use
- * {@link java.time.temporal.Adjusters#next(DayOfWeek)}, such as
+ * {@link java.time.temporal.TemporalAdjuster#next(DayOfWeek)}, such as
  * {@code date.with(next(MONDAY))}.
  * Applications can also define adjusters by implementing {@code TemporalAdjuster}.
  * </p>
@@ -127,7 +127,7 @@
  * The most common implementations of the query interface are method references.
  * The {@code from(TemporalAccessor)} methods on major classes can all be used, such as
  * {@code LocalDate::from} or {@code Month::from}.
- * Further implementations are provided in {@link java.time.temporal.Queries}.
+ * Further implementations are provided in {@code TemporalQuery} as static methods.
  * Applications can also define queries by implementing {@code TemporalQuery}.
  * </p>
  *
--- a/src/share/classes/java/time/zone/TzdbZoneRulesProvider.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/zone/TzdbZoneRulesProvider.java	Wed Apr 17 21:48:04 2013 -0700
@@ -64,6 +64,7 @@
 import java.io.ByteArrayInputStream;
 import java.io.DataInputStream;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.StreamCorruptedException;
 import java.util.Arrays;
@@ -75,7 +76,6 @@
 import java.util.Set;
 import java.util.TreeMap;
 import java.util.concurrent.ConcurrentHashMap;
-import java.util.zip.ZipFile;
 
 /**
  * Loads time-zone rules for 'TZDB'.
@@ -106,10 +106,8 @@
     public TzdbZoneRulesProvider() {
         try {
             String libDir = System.getProperty("java.home") + File.separator + "lib";
-            File tzdbJar = new File(libDir, "tzdb.jar");
-            try (ZipFile zf = new ZipFile(tzdbJar);
-                 DataInputStream dis = new DataInputStream(
-                     zf.getInputStream(zf.getEntry("TZDB.dat")))) {
+            try (DataInputStream dis = new DataInputStream(
+                     new FileInputStream(new File(libDir, "tzdb.dat")))) {
                 load(dis);
             }
         } catch (Exception ex) {
--- a/src/share/classes/java/time/zone/ZoneOffsetTransition.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/zone/ZoneOffsetTransition.java	Wed Apr 17 21:48:04 2013 -0700
@@ -321,7 +321,7 @@
     }
 
     /**
-     * Does this transition represent a gap in the local time-line.
+     * Does this transition represent an overlap in the local time-line.
      * <p>
      * Overlaps occur where there are local date-times that exist twice.
      * An example would be when the offset changes from {@code +02:00} to {@code +01:00}.
--- a/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java	Wed Apr 17 21:48:04 2013 -0700
@@ -61,8 +61,8 @@
  */
 package java.time.zone;
 
-import static java.time.temporal.Adjusters.nextOrSame;
-import static java.time.temporal.Adjusters.previousOrSame;
+import static java.time.temporal.TemporalAdjuster.nextOrSame;
+import static java.time.temporal.TemporalAdjuster.previousOrSame;
 
 import java.io.DataInput;
 import java.io.DataOutput;
--- a/src/share/classes/java/time/zone/ZoneRulesProvider.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/time/zone/ZoneRulesProvider.java	Wed Apr 17 21:48:04 2013 -0700
@@ -141,7 +141,7 @@
         // if the property java.time.zone.DefaultZoneRulesProvider is
         // set then its value is the class name of the default provider
         final List<ZoneRulesProvider> loaded = new ArrayList<>();
-        AccessController.doPrivileged(new PrivilegedAction() {
+        AccessController.doPrivileged(new PrivilegedAction<Object>() {
             public Object run() {
                 String prop = System.getProperty("java.time.zone.DefaultZoneRulesProvider");
                 if (prop != null) {
--- a/src/share/classes/java/util/ArrayList.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/ArrayList.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -105,8 +105,20 @@
     private static final long serialVersionUID = 8683452581122892189L;
 
     /**
+     * Default initial capacity.
+     */
+    private static final int DEFAULT_CAPACITY = 10;
+
+    /**
+     * Shared empty array instance used for empty instances.
+     */
+    private static final Object[] EMPTY_ELEMENTDATA = {};
+
+    /**
      * The array buffer into which the elements of the ArrayList are stored.
-     * The capacity of the ArrayList is the length of this array buffer.
+     * The capacity of the ArrayList is the length of this array buffer. Any
+     * empty ArrayList with elementData == EMPTY_ELEMENTDATA will be expanded to
+     * DEFAULT_CAPACITY when the first element is added.
      */
     private transient Object[] elementData;
 
@@ -136,7 +148,8 @@
      * Constructs an empty list with an initial capacity of ten.
      */
     public ArrayList() {
-        this(10);
+        super();
+        this.elementData = EMPTY_ELEMENTDATA;
     }
 
     /**
@@ -162,8 +175,7 @@
      */
     public void trimToSize() {
         modCount++;
-        int oldCapacity = elementData.length;
-        if (size < oldCapacity) {
+        if (size < elementData.length) {
             elementData = Arrays.copyOf(elementData, size);
         }
     }
@@ -176,12 +188,29 @@
      * @param   minCapacity   the desired minimum capacity
      */
     public void ensureCapacity(int minCapacity) {
-        if (minCapacity > 0)
-            ensureCapacityInternal(minCapacity);
+        int minExpand = (elementData != EMPTY_ELEMENTDATA)
+            // any size if real element table
+            ? 0
+            // larger than default for empty table. It's already supposed to be
+            // at default size.
+            : DEFAULT_CAPACITY;
+
+        if (minCapacity > minExpand) {
+            ensureExplicitCapacity(minCapacity);
+        }
     }
 
     private void ensureCapacityInternal(int minCapacity) {
+        if (elementData == EMPTY_ELEMENTDATA) {
+            minCapacity = Math.max(DEFAULT_CAPACITY, minCapacity);
+        }
+
+        ensureExplicitCapacity(minCapacity);
+    }
+
+    private void ensureExplicitCapacity(int minCapacity) {
         modCount++;
+
         // overflow-conscious code
         if (minCapacity - elementData.length > 0)
             grow(minCapacity);
@@ -450,7 +479,7 @@
         if (numMoved > 0)
             System.arraycopy(elementData, index+1, elementData, index,
                              numMoved);
-        elementData[--size] = null; // Let gc do its work
+        elementData[--size] = null; // clear to let GC do its work
 
         return oldValue;
     }
@@ -495,7 +524,7 @@
         if (numMoved > 0)
             System.arraycopy(elementData, index+1, elementData, index,
                              numMoved);
-        elementData[--size] = null; // Let gc do its work
+        elementData[--size] = null; // clear to let GC do its work
     }
 
     /**
@@ -505,7 +534,7 @@
     public void clear() {
         modCount++;
 
-        // Let gc do its work
+        // clear to let GC do its work
         for (int i = 0; i < size; i++)
             elementData[i] = null;
 
@@ -586,10 +615,12 @@
         System.arraycopy(elementData, toIndex, elementData, fromIndex,
                          numMoved);
 
-        // Let gc do its work
+        // clear to let GC do its work
         int newSize = size - (toIndex-fromIndex);
-        while (size != newSize)
-            elementData[--size] = null;
+        for (int i = newSize; i < size; i++) {
+            elementData[i] = null;
+        }
+        size = newSize;
     }
 
     /**
@@ -677,6 +708,7 @@
                 w += size - r;
             }
             if (w != size) {
+                // clear to let GC do its work
                 for (int i = w; i < size; i++)
                     elementData[i] = null;
                 modCount += size - w;
@@ -701,17 +733,17 @@
         int expectedModCount = modCount;
         s.defaultWriteObject();
 
-        // Write out array length
-        s.writeInt(elementData.length);
+        // Write out size as capacity for behavioural compatibility with clone()
+        s.writeInt(size);
 
         // Write out all elements in the proper order.
-        for (int i=0; i<size; i++)
+        for (int i=0; i<size; i++) {
             s.writeObject(elementData[i]);
+        }
 
         if (modCount != expectedModCount) {
             throw new ConcurrentModificationException();
         }
-
     }
 
     /**
@@ -720,16 +752,24 @@
      */
     private void readObject(java.io.ObjectInputStream s)
         throws java.io.IOException, ClassNotFoundException {
+        elementData = EMPTY_ELEMENTDATA;
+
         // Read in size, and any hidden stuff
         s.defaultReadObject();
 
-        // Read in array length and allocate array
-        int arrayLength = s.readInt();
-        Object[] a = elementData = new Object[arrayLength];
+        // Read in capacity
+        s.readInt(); // ignored
+
+        if (size > 0) {
+            // be like clone(), allocate array based upon size not capacity
+            ensureCapacityInternal(size);
 
-        // Read in all elements in the proper order.
-        for (int i=0; i<size; i++)
-            a[i] = s.readObject();
+            Object[] a = elementData;
+            // Read in all elements in the proper order.
+            for (int i=0; i<size; i++) {
+                a[i] = s.readObject();
+            }
+        }
     }
 
     /**
--- a/src/share/classes/java/util/Arrays.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/Arrays.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -3518,6 +3518,11 @@
         public boolean contains(Object o) {
             return indexOf(o) != -1;
         }
+
+        @Override
+        public Spliterator<E> spliterator() {
+            return Spliterators.spliterator(a, Spliterator.ORDERED);
+        }
     }
 
     /**
@@ -4300,4 +4305,167 @@
         buf.append(']');
         dejaVu.remove(a);
     }
+
+    /**
+     * Creates a {@link Spliterator} covering all of the specified array.
+     *
+     * <p>The spliterator reports {@link Spliterator#SIZED},
+     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
+     * {@link Spliterator#IMMUTABLE}.
+     *
+     * @param <T> Type of elements
+     * @param array The array, assumed to be unmodified during use
+     * @return A spliterator from the array
+     * @throws NullPointerException if the specified array is {@code null}
+     * @since 1.8
+     */
+    public static <T> Spliterator<T> spliterator(T[] array) {
+        return Spliterators.spliterator(array,
+                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
+    }
+
+    /**
+     * Creates a {@link Spliterator} covering the specified range of the
+     * specified array.
+     *
+     * <p>The spliterator reports {@link Spliterator#SIZED},
+     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
+     * {@link Spliterator#IMMUTABLE}.
+     *
+     * @param <T> Type of elements
+     * @param array The array, assumed to be unmodified during use
+     * @param fromIndex The least index (inclusive) to cover
+     * @param toIndex One past the greatest index to cover
+     * @return A spliterator from the array
+     * @throws NullPointerException if the specified array is {@code null}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
+     *         {@code toIndex} is less than {@code fromIndex}, or
+     *         {@code toIndex} is greater than the array size
+     * @since 1.8
+     */
+    public static <T> Spliterator<T> spliterator(T[] array, int fromIndex, int toIndex) {
+        return Spliterators.spliterator(array, fromIndex, toIndex,
+                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
+    }
+
+    /**
+     * Creates a {@link Spliterator.OfInt} covering all of the specified array.
+     *
+     * <p>The spliterator reports {@link Spliterator#SIZED},
+     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
+     * {@link Spliterator#IMMUTABLE}.
+     *
+     * @param array The array, assumed to be unmodified during use
+     * @return A spliterator from the array
+     * @throws NullPointerException if the specified array is {@code null}
+     * @since 1.8
+     */
+    public static Spliterator.OfInt spliterator(int[] array) {
+        return Spliterators.spliterator(array,
+                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
+    }
+
+    /**
+     * Creates a {@link Spliterator.OfInt} covering the specified range of the
+     * specified array.
+     *
+     * <p>The spliterator reports {@link Spliterator#SIZED},
+     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
+     * {@link Spliterator#IMMUTABLE}.
+     *
+     * @param array The array, assumed to be unmodified during use
+     * @param fromIndex The least index (inclusive) to cover
+     * @param toIndex One past the greatest index to cover
+     * @return A spliterator from the array
+     * @throws NullPointerException if the specified array is {@code null}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
+     *         {@code toIndex} is less than {@code fromIndex}, or
+     *         {@code toIndex} is greater than the array size
+     * @since 1.8
+     */
+    public static Spliterator.OfInt spliterator(int[] array, int fromIndex, int toIndex) {
+        return Spliterators.spliterator(array, fromIndex, toIndex,
+                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
+    }
+
+    /**
+     * Creates a {@link Spliterator.OfLong} covering all of the specified array.
+     *
+     * <p>The spliterator reports {@link Spliterator#SIZED},
+     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
+     * {@link Spliterator#IMMUTABLE}.
+     *
+     * @param array The array, assumed to be unmodified during use
+     * @return A spliterator from the array
+     * @throws NullPointerException if the specified array is {@code null}
+     * @since 1.8
+     */
+    public static Spliterator.OfLong spliterator(long[] array) {
+        return Spliterators.spliterator(array,
+                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
+    }
+
+    /**
+     * Creates a {@link Spliterator.OfLong} covering the specified range of the
+     * specified array.
+     *
+     * <p>The spliterator reports {@link Spliterator#SIZED},
+     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
+     * {@link Spliterator#IMMUTABLE}.
+     *
+     * @param array The array, assumed to be unmodified during use
+     * @param fromIndex The least index (inclusive) to cover
+     * @param toIndex One past the greatest index to cover
+     * @return A spliterator from the array
+     * @throws NullPointerException if the specified array is {@code null}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
+     *         {@code toIndex} is less than {@code fromIndex}, or
+     *         {@code toIndex} is greater than the array size
+     * @since 1.8
+     */
+    public static Spliterator.OfLong spliterator(long[] array, int fromIndex, int toIndex) {
+        return Spliterators.spliterator(array, fromIndex, toIndex,
+                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
+    }
+
+    /**
+     * Creates a {@link Spliterator.OfDouble} covering all of the specified
+     * array.
+     *
+     * <p>The spliterator reports {@link Spliterator#SIZED},
+     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
+     * {@link Spliterator#IMMUTABLE}.
+     *
+     * @param array The array, assumed to be unmodified during use
+     * @return A spliterator from the array
+     * @throws NullPointerException if the specified array is {@code null}
+     * @since 1.8
+     */
+    public static Spliterator.OfDouble spliterator(double[] array) {
+        return Spliterators.spliterator(array,
+                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
+    }
+
+    /**
+     * Creates a {@link Spliterator.OfDouble} covering the specified range of
+     * the specified array.
+     *
+     * <p>The spliterator reports {@link Spliterator#SIZED},
+     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
+     * {@link Spliterator#IMMUTABLE}.
+     *
+     * @param array The array, assumed to be unmodified during use
+     * @param fromIndex The least index (inclusive) to cover
+     * @param toIndex One past the greatest index to cover
+     * @return A spliterator from the array
+     * @throws NullPointerException if the specified array is {@code null}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
+     *         {@code toIndex} is less than {@code fromIndex}, or
+     *         {@code toIndex} is greater than the array size
+     * @since 1.8
+     */
+    public static Spliterator.OfDouble spliterator(double[] array, int fromIndex, int toIndex) {
+        return Spliterators.spliterator(array, fromIndex, toIndex,
+                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
+    }
 }
--- a/src/share/classes/java/util/Collection.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/Collection.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -104,6 +104,12 @@
  * <a href="{@docRoot}/../technotes/guides/collections/index.html">
  * Java Collections Framework</a>.
  *
+ * @implSpec
+ * The default method implementations (inherited or otherwise) do not apply any
+ * synchronization protocol.  If a {@code Collection} implementation has a
+ * specific synchronization protocol, then it must override default
+ * implementations to apply that protocol.
+ *
  * @param <E> the type of elements in this collection
  *
  * @author  Josh Bloch
@@ -453,4 +459,28 @@
      * @see Object#equals(Object)
      */
     int hashCode();
+
+    /**
+     * Creates a {@link Spliterator} over the elements in this collection.
+     *
+     * <p>The {@code Spliterator} reports {@link Spliterator#SIZED}.
+     * Implementations should document the reporting of additional
+     * characteristic values.
+     *
+     * @implSpec
+     * The default implementation creates a
+     * <em><a href="Spliterator.html#binding">late-binding</a></em> spliterator
+     * from the collections's {@code Iterator}.  The spliterator inherits the
+     * <em>fail-fast</em> properties of the collection's iterator.
+     *
+     * @implNote
+     * The created {@code Spliterator} additionally reports
+     * {@link Spliterator#SUBSIZED}.
+     *
+     * @return a {@code Spliterator} over the elements in this collection
+     * @since 1.8
+     */
+    default Spliterator<E> spliterator() {
+        return Spliterators.spliterator(this, 0);
+    }
 }
--- a/src/share/classes/java/util/Collections.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/Collections.java	Wed Apr 17 21:48:04 2013 -0700
@@ -28,6 +28,9 @@
 import java.io.ObjectOutputStream;
 import java.io.IOException;
 import java.lang.reflect.Array;
+import java.util.function.BiConsumer;
+import java.util.function.BiFunction;
+import java.util.function.Function;
 
 /**
  * This class consists exclusively of static methods that operate on or return
@@ -264,8 +267,7 @@
     }
 
     private static <T>
-    int indexedBinarySearch(List<? extends Comparable<? super T>> list, T key)
-    {
+    int indexedBinarySearch(List<? extends Comparable<? super T>> list, T key) {
         int low = 0;
         int high = list.size()-1;
 
@@ -441,21 +443,21 @@
     /**
      * Randomly permutes the specified list using a default source of
      * randomness.  All permutations occur with approximately equal
-     * likelihood.<p>
+     * likelihood.
      *
-     * The hedge "approximately" is used in the foregoing description because
+     * <p>The hedge "approximately" is used in the foregoing description because
      * default source of randomness is only approximately an unbiased source
      * of independently chosen bits. If it were a perfect source of randomly
      * chosen bits, then the algorithm would choose permutations with perfect
-     * uniformity.<p>
+     * uniformity.
      *
-     * This implementation traverses the list backwards, from the last element
-     * up to the second, repeatedly swapping a randomly selected element into
-     * the "current position".  Elements are randomly selected from the
+     * <p>This implementation traverses the list backwards, from the last
+     * element up to the second, repeatedly swapping a randomly selected element
+     * into the "current position".  Elements are randomly selected from the
      * portion of the list that runs from the first element to the current
-     * position, inclusive.<p>
+     * position, inclusive.
      *
-     * This method runs in linear time.  If the specified list does not
+     * <p>This method runs in linear time.  If the specified list does not
      * implement the {@link RandomAccess} interface and is large, this
      * implementation dumps the specified list into an array before shuffling
      * it, and dumps the shuffled array back into the list.  This avoids the
@@ -469,9 +471,10 @@
     public static void shuffle(List<?> list) {
         Random rnd = r;
         if (rnd == null)
-            r = rnd = new Random();
+            r = rnd = new Random(); // harmless race.
         shuffle(list, rnd);
     }
+
     private static Random r;
 
     /**
@@ -1391,6 +1394,67 @@
         public int hashCode()           {return m.hashCode();}
         public String toString()        {return m.toString();}
 
+        // Override default methods in Map
+        @Override
+        @SuppressWarnings("unchecked")
+        public V getOrDefault(Object k, V defaultValue) {
+            // Safe cast as we don't change the value
+            return ((Map<K, V>)m).getOrDefault(k, defaultValue);
+        }
+
+        @Override
+        public void forEach(BiConsumer<? super K, ? super V> action) {
+            m.forEach(action);
+        }
+
+        @Override
+        public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V putIfAbsent(K key, V value) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public boolean remove(Object key, Object value) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public boolean replace(K key, V oldValue, V newValue) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V replace(K key, V value) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V computeIfPresent(K key,
+                BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V compute(K key,
+                BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V merge(K key, V value,
+                BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
+            throw new UnsupportedOperationException();
+        }
+
         /**
          * We need this class in addition to UnmodifiableSet as
          * Map.Entries themselves permit modification of the backing Map
@@ -1590,9 +1654,9 @@
      * </pre>
      * Failure to follow this advice may result in non-deterministic behavior.
      *
-     * <p>The returned collection does <i>not</i> pass the <tt>hashCode</tt>
-     * and <tt>equals</tt> operations through to the backing collection, but
-     * relies on <tt>Object</tt>'s equals and hashCode methods.  This is
+     * <p>The returned collection does <i>not</i> pass the {@code hashCode}
+     * and {@code equals} operations through to the backing collection, but
+     * relies on {@code Object}'s equals and hashCode methods.  This is
      * necessary to preserve the contracts of these operations in the case
      * that the backing collection is a set or a list.<p>
      *
@@ -2107,6 +2171,57 @@
         public String toString() {
             synchronized (mutex) {return m.toString();}
         }
+
+        // Override default methods in Map
+        @Override
+        public V getOrDefault(Object k, V defaultValue) {
+            synchronized (mutex) {return m.getOrDefault(k, defaultValue);}
+        }
+        @Override
+        public void forEach(BiConsumer<? super K, ? super V> action) {
+            synchronized (mutex) {m.forEach(action);}
+        }
+        @Override
+        public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
+            synchronized (mutex) {m.replaceAll(function);}
+        }
+        @Override
+        public V putIfAbsent(K key, V value) {
+            synchronized (mutex) {return m.putIfAbsent(key, value);}
+        }
+        @Override
+        public boolean remove(Object key, Object value) {
+            synchronized (mutex) {return m.remove(key, value);}
+        }
+        @Override
+        public boolean replace(K key, V oldValue, V newValue) {
+            synchronized (mutex) {return m.replace(key, oldValue, newValue);}
+        }
+        @Override
+        public V replace(K key, V value) {
+            synchronized (mutex) {return m.replace(key, value);}
+        }
+        @Override
+        public V computeIfAbsent(K key,
+                Function<? super K, ? extends V> mappingFunction) {
+            synchronized (mutex) {return m.computeIfAbsent(key, mappingFunction);}
+        }
+        @Override
+        public V computeIfPresent(K key,
+                BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+            synchronized (mutex) {return m.computeIfPresent(key, remappingFunction);}
+        }
+        @Override
+        public V compute(K key,
+                BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+            synchronized (mutex) {return m.compute(key, remappingFunction);}
+        }
+        @Override
+        public V merge(K key, V value,
+                BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
+            synchronized (mutex) {return m.merge(key, value, remappingFunction);}
+        }
+
         private void writeObject(ObjectOutputStream s) throws IOException {
             synchronized (mutex) {s.defaultWriteObject();}
         }
@@ -2326,6 +2441,8 @@
         }
 
         public Iterator<E> iterator() {
+            // JDK-6363904 - unwrapped iterator could be typecast to
+            // ListIterator with unsafe set()
             final Iterator<E> it = c.iterator();
             return new Iterator<E>() {
                 public boolean hasNext() { return it.hasNext(); }
@@ -2652,7 +2769,7 @@
 
         public List<E> subList(int fromIndex, int toIndex) {
             return new CheckedRandomAccessList<>(
-                list.subList(fromIndex, toIndex), type);
+                    list.subList(fromIndex, toIndex), type);
         }
     }
 
@@ -2717,14 +2834,24 @@
                 throw new ClassCastException(badValueMsg(value));
         }
 
+        private BiFunction<? super K, ? super V, ? extends V> typeCheck(
+                BiFunction<? super K, ? super V, ? extends V> func) {
+            Objects.requireNonNull(func);
+            return (k, v) -> {
+                V newValue = func.apply(k, v);
+                typeCheck(k, newValue);
+                return newValue;
+            };
+        }
+
         private String badKeyMsg(Object key) {
             return "Attempt to insert " + key.getClass() +
-                " key into map with key type " + keyType;
+                    " key into map with key type " + keyType;
         }
 
         private String badValueMsg(Object value) {
             return "Attempt to insert " + value.getClass() +
-                " value into map with value type " + valueType;
+                    " value into map with value type " + valueType;
         }
 
         CheckedMap(Map<K, V> m, Class<K> keyType, Class<V> valueType) {
@@ -2768,7 +2895,7 @@
                 Object v = e.getValue();
                 typeCheck(k, v);
                 checked.add(
-                    new AbstractMap.SimpleImmutableEntry<>((K) k, (V) v));
+                        new AbstractMap.SimpleImmutableEntry<>((K)k, (V)v));
             }
             for (Map.Entry<K,V> e : checked)
                 m.put(e.getKey(), e.getValue());
@@ -2782,6 +2909,74 @@
             return entrySet;
         }
 
+        // Override default methods in Map
+        @Override
+        public void forEach(BiConsumer<? super K, ? super V> action) {
+            m.forEach(action);
+        }
+
+        @Override
+        public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
+            m.replaceAll(typeCheck(function));
+        }
+
+        @Override
+        public V putIfAbsent(K key, V value) {
+            typeCheck(key, value);
+            return m.putIfAbsent(key, value);
+        }
+
+        @Override
+        public boolean remove(Object key, Object value) {
+            return m.remove(key, value);
+        }
+
+        @Override
+        public boolean replace(K key, V oldValue, V newValue) {
+            typeCheck(key, newValue);
+            return m.replace(key, oldValue, newValue);
+        }
+
+        @Override
+        public V replace(K key, V value) {
+            typeCheck(key, value);
+            return m.replace(key, value);
+        }
+
+        @Override
+        public V computeIfAbsent(K key,
+                Function<? super K, ? extends V> mappingFunction) {
+            Objects.requireNonNull(mappingFunction);
+            return m.computeIfAbsent(key, k -> {
+                V value = mappingFunction.apply(k);
+                typeCheck(k, value);
+                return value;
+            });
+        }
+
+        @Override
+        public V computeIfPresent(K key,
+                BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+            return m.computeIfPresent(key, typeCheck(remappingFunction));
+        }
+
+        @Override
+        public V compute(K key,
+                BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+            return m.compute(key, typeCheck(remappingFunction));
+        }
+
+        @Override
+        public V merge(K key, V value,
+                BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
+            Objects.requireNonNull(remappingFunction);
+            return m.merge(key, value, (v1, v2) -> {
+                V newValue = remappingFunction.apply(v1, v2);
+                typeCheck(null, newValue);
+                return newValue;
+            });
+        }
+
         /**
          * We need this class in addition to CheckedSet as Map.Entry permits
          * modification of the backing Map via the setValue operation.  This
@@ -3456,6 +3651,67 @@
 
         public int hashCode()                      {return 0;}
 
+        // Override default methods in Map
+        @Override
+        @SuppressWarnings("unchecked")
+        public V getOrDefault(Object k, V defaultValue) {
+            return defaultValue;
+        }
+
+        @Override
+        public void forEach(BiConsumer<? super K, ? super V> action) {
+            Objects.requireNonNull(action);
+        }
+
+        @Override
+        public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
+            Objects.requireNonNull(function);
+        }
+
+        @Override
+        public V putIfAbsent(K key, V value) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public boolean remove(Object key, Object value) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public boolean replace(K key, V oldValue, V newValue) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V replace(K key, V value) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V computeIfAbsent(K key,
+                Function<? super K, ? extends V> mappingFunction) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V computeIfPresent(K key,
+                BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V compute(K key,
+                BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V merge(K key, V value,
+                BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
+            throw new UnsupportedOperationException();
+        }
+
         // Preserves singleton property
         private Object readResolve() {
             return EMPTY_MAP;
@@ -3619,6 +3875,65 @@
             return values;
         }
 
+        // Override default methods in Map
+        @Override
+        public V getOrDefault(Object key, V defaultValue) {
+            return eq(key, k) ? v : defaultValue;
+        }
+
+        @Override
+        public void forEach(BiConsumer<? super K, ? super V> action) {
+            action.accept(k, v);
+        }
+
+        @Override
+        public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V putIfAbsent(K key, V value) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public boolean remove(Object key, Object value) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public boolean replace(K key, V oldValue, V newValue) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V replace(K key, V value) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V computeIfAbsent(K key,
+                Function<? super K, ? extends V> mappingFunction) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V computeIfPresent(K key,
+                BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V compute(K key,
+                BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public V merge(K key, V value,
+                BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
+            throw new UnsupportedOperationException();
+        }
     }
 
     // Miscellaneous
--- a/src/share/classes/java/util/Comparators.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/Comparators.java	Wed Apr 17 21:48:04 2013 -0700
@@ -261,6 +261,7 @@
      * according to the supplied {@code Comparator}
      */
     public static<T> BinaryOperator<T> lesserOf(Comparator<? super T> comparator) {
+        Objects.requireNonNull(comparator);
         return (a, b) -> comparator.compare(a, b) <= 0 ? a : b;
     }
 
@@ -274,6 +275,7 @@
      * according to the supplied {@code Comparator}
      */
     public static<T> BinaryOperator<T> greaterOf(Comparator<? super T> comparator) {
+        Objects.requireNonNull(comparator);
         return (a, b) -> comparator.compare(a, b) >= 0 ? a : b;
     }
 }
--- a/src/share/classes/java/util/CurrencyData.properties	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/CurrencyData.properties	Wed Apr 17 21:48:04 2013 -0700
@@ -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
@@ -28,7 +28,7 @@
 # Version of the currency code information in this class.
 # It is a serial number that accompanies with each amendment.
 
-dataVersion=154
+dataVersion=155
 
 # List of all valid ISO 4217 currency codes.
 # To ensure compatibility, do not remove codes.
@@ -585,7 +585,7 @@
 minor0=\
     ADP-BEF-BIF-BYB-BYR-CLF-CLP-DJF-ESP-GNF-\
     GRD-ISK-ITL-JPY-KMF-KRW-LUF-MGF-PYG-PTE-RWF-\
-    TPE-TRL-VND-VUV-XAF-XOF-XPF
+    TPE-TRL-UGX-VND-VUV-XAF-XOF-XPF
 minor1=
 minor3=\
     BHD-IQD-JOD-KWD-LYD-OMR-TND
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/util/DoubleSummaryStatistics.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,187 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.util;
+
+import java.util.function.DoubleConsumer;
+
+/**
+ * A state object for collecting statistics such as count, min, max, sum, and
+ * average.
+ *
+ * <p>This class is designed to work with (though does not require)
+ * {@linkplain java.util.stream streams}. For example, you can compute
+ * summary statistics on a stream of doubles with:
+ * <pre> {@code
+ * DoubleSummaryStatistics stats = doubleStream.collect(DoubleSummaryStatistics::new,
+ *     DoubleSummaryStatistics::accept,
+ *     DoubleSummaryStatistics::combine);
+ * }</pre>
+ *
+ * <p>{@code DoubleSummaryStatistics} can be used as a
+ * {@linkplain java.util.stream.Stream#reduce(java.util.function.BinaryOperator) reduction}
+ * target for a {@linkplain java.util.stream.Stream stream}. For example:
+ *
+ * <pre> {@code
+ * DoubleSummaryStatistics stats = people.stream()
+ *     .collect(Collectors.toDoubleSummaryStatistics(Person::getWeight));
+ *}</pre>
+ *
+ * This computes, in a single pass, the count of people, as well as the minimum,
+ * maximum, sum, and average of their weights.
+ *
+ * @implNote This implementation is not thread safe. However, it is safe to use
+ * {@link java.util.stream.Collectors#toDoubleSummaryStatistics(java.util.function.ToDoubleFunction)
+ * Collectors.toDoubleStatistics()} on a parallel stream, because the parallel
+ * implementation of {@link java.util.stream.Stream#collect Stream.collect()}
+ * provides the necessary partitioning, isolation, and merging of results for
+ * safe and efficient parallel execution.
+ * @since 1.8
+ */
+public class DoubleSummaryStatistics implements DoubleConsumer {
+    private long count;
+    private double sum;
+    private double min = Double.POSITIVE_INFINITY;
+    private double max = Double.NEGATIVE_INFINITY;
+
+    /**
+     * Construct an empty instance with zero count, zero sum,
+     * {@code Double.POSITIVE_INFINITY} min, {@code Double.NEGATIVE_INFINITY}
+     * max and zero average.
+     */
+    public DoubleSummaryStatistics() { }
+
+    /**
+     * Records another value into the summary information.
+     *
+     * @param value the input value
+     */
+    @Override
+    public void accept(double value) {
+        ++count;
+        sum += value;
+        min = Math.min(min, value);
+        max = Math.max(max, value);
+    }
+
+    /**
+     * Combines the state of another {@code DoubleSummaryStatistics} into this
+     * one.
+     *
+     * @param other another {@code DoubleSummaryStatistics}
+     * @throws NullPointerException if {@code other} is null
+     */
+    public void combine(DoubleSummaryStatistics other) {
+        count += other.count;
+        sum += other.sum;
+        min = Math.min(min, other.min);
+        max = Math.max(max, other.max);
+    }
+
+    /**
+     * Return the count of values recorded.
+     *
+     * @return the count of values
+     */
+    public final long getCount() {
+        return count;
+    }
+
+    /**
+     * Returns the sum of values recorded, or zero if no values have been
+     * recorded. The sum returned can vary depending upon the order in which
+     * values are recorded. This is due to accumulated rounding error in
+     * addition of values of differing magnitudes. Values sorted by increasing
+     * absolute magnitude tend to yield more accurate results.  If any recorded
+     * value is a {@code NaN} or the sum is at any point a {@code NaN} then the
+     * sum will be {@code NaN}.
+     *
+     * @return the sum of values, or zero if none
+     */
+    public final double getSum() {
+        return sum;
+    }
+
+    /**
+     * Returns the minimum recorded value, {@code Double.NaN} if any recorded
+     * value was NaN or {@code Double.POSITIVE_INFINITY} if no values were
+     * recorded. Unlike the numerical comparison operators, this method
+     * considers negative zero to be strictly smaller than positive zero.
+     *
+     * @return the minimum recorded value, {@code Double.NaN} if any recorded
+     * value was NaN or {@code Double.POSITIVE_INFINITY} if no values were
+     * recorded
+     */
+    public final double getMin() {
+        return min;
+    }
+
+    /**
+     * Returns the maximum recorded value, {@code Double.NaN} if any recorded
+     * value was NaN or {@code Double.NEGATIVE_INFINITY} if no values were
+     * recorded. Unlike the numerical comparison operators, this method
+     * considers negative zero to be strictly smaller than positive zero.
+     *
+     * @return the maximum recorded value, {@code Double.NaN} if any recorded
+     * value was NaN or {@code Double.NEGATIVE_INFINITY} if no values were
+     * recorded
+     */
+    public final double getMax() {
+        return max;
+    }
+
+    /**
+     * Returns the average of values recorded, or zero if no values have been
+     * recorded. The average returned can vary depending upon the order in
+     * which values are recorded. This is due to accumulated rounding error in
+     * addition of values of differing magnitudes. Values sorted by increasing
+     * absolute magnitude tend to yield more accurate results. If any recorded
+     * value is a {@code NaN} or the sum is at any point a {@code NaN} then the
+     * average will be {@code NaN}.
+     *
+     * @return the average of values, or zero if none
+     */
+    public final double getAverage() {
+        return getCount() > 0 ? getSum() / getCount() : 0.0d;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * Returns a non-empty string representation of this object suitable for
+     * debugging. The exact presentation format is unspecified and may vary
+     * between implementations and versions.
+     */
+    @Override
+    public String toString() {
+        return String.format(
+            "%s{count=%d, sum=%f, min=%f, average=%f, max=%f}",
+            this.getClass().getSimpleName(),
+            getCount(),
+            getSum(),
+            getMin(),
+            getAverage(),
+            getMax());
+    }
+}
--- a/src/share/classes/java/util/Formatter.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/Formatter.java	Wed Apr 17 21:48:04 2013 -0700
@@ -56,7 +56,7 @@
 import java.time.ZoneOffset;
 import java.time.temporal.ChronoField;
 import java.time.temporal.TemporalAccessor;
-import java.time.temporal.Queries;
+import java.time.temporal.TemporalQuery;
 
 import sun.misc.DoubleConsts;
 import sun.misc.FormattedFloatingDecimal;
@@ -4160,7 +4160,7 @@
                     break;
                 }
                 case DateTime.ZONE:        { // 'Z' (symbol)
-                    ZoneId zid = t.query(Queries.zone());
+                    ZoneId zid = t.query(TemporalQuery.zone());
                     if (zid == null) {
                         throw new IllegalFormatConversionException(c, t.getClass());
                     }
--- a/src/share/classes/java/util/GregorianCalendar.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/GregorianCalendar.java	Wed Apr 17 21:48:04 2013 -0700
@@ -45,7 +45,7 @@
 import java.time.ZonedDateTime;
 import java.time.chrono.IsoChronology;
 import java.time.temporal.ChronoField;
-import java.time.temporal.Queries;
+import java.time.temporal.TemporalQuery;
 import sun.util.calendar.BaseCalendar;
 import sun.util.calendar.CalendarDate;
 import sun.util.calendar.CalendarSystem;
--- a/src/share/classes/java/util/HashMap.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/HashMap.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,11 @@
  */
 
 package java.util;
+
 import java.io.*;
+import java.util.function.Consumer;
+import java.util.function.BiFunction;
+import java.util.function.Function;
 
 /**
  * Hash table based implementation of the <tt>Map</tt> interface.  This
@@ -129,7 +133,7 @@
     /**
      * The default initial capacity - MUST be a power of two.
      */
-    static final int DEFAULT_INITIAL_CAPACITY = 16;
+    static final int DEFAULT_INITIAL_CAPACITY = 1 << 4; // aka 16
 
     /**
      * The maximum capacity, used if a higher value is implicitly specified
@@ -144,9 +148,14 @@
     static final float DEFAULT_LOAD_FACTOR = 0.75f;
 
     /**
+     * An empty table instance to share when the table is not inflated.
+     */
+    static final Entry<?,?>[] EMPTY_TABLE = {};
+
+    /**
      * The table, resized as necessary. Length MUST Always be a power of two.
      */
-    transient Entry<?,?>[] table;
+    transient Entry<?,?>[] table = EMPTY_TABLE;
 
     /**
      * The number of key-value mappings contained in this map.
@@ -157,6 +166,8 @@
      * The next size value at which to resize (capacity * load factor).
      * @serial
      */
+    // If table == EMPTY_TABLE then this is the initial capacity at which the
+    // table will be created when inflated.
     int threshold;
 
     /**
@@ -223,14 +234,8 @@
             throw new IllegalArgumentException("Illegal load factor: " +
                                                loadFactor);
 
-        // Find a power of 2 >= initialCapacity
-        int capacity = 1;
-        while (capacity < initialCapacity)
-            capacity <<= 1;
-
         this.loadFactor = loadFactor;
-        threshold = (int)Math.min(capacity * loadFactor, MAXIMUM_CAPACITY + 1);
-        table = new Entry<?,?>[capacity];
+        threshold = initialCapacity;
         init();
     }
 
@@ -265,9 +270,33 @@
     public HashMap(Map<? extends K, ? extends V> m) {
         this(Math.max((int) (m.size() / DEFAULT_LOAD_FACTOR) + 1,
                       DEFAULT_INITIAL_CAPACITY), DEFAULT_LOAD_FACTOR);
+        inflateTable(threshold);
+
         putAllForCreate(m);
     }
 
+    private static int roundUpToPowerOf2(int number) {
+        // assert number >= 0 : "number must be non-negative";
+        int rounded = number >= MAXIMUM_CAPACITY
+                ? MAXIMUM_CAPACITY
+                : (rounded = Integer.highestOneBit(number)) != 0
+                    ? (Integer.bitCount(number) > 1) ? rounded << 1 : rounded
+                    : 1;
+
+        return rounded;
+    }
+
+    /**
+     * Inflates the table.
+     */
+    private void inflateTable(int toSize) {
+        // Find a power of 2 >= toSize
+        int capacity = roundUpToPowerOf2(toSize);
+
+        threshold = (int) Math.min(capacity * loadFactor, MAXIMUM_CAPACITY + 1);
+        table = new Entry[capacity];
+    }
+
     // internal utilities
 
     /**
@@ -305,6 +334,7 @@
      * Returns index for hash code h.
      */
     static int indexFor(int h, int length) {
+        // assert Integer.bitCount(length) == 1 : "length must be a non-zero power of 2";
         return h & (length-1);
     }
 
@@ -350,6 +380,13 @@
         return null == entry ? null : entry.getValue();
     }
 
+    @Override
+    public V getOrDefault(Object key, V defaultValue) {
+        Entry<K,V> entry = getEntry(key);
+
+        return (entry == null) ? defaultValue : entry.getValue();
+    }
+
     /**
      * Returns <tt>true</tt> if this map contains a mapping for the
      * specified key.
@@ -369,6 +406,10 @@
      */
     @SuppressWarnings("unchecked")
     final Entry<K,V> getEntry(Object key) {
+        if (isEmpty()) {
+            return null;
+        }
+
         int hash = (key == null) ? 0 : hash(key);
         for (Entry<?,?> e = table[indexFor(hash, table.length)];
              e != null;
@@ -381,7 +422,6 @@
         return null;
     }
 
-
     /**
      * Associates the specified value with the specified key in this map.
      * If the map previously contained a mapping for the key, the old
@@ -395,6 +435,9 @@
      *         previously associated <tt>null</tt> with <tt>key</tt>.)
      */
     public V put(K key, V value) {
+        if (table == EMPTY_TABLE) {
+            inflateTable(threshold);
+        }
         if (key == null)
             return putForNullKey(value);
         int hash = hash(key);
@@ -529,6 +572,10 @@
         if (numKeysToBeAdded == 0)
             return;
 
+        if (table == EMPTY_TABLE) {
+            inflateTable((int) Math.max(numKeysToBeAdded * loadFactor, threshold));
+        }
+
         /*
          * Expand the map if the map if the number of mappings to be added
          * is greater than or equal to threshold.  This is conservative; the
@@ -567,12 +614,270 @@
         return (e == null ? null : e.value);
     }
 
+    // optimized implementations of default methods in Map
+
+    @Override
+    public V putIfAbsent(K key, V value) {
+        if (table == EMPTY_TABLE) {
+            inflateTable(threshold);
+        }
+        int hash = (key == null) ? 0 : hash(key);
+        int i = indexFor(hash, table.length);
+        @SuppressWarnings("unchecked")
+        Entry<K,V> e = (Entry<K,V>)table[i];
+        for(; e != null; e = e.next) {
+            if (e.hash == hash && Objects.equals(e.key, key)) {
+                if(e.value != null) {
+                    return e.value;
+                }
+                e.value = value;
+                modCount++;
+                e.recordAccess(this);
+                return null;
+            }
+        }
+
+        modCount++;
+        addEntry(hash, key, value, i);
+        return null;
+    }
+
+    @Override
+    public boolean remove(Object key, Object value) {
+        if (isEmpty()) {
+            return false;
+        }
+        int hash = (key == null) ? 0 : hash(key);
+        int i = indexFor(hash, table.length);
+        @SuppressWarnings("unchecked")
+        Entry<K,V> prev = (Entry<K,V>)table[i];
+        Entry<K,V> e = prev;
+
+        while (e != null) {
+            Entry<K,V> next = e.next;
+            if (e.hash == hash && Objects.equals(e.key, key)) {
+                if (!Objects.equals(e.value, value)) {
+                    return false;
+                }
+                modCount++;
+                size--;
+                if (prev == e)
+                    table[i] = next;
+                else
+                    prev.next = next;
+                e.recordRemoval(this);
+                return true;
+            }
+            prev = e;
+            e = next;
+        }
+
+        return false;
+    }
+
+    @Override
+    public boolean replace(K key, V oldValue, V newValue) {
+        if (isEmpty()) {
+            return false;
+        }
+        int hash = (key == null) ? 0 : hash(key);
+        int i = indexFor(hash, table.length);
+        @SuppressWarnings("unchecked")
+        Entry<K,V> e = (Entry<K,V>)table[i];
+        for (; e != null; e = e.next) {
+            if (e.hash == hash && Objects.equals(e.key, key) && Objects.equals(e.value, oldValue)) {
+                e.value = newValue;
+                e.recordAccess(this);
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    @Override
+    public V replace(K key, V value) {
+        if (isEmpty()) {
+            return null;
+        }
+        int hash = (key == null) ? 0 : hash(key);
+        int i = indexFor(hash, table.length);
+        @SuppressWarnings("unchecked")
+        Entry<K,V> e = (Entry<K,V>)table[i];
+        for (; e != null; e = e.next) {
+            if (e.hash == hash && Objects.equals(e.key, key)) {
+                V oldValue = e.value;
+                e.value = value;
+                e.recordAccess(this);
+                return oldValue;
+            }
+        }
+
+        return null;
+    }
+
+    @Override
+    public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) {
+        if (table == EMPTY_TABLE) {
+            inflateTable(threshold);
+        }
+        int hash = (key == null) ? 0 : hash(key);
+        int i = indexFor(hash, table.length);
+        @SuppressWarnings("unchecked")
+        Entry<K,V> e = (Entry<K,V>)table[i];
+        for (; e != null; e = e.next) {
+            if (e.hash == hash && Objects.equals(e.key, key)) {
+                V oldValue = e.value;
+                return oldValue == null ? (e.value = mappingFunction.apply(key)) : oldValue;
+            }
+        }
+
+        V newValue = mappingFunction.apply(key);
+        if (newValue != null) {
+            modCount++;
+            addEntry(hash, key, newValue, i);
+        }
+
+        return newValue;
+    }
+
+    @Override
+    public V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+        if (isEmpty()) {
+            return null;
+        }
+        int hash = (key == null) ? 0 : hash(key);
+        int i = indexFor(hash, table.length);
+        @SuppressWarnings("unchecked")
+        Entry<K,V> prev = (Entry<K,V>)table[i];
+        Entry<K,V> e = prev;
+
+        while (e != null) {
+            Entry<K,V> next = e.next;
+            if (e.hash == hash && Objects.equals(e.key, key)) {
+                V oldValue = e.value;
+                if (oldValue == null)
+                    break;
+                V newValue = remappingFunction.apply(key, oldValue);
+                modCount++;
+                if (newValue == null) {
+                    size--;
+                    if (prev == e)
+                        table[i] = next;
+                    else
+                        prev.next = next;
+                    e.recordRemoval(this);
+                } else {
+                    e.value = newValue;
+                    e.recordAccess(this);
+                }
+                return newValue;
+            }
+            prev = e;
+            e = next;
+        }
+
+        return null;
+    }
+
+    @Override
+    public V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+        if (table == EMPTY_TABLE) {
+            inflateTable(threshold);
+        }
+        int hash = (key == null) ? 0 : hash(key);
+        int i = indexFor(hash, table.length);
+        @SuppressWarnings("unchecked")
+        Entry<K,V> prev = (Entry<K,V>)table[i];
+        Entry<K,V> e = prev;
+
+        while (e != null) {
+            Entry<K,V> next = e.next;
+            if (e.hash == hash && Objects.equals(e.key, key)) {
+                V oldValue = e.value;
+                V newValue = remappingFunction.apply(key, oldValue);
+                if (newValue != oldValue) {
+                    modCount++;
+                    if (newValue == null) {
+                        size--;
+                        if (prev == e)
+                            table[i] = next;
+                        else
+                            prev.next = next;
+                        e.recordRemoval(this);
+                    } else {
+                        e.value = newValue;
+                        e.recordAccess(this);
+                    }
+                }
+                return newValue;
+            }
+            prev = e;
+            e = next;
+        }
+
+        V newValue = remappingFunction.apply(key, null);
+        if (newValue != null) {
+            modCount++;
+            addEntry(hash, key, newValue, i);
+        }
+
+        return newValue;
+    }
+
+    @Override
+    public V merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
+        if (table == EMPTY_TABLE) {
+            inflateTable(threshold);
+        }
+        int hash = (key == null) ? 0 : hash(key);
+        int i = indexFor(hash, table.length);
+        @SuppressWarnings("unchecked")
+        Entry<K,V> prev = (Entry<K,V>)table[i];
+        Entry<K,V> e = prev;
+
+        while (e != null) {
+            Entry<K,V> next = e.next;
+            if (e.hash == hash && Objects.equals(e.key, key)) {
+                V oldValue = e.value;
+                V newValue = remappingFunction.apply(oldValue, value);
+                modCount++;
+                if (newValue == null) {
+                    size--;
+                    if (prev == e)
+                        table[i] = next;
+                    else
+                        prev.next = next;
+                    e.recordRemoval(this);
+                } else {
+                    e.value = newValue;
+                    e.recordAccess(this);
+                }
+                return newValue;
+            }
+            prev = e;
+            e = next;
+        }
+
+        if (value != null) {
+            modCount++;
+            addEntry(hash, key, value, i);
+        }
+
+        return value;
+    }
+
+    // end of optimized implementations of default methods in Map
+
     /**
      * Removes and returns the entry associated with the specified key
      * in the HashMap.  Returns null if the HashMap contains no mapping
      * for this key.
      */
     final Entry<K,V> removeEntryForKey(Object key) {
+        if (isEmpty()) {
+            return null;
+        }
         int hash = (key == null) ? 0 : hash(key);
         int i = indexFor(hash, table.length);
         @SuppressWarnings("unchecked")
@@ -605,7 +910,7 @@
      * for matching.
      */
     final Entry<K,V> removeMapping(Object o) {
-        if (!(o instanceof Map.Entry))
+        if (isEmpty() || !(o instanceof Map.Entry))
             return null;
 
         Map.Entry<?,?> entry = (Map.Entry<?,?>) o;
@@ -641,9 +946,7 @@
      */
     public void clear() {
         modCount++;
-        Entry<?,?>[] tab = table;
-        for (int i = 0; i < tab.length; i++)
-            tab[i] = null;
+        Arrays.fill(table, null);
         size = 0;
     }
 
@@ -660,8 +963,8 @@
             return containsNullValue();
 
         Entry<?,?>[] tab = table;
-        for (int i = 0; i < tab.length ; i++)
-            for (Entry<?,?> e = tab[i] ; e != null ; e = e.next)
+        for (int i = 0; i < tab.length; i++)
+            for (Entry<?,?> e = tab[i]; e != null; e = e.next)
                 if (value.equals(e.value))
                     return true;
         return false;
@@ -672,8 +975,8 @@
      */
     private boolean containsNullValue() {
         Entry<?,?>[] tab = table;
-        for (int i = 0; i < tab.length ; i++)
-            for (Entry<?,?> e = tab[i] ; e != null ; e = e.next)
+        for (int i = 0; i < tab.length; i++)
+            for (Entry<?,?> e = tab[i]; e != null; e = e.next)
                 if (e.value == null)
                     return true;
         return false;
@@ -693,7 +996,14 @@
         } catch (CloneNotSupportedException e) {
             // assert false;
         }
-        result.table = new Entry<?,?>[table.length];
+        if (result.table != EMPTY_TABLE) {
+            result.inflateTable(Math.min(
+                (int) Math.min(
+                    size * Math.min(1 / loadFactor, 4.0f),
+                    // we have limits...
+                    HashMap.MAXIMUM_CAPACITY),
+                table.length));
+        }
         result.entrySet = null;
         result.modCount = 0;
         result.size = 0;
@@ -749,8 +1059,7 @@
         }
 
         public final int hashCode() {
-            return (key==null   ? 0 : key.hashCode()) ^
-                   (value==null ? 0 : value.hashCode());
+            return Objects.hashCode(getKey()) ^ Objects.hashCode(getValue());
         }
 
         public final String toString() {
@@ -1017,14 +1326,15 @@
     private void writeObject(java.io.ObjectOutputStream s)
         throws IOException
     {
-        Iterator<Map.Entry<K,V>> i =
-            (size > 0) ? entrySet0().iterator() : null;
-
         // Write out the threshold, loadfactor, and any hidden stuff
         s.defaultWriteObject();
 
         // Write out number of buckets
-        s.writeInt(table.length);
+        if (table==EMPTY_TABLE) {
+            s.writeInt(roundUpToPowerOf2(threshold));
+        } else {
+           s.writeInt(table.length);
+        }
 
         // Write out size (number of Mappings)
         s.writeInt(size);
@@ -1049,16 +1359,18 @@
     {
         // Read in the threshold (ignored), loadfactor, and any hidden stuff
         s.defaultReadObject();
-        if (loadFactor <= 0 || Float.isNaN(loadFactor))
+        if (loadFactor <= 0 || Float.isNaN(loadFactor)) {
             throw new InvalidObjectException("Illegal load factor: " +
                                                loadFactor);
+        }
 
-        // set hashMask
+        // set other fields that need values
         Holder.UNSAFE.putIntVolatile(this, Holder.HASHSEED_OFFSET,
                 sun.misc.Hashing.randomHashSeed(this));
+        table = EMPTY_TABLE;
 
-        // Read in number of buckets and allocate the bucket array;
-        s.readInt(); // ignored
+        // Read in number of buckets
+        s.readInt(); // ignored.
 
         // Read number of mappings
         int mappings = s.readInt();
@@ -1066,23 +1378,21 @@
             throw new InvalidObjectException("Illegal mappings count: " +
                                                mappings);
 
-        int initialCapacity = (int) Math.min(
-                // capacity chosen by number of mappings
-                // and desired load (if >= 0.25)
-                mappings * Math.min(1 / loadFactor, 4.0f),
-                // we have limits...
-                HashMap.MAXIMUM_CAPACITY);
-        int capacity = 1;
-        // find smallest power of two which holds all mappings
-        while (capacity < initialCapacity) {
-            capacity <<= 1;
+        // capacity chosen by number of mappings and desired load (if >= 0.25)
+        int capacity = (int) Math.min(
+                    mappings * Math.min(1 / loadFactor, 4.0f),
+                    // we have limits...
+                    HashMap.MAXIMUM_CAPACITY);
+
+        // allocate the bucket array;
+        if (mappings > 0) {
+            inflateTable(capacity);
+        } else {
+            threshold = capacity;
         }
 
-        table = new Entry<?,?>[capacity];
-        threshold = (int) Math.min(capacity * loadFactor, MAXIMUM_CAPACITY + 1);
         init();  // Give subclass a chance to do its thing.
 
-
         // Read the keys and values, and put the mappings in the HashMap
         for (int i=0; i<mappings; i++) {
             @SuppressWarnings("unchecked")
--- a/src/share/classes/java/util/Hashtable.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/Hashtable.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 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
@@ -24,7 +24,11 @@
  */
 
 package java.util;
+
 import java.io.*;
+import java.util.function.BiConsumer;
+import java.util.function.Function;
+import java.util.function.BiFunction;
 
 /**
  * This class implements a hash table, which maps keys to values. Any
@@ -455,6 +459,26 @@
         }
     }
 
+    private void addEntry(int hash, K key, V value, int index) {
+        modCount++;
+
+        Entry<?,?> tab[] = table;
+        if (count >= threshold) {
+            // Rehash the table if the threshold is exceeded
+            rehash();
+
+            tab = table;
+            hash = hash(key);
+            index = (hash & 0x7FFFFFFF) % tab.length;
+        }
+
+        // Creates the new entry.
+        @SuppressWarnings("unchecked")
+        Entry<K,V> e = (Entry<K,V>) tab[index];
+        tab[index] = new Entry<>(hash, key, value, e);
+        count++;
+    }
+
     /**
      * Maps the specified <code>key</code> to the specified
      * <code>value</code> in this hashtable. Neither the key nor the
@@ -492,21 +516,7 @@
             }
         }
 
-        modCount++;
-        if (count >= threshold) {
-            // Rehash the table if the threshold is exceeded
-            rehash();
-
-            tab = table;
-            hash = hash(key);
-            index = (hash & 0x7FFFFFFF) % tab.length;
-        }
-
-        // Creates the new entry.
-        @SuppressWarnings("unchecked")
-        Entry<K,V> e = (Entry<K,V>)tab[index];
-        tab[index] = new Entry<>(hash, key, value, e);
-        count++;
+        addEntry(hash, key, value, index);
         return null;
     }
 
@@ -892,6 +902,239 @@
         return h;
     }
 
+    @Override
+    public synchronized V getOrDefault(Object key, V defaultValue) {
+        V result = get(key);
+        return (null == result) ? defaultValue : result;
+    }
+
+    @Override
+    public synchronized void forEach(BiConsumer<? super K, ? super V> action) {
+        Objects.requireNonNull(action);     // explicit check required in case
+                                            // table is empty.
+        Entry<?,?>[] tab = table;
+        for (Entry<?,?> entry : tab) {
+            while (entry != null) {
+                action.accept((K)entry.key, (V)entry.value);
+                entry = entry.next;
+            }
+        }
+    }
+
+    @Override
+    public synchronized void replaceAll(
+            BiFunction<? super K, ? super V, ? extends V> function) {
+        Map.super.replaceAll(function);
+    }
+
+    @Override
+    public synchronized V putIfAbsent(K key, V value) {
+        Objects.requireNonNull(value);
+
+        // Makes sure the key is not already in the hashtable.
+        Entry<?,?> tab[] = table;
+        int hash = hash(key);
+        int index = (hash & 0x7FFFFFFF) % tab.length;
+        @SuppressWarnings("unchecked")
+        Entry<K,V> entry = (Entry<K,V>)tab[index];
+        for (; entry != null; entry = entry.next) {
+            if ((entry.hash == hash) && entry.key.equals(key)) {
+                V old = entry.value;
+                if (old == null) {
+                    entry.value = value;
+                }
+                return old;
+            }
+        }
+
+        addEntry(hash, key, value, index);
+        return null;
+    }
+
+    @Override
+    public synchronized boolean remove(Object key, Object value) {
+        Objects.requireNonNull(value);
+
+        Entry<?,?> tab[] = table;
+        int hash = hash(key);
+        int index = (hash & 0x7FFFFFFF) % tab.length;
+        @SuppressWarnings("unchecked")
+        Entry<K,V> e = (Entry<K,V>)tab[index];
+        for (Entry<K,V> prev = null; e != null; prev = e, e = e.next) {
+            if ((e.hash == hash) && e.key.equals(key) && e.value.equals(value)) {
+                modCount++;
+                if (prev != null) {
+                    prev.next = e.next;
+                } else {
+                    tab[index] = e.next;
+                }
+                count--;
+                e.value = null;
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public synchronized boolean replace(K key, V oldValue, V newValue) {
+        Entry<?,?> tab[] = table;
+        int hash = hash(key);
+        int index = (hash & 0x7FFFFFFF) % tab.length;
+        @SuppressWarnings("unchecked")
+        Entry<K,V> e = (Entry<K,V>)tab[index];
+        for (; e != null; e = e.next) {
+            if ((e.hash == hash) && e.key.equals(key)) {
+                if (e.value.equals(oldValue)) {
+                    e.value = newValue;
+                    return true;
+                } else {
+                    return false;
+                }
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public synchronized V replace(K key, V value) {
+        Entry<?,?> tab[] = table;
+        int hash = hash(key);
+        int index = (hash & 0x7FFFFFFF) % tab.length;
+        @SuppressWarnings("unchecked")
+        Entry<K,V> e = (Entry<K,V>)tab[index];
+        for (; e != null; e = e.next) {
+            if ((e.hash == hash) && e.key.equals(key)) {
+                V oldValue = e.value;
+                e.value = value;
+                return oldValue;
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public synchronized V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) {
+        Objects.requireNonNull(mappingFunction);
+
+        Entry<?,?> tab[] = table;
+        int hash = hash(key);
+        int index = (hash & 0x7FFFFFFF) % tab.length;
+        @SuppressWarnings("unchecked")
+        Entry<K,V> e = (Entry<K,V>)tab[index];
+        for (; e != null; e = e.next) {
+            if (e.hash == hash && e.key.equals(key)) {
+                // Hashtable not accept null value
+                return e.value;
+            }
+        }
+
+        V newValue = mappingFunction.apply(key);
+        if (newValue != null) {
+            addEntry(hash, key, newValue, index);
+        }
+
+        return newValue;
+    }
+
+    @Override
+    public V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+        Objects.requireNonNull(remappingFunction);
+
+        Entry<?,?> tab[] = table;
+        int hash = hash(key);
+        int index = (hash & 0x7FFFFFFF) % tab.length;
+        @SuppressWarnings("unchecked")
+        Entry<K,V> e = (Entry<K,V>)tab[index];
+        for (Entry<K,V> prev = null; e != null; prev = e, e = e.next) {
+            if (e.hash == hash && e.key.equals(key)) {
+                V newValue = remappingFunction.apply(key, e.value);
+                if (newValue == null) {
+                    modCount++;
+                    if (prev != null) {
+                        prev.next = e.next;
+                    } else {
+                        tab[index] = e.next;
+                    }
+                    count--;
+                } else {
+                    e.value = newValue;
+                }
+                return newValue;
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+        Objects.requireNonNull(remappingFunction);
+
+        Entry<?,?> tab[] = table;
+        int hash = hash(key);
+        int index = (hash & 0x7FFFFFFF) % tab.length;
+        @SuppressWarnings("unchecked")
+        Entry<K,V> e = (Entry<K,V>)tab[index];
+        for (Entry<K,V> prev = null; e != null; prev = e, e = e.next) {
+            if (e.hash == hash && Objects.equals(e.key, key)) {
+                V newValue = remappingFunction.apply(key, e.value);
+                if (newValue == null) {
+                    modCount++;
+                    if (prev != null) {
+                        prev.next = e.next;
+                    } else {
+                        tab[index] = e.next;
+                    }
+                    count--;
+                } else {
+                    e.value = newValue;
+                }
+                return newValue;
+            }
+        }
+
+        V newValue = remappingFunction.apply(key, null);
+        if (newValue != null) {
+            addEntry(hash, key, newValue, index);
+        }
+
+        return newValue;
+    }
+
+    @Override
+    public V merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
+        Objects.requireNonNull(remappingFunction);
+
+        Entry<?,?> tab[] = table;
+        int hash = hash(key);
+        int index = (hash & 0x7FFFFFFF) % tab.length;
+        @SuppressWarnings("unchecked")
+        Entry<K,V> e = (Entry<K,V>)tab[index];
+        for (Entry<K,V> prev = null; e != null; prev = e, e = e.next) {
+            if (e.hash == hash && e.key.equals(key)) {
+                V newValue = remappingFunction.apply(e.value, value);
+                if (newValue == null) {
+                    modCount++;
+                    if (prev != null) {
+                        prev.next = e.next;
+                    } else {
+                        tab[index] = e.next;
+                    }
+                    count--;
+                } else {
+                    e.value = newValue;
+                }
+                return newValue;
+            }
+        }
+
+        if (value != null) {
+            addEntry(hash, key, value, index);
+        }
+
+        return value;
+    }
+
     /**
      * Save the state of the Hashtable to a stream (i.e., serialize it).
      *
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/util/IntSummaryStatistics.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.util;
+
+import java.util.function.IntConsumer;
+
+/**
+ * A state object for collecting statistics such as count, min, max, sum, and
+ * average.
+ *
+ * <p>This class is designed to work with (though does not require)
+ * {@linkplain java.util.stream streams}. For example, you can compute
+ * summary statistics on a stream of ints with:
+ * <pre> {@code
+ * IntSummaryStatistics stats = intStream.collect(IntSummaryStatistics::new,
+ *     IntSummaryStatistics::accept,
+ *     IntSummaryStatistics::combine);
+ * }</pre>
+ *
+ * <p>{@code IntSummaryStatistics} can be used as a
+ * {@linkplain java.util.stream.Stream#reduce(java.util.function.BinaryOperator) reduction}
+ * target for a {@linkplain java.util.stream.Stream stream}. For example:
+ *
+ * <pre> {@code
+ * IntSummaryStatistics stats = people.stream()
+ *     .collect(Collectors.toIntSummaryStatistics(Person::getDependents));
+ *}</pre>
+ *
+ * This computes, in a single pass, the count of people, as well as the minimum,
+ * maximum, sum, and average of their number of dependents.
+ *
+ * @implNote This implementation is not thread safe. However, it is safe to use
+ * {@link java.util.stream.Collectors#toIntSummaryStatistics(java.util.function.ToIntFunction)
+ * Collectors.toIntStatistics()} on a parallel stream, because the parallel
+ * implementation of {@link java.util.stream.Stream#collect Stream.collect()}
+ * provides the necessary partitioning, isolation, and merging of results for
+ * safe and efficient parallel execution.
+ *
+ * <p>This implementation does not check for overflow of the sum.
+ * @since 1.8
+ */
+public class IntSummaryStatistics implements IntConsumer {
+    private long count;
+    private long sum;
+    private int min = Integer.MAX_VALUE;
+    private int max = Integer.MIN_VALUE;
+
+    /**
+     * Construct an empty instance with zero count, zero sum,
+     * {@code Integer.MAX_VALUE} min, {@code Integer.MIN_VALUE} max and zero
+     * average.
+     */
+    public IntSummaryStatistics() { }
+
+    /**
+     * Records a new value into the summary information
+     *
+     * @param value the input value
+     */
+    @Override
+    public void accept(int value) {
+        ++count;
+        sum += value;
+        min = Math.min(min, value);
+        max = Math.max(max, value);
+    }
+
+    /**
+     * Combines the state of another {@code IntSummaryStatistics} into this one.
+     *
+     * @param other another {@code IntSummaryStatistics}
+     * @throws NullPointerException if {@code other} is null
+     */
+    public void combine(IntSummaryStatistics other) {
+        count += other.count;
+        sum += other.sum;
+        min = Math.min(min, other.min);
+        max = Math.max(max, other.max);
+    }
+
+    /**
+     * Returns the count of values recorded.
+     *
+     * @return the count of values
+     */
+    public final long getCount() {
+        return count;
+    }
+
+    /**
+     * Returns the sum of values recorded, or zero if no values have been
+     * recorded.
+     *
+     * @return the sum of values, or zero if none
+     */
+    public final long getSum() {
+        return sum;
+    }
+
+    /**
+     * Returns the minimum value recorded, or {@code Integer.MAX_VALUE} if no
+     * values have been recorded.
+     *
+     * @return the minimum value, or {@code Integer.MAX_VALUE} if none
+     */
+    public final int getMin() {
+        return min;
+    }
+
+    /**
+     * Returns the maximum value recorded, or {@code Integer.MIN_VALUE} if no
+     * values have been recorded.
+     *
+     * @return the maximum value, or {@code Integer.MIN_VALUE} if none
+     */
+    public final int getMax() {
+        return max;
+    }
+
+    /**
+     * Returns the average of values recorded, or zero if no values have been
+     * recorded.
+     *
+     * @return the average of values, or zero if none
+     */
+    public final double getAverage() {
+        return getCount() > 0 ? (double) getSum() / getCount() : 0.0d;
+    }
+
+    @Override
+    /**
+     * {@inheritDoc}
+     *
+     * Returns a non-empty string representation of this object suitable for
+     * debugging. The exact presentation format is unspecified and may vary
+     * between implementations and versions.
+     */
+    public String toString() {
+        return String.format(
+            "%s{count=%d, sum=%d, min=%d, average=%d, max=%d}",
+            this.getClass().getSimpleName(),
+            getCount(),
+            getSum(),
+            getMin(),
+            getAverage(),
+            getMax());
+    }
+}
--- a/src/share/classes/java/util/Iterator.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/Iterator.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
 
 package java.util;
 
+import java.util.function.Consumer;
+
 /**
  * An iterator over a collection.  {@code Iterator} takes the place of
  * {@link Enumeration} in the Java Collections Framework.  Iterators
@@ -75,6 +77,10 @@
      * iteration is in progress in any way other than by calling this
      * method.
      *
+     * @implSpec
+     * The default implementation throws an instance of
+     * {@link UnsupportedOperationException} and performs no other action.
+     *
      * @throws UnsupportedOperationException if the {@code remove}
      *         operation is not supported by this iterator
      *
@@ -83,5 +89,30 @@
      *         been called after the last call to the {@code next}
      *         method
      */
-    void remove();
+    default void remove() {
+        throw new UnsupportedOperationException("remove");
+    }
+
+    /**
+     * Performs the given action for each remaining element, in the order
+     * elements occur when iterating, until all elements have been processed or
+     * the action throws an exception.  Errors or runtime exceptions thrown by
+     * the action are relayed to the caller.
+     *
+     * @implSpec
+     * <p>The default implementation behaves as if:
+     * <pre>{@code
+     *     while (hasNext())
+     *         action.accept(next());
+     * }</pre>
+     *
+     * @param action The action to be performed for each element
+     * @throws NullPointerException if the specified action is null
+     * @since 1.8
+     */
+    default void forEachRemaining(Consumer<? super E> action) {
+        Objects.requireNonNull(action);
+        while (hasNext())
+            action.accept(next());
+    }
 }
--- a/src/share/classes/java/util/List.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/List.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -597,4 +597,30 @@
      *         fromIndex &gt; toIndex</tt>)
      */
     List<E> subList(int fromIndex, int toIndex);
+
+    /**
+     * Creates a {@link Spliterator} over the elements in this list.
+     *
+     * <p>The {@code Spliterator} reports {@link Spliterator#SIZED} and
+     * {@link Spliterator#ORDERED}.  Implementations should document the
+     * reporting of additional characteristic values.
+     *
+     * @implSpec
+     * The default implementation creates a
+     * <em><a href="Spliterator.html#binding">late-binding</a></em> spliterator
+     * from the list's {@code Iterator}.  The spliterator inherits the
+     * <em>fail-fast</em> properties of the collection's iterator.
+     *
+     * @implNote
+     * The created {@code Spliterator} additionally reports
+     * {@link Spliterator#SUBSIZED}.
+     *
+     * @return a {@code Spliterator} over the elements in this list
+     * @since 1.8
+     */
+    @Override
+    default Spliterator<E> spliterator() {
+        return Spliterators.spliterator(this, Spliterator.ORDERED);
+    }
 }
+
--- a/src/share/classes/java/util/LocaleISOData.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/LocaleISOData.java	Wed Apr 17 21:48:04 2013 -0700
@@ -404,7 +404,7 @@
         + "PG" + "PNG"  // Papua New Guinea
         + "PH" + "PHL"  // Philippines, Republic of the
         + "PK" + "PAK"  // Pakistan, Islamic Republic of
-        + "PL" + "POL"  // Poland, Polish People's Republic
+        + "PL" + "POL"  // Poland, Republic of Poland
         + "PM" + "SPM"  // St. Pierre and Miquelon
         + "PN" + "PCN"  // Pitcairn Island
         + "PR" + "PRI"  // Puerto Rico
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/util/LongSummaryStatistics.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.util;
+
+import java.util.function.IntConsumer;
+import java.util.function.LongConsumer;
+
+/**
+ * A state object for collecting statistics such as count, min, max, sum, and
+ * average.
+ *
+ * <p>This class is designed to work with (though does not require)
+ * {@linkplain java.util.stream streams}. For example, you can compute
+ * summary statistics on a stream of longs with:
+ * <pre> {@code
+ * LongSummaryStatistics stats = longStream.collect(LongSummaryStatistics::new,
+ *     LongSummaryStatistics::accept,
+ *     LongSummaryStatistics::combine);
+ * }</pre>
+ *
+ * <p>{@code LongSummaryStatistics} can be used as a
+ * {@linkplain java.util.stream.Stream#reduce(java.util.function.BinaryOperator) reduction}
+ * target for a {@linkplain java.util.stream.Stream stream}. For example:
+ *
+ * <pre> {@code
+ * LongSummaryStatistics stats = people.stream()
+ *     .collect(Collectors.toLongSummaryStatistics(Person::getAge));
+ *}</pre>
+ *
+ * This computes, in a single pass, the count of people, as well as the minimum,
+ * maximum, sum, and average of their ages in milliseconds.
+ *
+ * @implNote This implementation is not thread safe. However, it is safe to use
+ * {@link java.util.stream.Collectors#toLongSummaryStatistics(java.util.function.ToLongFunction)
+ * Collectors.toLongStatistics()} on a parallel stream, because the parallel
+ * implementation of {@link java.util.stream.Stream#collect Stream.collect()}
+ * provides the necessary partitioning, isolation, and merging of results for
+ * safe and efficient parallel execution.
+ *
+ * <p>This implementation does not check for overflow of the sum.
+ * @since 1.8
+ */
+public class LongSummaryStatistics implements LongConsumer, IntConsumer {
+    private long count;
+    private long sum;
+    private long min = Long.MAX_VALUE;
+    private long max = Long.MIN_VALUE;
+
+    /**
+     * Construct an empty instance with zero count, zero sum,
+     * {@code Long.MAX_VALUE} min, {@code Long.MIN_VALUE} max and zero
+     * average.
+     */
+    public LongSummaryStatistics() { }
+
+    /**
+     * Records a new {@code int} value into the summary information.
+     *
+     * @param value the input value
+     */
+    @Override
+    public void accept(int value) {
+        accept((long) value);
+    }
+
+    /**
+     * Records a new {@code long} value into the summary information.
+     *
+     * @param value the input value
+     */
+    @Override
+    public void accept(long value) {
+        ++count;
+        sum += value;
+        min = Math.min(min, value);
+        max = Math.max(max, value);
+    }
+
+    /**
+     * Combines the state of another {@code LongSummaryStatistics} into this
+     * one.
+     *
+     * @param other another {@code LongSummaryStatistics}
+     * @throws NullPointerException if {@code other} is null
+     */
+    public void combine(LongSummaryStatistics other) {
+        count += other.count;
+        sum += other.sum;
+        min = Math.min(min, other.min);
+        max = Math.max(max, other.max);
+    }
+
+    /**
+     * Returns the count of values recorded.
+     *
+     * @return the count of values
+     */
+    public final long getCount() {
+        return count;
+    }
+
+    /**
+     * Returns the sum of values recorded, or zero if no values have been
+     * recorded.
+     *
+     * @return the sum of values, or zero if none
+     */
+    public final long getSum() {
+        return sum;
+    }
+
+    /**
+     * Returns the minimum value recorded, or {@code Long.MAX_VALUE} if no
+     * values have been recorded.
+     *
+     * @return the minimum value, or {@code Long.MAX_VALUE} if none
+     */
+    public final long getMin() {
+        return min;
+    }
+
+    /**
+     * Returns the maximum value recorded, or {@code Long.MIN_VALUE} if no
+     * values have been recorded
+     *
+     * @return the maximum value, or {@code Long.MIN_VALUE} if none
+     */
+    public final long getMax() {
+        return max;
+    }
+
+    /**
+     * Returns the average of values recorded, or zero if no values have been
+     * recorded.
+     *
+     * @return The average of values, or zero if none
+     */
+    public final double getAverage() {
+        return getCount() > 0 ? (double) getSum() / getCount() : 0.0d;
+    }
+
+    @Override
+    /**
+     * {@inheritDoc}
+     *
+     * Returns a non-empty string representation of this object suitable for
+     * debugging. The exact presentation format is unspecified and may vary
+     * between implementations and versions.
+     */
+    public String toString() {
+        return String.format(
+            "%s{count=%d, sum=%d, min=%d, average=%d, max=%d}",
+            this.getClass().getSimpleName(),
+            getCount(),
+            getSum(),
+            getMin(),
+            getAverage(),
+            getMax());
+    }
+}
--- a/src/share/classes/java/util/Map.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/Map.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
 
 package java.util;
 
+import java.util.function.BiConsumer;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+
 /**
  * An object that maps keys to values.  A map cannot contain duplicate keys;
  * each key can map to at most one value.
@@ -475,4 +479,613 @@
      */
     int hashCode();
 
+    // Defaultable methods
+
+    /**
+    *  Returns the value to which the specified key is mapped,
+    *  or {@code defaultValue} if this map contains no mapping
+    *  for the key.
+    *
+    * <p>The default implementation makes no guarantees about synchronization
+    * or atomicity properties of this method. Any implementation providing
+    * atomicity guarantees must override this method and document its
+    * concurrency properties.
+    *
+    * @param key the key whose associated value is to be returned
+    * @return the value to which the specified key is mapped, or
+    * {@code defaultValue} if this map contains no mapping for the key
+    * @throws ClassCastException if the key is of an inappropriate type for
+    * this map
+    * (<a href="Collection.html#optional-restrictions">optional</a>)
+    * @throws NullPointerException if the specified key is null and this map
+    * does not permit null keys
+    * (<a href="Collection.html#optional-restrictions">optional</a>)
+    */
+    default V getOrDefault(Object key, V defaultValue) {
+        V v;
+        return (((v = get(key)) != null) || containsKey(key))
+            ? v
+            : defaultValue;
+    }
+
+    /**
+     * Performs the given action on each entry in this map, in the order entries
+     * are returned by an entry set iterator (which may be unspecified), until
+     * all entries have been processed or the action throws an {@code Exception}.
+     * Exceptions thrown by the action are relayed to the caller.
+     *
+     * <p>The default implementation should be overridden by implementations if
+     * they can provide a more performant implementation than an iterator-based
+     * one.
+     *
+     * <p>The default implementation makes no guarantees about synchronization
+     * or atomicity properties of this method. Any implementation providing
+     * atomicity guarantees must override this method and document its
+     * concurrency properties.
+     *
+     * @implSpec The default implementation is equivalent to, for this
+     * {@code map}:
+     * <pre> {@code
+     * for ((Map.Entry<K, V> entry : map.entrySet())
+     *     action.accept(entry.getKey(), entry.getValue());
+     * }</pre>
+     *
+     * @param action The action to be performed for each entry
+     * @throws NullPointerException if the specified action is null
+     * @throws ConcurrentModificationException if an entry is found to be
+     * removed during iteration
+     * @since 1.8
+     */
+    default void forEach(BiConsumer<? super K, ? super V> action) {
+        Objects.requireNonNull(action);
+        for (Map.Entry<K, V> entry : entrySet()) {
+            K k;
+            V v;
+            try {
+                k = entry.getKey();
+                v = entry.getValue();
+            } catch(IllegalStateException ise) {
+                throw new ConcurrentModificationException(ise);
+            }
+            action.accept(k, v);
+        }
+    }
+
+    /**
+     * Replaces each entry's value with the result of invoking the given
+     * function on that entry, in the order entries are returned by an entry
+     * set iterator, until all entries have been processed or the function
+     * throws an exception.
+     *
+     * <p>The default implementation makes no guarantees about synchronization
+     * or atomicity properties of this method. Any implementation providing
+     * atomicity guarantees must override this method and document its
+     * concurrency properties.
+     *
+     * @implSpec
+     * <p>The default implementation is equivalent to, for this {@code map}:
+     * <pre> {@code
+     * for ((Map.Entry<K, V> entry : map.entrySet())
+     *     entry.setValue(function.apply(entry.getKey(), entry.getValue()));
+     * }</pre>
+     *
+     * @param function the function to apply to each entry
+     * @throws UnsupportedOperationException if the {@code set} operation
+     * is not supported by this map's entry set iterator.
+     * @throws ClassCastException if the class of a replacement value
+     * prevents it from being stored in this map
+     * @throws NullPointerException if the specified function is null, or the
+     * specified replacement value is null, and this map does not permit null
+     * values
+     * @throws ClassCastException if a replacement value is of an inappropriate
+     *         type for this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws NullPointerException if function or a replacement value is null,
+     *         and this map does not permit null keys or values
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws IllegalArgumentException if some property of a replacement value
+     *         prevents it from being stored in this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws ConcurrentModificationException if an entry is found to be
+     * removed during iteration
+     * @since 1.8
+     */
+    default void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
+        Objects.requireNonNull(function);
+        for (Map.Entry<K, V> entry : entrySet()) {
+            K k;
+            V v;
+            try {
+                k = entry.getKey();
+                v = entry.getValue();
+            } catch(IllegalStateException ise) {
+                throw new ConcurrentModificationException(ise);
+            }
+            entry.setValue(function.apply(k, v));
+        }
+    }
+
+    /**
+     * If the specified key is not already associated with a value (or is mapped
+     * to {@code null}) associates it with the given value and returns
+     * {@code null}, else returns the current value.
+     *
+     * <p>The default implementation makes no guarantees about synchronization
+     * or atomicity properties of this method. Any implementation providing
+     * atomicity guarantees must override this method and document its
+     * concurrency properties.
+     *
+     * @implSpec
+     * The default implementation is equivalent to, for this {@code
+     * map}:
+     *
+     * <pre> {@code
+     * if (map.get(key) == null)
+     *     return map.put(key, value);
+     * else
+     *     return map.get(key);
+     * }</pre>
+     *
+     * @param key key with which the specified value is to be associated
+     * @param value value to be associated with the specified key
+     * @return the previous value associated with the specified key, or
+     *         {@code 1} if there was no mapping for the key.
+     *         (A {@code null} return can also indicate that the map
+     *         previously associated {@code null} with the key,
+     *         if the implementation supports null values.)
+     * @throws UnsupportedOperationException if the {@code put} operation
+     *         is not supported by this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws ClassCastException if the key or value is of an inappropriate
+     *         type for this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws NullPointerException if the specified key or value is null,
+     *         and this map does not permit null keys or values
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws IllegalArgumentException if some property of the specified key
+     *         or value prevents it from being stored in this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws ConcurrentModificationException if a modification of the map is
+     * detected during insertion of the value.
+     * @since 1.8
+     */
+    default V putIfAbsent(K key, V value) {
+        V v = get(key);
+        if (v == null) {
+            if (put(key, value) != null) {
+                throw new ConcurrentModificationException();
+            }
+        }
+
+        return v;
+    }
+
+    /**
+     * Removes the entry for the specified key only if it is currently
+     * mapped to the specified value.
+     *
+     * <p>The default implementation makes no guarantees about synchronization
+     * or atomicity properties of this method. Any implementation providing
+     * atomicity guarantees must override this method and document its
+     * concurrency properties.
+     *
+     * @implSpec
+     * The default implementation is equivalent to, for this {@code map}:
+     *
+     * <pre> {@code
+     * if (map.containsKey(key) && Objects.equals(map.get(key), value)) {
+     *     map.remove(key);
+     *     return true;
+     * } else
+     *     return false;
+     * }</pre>
+     *
+     * @param key key with which the specified value is associated
+     * @param value value expected to be associated with the specified key
+     * @return {@code true} if the value was removed
+     * @throws UnsupportedOperationException if the {@code remove} operation
+     *         is not supported by this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws ClassCastException if the key or value is of an inappropriate
+     *         type for this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws NullPointerException if the specified key or value is null,
+     *         and this map does not permit null keys or values
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @since 1.8
+     */
+    default boolean remove(Object key, Object value) {
+        Object curValue = get(key);
+        if (!Objects.equals(curValue, value) ||
+            (curValue == null && !containsKey(key))) {
+            return false;
+        }
+        remove(key);
+        return true;
+    }
+
+    /**
+     * Replaces the entry for the specified key only if currently
+     * mapped to the specified value.
+     *
+     * <p>The default implementation makes no guarantees about synchronization
+     * or atomicity properties of this method. Any implementation providing
+     * atomicity guarantees must override this method and document its
+     * concurrency properties.
+    *
+     * @implSpec
+     * The default implementation is equivalent to, for this {@code map}:
+     *
+     * <pre> {@code
+     * if (map.containsKey(key) && Objects.equals(map.get(key), value)) {
+     *     map.put(key, newValue);
+     *     return true;
+     * } else
+     *     return false;
+     * }</pre>
+     *
+     * @param key key with which the specified value is associated
+     * @param oldValue value expected to be associated with the specified key
+     * @param newValue value to be associated with the specified key
+     * @return {@code true} if the value was replaced
+     * @throws UnsupportedOperationException if the {@code put} operation
+     *         is not supported by this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws ClassCastException if the class of a specified key or value
+     *         prevents it from being stored in this map
+     * @throws NullPointerException if a specified key or value is null,
+     *         and this map does not permit null keys or values
+     * @throws IllegalArgumentException if some property of a specified key
+     *         or value prevents it from being stored in this map
+     * @since 1.8
+     */
+    default boolean replace(K key, V oldValue, V newValue) {
+        Object curValue = get(key);
+        if (!Objects.equals(curValue, oldValue) ||
+            (curValue == null && !containsKey(key))) {
+            return false;
+        }
+        put(key, newValue);
+        return true;
+    }
+
+    /**
+     * Replaces the entry for the specified key only if it is
+     * currently mapped to some value.
+     *
+     * <p>The default implementation makes no guarantees about synchronization
+     * or atomicity properties of this method. Any implementation providing
+     * atomicity guarantees must override this method and document its
+     * concurrency properties.
+     *
+     * @implSpec
+     * The default implementation is equivalent to, for this {@code map}:
+     *
+     * <pre> {@code
+     * if (map.containsKey(key)) {
+     *     return map.put(key, value);
+     * } else
+     *     return null;
+     * }</pre>
+     *
+     * @param key key with which the specified value is associated
+     * @param value value to be associated with the specified key
+     * @return the previous value associated with the specified key, or
+     *         {@code null} if there was no mapping for the key.
+     *         (A {@code null} return can also indicate that the map
+     *         previously associated {@code null} with the key,
+     *         if the implementation supports null values.)
+     * @throws UnsupportedOperationException if the {@code put} operation
+     *         is not supported by this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws ClassCastException if the class of the specified key or value
+     *         prevents it from being stored in this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws NullPointerException if the specified key or value is null,
+     *         and this map does not permit null keys or values
+     * @throws IllegalArgumentException if some property of the specified key
+     *         or value prevents it from being stored in this map
+     * @since 1.8
+     */
+    default V replace(K key, V value) {
+        return containsKey(key) ? put(key, value) : null;
+    }
+
+    /**
+     * If the specified key is not already associated with a value (or
+     * is mapped to {@code null}), attempts to compute its value using
+     * the given mapping function and enters it into this map unless
+     * {@code null}.
+     *
+     * <p>If the function returns {@code null} no mapping is recorded. If
+     * the function itself throws an (unchecked) exception, the
+     * exception is rethrown, and no mapping is recorded.  The most
+     * common usage is to construct a new object serving as an initial
+     * mapped value or memoized result, as in:
+     *
+     * <pre> {@code
+     * map.computeIfAbsent(key, k -> new Value(f(k)));
+     * }</pre>
+     *
+     * <p>The default implementation makes no guarantees about synchronization
+     * or atomicity properties of this method. Any implementation providing
+     * atomicity guarantees must override this method and document its
+     * concurrency properties. In particular, all implementations of
+     * subinterface {@link java.util.concurrent.ConcurrentMap} must document
+     * whether the function is applied once atomically only if the value is not
+     * present.  Any class that permits null values must document
+     * whether and how this method distinguishes absence from null mappings.
+     *
+     * @implSpec
+     * The default implementation is equivalent to the following
+     * steps for this {@code map}, then returning the current value or
+     * {@code null} if now absent:
+     *
+     * <pre> {@code
+     * if (map.get(key) == null) {
+     *     V newValue = mappingFunction.apply(key);
+     *     if (newValue != null)
+     *         map.putIfAbsent(key, newValue);
+     * }
+     * }</pre>
+     *
+     * @param key key with which the specified value is to be associated
+     * @param mappingFunction the function to compute a value
+     * @return the current (existing or computed) value associated with
+     *         the specified key, or null if the computed value is null
+     * @throws NullPointerException if the specified key is null and
+     *         this map does not support null keys, or the
+     *         mappingFunction is null
+     * @throws UnsupportedOperationException if the {@code put} operation
+     *         is not supported by this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws ClassCastException if the class of the specified key or value
+     *         prevents it from being stored in this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @since 1.8
+     */
+    default V computeIfAbsent(K key,
+            Function<? super K, ? extends V> mappingFunction) {
+        V v, newValue;
+        return ((v = get(key)) == null &&
+                (newValue = mappingFunction.apply(key)) != null &&
+                (v = putIfAbsent(key, newValue)) == null) ? newValue : v;
+    }
+
+    /**
+     * If the value for the specified key is present and non-null, attempts to
+     * compute a new mapping given the key and its current mapped value.
+     *
+     * <p>If the function returns {@code null}, the mapping is removed.  If the
+     * function itself throws an (unchecked) exception, the exception is
+     * rethrown, and the current mapping is left unchanged.
+     *
+     * <p>The default implementation makes no guarantees about synchronization
+     * or atomicity properties of this method. Any implementation providing
+     * atomicity guarantees must override this method and document its
+     * concurrency properties. In particular, all implementations of
+     * subinterface {@link java.util.concurrent.ConcurrentMap} must document
+     * whether the function is applied once atomically only if the value is not
+     * present.  Any class that permits null values must document
+     * whether and how this method distinguishes absence from null mappings.
+     *
+     * @implSpec
+     * The default implementation is equivalent to performing the
+     * following steps for this {@code map}, then returning the
+     * current value or {@code null} if now absent:
+     *
+     * <pre> {@code
+     * if (map.get(key) != null) {
+     *     V oldValue = map.get(key);
+     *     V newValue = remappingFunction.apply(key, oldValue);
+     *     if (newValue != null)
+     *         map.replace(key, oldValue, newValue);
+     *     else
+     *         map.remove(key, oldValue);
+     * }
+     * }</pre>
+     *
+     * In concurrent contexts, the default implementation may retry
+     * these steps when multiple threads attempt updates.
+     *
+     * @param key key with which the specified value is to be associated
+     * @param remappingFunction the function to compute a value
+     * @return the new value associated with the specified key, or null if none
+     * @throws NullPointerException if the specified key is null and
+     *         this map does not support null keys, or the
+     *         remappingFunction is null
+     * @throws UnsupportedOperationException if the {@code put} operation
+     *         is not supported by this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws ClassCastException if the class of the specified key or value
+     *         prevents it from being stored in this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @since 1.8
+     */
+    default V computeIfPresent(K key,
+            BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+        V oldValue;
+        while ((oldValue = get(key)) != null) {
+            V newValue = remappingFunction.apply(key, oldValue);
+            if (newValue != null) {
+                if (replace(key, oldValue, newValue))
+                    return newValue;
+            } else if (remove(key, oldValue))
+                return null;
+        }
+        return oldValue;
+    }
+
+    /**
+     * Attempts to compute a mapping for the specified key and its
+     * current mapped value (or {@code null} if there is no current
+     * mapping). For example, to either create or append a {@code
+     * String msg} to a value mapping:
+     *
+     * <pre> {@code
+     * map.compute(key, (k, v) -> (v == null) ? msg : v.concat(msg))}</pre>
+     * (Method {@link #merge merge()} is often simpler to use for such purposes.)
+     *
+     * <p>If the function returns {@code null}, the mapping is removed (or
+     * remains absent if initially absent).  If the function itself throws an
+     * (unchecked) exception, the exception is rethrown, and the current mapping
+     * is left unchanged.
+     *
+     * <p>The default implementation makes no guarantees about synchronization
+     * or atomicity properties of this method. Any implementation providing
+     * atomicity guarantees must override this method and document its
+     * concurrency properties. In particular, all implementations of
+     * subinterface {@link java.util.concurrent.ConcurrentMap} must document
+     * whether the function is applied once atomically only if the value is not
+     * present.  Any class that permits null values must document
+     * whether and how this method distinguishes absence from null mappings.
+     *
+     * @implSpec
+     * The default implementation is equivalent to performing the following
+     * steps for this {@code map}, then returning the current value or
+     * {@code null} if absent:
+     *
+     * <pre> {@code
+     * V oldValue = map.get(key);
+     * V newValue = remappingFunction.apply(key, oldValue);
+     * if (oldValue != null ) {
+     *    if (newValue != null)
+     *       map.replace(key, oldValue, newValue);
+     *    else
+     *       map.remove(key, oldValue);
+     * } else {
+     *    if (newValue != null)
+     *       map.putIfAbsent(key, newValue);
+     *    else
+     *       return null;
+     * }
+     * }</pre>
+     *
+     * In concurrent contexts, the default implementation may retry
+     * these steps when multiple threads attempt updates.
+     *
+     * @param key key with which the specified value is to be associated
+     * @param remappingFunction the function to compute a value
+     * @return the new value associated with the specified key, or null if none
+     * @throws NullPointerException if the specified key is null and
+     *         this map does not support null keys, or the
+     *         remappingFunction is null
+     * @throws UnsupportedOperationException if the {@code put} operation
+     *         is not supported by this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws ClassCastException if the class of the specified key or value
+     *         prevents it from being stored in this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @since 1.8
+     */
+    default V compute(K key,
+            BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
+        V oldValue = get(key);
+        for (;;) {
+            V newValue = remappingFunction.apply(key, oldValue);
+            if (oldValue != null) {
+                if (newValue != null) {
+                    if (replace(key, oldValue, newValue))
+                        return newValue;
+                } else if (remove(key, oldValue)) {
+                    return null;
+                }
+                oldValue = get(key);
+            } else {
+                if (newValue != null) {
+                    if ((oldValue = putIfAbsent(key, newValue)) == null)
+                        return newValue;
+                } else {
+                    return null;
+                }
+            }
+        }
+    }
+
+    /**
+     * If the specified key is not already associated with a value or is
+     * associated with null, associates it with the given value.
+     * Otherwise, replaces the value with the results of the given
+     * remapping function, or removes if the result is {@code null}. This
+     * method may be of use when combining multiple mapped values for a key.
+     * For example, to either create or append a {@code String msg} to a
+     * value mapping:
+     *
+     * <pre> {@code
+     * map.merge(key, msg, String::concat)
+     * }</pre>
+     *
+     * <p>If the function returns {@code null}, the mapping is removed (or
+     * remains absent if initially absent).  If the function itself throws an
+     * (unchecked) exception, the exception is rethrown, and the current mapping
+     * is left unchanged.
+     *
+     * <p>The default implementation makes no guarantees about synchronization
+     * or atomicity properties of this method. Any implementation providing
+     * atomicity guarantees must override this method and document its
+     * concurrency properties. In particular, all implementations of
+     * subinterface {@link java.util.concurrent.ConcurrentMap} must document
+     * whether the function is applied once atomically only if the value is not
+     * present.  Any class that permits null values must document
+     * whether and how this method distinguishes absence from null mappings.
+     *
+     * @implSpec
+     * The default implementation is equivalent to performing the
+     * following steps for this {@code map}, then returning the
+     * current value or {@code null} if absent:
+     *
+     * <pre> {@code
+     * V oldValue = map.get(key);
+     * V newValue = (oldValue == null) ? value :
+     *              remappingFunction.apply(oldValue, value);
+     * if (newValue == null)
+     *     map.remove(key, oldValue);
+     * else if (oldValue == null)
+     *     map.putIfAbsent(key, newValue);
+     * else
+     *     map.replace(key, oldValue, newValue);
+     * }</pre>
+     *
+     * In concurrent contexts, the default implementation may retry
+     * these steps when multiple threads attempt updates.
+     *
+     * @param key key with which the specified value is to be associated
+     * @param value the value to use if absent
+     * @param remappingFunction the function to recompute a value if present
+     * @return the new value associated with the specified key, or null if none
+     * @throws UnsupportedOperationException if the {@code put} operation
+     *         is not supported by this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws ClassCastException if the class of the specified key or value
+     *         prevents it from being stored in this map
+     *         (<a href="Collection.html#optional-restrictions">optional</a>)
+     * @throws NullPointerException if the specified key is null and
+     *         this map does not support null keys, or the
+     *         remappingFunction is null
+     * @since 1.8
+     */
+    default V merge(K key, V value,
+            BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
+        V oldValue = get(key);
+        for (;;) {
+            if (oldValue != null) {
+                V newValue = remappingFunction.apply(oldValue, value);
+                if (newValue != null) {
+                    if (replace(key, oldValue, newValue))
+                        return newValue;
+                } else if (remove(key, oldValue)) {
+                    return null;
+                }
+                oldValue = get(key);
+            } else {
+                if (value == null) {
+                    return null;
+                }
+
+                if ((oldValue = putIfAbsent(key, value)) == null) {
+                    return value;
+                }
+            }
+        }
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/util/PrimitiveIterator.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,274 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.util;
+
+import java.util.function.Consumer;
+import java.util.function.DoubleConsumer;
+import java.util.function.IntConsumer;
+import java.util.function.LongConsumer;
+
+/**
+ * A base type for primitive specializations of {@code Iterator}.  Specialized
+ * subtypes are provided for {@link OfInt int}, {@link OfLong long}, and
+ * {@link OfDouble double} values.
+ *
+ * <p>The specialized subtype default implementations of {@link Iterator#next}
+ * and {@link Iterator#forEachRemaining(java.util.function.Consumer)} box
+ * primitive values to instances of their corresponding wrapper class.  Such
+ * boxing may offset any advantages gained when using the primitive
+ * specializations.  To avoid boxing, the corresponding primitive-based methods
+ * should be used.  For example, {@link PrimitiveIterator.OfInt#nextInt()} and
+ * {@link PrimitiveIterator.OfInt#forEachRemaining(java.util.function.IntConsumer)}
+ * should be used in preference to {@link PrimitiveIterator.OfInt#next()} and
+ * {@link PrimitiveIterator.OfInt#forEachRemaining(java.util.function.Consumer)}.
+ *
+ * <p>Iteration of primitive values using boxing-based methods
+ * {@link Iterator#next next()} and
+ * {@link Iterator#forEachRemaining(java.util.function.Consumer) forEachRemaining()},
+ * does not affect the order in which the values, transformed to boxed values,
+ * are encountered.
+ *
+ * @implNote
+ * If the boolean system property {@code org.openjdk.java.util.stream.tripwire}
+ * is set to {@code true} then diagnostic warnings are reported if boxing of
+ * primitive values occur when operating on primitive subtype specializations.
+ *
+ * @param <T> the boxed type of the primitive type
+ * @since 1.8
+ */
+public interface PrimitiveIterator<T> extends Iterator<T> {
+
+    /**
+     * An Iterator specialized for {@code int} values.
+     * @since 1.8
+     */
+    public static interface OfInt extends PrimitiveIterator<Integer> {
+
+        /**
+         * Returns the next {@code int} element in the iteration.
+         *
+         * @return the next {@code int} element in the iteration
+         * @throws NoSuchElementException if the iteration has no more elements
+         */
+        int nextInt();
+
+        /**
+         * Performs the given action for each remaining element, in the order
+         * elements occur when iterating, until all elements have been processed
+         * or the action throws an exception.  Errors or runtime exceptions
+         * thrown by the action are relayed to the caller.
+         *
+         * @implSpec
+         * <p>The default implementation behaves as if:
+         * <pre>{@code
+         *     while (hasNext())
+         *         action.accept(nextInt());
+         * }</pre>
+         *
+         * @param action The action to be performed for each element
+         * @throws NullPointerException if the specified action is null
+         */
+        default void forEachRemaining(IntConsumer action) {
+            while (hasNext())
+                action.accept(nextInt());
+        }
+
+        /**
+         * {@inheritDoc}
+         * @implSpec
+         * The default implementation boxes the result of calling
+         * {@link #nextInt()}, and returns that boxed result.
+         */
+        @Override
+        default Integer next() {
+            if (Tripwire.ENABLED)
+                Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfInt.nextInt()");
+            return nextInt();
+        }
+
+        /**
+         * {@inheritDoc}
+         * @implSpec
+         * If the action is an instance of {@code IntConsumer} then it is cast
+         * to {@code IntConsumer} and passed to {@link #forEachRemaining};
+         * otherwise the action is adapted to an instance of
+         * {@code IntConsumer}, by boxing the argument of {@code IntConsumer},
+         * and then passed to {@link #forEachRemaining}.
+         */
+        @Override
+        default void forEachRemaining(Consumer<? super Integer> action) {
+            if (action instanceof IntConsumer) {
+                forEachRemaining((IntConsumer) action);
+            }
+            else {
+                if (Tripwire.ENABLED)
+                    Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfInt.forEachRemainingInt(action::accept)");
+                forEachRemaining((IntConsumer) action::accept);
+            }
+        }
+
+    }
+
+    /**
+     * An Iterator specialized for {@code long} values.
+     * @since 1.8
+     */
+    public static interface OfLong extends PrimitiveIterator<Long> {
+
+        /**
+         * Returns the next {@code long} element in the iteration.
+         *
+         * @return the next {@code long} element in the iteration
+         * @throws NoSuchElementException if the iteration has no more elements
+         */
+        long nextLong();
+
+        /**
+         * Performs the given action for each remaining element, in the order
+         * elements occur when iterating, until all elements have been processed
+         * or the action throws an exception.  Errors or runtime exceptions
+         * thrown by the action are relayed to the caller.
+         *
+         * @implSpec
+         * <p>The default implementation behaves as if:
+         * <pre>{@code
+         *     while (hasNext())
+         *         action.accept(nextLong());
+         * }</pre>
+         *
+         * @param action The action to be performed for each element
+         * @throws NullPointerException if the specified action is null
+         */
+        default void forEachRemaining(LongConsumer action) {
+            while (hasNext())
+                action.accept(nextLong());
+        }
+
+        /**
+         * {@inheritDoc}
+         * @implSpec
+         * The default implementation boxes the result of calling
+         * {@link #nextLong()}, and returns that boxed result.
+         */
+        @Override
+        default Long next() {
+            if (Tripwire.ENABLED)
+                Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfLong.nextLong()");
+            return nextLong();
+        }
+
+        /**
+         * {@inheritDoc}
+         * @implSpec
+         * If the action is an instance of {@code LongConsumer} then it is cast
+         * to {@code LongConsumer} and passed to {@link #forEachRemaining};
+         * otherwise the action is adapted to an instance of
+         * {@code LongConsumer}, by boxing the argument of {@code LongConsumer},
+         * and then passed to {@link #forEachRemaining}.
+         */
+        @Override
+        default void forEachRemaining(Consumer<? super Long> action) {
+            if (action instanceof LongConsumer) {
+                forEachRemaining((LongConsumer) action);
+            }
+            else {
+                if (Tripwire.ENABLED)
+                    Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfLong.forEachRemainingLong(action::accept)");
+                forEachRemaining((LongConsumer) action::accept);
+            }
+        }
+    }
+
+    /**
+     * An Iterator specialized for {@code double} values.
+     * @since 1.8
+     */
+    public static interface OfDouble extends PrimitiveIterator<Double> {
+
+        /**
+         * Returns the next {@code double} element in the iteration.
+         *
+         * @return the next {@code double} element in the iteration
+         * @throws NoSuchElementException if the iteration has no more elements
+         */
+        double nextDouble();
+
+        /**
+         * Performs the given action for each remaining element, in the order
+         * elements occur when iterating, until all elements have been processed
+         * or the action throws an exception.  Errors or runtime exceptions
+         * thrown by the action are relayed to the caller.
+         *
+         * @implSpec
+         * <p>The default implementation behaves as if:
+         * <pre>{@code
+         *     while (hasNext())
+         *         action.accept(nextDouble());
+         * }</pre>
+         *
+         * @param action The action to be performed for each element
+         * @throws NullPointerException if the specified action is null
+         */
+        default void forEachRemaining(DoubleConsumer action) {
+            while (hasNext())
+                action.accept(nextDouble());
+        }
+
+        /**
+         * {@inheritDoc}
+         * @implSpec
+         * The default implementation boxes the result of calling
+         * {@link #nextDouble()}, and returns that boxed result.
+         */
+        @Override
+        default Double next() {
+            if (Tripwire.ENABLED)
+                Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfDouble.nextLong()");
+            return nextDouble();
+        }
+
+        /**
+         * {@inheritDoc}
+         * @implSpec
+         * If the action is an instance of {@code DoubleConsumer} then it is
+         * cast to {@code DoubleConsumer} and passed to
+         * {@link #forEachRemaining}; otherwise the action is adapted to
+         * an instance of {@code DoubleConsumer}, by boxing the argument of
+         * {@code DoubleConsumer}, and then passed to
+         * {@link #forEachRemaining}.
+         */
+        @Override
+        default void forEachRemaining(Consumer<? super Double> action) {
+            if (action instanceof DoubleConsumer) {
+                forEachRemaining((DoubleConsumer) action);
+            }
+            else {
+                if (Tripwire.ENABLED)
+                    Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfDouble.forEachRemainingDouble(action::accept)");
+                forEachRemaining((DoubleConsumer) action::accept);
+            }
+        }
+    }
+}
--- a/src/share/classes/java/util/ResourceBundle.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/ResourceBundle.java	Wed Apr 17 21:48:04 2013 -0700
@@ -57,6 +57,8 @@
 import java.util.jar.JarEntry;
 import java.util.spi.ResourceBundleControlProvider;
 
+import sun.reflect.CallerSensitive;
+import sun.reflect.Reflection;
 import sun.util.locale.BaseLocale;
 import sun.util.locale.LocaleObjectCache;
 
@@ -440,14 +442,10 @@
 
     /*
      * Automatic determination of the ClassLoader to be used to load
-     * resources on behalf of the client.  N.B. The client is getLoader's
-     * caller's caller.
+     * resources on behalf of the client.
      */
-    private static ClassLoader getLoader() {
-        Class<?>[] stack = getClassContext();
-        /* Magic number 2 identifies our caller's caller */
-        Class<?> c = stack[2];
-        ClassLoader cl = (c == null) ? null : c.getClassLoader();
+    private static ClassLoader getLoader(Class<?> caller) {
+        ClassLoader cl = caller == null ? null : caller.getClassLoader();
         if (cl == null) {
             // When the caller's loader is the boot class loader, cl is null
             // here. In that case, ClassLoader.getSystemClassLoader() may
@@ -461,8 +459,6 @@
         return cl;
     }
 
-    private static native Class<?>[] getClassContext();
-
     /**
      * A wrapper of ClassLoader.getSystemClassLoader().
      */
@@ -746,11 +742,11 @@
      *     if no resource bundle for the specified base name can be found
      * @return a resource bundle for the given base name and the default locale
      */
+    @CallerSensitive
     public static final ResourceBundle getBundle(String baseName)
     {
         return getBundleImpl(baseName, Locale.getDefault(),
-                             /* must determine loader here, else we break stack invariant */
-                             getLoader(),
+                             getLoader(Reflection.getCallerClass()),
                              getDefaultControl(baseName));
     }
 
@@ -788,11 +784,11 @@
      *        needed.
      * @since 1.6
      */
+    @CallerSensitive
     public static final ResourceBundle getBundle(String baseName,
                                                  Control control) {
         return getBundleImpl(baseName, Locale.getDefault(),
-                             /* must determine loader here, else we break stack invariant */
-                             getLoader(),
+                             getLoader(Reflection.getCallerClass()),
                              control);
     }
 
@@ -817,12 +813,12 @@
      *        if no resource bundle for the specified base name can be found
      * @return a resource bundle for the given base name and locale
      */
+    @CallerSensitive
     public static final ResourceBundle getBundle(String baseName,
                                                  Locale locale)
     {
         return getBundleImpl(baseName, locale,
-                             /* must determine loader here, else we break stack invariant */
-                             getLoader(),
+                             getLoader(Reflection.getCallerClass()),
                              getDefaultControl(baseName));
     }
 
@@ -863,11 +859,11 @@
      *        needed.
      * @since 1.6
      */
+    @CallerSensitive
     public static final ResourceBundle getBundle(String baseName, Locale targetLocale,
                                                  Control control) {
         return getBundleImpl(baseName, targetLocale,
-                             /* must determine loader here, else we break stack invariant */
-                             getLoader(),
+                             getLoader(Reflection.getCallerClass()),
                              control);
     }
 
@@ -1721,8 +1717,9 @@
      * @since 1.6
      * @see ResourceBundle.Control#getTimeToLive(String,Locale)
      */
+    @CallerSensitive
     public static final void clearCache() {
-        clearCache(getLoader());
+        clearCache(getLoader(Reflection.getCallerClass()));
     }
 
     /**
--- a/src/share/classes/java/util/Set.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/Set.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -382,4 +382,29 @@
      * @see Set#equals(Object)
      */
     int hashCode();
+
+    /**
+     * Creates a {@code Spliterator} over the elements in this set.
+     *
+     * <p>The {@code Spliterator} reports {@link Spliterator#SIZED} and
+     * {@link Spliterator#DISTINCT}.  Implementations should document the
+     * reporting of additional characteristic values.
+     *
+     * @implSpec
+     * The default implementation creates a
+     * <em><a href="Spliterator.html#binding">late-binding</a></em> spliterator
+     * from the set's {@code Iterator}.  The spliterator inherits the
+     * <em>fail-fast</em> properties of the collection's iterator.
+     *
+     * @implNote
+     * The created {@code Spliterator} additionally reports
+     * {@link Spliterator#SUBSIZED}.
+     *
+     * @return a {@code Spliterator} over the elements in this set
+     * @since 1.8
+     */
+    @Override
+    default Spliterator<E> spliterator() {
+        return Spliterators.spliterator(this, Spliterator.DISTINCT);
+    }
 }
--- a/src/share/classes/java/util/SortedSet.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/SortedSet.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -219,4 +219,43 @@
      * @throws NoSuchElementException if this set is empty
      */
     E last();
+
+    /**
+     * Creates a {@code Spliterator} over the elements in this sorted set.
+     *
+     * <p>The {@code Spliterator} reports {@link Spliterator#SIZED},
+     * {@link Spliterator#DISTINCT}, {@link Spliterator#SORTED} and
+     * {@link Spliterator#ORDERED}.  Implementations should document the
+     * reporting of additional characteristic values.
+     *
+     * <p>The spliterator's comparator (see
+     * {@link java.util.Spliterator#getComparator()}) must be {@code null} if
+     * the sorted set's comparator (see {@link #comparator()}) is {@code null}.
+     * Otherwise, the spliterator's comparator must be the same as or impose the
+     * same total ordering as the sorted set's comparator.
+     *
+     * @implSpec
+     * The default implementation creates a
+     * <em><a href="Spliterator.html#binding">late-binding</a></em> spliterator
+     * from the sorted set's {@code Iterator}.  The spliterator inherits the
+     * <em>fail-fast</em> properties of the collection's iterator.  The
+     * spliterator's comparator is the same as the sorted set's comparator.
+     *
+     * @implNote
+     * The created {@code Spliterator} additionally reports
+     * {@link Spliterator#SUBSIZED}.
+     *
+     * @return a {@code Spliterator} over the elements in this sorted set
+     * @since 1.8
+     */
+    @Override
+    default Spliterator<E> spliterator() {
+        return new Spliterators.IteratorSpliterator<E>(
+                this, Spliterator.DISTINCT | Spliterator.SORTED | Spliterator.ORDERED) {
+            @Override
+            public Comparator<? super E> getComparator() {
+                return SortedSet.this.comparator();
+            }
+        };
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/util/Spliterator.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,835 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.util;
+
+import java.util.function.Consumer;
+import java.util.function.DoubleConsumer;
+import java.util.function.IntConsumer;
+import java.util.function.LongConsumer;
+
+/**
+ * An object for traversing and partitioning elements of a source.  The source
+ * of elements covered by a Spliterator could be, for example, an array, a
+ * {@link Collection}, an IO channel, or a generator function.
+ *
+ * <p>A Spliterator may traverse elements individually ({@link
+ * #tryAdvance tryAdvance()}) or sequentially in bulk
+ * ({@link #forEachRemaining forEachRemaining()}).
+ *
+ * <p>A Spliterator may also partition off some of its elements (using
+ * {@link #trySplit}) as another Spliterator, to be used in
+ * possibly-parallel operations.  Operations using a Spliterator that
+ * cannot split, or does so in a highly imbalanced or inefficient
+ * manner, are unlikely to benefit from parallelism.  Traversal
+ * and splitting exhaust elements; each Spliterator is useful for only a single
+ * bulk computation.
+ *
+ * <p>A Spliterator also reports a set of {@link #characteristics()} of its
+ * structure, source, and elements from among {@link #ORDERED},
+ * {@link #DISTINCT}, {@link #SORTED}, {@link #SIZED}, {@link #NONNULL},
+ * {@link #IMMUTABLE}, {@link #CONCURRENT}, and {@link #SUBSIZED}. These may
+ * be employed by Spliterator clients to control, specialize or simplify
+ * computation.  For example, a Spliterator for a {@link Collection} would
+ * report {@code SIZED}, a Spliterator for a {@link Set} would report
+ * {@code DISTINCT}, and a Spliterator for a {@link SortedSet} would also
+ * report {@code SORTED}.  Characteristics are reported as a simple unioned bit
+ * set.
+ *
+ * Some characteristics additionally constrain method behavior; for example if
+ * {@code ORDERED}, traversal methods must conform to their documented ordering.
+ * New characteristics may be defined in the future, so implementors should not
+ * assign meanings to unlisted values.
+ *
+ * <p><a name="binding"/>A Spliterator that does not report {@code IMMUTABLE} or
+ * {@code CONCURRENT} is expected to have a documented policy concerning:
+ * when the spliterator <em>binds</em> to the element source; and detection of
+ * structural interference of the element source detected after binding.  A
+ * <em>late-binding</em> Spliterator binds to the source of elements at the
+ * point of first traversal, first split, or first query for estimated size,
+ * rather than at the time the Spliterator is created.  A Spliterator that is
+ * not <em>late-binding</em> binds to the source of elements at the point of
+ * construction or first invocation of any method.  Modifications made to the
+ * source prior to binding are reflected when the Spliterator is traversed.
+ * After binding a Spliterator should, on a best-effort basis, throw
+ * {@link ConcurrentModificationException} if structural interference is
+ * detected.  Spliterators that do this are called <em>fail-fast</em>.
+ *
+ * <p>Spliterators can provide an estimate of the number of remaining elements
+ * via the {@link #estimateSize} method.  Ideally, as reflected in characteristic
+ * {@link #SIZED}, this value corresponds exactly to the number of elements
+ * that would be encountered in a successful traversal.  However, even when not
+ * exactly known, an estimated value value may still be useful to operations
+ * being performed on the source, such as helping to determine whether it is
+ * preferable to split further or traverse the remaining elements sequentially.
+ *
+ * <p>Despite their obvious utility in parallel algorithms, spliterators are not
+ * expected to be thread-safe; instead, implementations of parallel algorithms
+ * using spliterators should ensure that the spliterator is only used by one
+ * thread at a time.  This is generally easy to attain via <em>serial
+ * thread-confinement</em>, which often is a natural consequence of typical
+ * parallel algorithms that work by recursive decomposition.  A thread calling
+ * {@link #trySplit()} may hand over the returned Spliterator to another thread,
+ * which in turn may traverse or further split that Spliterator.  The behaviour
+ * of splitting and traversal is undefined if two or more threads operate
+ * concurrently on the same spliterator.  If the original thread hands a
+ * spliterator off to another thread for processing, it is best if that handoff
+ * occurs before any elements are consumed with {@link #tryAdvance(Consumer)
+ * tryAdvance()}, as certain guarantees (such as the accuracy of
+ * {@link #estimateSize()} for {@code SIZED} spliterators) are only valid before
+ * traversal has begun.
+ *
+ * <p>Primitive subtype specializations of {@code Spliterator} are provided for
+ * {@link OfInt int}, {@link OfLong long}, and {@link OfDouble double} values.
+ * The subtype default implementations of
+ * {@link Spliterator#tryAdvance(java.util.function.Consumer)}
+ * and {@link Spliterator#forEachRemaining(java.util.function.Consumer)} box
+ * primitive values to instances of their corresponding wrapper class.  Such
+ * boxing may undermine any performance advantages gained by using the primitive
+ * specializations.  To avoid boxing, the corresponding primitive-based methods
+ * should be used.  For example,
+ * {@link Spliterator.OfInt#tryAdvance(java.util.function.IntConsumer)}
+ * and {@link Spliterator.OfInt#forEachRemaining(java.util.function.IntConsumer)}
+ * should be used in preference to
+ * {@link Spliterator.OfInt#tryAdvance(java.util.function.Consumer)} and
+ * {@link Spliterator.OfInt#forEachRemaining(java.util.function.Consumer)}.
+ * Traversal of primitive values using boxing-based methods
+ * {@link #tryAdvance tryAdvance()} and
+ * {@link #forEachRemaining(java.util.function.Consumer) forEachRemaining()}
+ * does not affect the order in which the values, transformed to boxed values,
+ * are encountered.
+ *
+ * @apiNote
+ * <p>Spliterators, like {@code Iterators}s, are for traversing the elements of
+ * a source.  The {@code Spliterator} API was designed to support efficient
+ * parallel traversal in addition to sequential traversal, by supporting
+ * decomposition as well as single-element iteration.  In addition, the
+ * protocol for accessing elements via a Spliterator is designed to impose
+ * smaller per-element overhead than {@code Iterator}, and to avoid the inherent
+ * race involved in having separate methods for {@code hasNext()} and
+ * {@code next()}.
+ *
+ * <p>For mutable sources, arbitrary and non-deterministic behavior may occur if
+ * the source is structurally interfered with (elements added, replaced, or
+ * removed) between the time that the Spliterator binds to its data source and
+ * the end of traversal.  For example, such interference will produce arbitrary,
+ * non-deterministic results when using the {@code java.util.stream} framework.
+ *
+ * <p>Structural interference of a source can be managed in the following ways
+ * (in approximate order of decreasing desirability):
+ * <ul>
+ * <li>The source cannot be structurally interfered with.
+ * </br>For example, an instance of
+ * {@link java.util.concurrent.CopyOnWriteArrayList} is an immutable source.
+ * A Spliterator created from the source reports a characteristic of
+ * {@code IMMUTABLE}.</li>
+ * <li>The source manages concurrent modifications.
+ * </br>For example, a key set of a {@link java.util.concurrent.ConcurrentHashMap}
+ * is a concurrent source.  A Spliterator created from the source reports a
+ * characteristic of {@code CONCURRENT}.</li>
+ * <li>The mutable source provides a late-binding and fail-fast Spliterator.
+ * </br>Late binding narrows the window during which interference can affect
+ * the calculation; fail-fast detects, on a best-effort basis, that structural
+ * interference has occurred after traversal has commenced and throws
+ * {@link ConcurrentModificationException}.  For example, {@link ArrayList},
+ * and many other non-concurrent {@code Collection} classes in the JDK, provide
+ * a late-binding, fail-fast spliterator.</li>
+ * <li>The mutable source provides a non-late-binding but fail-fast Spliterator.
+ * </br>The source increases the likelihood of throwing
+ * {@code ConcurrentModificationException} since the window of potential
+ * interference is larger.</li>
+ * <li>The mutable source provides a late-binding and non-fail-fast Spliterator.
+ * </br>The source risks arbitrary, non-deterministic behavior after traversal
+ * has commenced since interference is not detected.
+ * </li>
+ * <li>The mutable source provides a non-late-binding and non-fail-fast
+ * Spliterator.
+ * </br>The source increases the risk of arbitrary, non-deterministic behavior
+ * since non-detected interference may occur after construction.
+ * </li>
+ * </ul>
+ *
+ * <p><b>Example.</b> Here is a class (not a very useful one, except
+ * for illustration) that maintains an array in which the actual data
+ * are held in even locations, and unrelated tag data are held in odd
+ * locations. Its Spliterator ignores the tags.
+ *
+ * <pre> {@code
+ * class TaggedArray<T> {
+ *   private final Object[] elements; // immutable after construction
+ *   TaggedArray(T[] data, Object[] tags) {
+ *     int size = data.length;
+ *     if (tags.length != size) throw new IllegalArgumentException();
+ *     this.elements = new Object[2 * size];
+ *     for (int i = 0, j = 0; i < size; ++i) {
+ *       elements[j++] = data[i];
+ *       elements[j++] = tags[i];
+ *     }
+ *   }
+ *
+ *   public Spliterator<T> spliterator() {
+ *     return new TaggedArraySpliterator<>(elements, 0, elements.length);
+ *   }
+ *
+ *   static class TaggedArraySpliterator<T> implements Spliterator<T> {
+ *     private final Object[] array;
+ *     private int origin; // current index, advanced on split or traversal
+ *     private final int fence; // one past the greatest index
+ *
+ *     TaggedArraySpliterator(Object[] array, int origin, int fence) {
+ *       this.array = array; this.origin = origin; this.fence = fence;
+ *     }
+ *
+ *     public void forEachRemaining(Consumer<? super T> action) {
+ *       for (; origin < fence; origin += 2)
+ *         action.accept((T) array[origin]);
+ *     }
+ *
+ *     public boolean tryAdvance(Consumer<? super T> action) {
+ *       if (origin < fence) {
+ *         action.accept((T) array[origin]);
+ *         origin += 2;
+ *         return true;
+ *       }
+ *       else // cannot advance
+ *         return false;
+ *     }
+ *
+ *     public Spliterator<T> trySplit() {
+ *       int lo = origin; // divide range in half
+ *       int mid = ((lo + fence) >>> 1) & ~1; // force midpoint to be even
+ *       if (lo < mid) { // split out left half
+ *         origin = mid; // reset this Spliterator's origin
+ *         return new TaggedArraySpliterator<>(array, lo, mid);
+ *       }
+ *       else       // too small to split
+ *         return null;
+ *     }
+ *
+ *     public long estimateSize() {
+ *       return (long)((fence - origin) / 2);
+ *     }
+ *
+ *     public int characteristics() {
+ *       return ORDERED | SIZED | IMMUTABLE | SUBSIZED;
+ *     }
+ *   }
+ * }}</pre>
+ *
+ * <p>As an example how a parallel computation framework, such as the
+ * {@code java.util.stream} package, would use Spliterator in a parallel
+ * computation, here is one way to implement an associated parallel forEach,
+ * that illustrates the primary usage idiom of splitting off subtasks until
+ * the estimated amount of work is small enough to perform
+ * sequentially. Here we assume that the order of processing across
+ * subtasks doesn't matter; different (forked) tasks may further split
+ * and process elements concurrently in undetermined order.  This
+ * example uses a {@link java.util.concurrent.CountedCompleter};
+ * similar usages apply to other parallel task constructions.
+ *
+ * <pre>{@code
+ * static <T> void parEach(TaggedArray<T> a, Consumer<T> action) {
+ *   Spliterator<T> s = a.spliterator();
+ *   long targetBatchSize = s.estimateSize() / (ForkJoinPool.getCommonPoolParallelism() * 8);
+ *   new ParEach(null, s, action, targetBatchSize).invoke();
+ * }
+ *
+ * static class ParEach<T> extends CountedCompleter<Void> {
+ *   final Spliterator<T> spliterator;
+ *   final Consumer<T> action;
+ *   final long targetBatchSize;
+ *
+ *   ParEach(ParEach<T> parent, Spliterator<T> spliterator,
+ *           Consumer<T> action, long targetBatchSize) {
+ *     super(parent);
+ *     this.spliterator = spliterator; this.action = action;
+ *     this.targetBatchSize = targetBatchSize;
+ *   }
+ *
+ *   public void compute() {
+ *     Spliterator<T> sub;
+ *     while (spliterator.estimateSize() > targetBatchSize &&
+ *            (sub = spliterator.trySplit()) != null) {
+ *       addToPendingCount(1);
+ *       new ParEach<>(this, sub, action, targetBatchSize).fork();
+ *     }
+ *     spliterator.forEachRemaining(action);
+ *     propagateCompletion();
+ *   }
+ * }}</pre>
+ *
+ * @implNote
+ * If the boolean system property {@code org.openjdk.java.util.stream.tripwire}
+ * is set to {@code true} then diagnostic warnings are reported if boxing of
+ * primitive values occur when operating on primitive subtype specializations.
+ *
+ * @see Collection
+ * @since 1.8
+ */
+public interface Spliterator<T> {
+    /**
+     * If a remaining element exists, performs the given action on it,
+     * returning {@code true}; else returns {@code false}.  If this
+     * Spliterator is {@link #ORDERED} the action is performed on the
+     * next element in encounter order.  Exceptions thrown by the
+     * action are relayed to the caller.
+     *
+     * @param action The action
+     * @return {@code false} if no remaining elements existed
+     * upon entry to this method, else {@code true}.
+     * @throws NullPointerException if the specified action is null
+     */
+    boolean tryAdvance(Consumer<? super T> action);
+
+    /**
+     * Performs the given action for each remaining element, sequentially in
+     * the current thread, until all elements have been processed or the action
+     * throws an exception.  If this Spliterator is {@link #ORDERED}, actions
+     * are performed in encounter order.  Exceptions thrown by the action
+     * are relayed to the caller.
+     *
+     * @implSpec
+     * The default implementation repeatedly invokes {@link #tryAdvance} until
+     * it returns {@code false}.  It should be overridden whenever possible.
+     *
+     * @param action The action
+     * @throws NullPointerException if the specified action is null
+     */
+    default void forEachRemaining(Consumer<? super T> action) {
+        do { } while (tryAdvance(action));
+    }
+
+    /**
+     * If this spliterator can be partitioned, returns a Spliterator
+     * covering elements, that will, upon return from this method, not
+     * be covered by this Spliterator.
+     *
+     * <p>If this Spliterator is {@link #ORDERED}, the returned Spliterator
+     * must cover a strict prefix of the elements.
+     *
+     * <p>Unless this Spliterator covers an infinite number of elements,
+     * repeated calls to {@code trySplit()} must eventually return {@code null}.
+     * Upon non-null return:
+     * <ul>
+     * <li>the value reported for {@code estimateSize()} before splitting,
+     * if not already zero or {@code Long.MAX_VALUE}, must, after splitting, be
+     * greater than {@code estimateSize()} for this and the returned
+     * Spliterator; and</li>
+     * <li>if this Spliterator is {@code SUBSIZED}, then {@code estimateSize()}
+     * for this spliterator before splitting must be equal to the sum of
+     * {@code estimateSize()} for this and the returned Spliterator after
+     * splitting.</li>
+     * </ul>
+     *
+     * <p>This method may return {@code null} for any reason,
+     * including emptiness, inability to split after traversal has
+     * commenced, data structure constraints, and efficiency
+     * considerations.
+     *
+     * @apiNote
+     * An ideal {@code trySplit} method efficiently (without
+     * traversal) divides its elements exactly in half, allowing
+     * balanced parallel computation.  Many departures from this ideal
+     * remain highly effective; for example, only approximately
+     * splitting an approximately balanced tree, or for a tree in
+     * which leaf nodes may contain either one or two elements,
+     * failing to further split these nodes.  However, large
+     * deviations in balance and/or overly inefficient {@code
+     * trySplit} mechanics typically result in poor parallel
+     * performance.
+     *
+     * @return a {@code Spliterator} covering some portion of the
+     * elements, or {@code null} if this spliterator cannot be split
+     */
+    Spliterator<T> trySplit();
+
+    /**
+     * Returns an estimate of the number of elements that would be
+     * encountered by a {@link #forEachRemaining} traversal, or returns {@link
+     * Long#MAX_VALUE} if infinite, unknown, or too expensive to compute.
+     *
+     * <p>If this Spliterator is {@link #SIZED} and has not yet been partially
+     * traversed or split, or this Spliterator is {@link #SUBSIZED} and has
+     * not yet been partially traversed, this estimate must be an accurate
+     * count of elements that would be encountered by a complete traversal.
+     * Otherwise, this estimate may be arbitrarily inaccurate, but must decrease
+     * as specified across invocations of {@link #trySplit}.
+     *
+     * @apiNote
+     * Even an inexact estimate is often useful and inexpensive to compute.
+     * For example, a sub-spliterator of an approximately balanced binary tree
+     * may return a value that estimates the number of elements to be half of
+     * that of its parent; if the root Spliterator does not maintain an
+     * accurate count, it could estimate size to be the power of two
+     * corresponding to its maximum depth.
+     *
+     * @return the estimated size, or {@code Long.MAX_VALUE} if infinite,
+     *         unknown, or too expensive to compute.
+     */
+    long estimateSize();
+
+    /**
+     * Convenience method that returns {@link #estimateSize()} if this
+     * Spliterator is {@link #SIZED}, else {@code -1}.
+     * @implSpec
+     * The default returns the result of {@code estimateSize()} if the
+     * Spliterator reports a characteristic of {@code SIZED}, and {@code -1}
+     * otherwise.
+     *
+     * @return the exact size, if known, else {@code -1}.
+     */
+    default long getExactSizeIfKnown() {
+        return (characteristics() & SIZED) == 0 ? -1L : estimateSize();
+    }
+
+    /**
+     * Returns a set of characteristics of this Spliterator and its
+     * elements. The result is represented as ORed values from {@link
+     * #ORDERED}, {@link #DISTINCT}, {@link #SORTED}, {@link #SIZED},
+     * {@link #NONNULL}, {@link #IMMUTABLE}, {@link #CONCURRENT},
+     * {@link #SUBSIZED}.  Repeated calls to {@code characteristics()} on
+     * a given spliterator should always return the same result.
+     *
+     * <p>If a Spliterator reports an inconsistent set of
+     * characteristics (either those returned from a single invocation
+     * or across multiple invocations), no guarantees can be made
+     * about any computation using this Spliterator.
+     *
+     * @return a representation of characteristics
+     */
+    int characteristics();
+
+    /**
+     * Returns {@code true} if this Spliterator's {@link
+     * #characteristics} contain all of the given characteristics.
+     *
+     * @implSpec
+     * The default implementation returns true if the corresponding bits
+     * of the given characteristics are set.
+     *
+     * @return {@code true} if all the specified characteristics are present,
+     * else {@code false}
+     */
+    default boolean hasCharacteristics(int characteristics) {
+        return (characteristics() & characteristics) == characteristics;
+    }
+
+    /**
+     * If this Spliterator's source is {@link #SORTED} by a {@link Comparator},
+     * returns that {@code Comparator}. If the source is {@code SORTED} in
+     * {@linkplain Comparable natural order, returns {@code null}.  Otherwise,
+     * if the source is not {@code SORTED}, throws {@link IllegalStateException}.
+     *
+     * @implSpec
+     * The default implementation always throws {@link IllegalStateException}.
+     *
+     * @return a Comparator, or {@code null} if the elements are sorted in the
+     * natural order.
+     * @throws IllegalStateException if the spliterator does not report
+     *         a characteristic of {@code SORTED}.
+     */
+    default Comparator<? super T> getComparator() {
+        throw new IllegalStateException();
+    }
+
+    /**
+     * Characteristic value signifying that an encounter order is defined for
+     * elements. If so, this Spliterator guarantees that method
+     * {@link #trySplit} splits a strict prefix of elements, that method
+     * {@link #tryAdvance} steps by one element in prefix order, and that
+     * {@link #forEachRemaining} performs actions in encounter order.
+     *
+     * <p>A {@link Collection} has an encounter order if the corresponding
+     * {@link Collection#iterator} documents an order. If so, the encounter
+     * order is the same as the documented order. Otherwise, a collection does
+     * not have an encounter order.
+     *
+     * @apiNote Encounter order is guaranteed to be ascending index order for
+     * any {@link List}. But no order is guaranteed for hash-based collections
+     * such as {@link HashSet}. Clients of a Spliterator that reports
+     * {@code ORDERED} are expected to preserve ordering constraints in
+     * non-commutative parallel computations.
+     */
+    public static final int ORDERED    = 0x00000010;
+
+    /**
+     * Characteristic value signifying that, for each pair of
+     * encountered elements {@code x, y}, {@code !x.equals(y)}. This
+     * applies for example, to a Spliterator based on a {@link Set}.
+     */
+    public static final int DISTINCT   = 0x00000001;
+
+    /**
+     * Characteristic value signifying that encounter order follows a defined
+     * sort order. If so, method {@link #getComparator()} returns the associated
+     * Comparator, or {@code null} if all elements are {@link Comparable} and
+     * are sorted by their natural ordering.
+     *
+     * <p>A Spliterator that reports {@code SORTED} must also report
+     * {@code ORDERED}.
+     *
+     * @apiNote The spliterators for {@code Collection} classes in the JDK that
+     * implement {@link NavigableSet} or {@link SortedSet} report {@code SORTED}.
+     */
+    public static final int SORTED     = 0x00000004;
+
+    /**
+     * Characteristic value signifying that the value returned from
+     * {@code estimateSize()} prior to traversal or splitting represents a
+     * finite size that, in the absence of structural source modification,
+     * represents an exact count of the number of elements that would be
+     * encountered by a complete traversal.
+     *
+     * @apiNote Most Spliterators for Collections, that cover all elements of a
+     * {@code Collection} report this characteristic. Sub-spliterators, such as
+     * those for {@link HashSet}, that cover a sub-set of elements and
+     * approximate their reported size do not.
+     */
+    public static final int SIZED      = 0x00000040;
+
+    /**
+     * Characteristic value signifying that the source guarantees that
+     * encountered elements will not be {@code null}. (This applies,
+     * for example, to most concurrent collections, queues, and maps.)
+     */
+    public static final int NONNULL    = 0x00000100;
+
+    /**
+     * Characteristic value signifying that the element source cannot be
+     * structurally modified; that is, elements cannot be added, replaced, or
+     * removed, so such changes cannot occur during traversal. A Spliterator
+     * that does not report {@code IMMUTABLE} or {@code CONCURRENT} is expected
+     * to have a documented policy (for example throwing
+     * {@link ConcurrentModificationException}) concerning structural
+     * interference detected during traversal.
+     */
+    public static final int IMMUTABLE  = 0x00000400;
+
+    /**
+     * Characteristic value signifying that the element source may be safely
+     * concurrently modified (allowing additions, replacements, and/or removals)
+     * by multiple threads without external synchronization. If so, the
+     * Spliterator is expected to have a documented policy concerning the impact
+     * of modifications during traversal.
+     *
+     * <p>A top-level Spliterator should not report {@code CONCURRENT} and
+     * {@code SIZED}, since the finite size, if known, may change if the source
+     * is concurrently modified during traversal. Such a Spliterator is
+     * inconsistent and no guarantees can be made about any computation using
+     * that Spliterator. Sub-spliterators may report {@code SIZED} if the
+     * sub-split size is known and additions or removals to the source are not
+     * reflected when traversing.
+     *
+     * @apiNote Most concurrent collections maintain a consistency policy
+     * guaranteeing accuracy with respect to elements present at the point of
+     * Spliterator construction, but possibly not reflecting subsequent
+     * additions or removals.
+     */
+    public static final int CONCURRENT = 0x00001000;
+
+    /**
+     * Characteristic value signifying that all Spliterators resulting from
+     * {@code trySplit()} will be both {@link #SIZED} and {@link #SUBSIZED}.
+     * (This means that all child Spliterators, whether direct or indirect, will
+     * be {@code SIZED}.)
+     *
+     * <p>A Spliterator that does not report {@code SIZED} as required by
+     * {@code SUBSIZED} is inconsistent and no guarantees can be made about any
+     * computation using that Spliterator.
+     *
+     * @apiNote Some spliterators, such as the top-level spliterator for an
+     * approximately balanced binary tree, will report {@code SIZED} but not
+     * {@code SUBSIZED}, since it is common to know the size of the entire tree
+     * but not the exact sizes of subtrees.
+     */
+    public static final int SUBSIZED = 0x00004000;
+
+    /**
+     * A Spliterator specialized for {@code int} values.
+     * @since 1.8
+     */
+    public interface OfInt extends Spliterator<Integer> {
+
+        @Override
+        OfInt trySplit();
+
+        /**
+         * If a remaining element exists, performs the given action on it,
+         * returning {@code true}; else returns {@code false}.  If this
+         * Spliterator is {@link #ORDERED} the action is performed on the
+         * next element in encounter order.  Exceptions thrown by the
+         * action are relayed to the caller.
+         *
+         * @param action The action
+         * @return {@code false} if no remaining elements existed
+         * upon entry to this method, else {@code true}.
+         * @throws NullPointerException if the specified action is null
+         */
+        boolean tryAdvance(IntConsumer action);
+
+        /**
+         * Performs the given action for each remaining element, sequentially in
+         * the current thread, until all elements have been processed or the
+         * action throws an exception.  If this Spliterator is {@link #ORDERED},
+         * actions are performed in encounter order.  Exceptions thrown by the
+         * action are relayed to the caller.
+         *
+         * @implSpec
+         * The default implementation repeatedly invokes {@link #tryAdvance}
+         * until it returns {@code false}.  It should be overridden whenever
+         * possible.
+         *
+         * @param action The action
+         * @throws NullPointerException if the specified action is null
+         */
+        default void forEachRemaining(IntConsumer action) {
+            do { } while (tryAdvance(action));
+        }
+
+        /**
+         * {@inheritDoc}
+         * @implSpec
+         * If the action is an instance of {@code IntConsumer} then it is cast
+         * to {@code IntConsumer} and passed to
+         * {@link #tryAdvance(java.util.function.IntConsumer)}; otherwise
+         * the action is adapted to an instance of {@code IntConsumer}, by
+         * boxing the argument of {@code IntConsumer}, and then passed to
+         * {@link #tryAdvance(java.util.function.IntConsumer)}.
+         */
+        @Override
+        default boolean tryAdvance(Consumer<? super Integer> action) {
+            if (action instanceof IntConsumer) {
+                return tryAdvance((IntConsumer) action);
+            }
+            else {
+                if (Tripwire.ENABLED)
+                    Tripwire.trip(getClass(),
+                                  "{0} calling Spliterator.OfInt.tryAdvance((IntConsumer) action::accept)");
+                return tryAdvance((IntConsumer) action::accept);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         * @implSpec
+         * If the action is an instance of {@code IntConsumer} then it is cast
+         * to {@code IntConsumer} and passed to
+         * {@link #forEachRemaining(java.util.function.IntConsumer)}; otherwise
+         * the action is adapted to an instance of {@code IntConsumer}, by
+         * boxing the argument of {@code IntConsumer}, and then passed to
+         * {@link #forEachRemaining(java.util.function.IntConsumer)}.
+         */
+        @Override
+        default void forEachRemaining(Consumer<? super Integer> action) {
+            if (action instanceof IntConsumer) {
+                forEachRemaining((IntConsumer) action);
+            }
+            else {
+                if (Tripwire.ENABLED)
+                    Tripwire.trip(getClass(),
+                                  "{0} calling Spliterator.OfInt.forEachRemaining((IntConsumer) action::accept)");
+                forEachRemaining((IntConsumer) action::accept);
+            }
+        }
+    }
+
+    /**
+     * A Spliterator specialized for {@code long} values.
+     * @since 1.8
+     */
+    public interface OfLong extends Spliterator<Long> {
+
+        @Override
+        OfLong trySplit();
+
+        /**
+         * If a remaining element exists, performs the given action on it,
+         * returning {@code true}; else returns {@code false}.  If this
+         * Spliterator is {@link #ORDERED} the action is performed on the
+         * next element in encounter order.  Exceptions thrown by the
+         * action are relayed to the caller.
+         *
+         * @param action The action
+         * @return {@code false} if no remaining elements existed
+         * upon entry to this method, else {@code true}.
+         * @throws NullPointerException if the specified action is null
+         */
+        boolean tryAdvance(LongConsumer action);
+
+        /**
+         * Performs the given action for each remaining element, sequentially in
+         * the current thread, until all elements have been processed or the
+         * action throws an exception.  If this Spliterator is {@link #ORDERED},
+         * actions are performed in encounter order.  Exceptions thrown by the
+         * action are relayed to the caller.
+         *
+         * @implSpec
+         * The default implementation repeatedly invokes {@link #tryAdvance}
+         * until it returns {@code false}.  It should be overridden whenever
+         * possible.
+         *
+         * @param action The action
+         * @throws NullPointerException if the specified action is null
+         */
+        default void forEachRemaining(LongConsumer action) {
+            do { } while (tryAdvance(action));
+        }
+
+        /**
+         * {@inheritDoc}
+         * @implSpec
+         * If the action is an instance of {@code LongConsumer} then it is cast
+         * to {@code LongConsumer} and passed to
+         * {@link #tryAdvance(java.util.function.LongConsumer)}; otherwise
+         * the action is adapted to an instance of {@code LongConsumer}, by
+         * boxing the argument of {@code LongConsumer}, and then passed to
+         * {@link #tryAdvance(java.util.function.LongConsumer)}.
+         */
+        @Override
+        default boolean tryAdvance(Consumer<? super Long> action) {
+            if (action instanceof LongConsumer) {
+                return tryAdvance((LongConsumer) action);
+            }
+            else {
+                if (Tripwire.ENABLED)
+                    Tripwire.trip(getClass(),
+                                  "{0} calling Spliterator.OfLong.tryAdvance((LongConsumer) action::accept)");
+                return tryAdvance((LongConsumer) action::accept);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         * @implSpec
+         * If the action is an instance of {@code LongConsumer} then it is cast
+         * to {@code LongConsumer} and passed to
+         * {@link #forEachRemaining(java.util.function.LongConsumer)}; otherwise
+         * the action is adapted to an instance of {@code LongConsumer}, by
+         * boxing the argument of {@code LongConsumer}, and then passed to
+         * {@link #forEachRemaining(java.util.function.LongConsumer)}.
+         */
+        @Override
+        default void forEachRemaining(Consumer<? super Long> action) {
+            if (action instanceof LongConsumer) {
+                forEachRemaining((LongConsumer) action);
+            }
+            else {
+                if (Tripwire.ENABLED)
+                    Tripwire.trip(getClass(),
+                                  "{0} calling Spliterator.OfLong.forEachRemaining((LongConsumer) action::accept)");
+                forEachRemaining((LongConsumer) action::accept);
+            }
+        }
+    }
+
+    /**
+     * A Spliterator specialized for {@code double} values.
+     * @since 1.8
+     */
+    public interface OfDouble extends Spliterator<Double> {
+
+        @Override
+        OfDouble trySplit();
+
+        /**
+         * If a remaining element exists, performs the given action on it,
+         * returning {@code true}; else returns {@code false}.  If this
+         * Spliterator is {@link #ORDERED} the action is performed on the
+         * next element in encounter order.  Exceptions thrown by the
+         * action are relayed to the caller.
+         *
+         * @param action The action
+         * @return {@code false} if no remaining elements existed
+         * upon entry to this method, else {@code true}.
+         * @throws NullPointerException if the specified action is null
+         */
+        boolean tryAdvance(DoubleConsumer action);
+
+        /**
+         * Performs the given action for each remaining element, sequentially in
+         * the current thread, until all elements have been processed or the
+         * action throws an exception.  If this Spliterator is {@link #ORDERED},
+         * actions are performed in encounter order.  Exceptions thrown by the
+         * action are relayed to the caller.
+         *
+         * @implSpec
+         * The default implementation repeatedly invokes {@link #tryAdvance}
+         * until it returns {@code false}.  It should be overridden whenever
+         * possible.
+         *
+         * @param action The action
+         * @throws NullPointerException if the specified action is null
+         */
+        default void forEachRemaining(DoubleConsumer action) {
+            do { } while (tryAdvance(action));
+        }
+
+        /**
+         * {@inheritDoc}
+         * @implSpec
+         * If the action is an instance of {@code DoubleConsumer} then it is
+         * cast to {@code DoubleConsumer} and passed to
+         * {@link #tryAdvance(java.util.function.DoubleConsumer)}; otherwise
+         * the action is adapted to an instance of {@code DoubleConsumer}, by
+         * boxing the argument of {@code DoubleConsumer}, and then passed to
+         * {@link #tryAdvance(java.util.function.DoubleConsumer)}.
+         */
+        @Override
+        default boolean tryAdvance(Consumer<? super Double> action) {
+            if (action instanceof DoubleConsumer) {
+                return tryAdvance((DoubleConsumer) action);
+            }
+            else {
+                if (Tripwire.ENABLED)
+                    Tripwire.trip(getClass(),
+                                  "{0} calling Spliterator.OfDouble.tryAdvance((DoubleConsumer) action::accept)");
+                return tryAdvance((DoubleConsumer) action::accept);
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         * @implSpec
+         * If the action is an instance of {@code DoubleConsumer} then it is
+         * cast to {@code DoubleConsumer} and passed to
+         * {@link #forEachRemaining(java.util.function.DoubleConsumer)};
+         * otherwise the action is adapted to an instance of
+         * {@code DoubleConsumer}, by boxing the argument of
+         * {@code DoubleConsumer}, and then passed to
+         * {@link #forEachRemaining(java.util.function.DoubleConsumer)}.
+         */
+        @Override
+        default void forEachRemaining(Consumer<? super Double> action) {
+            if (action instanceof DoubleConsumer) {
+                forEachRemaining((DoubleConsumer) action);
+            }
+            else {
+                if (Tripwire.ENABLED)
+                    Tripwire.trip(getClass(),
+                                  "{0} calling Spliterator.OfDouble.forEachRemaining((DoubleConsumer) action::accept)");
+                forEachRemaining((DoubleConsumer) action::accept);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/util/Spliterators.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,2154 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.util;
+
+import java.util.function.Consumer;
+import java.util.function.DoubleConsumer;
+import java.util.function.IntConsumer;
+import java.util.function.LongConsumer;
+
+/**
+ * Static classes and methods for operating on or creating instances of
+ * {@link Spliterator} and its primitive specializations
+ * {@link Spliterator.OfInt}, {@link Spliterator.OfLong}, and
+ * {@link Spliterator.OfDouble}.
+ *
+ * @see Spliterator
+ * @since 1.8
+ */
+public final class Spliterators {
+
+    // Suppresses default constructor, ensuring non-instantiability.
+    private Spliterators() {}
+
+    // Empty spliterators
+
+    /**
+     * Creates an empty {@code Spliterator}
+     *
+     * <p>The empty spliterator reports {@link Spliterator#SIZED} and
+     * {@link Spliterator#SUBSIZED}.  Calls to
+     * {@link java.util.Spliterator#trySplit()} always return {@code null}.
+     *
+     * @param <T> Type of elements
+     * @return An empty spliterator
+     */
+    @SuppressWarnings("unchecked")
+    public static <T> Spliterator<T> emptySpliterator() {
+        return (Spliterator<T>) EMPTY_SPLITERATOR;
+    }
+
+    private static final Spliterator<Object> EMPTY_SPLITERATOR =
+            new EmptySpliterator.OfRef<>();
+
+    /**
+     * Creates an empty {@code Spliterator.OfInt}
+     *
+     * <p>The empty spliterator reports {@link Spliterator#SIZED} and
+     * {@link Spliterator#SUBSIZED}.  Calls to
+     * {@link java.util.Spliterator#trySplit()} always return {@code null}.
+     *
+     * @return An empty spliterator
+     */
+    public static Spliterator.OfInt emptyIntSpliterator() {
+        return EMPTY_INT_SPLITERATOR;
+    }
+
+    private static final Spliterator.OfInt EMPTY_INT_SPLITERATOR =
+            new EmptySpliterator.OfInt();
+
+    /**
+     * Creates an empty {@code Spliterator.OfLong}
+     *
+     * <p>The empty spliterator reports {@link Spliterator#SIZED} and
+     * {@link Spliterator#SUBSIZED}.  Calls to
+     * {@link java.util.Spliterator#trySplit()} always return {@code null}.
+     *
+     * @return An empty spliterator
+     */
+    public static Spliterator.OfLong emptyLongSpliterator() {
+        return EMPTY_LONG_SPLITERATOR;
+    }
+
+    private static final Spliterator.OfLong EMPTY_LONG_SPLITERATOR =
+            new EmptySpliterator.OfLong();
+
+    /**
+     * Creates an empty {@code Spliterator.OfDouble}
+     *
+     * <p>The empty spliterator reports {@link Spliterator#SIZED} and
+     * {@link Spliterator#SUBSIZED}.  Calls to
+     * {@link java.util.Spliterator#trySplit()} always return {@code null}.
+     *
+     * @return An empty spliterator
+     */
+    public static Spliterator.OfDouble emptyDoubleSpliterator() {
+        return EMPTY_DOUBLE_SPLITERATOR;
+    }
+
+    private static final Spliterator.OfDouble EMPTY_DOUBLE_SPLITERATOR =
+            new EmptySpliterator.OfDouble();
+
+    // Array-based spliterators
+
+    /**
+     * Creates a {@code Spliterator} covering the elements of a given array,
+     * using a customized set of spliterator characteristics.
+     *
+     * <p>This method is provided as an implementation convenience for
+     * Spliterators which store portions of their elements in arrays, and need
+     * fine control over Spliterator characteristics.  Most other situations in
+     * which a Spliterator for an array is needed should use
+     * {@link Arrays#spliterator(Object[])}.
+     *
+     * <p>The returned spliterator always reports the characteristics
+     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
+     * characteristics for the spliterator to report; it is common to
+     * additionally specify {@code IMMUTABLE} and {@code ORDERED}.
+     *
+     * @param <T> Type of elements
+     * @param array The array, assumed to be unmodified during use
+     * @param additionalCharacteristics Additional spliterator characteristics
+     *        of this spliterator's source or elements beyond {@code SIZED} and
+     *        {@code SUBSIZED} which are are always reported
+     * @return A spliterator for an array
+     * @throws NullPointerException if the given array is {@code null}
+     * @see Arrays#spliterator(Object[])
+     */
+    public static <T> Spliterator<T> spliterator(Object[] array,
+                                                 int additionalCharacteristics) {
+        return new ArraySpliterator<>(Objects.requireNonNull(array),
+                                      additionalCharacteristics);
+    }
+
+    /**
+     * Creates a {@code Spliterator} covering a range of elements of a given
+     * array, using a customized set of spliterator characteristics.
+     *
+     * <p>This method is provided as an implementation convenience for
+     * Spliterators which store portions of their elements in arrays, and need
+     * fine control over Spliterator characteristics.  Most other situations in
+     * which a Spliterator for an array is needed should use
+     * {@link Arrays#spliterator(Object[])}.
+     *
+     * <p>The returned spliterator always reports the characteristics
+     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
+     * characteristics for the spliterator to report; it is common to
+     * additionally specify {@code IMMUTABLE} and {@code ORDERED}.
+     *
+     * @param <T> Type of elements
+     * @param array The array, assumed to be unmodified during use
+     * @param fromIndex The least index (inclusive) to cover
+     * @param toIndex One past the greatest index to cover
+     * @param additionalCharacteristics Additional spliterator characteristics
+     *        of this spliterator's source or elements beyond {@code SIZED} and
+     *        {@code SUBSIZED} which are are always reported
+     * @return A spliterator for an array
+     * @throws NullPointerException if the given array is {@code null}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
+     *         {@code toIndex} is less than {@code fromIndex}, or
+     *         {@code toIndex} is greater than the array size
+     * @see Arrays#spliterator(Object[], int, int)
+     */
+    public static <T> Spliterator<T> spliterator(Object[] array, int fromIndex, int toIndex,
+                                                 int additionalCharacteristics) {
+        checkFromToBounds(Objects.requireNonNull(array).length, fromIndex, toIndex);
+        return new ArraySpliterator<>(array, fromIndex, toIndex, additionalCharacteristics);
+    }
+
+    /**
+     * Creates a {@code Spliterator.OfInt} covering the elements of a given array,
+     * using a customized set of spliterator characteristics.
+     *
+     * <p>This method is provided as an implementation convenience for
+     * Spliterators which store portions of their elements in arrays, and need
+     * fine control over Spliterator characteristics.  Most other situations in
+     * which a Spliterator for an array is needed should use
+     * {@link Arrays#spliterator(int[])}.
+     *
+     * <p>The returned spliterator always reports the characteristics
+     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
+     * characteristics for the spliterator to report; it is common to
+     * additionally specify {@code IMMUTABLE} and {@code ORDERED}.
+     *
+     * @param array The array, assumed to be unmodified during use
+     * @param additionalCharacteristics Additional spliterator characteristics
+     *        of this spliterator's source or elements beyond {@code SIZED} and
+     *        {@code SUBSIZED} which are are always reported
+     * @return A spliterator for an array
+     * @throws NullPointerException if the given array is {@code null}
+     * @see Arrays#spliterator(int[])
+     */
+    public static Spliterator.OfInt spliterator(int[] array,
+                                                int additionalCharacteristics) {
+        return new IntArraySpliterator(Objects.requireNonNull(array), additionalCharacteristics);
+    }
+
+    /**
+     * Creates a {@code Spliterator.OfInt} covering a range of elements of a
+     * given array, using a customized set of spliterator characteristics.
+     *
+     * <p>This method is provided as an implementation convenience for
+     * Spliterators which store portions of their elements in arrays, and need
+     * fine control over Spliterator characteristics.  Most other situations in
+     * which a Spliterator for an array is needed should use
+     * {@link Arrays#spliterator(int[], int, int)}.
+     *
+     * <p>The returned spliterator always reports the characteristics
+     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
+     * characteristics for the spliterator to report; it is common to
+     * additionally specify {@code IMMUTABLE} and {@code ORDERED}.
+     *
+     * @param array The array, assumed to be unmodified during use
+     * @param fromIndex The least index (inclusive) to cover
+     * @param toIndex One past the greatest index to cover
+     * @param additionalCharacteristics Additional spliterator characteristics
+     *        of this spliterator's source or elements beyond {@code SIZED} and
+     *        {@code SUBSIZED} which are are always reported
+     * @return A spliterator for an array
+     * @throws NullPointerException if the given array is {@code null}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
+     *         {@code toIndex} is less than {@code fromIndex}, or
+     *         {@code toIndex} is greater than the array size
+     * @see Arrays#spliterator(int[], int, int)
+     */
+    public static Spliterator.OfInt spliterator(int[] array, int fromIndex, int toIndex,
+                                                int additionalCharacteristics) {
+        checkFromToBounds(Objects.requireNonNull(array).length, fromIndex, toIndex);
+        return new IntArraySpliterator(array, fromIndex, toIndex, additionalCharacteristics);
+    }
+
+    /**
+     * Creates a {@code Spliterator.OfLong} covering the elements of a given array,
+     * using a customized set of spliterator characteristics.
+     *
+     * <p>This method is provided as an implementation convenience for
+     * Spliterators which store portions of their elements in arrays, and need
+     * fine control over Spliterator characteristics.  Most other situations in
+     * which a Spliterator for an array is needed should use
+     * {@link Arrays#spliterator(long[])}.
+     *
+     * <p>The returned spliterator always reports the characteristics
+     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
+     * characteristics for the spliterator to report; it is common to
+     * additionally specify {@code IMMUTABLE} and {@code ORDERED}.
+     *
+     * @param array The array, assumed to be unmodified during use
+     * @param additionalCharacteristics Additional spliterator characteristics
+     *        of this spliterator's source or elements beyond {@code SIZED} and
+     *        {@code SUBSIZED} which are are always reported
+     * @return A spliterator for an array
+     * @throws NullPointerException if the given array is {@code null}
+     * @see Arrays#spliterator(long[])
+     */
+    public static Spliterator.OfLong spliterator(long[] array,
+                                                 int additionalCharacteristics) {
+        return new LongArraySpliterator(Objects.requireNonNull(array), additionalCharacteristics);
+    }
+
+    /**
+     * Creates a {@code Spliterator.OfLong} covering a range of elements of a
+     * given array, using a customized set of spliterator characteristics.
+     *
+     * <p>This method is provided as an implementation convenience for
+     * Spliterators which store portions of their elements in arrays, and need
+     * fine control over Spliterator characteristics.  Most other situations in
+     * which a Spliterator for an array is needed should use
+     * {@link Arrays#spliterator(long[], int, int)}.
+     *
+     * <p>The returned spliterator always reports the characteristics
+     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
+     * characteristics for the spliterator to report.  (For example, if it is
+     * known the array will not be further modified, specify {@code IMMUTABLE};
+     * if the array data is considered to have an an encounter order, specify
+     * {@code ORDERED}).  The method {@link Arrays#spliterator(long[], int, int)} can
+     * often be used instead, which returns a spliterator that reports
+     * {@code SIZED}, {@code SUBSIZED}, {@code IMMUTABLE}, and {@code ORDERED}.
+     *
+     * @param array The array, assumed to be unmodified during use
+     * @param fromIndex The least index (inclusive) to cover
+     * @param toIndex One past the greatest index to cover
+     * @param additionalCharacteristics Additional spliterator characteristics
+     *        of this spliterator's source or elements beyond {@code SIZED} and
+     *        {@code SUBSIZED} which are are always reported
+     * @return A spliterator for an array
+     * @throws NullPointerException if the given array is {@code null}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
+     *         {@code toIndex} is less than {@code fromIndex}, or
+     *         {@code toIndex} is greater than the array size
+     * @see Arrays#spliterator(long[], int, int)
+     */
+    public static Spliterator.OfLong spliterator(long[] array, int fromIndex, int toIndex,
+                                                 int additionalCharacteristics) {
+        checkFromToBounds(Objects.requireNonNull(array).length, fromIndex, toIndex);
+        return new LongArraySpliterator(array, fromIndex, toIndex, additionalCharacteristics);
+    }
+
+    /**
+     * Creates a {@code Spliterator.OfDouble} covering the elements of a given array,
+     * using a customized set of spliterator characteristics.
+     *
+     * <p>This method is provided as an implementation convenience for
+     * Spliterators which store portions of their elements in arrays, and need
+     * fine control over Spliterator characteristics.  Most other situations in
+     * which a Spliterator for an array is needed should use
+     * {@link Arrays#spliterator(double[])}.
+     *
+     * <p>The returned spliterator always reports the characteristics
+     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
+     * characteristics for the spliterator to report; it is common to
+     * additionally specify {@code IMMUTABLE} and {@code ORDERED}.
+     *
+     * @param array The array, assumed to be unmodified during use
+     * @param additionalCharacteristics Additional spliterator characteristics
+     *        of this spliterator's source or elements beyond {@code SIZED} and
+     *        {@code SUBSIZED} which are are always reported
+     * @return A spliterator for an array
+     * @throws NullPointerException if the given array is {@code null}
+     * @see Arrays#spliterator(double[])
+     */
+    public static Spliterator.OfDouble spliterator(double[] array,
+                                                   int additionalCharacteristics) {
+        return new DoubleArraySpliterator(Objects.requireNonNull(array), additionalCharacteristics);
+    }
+
+    /**
+     * Creates a {@code Spliterator.OfDouble} covering a range of elements of a
+     * given array, using a customized set of spliterator characteristics.
+     *
+     * <p>This method is provided as an implementation convenience for
+     * Spliterators which store portions of their elements in arrays, and need
+     * fine control over Spliterator characteristics.  Most other situations in
+     * which a Spliterator for an array is needed should use
+     * {@link Arrays#spliterator(double[], int, int)}.
+     *
+     * <p>The returned spliterator always reports the characteristics
+     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
+     * characteristics for the spliterator to report.  (For example, if it is
+     * known the array will not be further modified, specify {@code IMMUTABLE};
+     * if the array data is considered to have an an encounter order, specify
+     * {@code ORDERED}).  The method {@link Arrays#spliterator(long[], int, int)} can
+     * often be used instead, which returns a spliterator that reports
+     * {@code SIZED}, {@code SUBSIZED}, {@code IMMUTABLE}, and {@code ORDERED}.
+     *
+     * @param array The array, assumed to be unmodified during use
+     * @param fromIndex The least index (inclusive) to cover
+     * @param toIndex One past the greatest index to cover
+     * @param additionalCharacteristics Additional spliterator characteristics
+     *        of this spliterator's source or elements beyond {@code SIZED} and
+     *        {@code SUBSIZED} which are are always reported
+     * @return A spliterator for an array
+     * @throws NullPointerException if the given array is {@code null}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
+     *         {@code toIndex} is less than {@code fromIndex}, or
+     *         {@code toIndex} is greater than the array size
+     * @see Arrays#spliterator(double[], int, int)
+     */
+    public static Spliterator.OfDouble spliterator(double[] array, int fromIndex, int toIndex,
+                                                   int additionalCharacteristics) {
+        checkFromToBounds(Objects.requireNonNull(array).length, fromIndex, toIndex);
+        return new DoubleArraySpliterator(array, fromIndex, toIndex, additionalCharacteristics);
+    }
+
+    /**
+     * Validate inclusive start index and exclusive end index against the length
+     * of an array.
+     * @param arrayLength The length of the array
+     * @param origin The inclusive start index
+     * @param fence The exclusive end index
+     * @throws ArrayIndexOutOfBoundsException if the start index is greater than
+     * the end index, if the start index is negative, or the end index is
+     * greater than the array length
+     */
+    private static void checkFromToBounds(int arrayLength, int origin, int fence) {
+        if (origin > fence) {
+            throw new IllegalArgumentException(
+                    "origin(" + origin + ") > fence(" + fence + ")");
+        }
+        if (origin < 0) {
+            throw new ArrayIndexOutOfBoundsException(origin);
+        }
+        if (fence > arrayLength) {
+            throw new ArrayIndexOutOfBoundsException(fence);
+        }
+    }
+
+    // Iterator-based spliterators
+
+    /**
+     * Creates a {@code Spliterator} using the given collection's
+     * {@link java.util.Collection#iterator()} as the source of elements, and
+     * reporting its {@link java.util.Collection#size()} as its initial size.
+     *
+     * <p>The spliterator is
+     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
+     * the <em>fail-fast</em> properties of the collection's iterator, and
+     * implements {@code trySplit} to permit limited parallelism.
+     *
+     * @param <T> Type of elements
+     * @param c The collection
+     * @param additionalCharacteristics Additional spliterator characteristics
+     *        of this spliterator's source or elements beyond {@code SIZED} and
+     *        {@code SUBSIZED} which are are always reported
+     * @return A spliterator from an iterator
+     * @throws NullPointerException if the given collection is {@code null}
+     */
+    public static <T> Spliterator<T> spliterator(Collection<? extends T> c,
+                                                 int additionalCharacteristics) {
+        return new IteratorSpliterator<>(Objects.requireNonNull(c),
+                                         additionalCharacteristics);
+    }
+
+    /**
+     * Creates a {@code Spliterator} using a given {@code Iterator}
+     * as the source of elements, and with a given initially reported size.
+     *
+     * <p>The spliterator is not
+     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
+     * the <em>fail-fast</em> properties of the iterator, and implements
+     * {@code trySplit} to permit limited parallelism.
+     *
+     * <p>Traversal of elements should be accomplished through the spliterator.
+     * The behaviour of splitting and traversal is undefined if the iterator is
+     * operated on after the spliterator is returned, or the initially reported
+     * size is not equal to the actual number of elements in the source.
+     *
+     * @param <T> Type of elements
+     * @param iterator The iterator for the source
+     * @param size The number of elements in the source, to be reported as
+     *        initial {@code estimateSize}
+     * @param additionalCharacteristics Additional spliterator characteristics
+     *        of this spliterator's source or elements beyond {@code SIZED} and
+     *        {@code SUBSIZED} which are are always reported
+     * @return A spliterator from an iterator
+     * @throws NullPointerException if the given iterator is {@code null}
+     */
+    public static <T> Spliterator<T> spliterator(Iterator<? extends T> iterator,
+                                                 long size,
+                                                 int additionalCharacteristics) {
+        return new IteratorSpliterator<>(Objects.requireNonNull(iterator), size,
+                                         additionalCharacteristics);
+    }
+
+    /**
+     * Creates a {@code Spliterator} using a given {@code Iterator}
+     * as the source of elements, with no initial size estimate.
+     *
+     * <p>The spliterator is not
+     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
+     * the <em>fail-fast</em> properties of the iterator, and implements
+     * {@code trySplit} to permit limited parallelism.
+     *
+     * <p>Traversal of elements should be accomplished through the spliterator.
+     * The behaviour of splitting and traversal is undefined if the iterator is
+     * operated on after the spliterator is returned.
+     *
+     * @param <T> Type of elements
+     * @param iterator The iterator for the source
+     * @param characteristics Properties of this spliterator's source
+     *        or elements ({@code SIZED} and {@code SUBSIZED}, if supplied, are
+     *        ignored and are not reported.)
+     * @return A spliterator from an iterator
+     * @throws NullPointerException if the given iterator is {@code null}
+     */
+    public static <T> Spliterator<T> spliteratorUnknownSize(Iterator<? extends T> iterator,
+                                                            int characteristics) {
+        return new IteratorSpliterator<>(Objects.requireNonNull(iterator), characteristics);
+    }
+
+    /**
+     * Creates a {@code Spliterator.OfInt} using a given
+     * {@code IntStream.IntIterator} as the source of elements, and with a given
+     * initially reported size.
+     *
+     * <p>The spliterator is not
+     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
+     * the <em>fail-fast</em> properties of the iterator, and implements
+     * {@code trySplit} to permit limited parallelism.
+     *
+     * <p>Traversal of elements should be accomplished through the spliterator.
+     * The behaviour of splitting and traversal is undefined if the iterator is
+     * operated on after the spliterator is returned, or the initially reported
+     * size is not equal to the actual number of elements in the source.
+     *
+     * @param iterator The iterator for the source
+     * @param size The number of elements in the source, to be reported as
+     *        initial {@code estimateSize}.
+     * @param additionalCharacteristics Additional spliterator characteristics
+     *        of this spliterator's source or elements beyond {@code SIZED} and
+     *        {@code SUBSIZED} which are are always reported
+     * @return A spliterator from an iterator
+     * @throws NullPointerException if the given iterator is {@code null}
+     */
+    public static Spliterator.OfInt spliterator(PrimitiveIterator.OfInt iterator,
+                                                long size,
+                                                int additionalCharacteristics) {
+        return new IntIteratorSpliterator(Objects.requireNonNull(iterator),
+                                          size, additionalCharacteristics);
+    }
+
+    /**
+     * Creates a {@code Spliterator.OfInt} using a given
+     * {@code IntStream.IntIterator} as the source of elements, with no initial
+     * size estimate.
+     *
+     * <p>The spliterator is not
+     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
+     * the <em>fail-fast</em> properties of the iterator, and implements
+     * {@code trySplit} to permit limited parallelism.
+     *
+     * <p>Traversal of elements should be accomplished through the spliterator.
+     * The behaviour of splitting and traversal is undefined if the iterator is
+     * operated on after the spliterator is returned.
+     *
+     * @param iterator The iterator for the source
+     * @param characteristics Properties of this spliterator's source
+     *        or elements ({@code SIZED} and {@code SUBSIZED}, if supplied, are
+     *        ignored and are not reported.)
+     * @return A spliterator from an iterator
+     * @throws NullPointerException if the given iterator is {@code null}
+     */
+    public static Spliterator.OfInt spliteratorUnknownSize(PrimitiveIterator.OfInt iterator,
+                                                           int characteristics) {
+        return new IntIteratorSpliterator(Objects.requireNonNull(iterator), characteristics);
+    }
+
+    /**
+     * Creates a {@code Spliterator.OfLong} using a given
+     * {@code LongStream.LongIterator} as the source of elements, and with a
+     * given initially reported size.
+     *
+     * <p>The spliterator is not
+     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
+     * the <em>fail-fast</em> properties of the iterator, and implements
+     * {@code trySplit} to permit limited parallelism.
+     *
+     * <p>Traversal of elements should be accomplished through the spliterator.
+     * The behaviour of splitting and traversal is undefined if the iterator is
+     * operated on after the spliterator is returned, or the initially reported
+     * size is not equal to the actual number of elements in the source.
+     *
+     * @param iterator The iterator for the source
+     * @param size The number of elements in the source, to be reported as
+     *        initial {@code estimateSize}.
+     * @param additionalCharacteristics Additional spliterator characteristics
+     *        of this spliterator's source or elements beyond {@code SIZED} and
+     *        {@code SUBSIZED} which are are always reported
+     * @return A spliterator from an iterator
+     * @throws NullPointerException if the given iterator is {@code null}
+     */
+    public static Spliterator.OfLong spliterator(PrimitiveIterator.OfLong iterator,
+                                                 long size,
+                                                 int additionalCharacteristics) {
+        return new LongIteratorSpliterator(Objects.requireNonNull(iterator),
+                                           size, additionalCharacteristics);
+    }
+
+    /**
+     * Creates a {@code Spliterator.OfLong} using a given
+     * {@code LongStream.LongIterator} as the source of elements, with no
+     * initial size estimate.
+     *
+     * <p>The spliterator is not
+     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
+     * the <em>fail-fast</em> properties of the iterator, and implements
+     * {@code trySplit} to permit limited parallelism.
+     *
+     * <p>Traversal of elements should be accomplished through the spliterator.
+     * The behaviour of splitting and traversal is undefined if the iterator is
+     * operated on after the spliterator is returned.
+     *
+     * @param iterator The iterator for the source
+     * @param characteristics Properties of this spliterator's source
+     *        or elements ({@code SIZED} and {@code SUBSIZED}, if supplied, are
+     *        ignored and are not reported.)
+     * @return A spliterator from an iterator
+     * @throws NullPointerException if the given iterator is {@code null}
+     */
+    public static Spliterator.OfLong spliteratorUnknownSize(PrimitiveIterator.OfLong iterator,
+                                                            int characteristics) {
+        return new LongIteratorSpliterator(Objects.requireNonNull(iterator), characteristics);
+    }
+
+    /**
+     * Creates a {@code Spliterator.OfDouble} using a given
+     * {@code DoubleStream.DoubleIterator} as the source of elements, and with a
+     * given initially reported size.
+     *
+     * <p>The spliterator is not
+     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
+     * the <em>fail-fast</em> properties of the iterator, and implements
+     * {@code trySplit} to permit limited parallelism.
+     *
+     * <p>Traversal of elements should be accomplished through the spliterator.
+     * The behaviour of splitting and traversal is undefined if the iterator is
+     * operated on after the spliterator is returned, or the initially reported
+     * size is not equal to the actual number of elements in the source.
+     *
+     * @param iterator The iterator for the source
+     * @param size The number of elements in the source, to be reported as
+     *        initial {@code estimateSize}
+     * @param additionalCharacteristics Additional spliterator characteristics
+     *        of this spliterator's source or elements beyond {@code SIZED} and
+     *        {@code SUBSIZED} which are are always reported
+     * @return A spliterator from an iterator
+     * @throws NullPointerException if the given iterator is {@code null}
+     */
+    public static Spliterator.OfDouble spliterator(PrimitiveIterator.OfDouble iterator,
+                                                   long size,
+                                                   int additionalCharacteristics) {
+        return new DoubleIteratorSpliterator(Objects.requireNonNull(iterator),
+                                             size, additionalCharacteristics);
+    }
+
+    /**
+     * Creates a {@code Spliterator.OfDouble} using a given
+     * {@code DoubleStream.DoubleIterator} as the source of elements, with no
+     * initial size estimate.
+     *
+     * <p>The spliterator is not
+     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
+     * the <em>fail-fast</em> properties of the iterator, and implements
+     * {@code trySplit} to permit limited parallelism.
+     *
+     * <p>Traversal of elements should be accomplished through the spliterator.
+     * The behaviour of splitting and traversal is undefined if the iterator is
+     * operated on after the spliterator is returned.
+     *
+     * @param iterator The iterator for the source
+     * @param characteristics Properties of this spliterator's source
+     *        or elements ({@code SIZED} and {@code SUBSIZED}, if supplied, are
+     *        ignored and are not reported.)
+     * @return A spliterator from an iterator
+     * @throws NullPointerException if the given iterator is {@code null}
+     */
+    public static Spliterator.OfDouble spliteratorUnknownSize(PrimitiveIterator.OfDouble iterator,
+                                                              int characteristics) {
+        return new DoubleIteratorSpliterator(Objects.requireNonNull(iterator), characteristics);
+    }
+
+    // Iterators from Spliterators
+
+    /**
+     * Creates an {@code Iterator} from a {@code Spliterator}.
+     *
+     * <p>Traversal of elements should be accomplished through the iterator.
+     * The behaviour of traversal is undefined if the spliterator is operated
+     * after the iterator is returned.
+     *
+     * @param <T> Type of elements
+     * @param spliterator The spliterator
+     * @return An iterator
+     * @throws NullPointerException if the given spliterator is {@code null}
+     */
+    public static<T> Iterator<T> iteratorFromSpliterator(Spliterator<? extends T> spliterator) {
+        Objects.requireNonNull(spliterator);
+        class Adapter implements Iterator<T>, Consumer<T> {
+            boolean valueReady = false;
+            T nextElement;
+
+            @Override
+            public void accept(T t) {
+                valueReady = true;
+                nextElement = t;
+            }
+
+            @Override
+            public boolean hasNext() {
+                if (!valueReady)
+                    spliterator.tryAdvance(this);
+                return valueReady;
+            }
+
+            @Override
+            public T next() {
+                if (!valueReady && !hasNext())
+                    throw new NoSuchElementException();
+                else {
+                    valueReady = false;
+                    return nextElement;
+                }
+            }
+        }
+
+        return new Adapter();
+    }
+
+    /**
+     * Creates an {@code PrimitiveIterator.OfInt} from a
+     * {@code Spliterator.OfInt}.
+     *
+     * <p>Traversal of elements should be accomplished through the iterator.
+     * The behaviour of traversal is undefined if the spliterator is operated
+     * after the iterator is returned.
+     *
+     * @param spliterator The spliterator
+     * @return An iterator
+     * @throws NullPointerException if the given spliterator is {@code null}
+     */
+    public static PrimitiveIterator.OfInt iteratorFromSpliterator(Spliterator.OfInt spliterator) {
+        Objects.requireNonNull(spliterator);
+        class Adapter implements PrimitiveIterator.OfInt, IntConsumer {
+            boolean valueReady = false;
+            int nextElement;
+
+            @Override
+            public void accept(int t) {
+                valueReady = true;
+                nextElement = t;
+            }
+
+            @Override
+            public boolean hasNext() {
+                if (!valueReady)
+                    spliterator.tryAdvance(this);
+                return valueReady;
+            }
+
+            @Override
+            public int nextInt() {
+                if (!valueReady && !hasNext())
+                    throw new NoSuchElementException();
+                else {
+                    valueReady = false;
+                    return nextElement;
+                }
+            }
+        }
+
+        return new Adapter();
+    }
+
+    /**
+     * Creates an {@code PrimitiveIterator.OfLong} from a
+     * {@code Spliterator.OfLong}.
+     *
+     * <p>Traversal of elements should be accomplished through the iterator.
+     * The behaviour of traversal is undefined if the spliterator is operated
+     * after the iterator is returned.
+     *
+     * @param spliterator The spliterator
+     * @return An iterator
+     * @throws NullPointerException if the given spliterator is {@code null}
+     */
+    public static PrimitiveIterator.OfLong iteratorFromSpliterator(Spliterator.OfLong spliterator) {
+        Objects.requireNonNull(spliterator);
+        class Adapter implements PrimitiveIterator.OfLong, LongConsumer {
+            boolean valueReady = false;
+            long nextElement;
+
+            @Override
+            public void accept(long t) {
+                valueReady = true;
+                nextElement = t;
+            }
+
+            @Override
+            public boolean hasNext() {
+                if (!valueReady)
+                    spliterator.tryAdvance(this);
+                return valueReady;
+            }
+
+            @Override
+            public long nextLong() {
+                if (!valueReady && !hasNext())
+                    throw new NoSuchElementException();
+                else {
+                    valueReady = false;
+                    return nextElement;
+                }
+            }
+        }
+
+        return new Adapter();
+    }
+
+    /**
+     * Creates an {@code PrimitiveIterator.OfDouble} from a
+     * {@code Spliterator.OfDouble}.
+     *
+     * <p>Traversal of elements should be accomplished through the iterator.
+     * The behaviour of traversal is undefined if the spliterator is operated
+     * after the iterator is returned.
+     *
+     * @param spliterator The spliterator
+     * @return An iterator
+     * @throws NullPointerException if the given spliterator is {@code null}
+     */
+    public static PrimitiveIterator.OfDouble iteratorFromSpliterator(Spliterator.OfDouble spliterator) {
+        Objects.requireNonNull(spliterator);
+        class Adapter implements PrimitiveIterator.OfDouble, DoubleConsumer {
+            boolean valueReady = false;
+            double nextElement;
+
+            @Override
+            public void accept(double t) {
+                valueReady = true;
+                nextElement = t;
+            }
+
+            @Override
+            public boolean hasNext() {
+                if (!valueReady)
+                    spliterator.tryAdvance(this);
+                return valueReady;
+            }
+
+            @Override
+            public double nextDouble() {
+                if (!valueReady && !hasNext())
+                    throw new NoSuchElementException();
+                else {
+                    valueReady = false;
+                    return nextElement;
+                }
+            }
+        }
+
+        return new Adapter();
+    }
+
+    // Implementations
+
+    private static abstract class EmptySpliterator<T, S extends Spliterator<T>, C> {
+
+        EmptySpliterator() { }
+
+        public S trySplit() {
+            return null;
+        }
+
+        public boolean tryAdvance(C consumer) {
+            Objects.requireNonNull(consumer);
+            return false;
+        }
+
+        public void forEachRemaining(C consumer) {
+            Objects.requireNonNull(consumer);
+        }
+
+        public long estimateSize() {
+            return 0;
+        }
+
+        public int characteristics() {
+            return Spliterator.SIZED | Spliterator.SUBSIZED;
+        }
+
+        private static final class OfRef<T>
+                extends EmptySpliterator<T, Spliterator<T>, Consumer<? super T>>
+                implements Spliterator<T> {
+            OfRef() { }
+        }
+
+        private static final class OfInt
+                extends EmptySpliterator<Integer, Spliterator.OfInt, IntConsumer>
+                implements Spliterator.OfInt {
+            OfInt() { }
+        }
+
+        private static final class OfLong
+                extends EmptySpliterator<Long, Spliterator.OfLong, LongConsumer>
+                implements Spliterator.OfLong {
+            OfLong() { }
+        }
+
+        private static final class OfDouble
+                extends EmptySpliterator<Double, Spliterator.OfDouble, DoubleConsumer>
+                implements Spliterator.OfDouble {
+            OfDouble() { }
+        }
+    }
+
+    // Array-based spliterators
+
+    /**
+     * A Spliterator designed for use by sources that traverse and split
+     * elements maintained in an unmodifiable {@code Object[]} array.
+     */
+    static final class ArraySpliterator<T> implements Spliterator<T> {
+        /**
+         * The array, explicitly typed as Object[]. Unlike in some other
+         * classes (see for example CR 6260652), we do not need to
+         * screen arguments to ensure they are exactly of type Object[]
+         * so long as no methods write into the array or serialize it,
+         * which we ensure here by defining this class as final.
+         */
+        private final Object[] array;
+        private int index;        // current index, modified on advance/split
+        private final int fence;  // one past last index
+        private final int characteristics;
+
+        /**
+         * Creates a spliterator covering all of the given array.
+         * @param array the array, assumed to be unmodified during use
+         * @param additionalCharacteristics Additional spliterator characteristics
+         * of this spliterator's source or elements beyond {@code SIZED} and
+         * {@code SUBSIZED} which are are always reported
+         */
+        public ArraySpliterator(Object[] array, int additionalCharacteristics) {
+            this(array, 0, array.length, additionalCharacteristics);
+        }
+
+        /**
+         * Creates a spliterator covering the given array and range
+         * @param array the array, assumed to be unmodified during use
+         * @param origin the least index (inclusive) to cover
+         * @param fence one past the greatest index to cover
+         * @param additionalCharacteristics Additional spliterator characteristics
+         * of this spliterator's source or elements beyond {@code SIZED} and
+         * {@code SUBSIZED} which are are always reported
+         */
+        public ArraySpliterator(Object[] array, int origin, int fence, int additionalCharacteristics) {
+            this.array = array;
+            this.index = origin;
+            this.fence = fence;
+            this.characteristics = additionalCharacteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
+        }
+
+        @Override
+        public Spliterator<T> trySplit() {
+            int lo = index, mid = (lo + fence) >>> 1;
+            return (lo >= mid)
+                   ? null
+                   : new ArraySpliterator<>(array, lo, index = mid, characteristics);
+        }
+
+        @SuppressWarnings("unchecked")
+        @Override
+        public void forEachRemaining(Consumer<? super T> action) {
+            Object[] a; int i, hi; // hoist accesses and checks from loop
+            if (action == null)
+                throw new NullPointerException();
+            if ((a = array).length >= (hi = fence) &&
+                (i = index) >= 0 && i < (index = hi)) {
+                do { action.accept((T)a[i]); } while (++i < hi);
+            }
+        }
+
+        @Override
+        public boolean tryAdvance(Consumer<? super T> action) {
+            if (action == null)
+                throw new NullPointerException();
+            if (index >= 0 && index < fence) {
+                @SuppressWarnings("unchecked") T e = (T) array[index++];
+                action.accept(e);
+                return true;
+            }
+            return false;
+        }
+
+        @Override
+        public long estimateSize() { return (long)(fence - index); }
+
+        @Override
+        public int characteristics() {
+            return characteristics;
+        }
+
+        @Override
+        public Comparator<? super T> getComparator() {
+            if (hasCharacteristics(Spliterator.SORTED))
+                return null;
+            throw new IllegalStateException();
+        }
+    }
+
+    /**
+     * A Spliterator.OfInt designed for use by sources that traverse and split
+     * elements maintained in an unmodifiable {@code int[]} array.
+     */
+    static final class IntArraySpliterator implements Spliterator.OfInt {
+        private final int[] array;
+        private int index;        // current index, modified on advance/split
+        private final int fence;  // one past last index
+        private final int characteristics;
+
+        /**
+         * Creates a spliterator covering all of the given array.
+         * @param array the array, assumed to be unmodified during use
+         * @param additionalCharacteristics Additional spliterator characteristics
+         *        of this spliterator's source or elements beyond {@code SIZED} and
+         *        {@code SUBSIZED} which are are always reported
+         */
+        public IntArraySpliterator(int[] array, int additionalCharacteristics) {
+            this(array, 0, array.length, additionalCharacteristics);
+        }
+
+        /**
+         * Creates a spliterator covering the given array and range
+         * @param array the array, assumed to be unmodified during use
+         * @param origin the least index (inclusive) to cover
+         * @param fence one past the greatest index to cover
+         * @param additionalCharacteristics Additional spliterator characteristics
+         *        of this spliterator's source or elements beyond {@code SIZED} and
+         *        {@code SUBSIZED} which are are always reported
+         */
+        public IntArraySpliterator(int[] array, int origin, int fence, int additionalCharacteristics) {
+            this.array = array;
+            this.index = origin;
+            this.fence = fence;
+            this.characteristics = additionalCharacteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
+        }
+
+        @Override
+        public OfInt trySplit() {
+            int lo = index, mid = (lo + fence) >>> 1;
+            return (lo >= mid)
+                   ? null
+                   : new IntArraySpliterator(array, lo, index = mid, characteristics);
+        }
+
+        @Override
+        public void forEachRemaining(IntConsumer action) {
+            int[] a; int i, hi; // hoist accesses and checks from loop
+            if (action == null)
+                throw new NullPointerException();
+            if ((a = array).length >= (hi = fence) &&
+                (i = index) >= 0 && i < (index = hi)) {
+                do { action.accept(a[i]); } while (++i < hi);
+            }
+        }
+
+        @Override
+        public boolean tryAdvance(IntConsumer action) {
+            if (action == null)
+                throw new NullPointerException();
+            if (index >= 0 && index < fence) {
+                action.accept(array[index++]);
+                return true;
+            }
+            return false;
+        }
+
+        @Override
+        public long estimateSize() { return (long)(fence - index); }
+
+        @Override
+        public int characteristics() {
+            return characteristics;
+        }
+
+        @Override
+        public Comparator<? super Integer> getComparator() {
+            if (hasCharacteristics(Spliterator.SORTED))
+                return null;
+            throw new IllegalStateException();
+        }
+    }
+
+    /**
+     * A Spliterator.OfLong designed for use by sources that traverse and split
+     * elements maintained in an unmodifiable {@code int[]} array.
+     */
+    static final class LongArraySpliterator implements Spliterator.OfLong {
+        private final long[] array;
+        private int index;        // current index, modified on advance/split
+        private final int fence;  // one past last index
+        private final int characteristics;
+
+        /**
+         * Creates a spliterator covering all of the given array.
+         * @param array the array, assumed to be unmodified during use
+         * @param additionalCharacteristics Additional spliterator characteristics
+         *        of this spliterator's source or elements beyond {@code SIZED} and
+         *        {@code SUBSIZED} which are are always reported
+         */
+        public LongArraySpliterator(long[] array, int additionalCharacteristics) {
+            this(array, 0, array.length, additionalCharacteristics);
+        }
+
+        /**
+         * Creates a spliterator covering the given array and range
+         * @param array the array, assumed to be unmodified during use
+         * @param origin the least index (inclusive) to cover
+         * @param fence one past the greatest index to cover
+         * @param additionalCharacteristics Additional spliterator characteristics
+         *        of this spliterator's source or elements beyond {@code SIZED} and
+         *        {@code SUBSIZED} which are are always reported
+         */
+        public LongArraySpliterator(long[] array, int origin, int fence, int additionalCharacteristics) {
+            this.array = array;
+            this.index = origin;
+            this.fence = fence;
+            this.characteristics = additionalCharacteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
+        }
+
+        @Override
+        public OfLong trySplit() {
+            int lo = index, mid = (lo + fence) >>> 1;
+            return (lo >= mid)
+                   ? null
+                   : new LongArraySpliterator(array, lo, index = mid, characteristics);
+        }
+
+        @Override
+        public void forEachRemaining(LongConsumer action) {
+            long[] a; int i, hi; // hoist accesses and checks from loop
+            if (action == null)
+                throw new NullPointerException();
+            if ((a = array).length >= (hi = fence) &&
+                (i = index) >= 0 && i < (index = hi)) {
+                do { action.accept(a[i]); } while (++i < hi);
+            }
+        }
+
+        @Override
+        public boolean tryAdvance(LongConsumer action) {
+            if (action == null)
+                throw new NullPointerException();
+            if (index >= 0 && index < fence) {
+                action.accept(array[index++]);
+                return true;
+            }
+            return false;
+        }
+
+        @Override
+        public long estimateSize() { return (long)(fence - index); }
+
+        @Override
+        public int characteristics() {
+            return characteristics;
+        }
+
+        @Override
+        public Comparator<? super Long> getComparator() {
+            if (hasCharacteristics(Spliterator.SORTED))
+                return null;
+            throw new IllegalStateException();
+        }
+    }
+
+    /**
+     * A Spliterator.OfDouble designed for use by sources that traverse and split
+     * elements maintained in an unmodifiable {@code int[]} array.
+     */
+    static final class DoubleArraySpliterator implements Spliterator.OfDouble {
+        private final double[] array;
+        private int index;        // current index, modified on advance/split
+        private final int fence;  // one past last index
+        private final int characteristics;
+
+        /**
+         * Creates a spliterator covering all of the given array.
+         * @param array the array, assumed to be unmodified during use
+         * @param additionalCharacteristics Additional spliterator characteristics
+         *        of this spliterator's source or elements beyond {@code SIZED} and
+         *        {@code SUBSIZED} which are are always reported
+         */
+        public DoubleArraySpliterator(double[] array, int additionalCharacteristics) {
+            this(array, 0, array.length, additionalCharacteristics);
+        }
+
+        /**
+         * Creates a spliterator covering the given array and range
+         * @param array the array, assumed to be unmodified during use
+         * @param origin the least index (inclusive) to cover
+         * @param fence one past the greatest index to cover
+         * @param additionalCharacteristics Additional spliterator characteristics
+         *        of this spliterator's source or elements beyond {@code SIZED} and
+         *        {@code SUBSIZED} which are are always reported
+         */
+        public DoubleArraySpliterator(double[] array, int origin, int fence, int additionalCharacteristics) {
+            this.array = array;
+            this.index = origin;
+            this.fence = fence;
+            this.characteristics = additionalCharacteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
+        }
+
+        @Override
+        public OfDouble trySplit() {
+            int lo = index, mid = (lo + fence) >>> 1;
+            return (lo >= mid)
+                   ? null
+                   : new DoubleArraySpliterator(array, lo, index = mid, characteristics);
+        }
+
+        @Override
+        public void forEachRemaining(DoubleConsumer action) {
+            double[] a; int i, hi; // hoist accesses and checks from loop
+            if (action == null)
+                throw new NullPointerException();
+            if ((a = array).length >= (hi = fence) &&
+                (i = index) >= 0 && i < (index = hi)) {
+                do { action.accept(a[i]); } while (++i < hi);
+            }
+        }
+
+        @Override
+        public boolean tryAdvance(DoubleConsumer action) {
+            if (action == null)
+                throw new NullPointerException();
+            if (index >= 0 && index < fence) {
+                action.accept(array[index++]);
+                return true;
+            }
+            return false;
+        }
+
+        @Override
+        public long estimateSize() { return (long)(fence - index); }
+
+        @Override
+        public int characteristics() {
+            return characteristics;
+        }
+
+        @Override
+        public Comparator<? super Double> getComparator() {
+            if (hasCharacteristics(Spliterator.SORTED))
+                return null;
+            throw new IllegalStateException();
+        }
+    }
+
+    //
+
+    /**
+     * An abstract {@code Spliterator} that implements {@code trySplit} to
+     * permit limited parallelism.
+     *
+     * <p>An extending class need only
+     * implement {@link #tryAdvance(java.util.function.Consumer) tryAdvance}.
+     * The extending class should override
+     * {@link #forEachRemaining(java.util.function.Consumer) forEach} if it can
+     * provide a more performant implementation.
+     *
+     * @apiNote
+     * This class is a useful aid for creating a spliterator when it is not
+     * possible or difficult to efficiently partition elements in a manner
+     * allowing balanced parallel computation.
+     *
+     * <p>An alternative to using this class, that also permits limited
+     * parallelism, is to create a spliterator from an iterator
+     * (see {@link #spliterator(Iterator, long, int)}.  Depending on the
+     * circumstances using an iterator may be easier or more convenient than
+     * extending this class, such as when there is already an iterator
+     * available to use.
+     *
+     * @see #spliterator(Iterator, long, int)
+     * @since 1.8
+     */
+    public static abstract class AbstractSpliterator<T> implements Spliterator<T> {
+        static final int BATCH_UNIT = 1 << 10;  // batch array size increment
+        static final int MAX_BATCH = 1 << 25;  // max batch array size;
+        private final int characteristics;
+        private long est;             // size estimate
+        private int batch;            // batch size for splits
+
+        /**
+         * Creates a spliterator reporting the given estimated size and
+         * additionalCharacteristics.
+         *
+         * @param est the estimated size of this spliterator if known, otherwise
+         *        {@code Long.MAX_VALUE}.
+         * @param additionalCharacteristics properties of this spliterator's
+         *        source or elements.  If {@code SIZED} is reported then this
+         *        spliterator will additionally report {@code SUBSIZED}.
+         */
+        protected AbstractSpliterator(long est, int additionalCharacteristics) {
+            this.est = est;
+            this.characteristics = ((additionalCharacteristics & Spliterator.SIZED) != 0)
+                                   ? additionalCharacteristics | Spliterator.SUBSIZED
+                                   : additionalCharacteristics;
+        }
+
+        static final class HoldingConsumer<T> implements Consumer<T> {
+            Object value;
+
+            @Override
+            public void accept(T value) {
+                this.value = value;
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         *
+         * This implementation permits limited parallelism.
+         */
+        @Override
+        public Spliterator<T> trySplit() {
+            /*
+             * Split into arrays of arithmetically increasing batch
+             * sizes.  This will only improve parallel performance if
+             * per-element Consumer actions are more costly than
+             * transferring them into an array.  The use of an
+             * arithmetic progression in split sizes provides overhead
+             * vs parallelism bounds that do not particularly favor or
+             * penalize cases of lightweight vs heavyweight element
+             * operations, across combinations of #elements vs #cores,
+             * whether or not either are known.  We generate
+             * O(sqrt(#elements)) splits, allowing O(sqrt(#cores))
+             * potential speedup.
+             */
+            HoldingConsumer<T> holder = new HoldingConsumer<>();
+            long s = est;
+            if (s > 1 && tryAdvance(holder)) {
+                int n = batch + BATCH_UNIT;
+                if (n > s)
+                    n = (int) s;
+                if (n > MAX_BATCH)
+                    n = MAX_BATCH;
+                Object[] a;
+                try {
+                    a = new Object[n];
+                } catch (OutOfMemoryError oome) {
+                    return null;
+                }
+                int j = 0;
+                do { a[j] = holder.value; } while (++j < n && tryAdvance(holder));
+                batch = j;
+                if (est != Long.MAX_VALUE)
+                    est -= j;
+                return new ArraySpliterator<>(a, 0, j, characteristics());
+            }
+            return null;
+        }
+
+        /**
+         * {@inheritDoc}
+         *
+         * @implSpec
+         * This implementation returns the estimated size as reported when
+         * created and, if the estimate size is known, decreases in size when
+         * split.
+         */
+        @Override
+        public long estimateSize() {
+            return est;
+        }
+
+        /**
+         * {@inheritDoc}
+         *
+         * @implSpec
+         * This implementation returns the characteristics as reported when
+         * created.
+         */
+        @Override
+        public int characteristics() {
+            return characteristics;
+        }
+    }
+
+    /**
+     * An abstract {@code Spliterator.OfInt} that implements {@code trySplit} to
+     * permit limited parallelism.
+     *
+     * <p>To implement a spliterator an extending class need only
+     * implement {@link #tryAdvance(java.util.function.IntConsumer)}
+     * tryAdvance}.  The extending class should override
+     * {@link #forEachRemaining(java.util.function.IntConsumer)} forEach} if it
+     * can provide a more performant implementation.
+     *
+     * @apiNote
+     * This class is a useful aid for creating a spliterator when it is not
+     * possible or difficult to efficiently partition elements in a manner
+     * allowing balanced parallel computation.
+     *
+     * <p>An alternative to using this class, that also permits limited
+     * parallelism, is to create a spliterator from an iterator
+     * (see {@link #spliterator(java.util.PrimitiveIterator.OfInt, long, int)}.
+     * Depending on the circumstances using an iterator may be easier or more
+     * convenient than extending this class. For example, if there is already an
+     * iterator available to use then there is no need to extend this class.
+     *
+     * @see #spliterator(java.util.PrimitiveIterator.OfInt, long, int)
+     * @since 1.8
+     */
+    public static abstract class AbstractIntSpliterator implements Spliterator.OfInt {
+        static final int MAX_BATCH = AbstractSpliterator.MAX_BATCH;
+        static final int BATCH_UNIT = AbstractSpliterator.BATCH_UNIT;
+        private final int characteristics;
+        private long est;             // size estimate
+        private int batch;            // batch size for splits
+
+        /**
+         * Creates a spliterator reporting the given estimated size and
+         * characteristics.
+         *
+         * @param est the estimated size of this spliterator if known, otherwise
+         *        {@code Long.MAX_VALUE}.
+         * @param additionalCharacteristics properties of this spliterator's
+         *        source or elements.  If {@code SIZED} is reported then this
+         *        spliterator will additionally report {@code SUBSIZED}.
+         */
+        protected AbstractIntSpliterator(long est, int additionalCharacteristics) {
+            this.est = est;
+            this.characteristics = ((additionalCharacteristics & Spliterator.SIZED) != 0)
+                                   ? additionalCharacteristics | Spliterator.SUBSIZED
+                                   : additionalCharacteristics;
+        }
+
+        static final class HoldingIntConsumer implements IntConsumer {
+            int value;
+
+            @Override
+            public void accept(int value) {
+                this.value = value;
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         *
+         * This implementation permits limited parallelism.
+         */
+        @Override
+        public Spliterator.OfInt trySplit() {
+            HoldingIntConsumer holder = new HoldingIntConsumer();
+            long s = est;
+            if (s > 1 && tryAdvance(holder)) {
+                int n = batch + BATCH_UNIT;
+                if (n > s)
+                    n = (int) s;
+                if (n > MAX_BATCH)
+                    n = MAX_BATCH;
+                int[] a;
+                try {
+                    a = new int[n];
+                } catch (OutOfMemoryError oome) {
+                    return null;
+                }
+                int j = 0;
+                do { a[j] = holder.value; } while (++j < n && tryAdvance(holder));
+                batch = j;
+                if (est != Long.MAX_VALUE)
+                    est -= j;
+                return new IntArraySpliterator(a, 0, j, characteristics());
+            }
+            return null;
+        }
+
+        /**
+         * {@inheritDoc}
+         *
+         * @implSpec
+         * This implementation returns the estimated size as reported when
+         * created and, if the estimate size is known, decreases in size when
+         * split.
+         */
+        @Override
+        public long estimateSize() {
+            return est;
+        }
+
+        /**
+         * {@inheritDoc}
+         *
+         * @implSpec
+         * This implementation returns the characteristics as reported when
+         * created.
+         */
+        @Override
+        public int characteristics() {
+            return characteristics;
+        }
+    }
+
+    /**
+     * An abstract {@code Spliterator.OfLong} that implements {@code trySplit}
+     * to permit limited parallelism.
+     *
+     * <p>To implement a spliterator an extending class need only
+     * implement {@link #tryAdvance(java.util.function.LongConsumer)}
+     * tryAdvance}.  The extending class should override
+     * {@link #forEachRemaining(java.util.function.LongConsumer)} forEach} if it
+     * can provide a more performant implementation.
+     *
+     * @apiNote
+     * This class is a useful aid for creating a spliterator when it is not
+     * possible or difficult to efficiently partition elements in a manner
+     * allowing balanced parallel computation.
+     *
+     * <p>An alternative to using this class, that also permits limited
+     * parallelism, is to create a spliterator from an iterator
+     * (see {@link #spliterator(java.util.PrimitiveIterator.OfLong, long, int)}.
+     * Depending on the circumstances using an iterator may be easier or more
+     * convenient than extending this class. For example, if there is already an
+     * iterator available to use then there is no need to extend this class.
+     *
+     * @see #spliterator(java.util.PrimitiveIterator.OfLong, long, int)
+     * @since 1.8
+     */
+    public static abstract class AbstractLongSpliterator implements Spliterator.OfLong {
+        static final int MAX_BATCH = AbstractSpliterator.MAX_BATCH;
+        static final int BATCH_UNIT = AbstractSpliterator.BATCH_UNIT;
+        private final int characteristics;
+        private long est;             // size estimate
+        private int batch;            // batch size for splits
+
+        /**
+         * Creates a spliterator reporting the given estimated size and
+         * characteristics.
+         *
+         * @param est the estimated size of this spliterator if known, otherwise
+         *        {@code Long.MAX_VALUE}.
+         * @param additionalCharacteristics properties of this spliterator's
+         *        source or elements.  If {@code SIZED} is reported then this
+         *        spliterator will additionally report {@code SUBSIZED}.
+         */
+        protected AbstractLongSpliterator(long est, int additionalCharacteristics) {
+            this.est = est;
+            this.characteristics = ((additionalCharacteristics & Spliterator.SIZED) != 0)
+                                   ? additionalCharacteristics | Spliterator.SUBSIZED
+                                   : additionalCharacteristics;
+        }
+
+        static final class HoldingLongConsumer implements LongConsumer {
+            long value;
+
+            @Override
+            public void accept(long value) {
+                this.value = value;
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         *
+         * This implementation permits limited parallelism.
+         */
+        @Override
+        public Spliterator.OfLong trySplit() {
+            HoldingLongConsumer holder = new HoldingLongConsumer();
+            long s = est;
+            if (s > 1 && tryAdvance(holder)) {
+                int n = batch + BATCH_UNIT;
+                if (n > s)
+                    n = (int) s;
+                if (n > MAX_BATCH)
+                    n = MAX_BATCH;
+                long[] a;
+                try {
+                    a = new long[n];
+                } catch (OutOfMemoryError oome) {
+                    return null;
+                }
+                int j = 0;
+                do { a[j] = holder.value; } while (++j < n && tryAdvance(holder));
+                batch = j;
+                if (est != Long.MAX_VALUE)
+                    est -= j;
+                return new LongArraySpliterator(a, 0, j, characteristics());
+            }
+            return null;
+        }
+
+        /**
+         * {@inheritDoc}
+         *
+         * @implSpec
+         * This implementation returns the estimated size as reported when
+         * created and, if the estimate size is known, decreases in size when
+         * split.
+         */
+        @Override
+        public long estimateSize() {
+            return est;
+        }
+
+        /**
+         * {@inheritDoc}
+         *
+         * @implSpec
+         * This implementation returns the characteristics as reported when
+         * created.
+         */
+        @Override
+        public int characteristics() {
+            return characteristics;
+        }
+    }
+
+    /**
+     * An abstract {@code Spliterator.OfDouble} that implements
+     * {@code trySplit} to permit limited parallelism.
+     *
+     * <p>To implement a spliterator an extending class need only
+     * implement {@link #tryAdvance(java.util.function.DoubleConsumer)}
+     * tryAdvance}.  The extending class should override
+     * {@link #forEachRemaining(java.util.function.DoubleConsumer)} forEach} if
+     * it can provide a more performant implementation.
+     *
+     * @apiNote
+     * This class is a useful aid for creating a spliterator when it is not
+     * possible or difficult to efficiently partition elements in a manner
+     * allowing balanced parallel computation.
+     *
+     * <p>An alternative to using this class, that also permits limited
+     * parallelism, is to create a spliterator from an iterator
+     * (see {@link #spliterator(java.util.PrimitiveIterator.OfDouble, long, int)}.
+     * Depending on the circumstances using an iterator may be easier or more
+     * convenient than extending this class. For example, if there is already an
+     * iterator available to use then there is no need to extend this class.
+     *
+     * @see #spliterator(java.util.PrimitiveIterator.OfDouble, long, int)
+     * @since 1.8
+     */
+    public static abstract class AbstractDoubleSpliterator implements Spliterator.OfDouble {
+        static final int MAX_BATCH = AbstractSpliterator.MAX_BATCH;
+        static final int BATCH_UNIT = AbstractSpliterator.BATCH_UNIT;
+        private final int characteristics;
+        private long est;             // size estimate
+        private int batch;            // batch size for splits
+
+        /**
+         * Creates a spliterator reporting the given estimated size and
+         * characteristics.
+         *
+         * @param est the estimated size of this spliterator if known, otherwise
+         *        {@code Long.MAX_VALUE}.
+         * @param additionalCharacteristics properties of this spliterator's
+         *        source or elements.  If {@code SIZED} is reported then this
+         *        spliterator will additionally report {@code SUBSIZED}.
+         */
+        protected AbstractDoubleSpliterator(long est, int additionalCharacteristics) {
+            this.est = est;
+            this.characteristics = ((additionalCharacteristics & Spliterator.SIZED) != 0)
+                                   ? additionalCharacteristics | Spliterator.SUBSIZED
+                                   : additionalCharacteristics;
+        }
+
+        static final class HoldingDoubleConsumer implements DoubleConsumer {
+            double value;
+
+            @Override
+            public void accept(double value) {
+                this.value = value;
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         *
+         * This implementation permits limited parallelism.
+         */
+        @Override
+        public Spliterator.OfDouble trySplit() {
+            HoldingDoubleConsumer holder = new HoldingDoubleConsumer();
+            long s = est;
+            if (s > 1 && tryAdvance(holder)) {
+                int n = batch + BATCH_UNIT;
+                if (n > s)
+                    n = (int) s;
+                if (n > MAX_BATCH)
+                    n = MAX_BATCH;
+                double[] a;
+                try {
+                    a = new double[n];
+                } catch (OutOfMemoryError oome) {
+                    return null;
+                }
+                int j = 0;
+                do { a[j] = holder.value; } while (++j < n && tryAdvance(holder));
+                batch = j;
+                if (est != Long.MAX_VALUE)
+                    est -= j;
+                return new DoubleArraySpliterator(a, 0, j, characteristics());
+            }
+            return null;
+        }
+
+        /**
+         * {@inheritDoc}
+         *
+         * @implSpec
+         * This implementation returns the estimated size as reported when
+         * created and, if the estimate size is known, decreases in size when
+         * split.
+         */
+        @Override
+        public long estimateSize() {
+            return est;
+        }
+
+        /**
+         * {@inheritDoc}
+         *
+         * @implSpec
+         * This implementation returns the characteristics as reported when
+         * created.
+         */
+        @Override
+        public int characteristics() {
+            return characteristics;
+        }
+    }
+
+    // Iterator-based Spliterators
+
+    /**
+     * A Spliterator using a given Iterator for element
+     * operations. The spliterator implements {@code trySplit} to
+     * permit limited parallelism.
+     */
+    static class IteratorSpliterator<T> implements Spliterator<T> {
+        static final int BATCH_UNIT = 1 << 10;  // batch array size increment
+        static final int MAX_BATCH = 1 << 25;  // max batch array size;
+        private final Collection<? extends T> collection; // null OK
+        private Iterator<? extends T> it;
+        private final int characteristics;
+        private long est;             // size estimate
+        private int batch;            // batch size for splits
+
+        /**
+         * Creates a spliterator using the given given
+         * collection's {@link java.util.Collection#iterator()) for traversal,
+         * and reporting its {@link java.util.Collection#size()) as its initial
+         * size.
+         *
+         * @param c the collection
+         * @param characteristics properties of this spliterator's
+         *        source or elements.
+         */
+        public IteratorSpliterator(Collection<? extends T> collection, int characteristics) {
+            this.collection = collection;
+            this.it = null;
+            this.characteristics = characteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
+        }
+
+        /**
+         * Creates a spliterator using the given iterator
+         * for traversal, and reporting the given initial size
+         * and characteristics.
+         *
+         * @param iterator the iterator for the source
+         * @param size the number of elements in the source
+         * @param characteristics properties of this spliterator's
+         * source or elements.
+         */
+        public IteratorSpliterator(Iterator<? extends T> iterator, long size, int characteristics) {
+            this.collection = null;
+            this.it = iterator;
+            this.est = size;
+            this.characteristics = characteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
+        }
+
+        /**
+         * Creates a spliterator using the given iterator
+         * for traversal, and reporting the given initial size
+         * and characteristics.
+         *
+         * @param iterator the iterator for the source
+         * @param characteristics properties of this spliterator's
+         * source or elements.
+         */
+        public IteratorSpliterator(Iterator<? extends T> iterator, int characteristics) {
+            this.collection = null;
+            this.it = iterator;
+            this.est = Long.MAX_VALUE;
+            this.characteristics = characteristics & ~(Spliterator.SIZED | Spliterator.SUBSIZED);
+        }
+
+        @Override
+        public Spliterator<T> trySplit() {
+            /*
+             * Split into arrays of arithmetically increasing batch
+             * sizes.  This will only improve parallel performance if
+             * per-element Consumer actions are more costly than
+             * transferring them into an array.  The use of an
+             * arithmetic progression in split sizes provides overhead
+             * vs parallelism bounds that do not particularly favor or
+             * penalize cases of lightweight vs heavyweight element
+             * operations, across combinations of #elements vs #cores,
+             * whether or not either are known.  We generate
+             * O(sqrt(#elements)) splits, allowing O(sqrt(#cores))
+             * potential speedup.
+             */
+            Iterator<? extends T> i;
+            long s;
+            if ((i = it) == null) {
+                i = it = collection.iterator();
+                s = est = (long) collection.size();
+            }
+            else
+                s = est;
+            if (s > 1 && i.hasNext()) {
+                int n = batch + BATCH_UNIT;
+                if (n > s)
+                    n = (int) s;
+                if (n > MAX_BATCH)
+                    n = MAX_BATCH;
+                Object[] a;
+                try {
+                    a = new Object[n];
+                } catch (OutOfMemoryError oome) {
+                    return null;
+                }
+                int j = 0;
+                do { a[j] = i.next(); } while (++j < n && i.hasNext());
+                batch = j;
+                if (est != Long.MAX_VALUE)
+                    est -= j;
+                return new ArraySpliterator<>(a, 0, j, characteristics);
+            }
+            return null;
+        }
+
+        @Override
+        public void forEachRemaining(Consumer<? super T> action) {
+            if (action == null) throw new NullPointerException();
+            Iterator<? extends T> i;
+            if ((i = it) == null) {
+                i = it = collection.iterator();
+                est = (long)collection.size();
+            }
+            i.forEachRemaining(action);
+        }
+
+        @Override
+        public boolean tryAdvance(Consumer<? super T> action) {
+            if (action == null) throw new NullPointerException();
+            if (it == null) {
+                it = collection.iterator();
+                est = (long) collection.size();
+            }
+            if (it.hasNext()) {
+                action.accept(it.next());
+                return true;
+            }
+            return false;
+        }
+
+        @Override
+        public long estimateSize() {
+            if (it == null) {
+                it = collection.iterator();
+                return est = (long)collection.size();
+            }
+            return est;
+        }
+
+        @Override
+        public int characteristics() { return characteristics; }
+
+        @Override
+        public Comparator<? super T> getComparator() {
+            if (hasCharacteristics(Spliterator.SORTED))
+                return null;
+            throw new IllegalStateException();
+        }
+    }
+
+    /**
+     * A Spliterator.OfInt using a given IntStream.IntIterator for element
+     * operations. The spliterator implements {@code trySplit} to
+     * permit limited parallelism.
+     */
+    static final class IntIteratorSpliterator implements Spliterator.OfInt {
+        static final int BATCH_UNIT = IteratorSpliterator.BATCH_UNIT;
+        static final int MAX_BATCH = IteratorSpliterator.MAX_BATCH;
+        private PrimitiveIterator.OfInt it;
+        private final int characteristics;
+        private long est;             // size estimate
+        private int batch;            // batch size for splits
+
+        /**
+         * Creates a spliterator using the given iterator
+         * for traversal, and reporting the given initial size
+         * and characteristics.
+         *
+         * @param iterator the iterator for the source
+         * @param size the number of elements in the source
+         * @param characteristics properties of this spliterator's
+         * source or elements.
+         */
+        public IntIteratorSpliterator(PrimitiveIterator.OfInt iterator, long size, int characteristics) {
+            this.it = iterator;
+            this.est = size;
+            this.characteristics = characteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
+        }
+
+        /**
+         * Creates a spliterator using the given iterator for a
+         * source of unknown size, reporting the given
+         * characteristics.
+         *
+         * @param iterator the iterator for the source
+         * @param characteristics properties of this spliterator's
+         * source or elements.
+         */
+        public IntIteratorSpliterator(PrimitiveIterator.OfInt iterator, int characteristics) {
+            this.it = iterator;
+            this.est = Long.MAX_VALUE;
+            this.characteristics = characteristics & ~(Spliterator.SIZED | Spliterator.SUBSIZED);
+        }
+
+        @Override
+        public OfInt trySplit() {
+            PrimitiveIterator.OfInt i = it;
+            long s = est;
+            if (s > 1 && i.hasNext()) {
+                int n = batch + BATCH_UNIT;
+                if (n > s)
+                    n = (int) s;
+                if (n > MAX_BATCH)
+                    n = MAX_BATCH;
+                int[] a;
+                try {
+                    a = new int[n];
+                } catch (OutOfMemoryError oome) {
+                    return null;
+                }
+                int j = 0;
+                do { a[j] = i.nextInt(); } while (++j < n && i.hasNext());
+                batch = j;
+                if (est != Long.MAX_VALUE)
+                    est -= j;
+                return new IntArraySpliterator(a, 0, j, characteristics);
+            }
+            return null;
+        }
+
+        @Override
+        public void forEachRemaining(IntConsumer action) {
+            if (action == null) throw new NullPointerException();
+            it.forEachRemaining(action);
+        }
+
+        @Override
+        public boolean tryAdvance(IntConsumer action) {
+            if (action == null) throw new NullPointerException();
+            if (it.hasNext()) {
+                action.accept(it.nextInt());
+                return true;
+            }
+            return false;
+        }
+
+        @Override
+        public long estimateSize() {
+            return est;
+        }
+
+        @Override
+        public int characteristics() { return characteristics; }
+
+        @Override
+        public Comparator<? super Integer> getComparator() {
+            if (hasCharacteristics(Spliterator.SORTED))
+                return null;
+            throw new IllegalStateException();
+        }
+    }
+
+    static final class LongIteratorSpliterator implements Spliterator.OfLong {
+        static final int BATCH_UNIT = IteratorSpliterator.BATCH_UNIT;
+        static final int MAX_BATCH = IteratorSpliterator.MAX_BATCH;
+        private PrimitiveIterator.OfLong it;
+        private final int characteristics;
+        private long est;             // size estimate
+        private int batch;            // batch size for splits
+
+        /**
+         * Creates a spliterator using the given iterator
+         * for traversal, and reporting the given initial size
+         * and characteristics.
+         *
+         * @param iterator the iterator for the source
+         * @param size the number of elements in the source
+         * @param characteristics properties of this spliterator's
+         * source or elements.
+         */
+        public LongIteratorSpliterator(PrimitiveIterator.OfLong iterator, long size, int characteristics) {
+            this.it = iterator;
+            this.est = size;
+            this.characteristics = characteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
+        }
+
+        /**
+         * Creates a spliterator using the given iterator for a
+         * source of unknown size, reporting the given
+         * characteristics.
+         *
+         * @param iterator the iterator for the source
+         * @param characteristics properties of this spliterator's
+         * source or elements.
+         */
+        public LongIteratorSpliterator(PrimitiveIterator.OfLong iterator, int characteristics) {
+            this.it = iterator;
+            this.est = Long.MAX_VALUE;
+            this.characteristics = characteristics & ~(Spliterator.SIZED | Spliterator.SUBSIZED);
+        }
+
+        @Override
+        public OfLong trySplit() {
+            PrimitiveIterator.OfLong i = it;
+            long s = est;
+            if (s > 1 && i.hasNext()) {
+                int n = batch + BATCH_UNIT;
+                if (n > s)
+                    n = (int) s;
+                if (n > MAX_BATCH)
+                    n = MAX_BATCH;
+                long[] a;
+                try {
+                    a = new long[n];
+                } catch (OutOfMemoryError oome) {
+                    return null;
+                }
+                int j = 0;
+                do { a[j] = i.nextLong(); } while (++j < n && i.hasNext());
+                batch = j;
+                if (est != Long.MAX_VALUE)
+                    est -= j;
+                return new LongArraySpliterator(a, 0, j, characteristics);
+            }
+            return null;
+        }
+
+        @Override
+        public void forEachRemaining(LongConsumer action) {
+            if (action == null) throw new NullPointerException();
+            it.forEachRemaining(action);
+        }
+
+        @Override
+        public boolean tryAdvance(LongConsumer action) {
+            if (action == null) throw new NullPointerException();
+            if (it.hasNext()) {
+                action.accept(it.nextLong());
+                return true;
+            }
+            return false;
+        }
+
+        @Override
+        public long estimateSize() {
+            return est;
+        }
+
+        @Override
+        public int characteristics() { return characteristics; }
+
+        @Override
+        public Comparator<? super Long> getComparator() {
+            if (hasCharacteristics(Spliterator.SORTED))
+                return null;
+            throw new IllegalStateException();
+        }
+    }
+
+    static final class DoubleIteratorSpliterator implements Spliterator.OfDouble {
+        static final int BATCH_UNIT = IteratorSpliterator.BATCH_UNIT;
+        static final int MAX_BATCH = IteratorSpliterator.MAX_BATCH;
+        private PrimitiveIterator.OfDouble it;
+        private final int characteristics;
+        private long est;             // size estimate
+        private int batch;            // batch size for splits
+
+        /**
+         * Creates a spliterator using the given iterator
+         * for traversal, and reporting the given initial size
+         * and characteristics.
+         *
+         * @param iterator the iterator for the source
+         * @param size the number of elements in the source
+         * @param characteristics properties of this spliterator's
+         * source or elements.
+         */
+        public DoubleIteratorSpliterator(PrimitiveIterator.OfDouble iterator, long size, int characteristics) {
+            this.it = iterator;
+            this.est = size;
+            this.characteristics = characteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
+        }
+
+        /**
+         * Creates a spliterator using the given iterator for a
+         * source of unknown size, reporting the given
+         * characteristics.
+         *
+         * @param iterator the iterator for the source
+         * @param characteristics properties of this spliterator's
+         * source or elements.
+         */
+        public DoubleIteratorSpliterator(PrimitiveIterator.OfDouble iterator, int characteristics) {
+            this.it = iterator;
+            this.est = Long.MAX_VALUE;
+            this.characteristics = characteristics & ~(Spliterator.SIZED | Spliterator.SUBSIZED);
+        }
+
+        @Override
+        public OfDouble trySplit() {
+            PrimitiveIterator.OfDouble i = it;
+            long s = est;
+            if (s > 1 && i.hasNext()) {
+                int n = batch + BATCH_UNIT;
+                if (n > s)
+                    n = (int) s;
+                if (n > MAX_BATCH)
+                    n = MAX_BATCH;
+                double[] a;
+                try {
+                    a = new double[n];
+                } catch (OutOfMemoryError oome) {
+                    return null;
+                }
+                int j = 0;
+                do { a[j] = i.nextDouble(); } while (++j < n && i.hasNext());
+                batch = j;
+                if (est != Long.MAX_VALUE)
+                    est -= j;
+                return new DoubleArraySpliterator(a, 0, j, characteristics);
+            }
+            return null;
+        }
+
+        @Override
+        public void forEachRemaining(DoubleConsumer action) {
+            if (action == null) throw new NullPointerException();
+            it.forEachRemaining(action);
+        }
+
+        @Override
+        public boolean tryAdvance(DoubleConsumer action) {
+            if (action == null) throw new NullPointerException();
+            if (it.hasNext()) {
+                action.accept(it.nextDouble());
+                return true;
+            }
+            return false;
+        }
+
+        @Override
+        public long estimateSize() {
+            return est;
+        }
+
+        @Override
+        public int characteristics() { return characteristics; }
+
+        @Override
+        public Comparator<? super Double> getComparator() {
+            if (hasCharacteristics(Spliterator.SORTED))
+                return null;
+            throw new IllegalStateException();
+        }
+    }
+}
--- a/src/share/classes/java/util/TimeZone.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/TimeZone.java	Wed Apr 17 21:48:04 2013 -0700
@@ -559,7 +559,7 @@
      * @since 1.8
      */
     public ZoneId toZoneId() {
-        return ZoneId.of(getID(), ZoneId.OLD_IDS_POST_2005);
+        return ZoneId.of(getID(), ZoneId.SHORT_IDS);
     }
 
     private static TimeZone getTimeZone(String ID, boolean fallback) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/util/Tripwire.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.util;
+
+import sun.util.logging.PlatformLogger;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * Utility class for detecting inadvertent uses of boxing in
+ * {@code java.util} classes.  The detection is turned on or off based on
+ * whether the system property {@code org.openjdk.java.util.stream.tripwire} is
+ * considered {@code true} according to {@link Boolean#getBoolean(String)}.
+ * This should normally be turned off for production use.
+ *
+ * @apiNote
+ * Typical usage would be for boxing code to do:
+ * <pre>{@code
+ *     if (Tripwire.ENABLED)
+ *         Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfInt.nextInt()");
+ * }</pre>
+ *
+ * @since 1.8
+ */
+final class Tripwire {
+    private static final String TRIPWIRE_PROPERTY = "org.openjdk.java.util.stream.tripwire";
+
+    /** Should debugging checks be enabled? */
+    static final boolean ENABLED = AccessController.doPrivileged(
+            (PrivilegedAction<Boolean>) () -> Boolean.getBoolean(TRIPWIRE_PROPERTY));
+
+    private Tripwire() { }
+
+    /**
+     * Produces a log warning, using {@code PlatformLogger.getLogger(className)},
+     * using the supplied message.  The class name of {@code trippingClass} will
+     * be used as the first parameter to the message.
+     *
+     * @param trippingClass Name of the class generating the message
+     * @param msg A message format string of the type expected by
+     * {@link PlatformLogger}
+     */
+    static void trip(Class<?> trippingClass, String msg) {
+        PlatformLogger.getLogger(trippingClass.getName()).warning(msg, trippingClass.getName());
+    }
+}
--- a/src/share/classes/java/util/concurrent/ConcurrentHashMap.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/concurrent/ConcurrentHashMap.java	Wed Apr 17 21:48:04 2013 -0700
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent;
+import java.io.ObjectInputStream;
 import java.util.concurrent.locks.*;
 import java.util.*;
 import java.io.Serializable;
@@ -1483,7 +1484,23 @@
     @SuppressWarnings("unchecked")
     private void readObject(java.io.ObjectInputStream s)
             throws java.io.IOException, ClassNotFoundException {
-        s.defaultReadObject();
+        // Don't call defaultReadObject()
+        ObjectInputStream.GetField oisFields = s.readFields();
+        final Segment<K,V>[] oisSegments = (Segment<K,V>[])oisFields.get("segments", null);
+
+        final int ssize = oisSegments.length;
+        if (ssize < 1 || ssize > MAX_SEGMENTS
+            || (ssize & (ssize-1)) != 0 )  // ssize not power of two
+            throw new java.io.InvalidObjectException("Bad number of segments:"
+                                                     + ssize);
+        int sshift = 0, ssizeTmp = ssize;
+        while (ssizeTmp > 1) {
+            ++sshift;
+            ssizeTmp >>>= 1;
+        }
+        UNSAFE.putIntVolatile(this, SEGSHIFT_OFFSET, 32 - sshift);
+        UNSAFE.putIntVolatile(this, SEGMASK_OFFSET, ssize - 1);
+        UNSAFE.putObjectVolatile(this, SEGMENTS_OFFSET, oisSegments);
 
         // set hashMask
         UNSAFE.putIntVolatile(this, HASHSEED_OFFSET,
@@ -1517,6 +1534,9 @@
     private static final long TBASE;
     private static final int TSHIFT;
     private static final long HASHSEED_OFFSET;
+    private static final long SEGSHIFT_OFFSET;
+    private static final long SEGMASK_OFFSET;
+    private static final long SEGMENTS_OFFSET;
 
     static {
         int ss, ts;
@@ -1530,6 +1550,12 @@
             ss = UNSAFE.arrayIndexScale(sc);
             HASHSEED_OFFSET = UNSAFE.objectFieldOffset(
                 ConcurrentHashMap.class.getDeclaredField("hashSeed"));
+            SEGSHIFT_OFFSET = UNSAFE.objectFieldOffset(
+                ConcurrentHashMap.class.getDeclaredField("segmentShift"));
+            SEGMASK_OFFSET = UNSAFE.objectFieldOffset(
+                ConcurrentHashMap.class.getDeclaredField("segmentMask"));
+            SEGMENTS_OFFSET = UNSAFE.objectFieldOffset(
+                ConcurrentHashMap.class.getDeclaredField("segments"));
         } catch (Exception e) {
             throw new Error(e);
         }
--- a/src/share/classes/java/util/concurrent/ConcurrentMap.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/concurrent/ConcurrentMap.java	Wed Apr 17 21:48:04 2013 -0700
@@ -38,7 +38,7 @@
 
 /**
  * A {@link java.util.Map} providing additional atomic
- * <tt>putIfAbsent</tt>, <tt>remove</tt>, and <tt>replace</tt> methods.
+ * {@code putIfAbsent}, {@code remove}, and {@code replace} methods.
  *
  * <p>Memory consistency effects: As with other concurrent
  * collections, actions in a thread prior to placing an object into a
@@ -57,6 +57,21 @@
  * @param <V> the type of mapped values
  */
 public interface ConcurrentMap<K, V> extends Map<K, V> {
+
+    /**
+     * {@inheritDoc}
+     *
+     * @implNote This implementation assumes that the ConcurrentMap cannot
+     * contain null values and get() returning null unambiguously means the key
+     * is absent. Implementations which support null values must override this
+     * default implementation.
+     */
+    @Override
+    default V getOrDefault(Object key, V defaultValue) {
+        V v;
+        return ((v = get(key)) != null) ? v : defaultValue;
+    }
+
     /**
      * If the specified key is not already associated
      * with a value, associate it with the given value.
@@ -91,7 +106,7 @@
      * Removes the entry for a key only if currently mapped to a given value.
      * This is equivalent to
      *  <pre> {@code
-     * if (map.containsKey(key) && map.get(key).equals(value)) {
+     * if (map.containsKey(key) && Objects.equals(map.get(key), value)) {
      *   map.remove(key);
      *   return true;
      * } else
@@ -101,8 +116,8 @@
      *
      * @param key key with which the specified value is associated
      * @param value value expected to be associated with the specified key
-     * @return <tt>true</tt> if the value was removed
-     * @throws UnsupportedOperationException if the <tt>remove</tt> operation
+     * @return {@code true} if the value was removed
+     * @throws UnsupportedOperationException if the {@code remove} operation
      *         is not supported by this map
      * @throws ClassCastException if the key or value is of an inappropriate
      *         type for this map
@@ -117,7 +132,7 @@
      * Replaces the entry for a key only if currently mapped to a given value.
      * This is equivalent to
      *  <pre> {@code
-     * if (map.containsKey(key) && map.get(key).equals(oldValue)) {
+     * if (map.containsKey(key) && Objects.equals(map.get(key), oldValue)) {
      *   map.put(key, newValue);
      *   return true;
      * } else
@@ -128,8 +143,8 @@
      * @param key key with which the specified value is associated
      * @param oldValue value expected to be associated with the specified key
      * @param newValue value to be associated with the specified key
-     * @return <tt>true</tt> if the value was replaced
-     * @throws UnsupportedOperationException if the <tt>put</tt> operation
+     * @return {@code true} if the value was replaced
+     * @throws UnsupportedOperationException if the {@code put} operation
      *         is not supported by this map
      * @throws ClassCastException if the class of a specified key or value
      *         prevents it from being stored in this map
@@ -154,11 +169,11 @@
      * @param key key with which the specified value is associated
      * @param value value to be associated with the specified key
      * @return the previous value associated with the specified key, or
-     *         <tt>null</tt> if there was no mapping for the key.
-     *         (A <tt>null</tt> return can also indicate that the map
-     *         previously associated <tt>null</tt> with the key,
+     *         {@code null} if there was no mapping for the key.
+     *         (A {@code null} return can also indicate that the map
+     *         previously associated {@code null} with the key,
      *         if the implementation supports null values.)
-     * @throws UnsupportedOperationException if the <tt>put</tt> operation
+     * @throws UnsupportedOperationException if the {@code put} operation
      *         is not supported by this map
      * @throws ClassCastException if the class of the specified key or value
      *         prevents it from being stored in this map
--- a/src/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java	Wed Apr 17 21:48:04 2013 -0700
@@ -37,6 +37,9 @@
 import java.util.function.IntUnaryOperator;
 import java.util.function.IntBinaryOperator;
 import sun.misc.Unsafe;
+import sun.reflect.CallerSensitive;
+import sun.reflect.Reflection;
+
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.security.AccessController;
@@ -77,8 +80,9 @@
      * or the field is inaccessible to the caller according to Java language
      * access control
      */
+    @CallerSensitive
     public static <U> AtomicIntegerFieldUpdater<U> newUpdater(Class<U> tclass, String fieldName) {
-        return new AtomicIntegerFieldUpdaterImpl<U>(tclass, fieldName);
+        return new AtomicIntegerFieldUpdaterImpl<U>(tclass, fieldName, Reflection.getCallerClass());
     }
 
     /**
@@ -365,9 +369,11 @@
         private final Class<T> tclass;
         private final Class<?> cclass;
 
-        AtomicIntegerFieldUpdaterImpl(final Class<T> tclass, final String fieldName) {
+        AtomicIntegerFieldUpdaterImpl(final Class<T> tclass,
+                                      final String fieldName,
+                                      final Class<?> caller)
+        {
             final Field field;
-            final Class<?> caller;
             final int modifiers;
             try {
                 field = AccessController.doPrivileged(
@@ -376,7 +382,6 @@
                             return tclass.getDeclaredField(fieldName);
                         }
                     });
-                caller = sun.reflect.Reflection.getCallerClass(3);
                 modifiers = field.getModifiers();
                 sun.reflect.misc.ReflectUtil.ensureMemberAccess(
                     caller, tclass, null, modifiers);
--- a/src/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java	Wed Apr 17 21:48:04 2013 -0700
@@ -37,6 +37,9 @@
 import java.util.function.LongUnaryOperator;
 import java.util.function.LongBinaryOperator;
 import sun.misc.Unsafe;
+import sun.reflect.CallerSensitive;
+import sun.reflect.Reflection;
+
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.security.AccessController;
@@ -77,11 +80,13 @@
      * or the field is inaccessible to the caller according to Java language
      * access control
      */
+    @CallerSensitive
     public static <U> AtomicLongFieldUpdater<U> newUpdater(Class<U> tclass, String fieldName) {
+        Class<?> caller = Reflection.getCallerClass();
         if (AtomicLong.VM_SUPPORTS_LONG_CAS)
-            return new CASUpdater<U>(tclass, fieldName);
+            return new CASUpdater<U>(tclass, fieldName, caller);
         else
-            return new LockedUpdater<U>(tclass, fieldName);
+            return new LockedUpdater<U>(tclass, fieldName, caller);
     }
 
     /**
@@ -365,9 +370,8 @@
         private final Class<T> tclass;
         private final Class<?> cclass;
 
-        CASUpdater(final Class<T> tclass, final String fieldName) {
+        CASUpdater(final Class<T> tclass, final String fieldName, final Class<?> caller) {
             final Field field;
-            final Class<?> caller;
             final int modifiers;
             try {
                 field = AccessController.doPrivileged(
@@ -376,7 +380,6 @@
                             return tclass.getDeclaredField(fieldName);
                         }
                     });
-                caller = sun.reflect.Reflection.getCallerClass(3);
                 modifiers = field.getModifiers();
                 sun.reflect.misc.ReflectUtil.ensureMemberAccess(
                     caller, tclass, null, modifiers);
@@ -490,9 +493,8 @@
         private final Class<T> tclass;
         private final Class<?> cclass;
 
-        LockedUpdater(final Class<T> tclass, final String fieldName) {
+        LockedUpdater(final Class<T> tclass, final String fieldName, final Class<?> caller) {
             Field field = null;
-            Class<?> caller = null;
             int modifiers = 0;
             try {
                 field = AccessController.doPrivileged(
@@ -501,7 +503,6 @@
                             return tclass.getDeclaredField(fieldName);
                         }
                     });
-                caller = sun.reflect.Reflection.getCallerClass(3);
                 modifiers = field.getModifiers();
                 sun.reflect.misc.ReflectUtil.ensureMemberAccess(
                     caller, tclass, null, modifiers);
--- a/src/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java	Wed Apr 17 21:48:04 2013 -0700
@@ -37,6 +37,9 @@
 import java.util.function.UnaryOperator;
 import java.util.function.BinaryOperator;
 import sun.misc.Unsafe;
+import sun.reflect.CallerSensitive;
+import sun.reflect.Reflection;
+
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.security.AccessController;
@@ -96,10 +99,12 @@
      * or the field is inaccessible to the caller according to Java language
      * access control
      */
+    @CallerSensitive
     public static <U, W> AtomicReferenceFieldUpdater<U,W> newUpdater(Class<U> tclass, Class<W> vclass, String fieldName) {
         return new AtomicReferenceFieldUpdaterImpl<U,W>(tclass,
                                                         vclass,
-                                                        fieldName);
+                                                        fieldName,
+                                                        Reflection.getCallerClass());
     }
 
     /**
@@ -297,10 +302,11 @@
 
         AtomicReferenceFieldUpdaterImpl(final Class<T> tclass,
                                         Class<V> vclass,
-                                        final String fieldName) {
+                                        final String fieldName,
+                                        final Class<?> caller)
+        {
             final Field field;
             final Class<?> fieldClass;
-            final Class<?> caller;
             final int modifiers;
             try {
                 field = AccessController.doPrivileged(
@@ -309,7 +315,6 @@
                             return tclass.getDeclaredField(fieldName);
                         }
                     });
-                caller = sun.reflect.Reflection.getCallerClass(3);
                 modifiers = field.getModifiers();
                 sun.reflect.misc.ReflectUtil.ensureMemberAccess(
                     caller, tclass, null, modifiers);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/util/function/DoubleToIntFunction.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.util.function;
+
+/**
+ * Apply a function to the input argument, yielding an appropriate result.
+ * This is the {@code double}-to-{@code int} specialization for {@link Function}.
+ *
+ * @see Function
+ * @see IntToDoubleFunction
+ * @see LongToIntFunction
+ * @since 1.8
+ */
+@FunctionalInterface
+public interface DoubleToIntFunction {
+
+    /**
+     * Compute the result of applying the function to the input arguments.
+     *
+     * @param value the input value
+     * @return the function result value
+     */
+    int applyAsInt(double value);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/util/function/DoubleToLongFunction.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.util.function;
+
+/**
+ * Apply a function to the input argument, yielding an appropriate result.
+ * This is the {@code double}-to-{@code long} specialization for {@link Function}.
+ *
+ * @see Function
+ * @see LongToDoubleFunction
+ * @see IntToLongFunction
+ * @since 1.8
+ */
+@FunctionalInterface
+public interface DoubleToLongFunction {
+
+    /**
+     * Compute the result of applying the function to the input arguments.
+     *
+     * @param value the input value
+     * @return the function result value
+     */
+    long applyAsLong(double value);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/util/function/IntToDoubleFunction.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.util.function;
+
+/**
+ * Apply a function to the input argument, yielding an appropriate result.
+ * This is the {@code int}-to-{@code double} specialization for {@link Function}.
+ *
+ * @see Function
+ * @see DoubleToIntFunction
+ * @see LongToDoubleFunction
+ * @since 1.8
+ */
+@FunctionalInterface
+public interface IntToDoubleFunction {
+
+    /**
+     * Compute the result of applying the function to the input arguments.
+     *
+     * @param value the input value
+     * @return the function result value
+     */
+    double applyAsDouble(int value);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/util/function/IntToLongFunction.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.util.function;
+
+/**
+ * Apply a function to the input argument, yielding an appropriate result.
+ * This is the {@code int}-to-{@code long} specialization for {@link Function}.
+ *
+ * @see Function
+ * @see LongToIntFunction
+ * @see DoubleToLongFunction
+ * @since 1.8
+ */
+@FunctionalInterface
+public interface IntToLongFunction {
+
+    /**
+     * Compute the result of applying the function to the input arguments.
+     *
+     * @param value the input value
+     * @return the function result value
+     */
+    long applyAsLong(int value);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/util/function/LongToDoubleFunction.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.util.function;
+
+/**
+ * Apply a function to the input argument, yielding an appropriate result.
+ * This is the {@code long}-to-{@code double} specialization for {@link Function}.
+ *
+ * @see Function
+ * @see DoubleToLongFunction
+ * @see IntToDoubleFunction
+ * @since 1.8
+ */
+@FunctionalInterface
+public interface LongToDoubleFunction {
+
+    /**
+     * Compute the result of applying the function to the input arguments.
+     *
+     * @param value the input value
+     * @return the function result value
+     */
+    double applyAsDouble(long value);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/util/function/LongToIntFunction.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.util.function;
+
+/**
+ * Apply a function to the input argument, yielding an appropriate result.
+ * This is the {@code long}-to-{@code int} specialization for {@link Function}.
+ *
+ * @see Function
+ * @see IntToLongFunction
+ * @see DoubleToIntFunction
+ * @since 1.8
+ */
+@FunctionalInterface
+public interface LongToIntFunction {
+
+    /**
+     * Compute the result of applying the function to the input arguments.
+     *
+     * @param value the input value
+     * @return the function result value
+     */
+    int applyAsInt(long value);
+}
--- a/src/share/classes/java/util/logging/Logger.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/java/util/logging/Logger.java	Wed Apr 17 21:48:04 2013 -0700
@@ -36,6 +36,8 @@
 import java.util.ResourceBundle;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.function.Supplier;
+import sun.reflect.CallerSensitive;
+import sun.reflect.Reflection;
 
 /**
  * A Logger object is used to log messages for a specific
@@ -333,13 +335,10 @@
         }
     }
 
-    private static Logger demandLogger(String name, String resourceBundleName) {
+    private static Logger demandLogger(String name, String resourceBundleName, Class<?> caller) {
         LogManager manager = LogManager.getLogManager();
         SecurityManager sm = System.getSecurityManager();
         if (sm != null && !SystemLoggerHelper.disableCallerCheck) {
-            // 0: Reflection 1: Logger.demandLogger 2: Logger.getLogger 3: caller
-            final int SKIP_FRAMES = 3;
-            Class<?> caller = sun.reflect.Reflection.getCallerClass(SKIP_FRAMES);
             if (caller.getClassLoader() == null) {
                 return manager.demandSystemLogger(name, resourceBundleName);
             }
@@ -377,6 +376,7 @@
 
     // Synchronization is not required here. All synchronization for
     // adding a new Logger object is handled by LogManager.addLogger().
+    @CallerSensitive
     public static Logger getLogger(String name) {
         // This method is intentionally not a wrapper around a call
         // to getLogger(name, resourceBundleName). If it were then
@@ -388,7 +388,7 @@
         // would throw an IllegalArgumentException in the second call
         // because the wrapper would result in an attempt to replace
         // the existing "resourceBundleForFoo" with null.
-        return demandLogger(name, null);
+        return demandLogger(name, null, Reflection.getCallerClass());
     }
 
     /**
@@ -434,8 +434,9 @@
 
     // Synchronization is not required here. All synchronization for
     // adding a new Logger object is handled by LogManager.addLogger().
+    @CallerSensitive
     public static Logger getLogger(String name, String resourceBundleName) {
-        Logger result = demandLogger(name, resourceBundleName);
+        Logger result = demandLogger(name, resourceBundleName, Reflection.getCallerClass());
 
         // MissingResourceException or IllegalArgumentException can be
         // thrown by setupResourceInfo().
--- a/src/share/classes/javax/script/ScriptEngineManager.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/javax/script/ScriptEngineManager.java	Wed Apr 17 21:48:04 2013 -0700
@@ -28,6 +28,7 @@
 import java.security.*;
 import java.util.ServiceLoader;
 import java.util.ServiceConfigurationError;
+import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
 import sun.security.util.SecurityConstants;
 
@@ -60,9 +61,10 @@
      *
      * @see java.lang.Thread#getContextClassLoader
      */
+    @CallerSensitive
     public ScriptEngineManager() {
         ClassLoader ctxtLoader = Thread.currentThread().getContextClassLoader();
-        if (canCallerAccessLoader(ctxtLoader)) {
+        if (canCallerAccessLoader(ctxtLoader, Reflection.getCallerClass())) {
             if (DEBUG) System.out.println("using " + ctxtLoader);
             init(ctxtLoader);
         } else {
@@ -419,10 +421,10 @@
     /** Global bindings associated with script engines created by this manager. */
     private Bindings globalScope;
 
-    private boolean canCallerAccessLoader(ClassLoader loader) {
+    private boolean canCallerAccessLoader(ClassLoader loader, Class<?> caller) {
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
-            ClassLoader callerLoader = getCallerClassLoader();
+            ClassLoader callerLoader = getClassLoader(caller);
             if (!sun.misc.VM.isSystemDomainLoader(callerLoader)) {
                 if (loader != callerLoader || !isAncestor(loader, callerLoader)) {
                     try {
@@ -438,10 +440,9 @@
         return true;
     }
 
-    // Note that this code is same as ClassLoader.getCallerClassLoader().
+    // Note that this code is same as ClassLoader.getClassLoader().
     // But, that method is package private and hence we can't call here.
-    private ClassLoader getCallerClassLoader() {
-        Class<?> caller = Reflection.getCallerClass(3);
+    private ClassLoader getClassLoader(Class<?> caller) {
         if (caller == null) {
             return null;
         }
--- a/src/share/classes/sun/awt/EmbeddedFrame.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/awt/EmbeddedFrame.java	Wed Apr 17 21:48:04 2013 -0700
@@ -539,7 +539,7 @@
         public void toBack() {}
         public void updateFocusableWindowState() {}
         public void updateAlwaysOnTop() {}
-        public void setAlwaysOnTop(boolean alwaysOnTop) {}
+        public void updateAlwaysOnTopState() {}
         public Component getGlobalHeavyweightFocusOwner() { return null; }
         public void setBoundsPrivate(int x, int y, int width, int height) {
             setBounds(x, y, width, height, SET_BOUNDS);
--- a/src/share/classes/sun/awt/datatransfer/TransferableProxy.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/awt/datatransfer/TransferableProxy.java	Wed Apr 17 21:48:04 2013 -0700
@@ -102,11 +102,11 @@
     protected final boolean isLocal;
 }
 
-class ClassLoaderObjectOutputStream extends ObjectOutputStream {
+final class ClassLoaderObjectOutputStream extends ObjectOutputStream {
     private final Map<Set<String>, ClassLoader> map =
         new HashMap<Set<String>, ClassLoader>();
 
-    public ClassLoaderObjectOutputStream(OutputStream os) throws IOException {
+    ClassLoaderObjectOutputStream(OutputStream os) throws IOException {
         super(os);
     }
 
@@ -140,16 +140,16 @@
         map.put(s, classLoader);
     }
 
-    public Map<Set<String>, ClassLoader> getClassLoaderMap() {
+    Map<Set<String>, ClassLoader> getClassLoaderMap() {
         return new HashMap(map);
     }
 }
 
-class ClassLoaderObjectInputStream extends ObjectInputStream {
+final class ClassLoaderObjectInputStream extends ObjectInputStream {
     private final Map<Set<String>, ClassLoader> map;
 
-    public ClassLoaderObjectInputStream(InputStream is,
-                                        Map<Set<String>, ClassLoader> map)
+    ClassLoaderObjectInputStream(InputStream is,
+                                 Map<Set<String>, ClassLoader> map)
       throws IOException {
         super(is);
         if (map == null) {
@@ -166,8 +166,11 @@
         s.add(className);
 
         ClassLoader classLoader = map.get(s);
-
-        return Class.forName(className, false, classLoader);
+        if (classLoader != null) {
+            return Class.forName(className, false, classLoader);
+        } else {
+            return super.resolveClass(classDesc);
+        }
     }
 
     protected Class<?> resolveProxyClass(String[] interfaces)
@@ -179,6 +182,9 @@
         }
 
         ClassLoader classLoader = map.get(s);
+        if (classLoader == null) {
+            return super.resolveProxyClass(interfaces);
+        }
 
         // The code below is mostly copied from the superclass.
         ClassLoader nonPublicLoader = null;
--- a/src/share/classes/sun/awt/image/ByteComponentRaster.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/awt/image/ByteComponentRaster.java	Wed Apr 17 21:48:04 2013 -0700
@@ -868,6 +868,15 @@
      * or if data buffer has not enough capacity.
      */
     protected final void verify() {
+        /* Need to re-verify the dimensions since a sample model may be
+         * specified to the constructor
+         */
+        if (width <= 0 || height <= 0 ||
+            height > (Integer.MAX_VALUE / width))
+        {
+            throw new RasterFormatException("Invalid raster dimension");
+        }
+
         for (int i = 0; i < dataOffsets.length; i++) {
             if (dataOffsets[i] < 0) {
                 throw new RasterFormatException("Data offsets for band " + i
@@ -905,13 +914,14 @@
         lastPixelOffset += lastScanOffset;
 
         for (int i = 0; i < numDataElements; i++) {
-            size = lastPixelOffset + dataOffsets[i];
             if (dataOffsets[i] > (Integer.MAX_VALUE - lastPixelOffset)) {
                 throw new RasterFormatException("Incorrect band offset: "
                             + dataOffsets[i]);
 
             }
 
+            size = lastPixelOffset + dataOffsets[i];
+
             if (size > maxSize) {
                 maxSize = size;
             }
--- a/src/share/classes/sun/awt/image/BytePackedRaster.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/awt/image/BytePackedRaster.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1368,11 +1368,35 @@
             throw new RasterFormatException("Data offsets must be >= 0");
         }
 
+        /* Need to re-verify the dimensions since a sample model may be
+         * specified to the constructor
+         */
+        if (width <= 0 || height <= 0 ||
+            height > (Integer.MAX_VALUE / width))
+        {
+            throw new RasterFormatException("Invalid raster dimension");
+        }
+
+
+        /*
+         * pixelBitstride was verified in constructor, so just make
+         * sure that it is safe to multiply it by width.
+         */
+        if ((width - 1) > Integer.MAX_VALUE / pixelBitStride) {
+            throw new RasterFormatException("Invalid raster dimension");
+        }
+
+        if (scanlineStride < 0 ||
+            scanlineStride > (Integer.MAX_VALUE / height))
+        {
+            throw new RasterFormatException("Invalid scanline stride");
+        }
+
         int lastbit = (dataBitOffset
                        + (height-1) * scanlineStride * 8
                        + (width-1) * pixelBitStride
                        + pixelBitStride - 1);
-        if (lastbit / 8 >= data.length) {
+        if (lastbit < 0 || lastbit / 8 >= data.length) {
             throw new RasterFormatException("raster dimensions overflow " +
                                             "array bounds");
         }
--- a/src/share/classes/sun/awt/image/ImageRepresentation.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/awt/image/ImageRepresentation.java	Wed Apr 17 21:48:04 2013 -0700
@@ -333,10 +333,10 @@
         hints = h;
     }
 
-    private native void setICMpixels(int x, int y, int w, int h, int[] lut,
+    private native boolean setICMpixels(int x, int y, int w, int h, int[] lut,
                                     byte[] pix, int off, int scansize,
                                     IntegerComponentRaster ict);
-    private native int setDiffICM(int x, int y, int w, int h, int[] lut,
+    private native boolean setDiffICM(int x, int y, int w, int h, int[] lut,
                                  int transPix, int numLut, IndexColorModel icm,
                                  byte[] pix, int off, int scansize,
                                  ByteComponentRaster bct, int chanOff);
@@ -426,10 +426,10 @@
                 IndexColorModel icm = (IndexColorModel) model;
                 ByteComponentRaster bct = (ByteComponentRaster) biRaster;
                 int numlut = numSrcLUT;
-                if (setDiffICM(x, y, w, h, srcLUT, srcLUTtransIndex,
+                if (!setDiffICM(x, y, w, h, srcLUT, srcLUTtransIndex,
                                numSrcLUT, icm,
                                pix, off, scansize, bct,
-                               bct.getDataOffset(0)) == 0) {
+                               bct.getDataOffset(0))) {
                     convertToRGB();
                 }
                 else {
@@ -470,9 +470,14 @@
                     if (s_useNative) {
                         // Note that setICMpixels modifies the raster directly
                         // so we must mark it as changed afterwards
-                        setICMpixels(x, y, w, h, srcLUT, pix, off, scansize,
-                                     iraster);
-                        iraster.markDirty();
+                        if (setICMpixels(x, y, w, h, srcLUT, pix, off, scansize,
+                                     iraster))
+                        {
+                            iraster.markDirty();
+                        } else {
+                            abort();
+                            return;
+                        }
                     }
                     else {
                         int[] storage = new int[w*h];
--- a/src/share/classes/sun/awt/image/IntegerComponentRaster.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/awt/image/IntegerComponentRaster.java	Wed Apr 17 21:48:04 2013 -0700
@@ -208,7 +208,7 @@
                                             " SinglePixelPackedSampleModel");
         }
 
-        verify(false);
+        verify();
     }
 
 
@@ -629,16 +629,26 @@
     }
 
     /**
-     * Verify that the layout parameters are consistent with
-     * the data.  If strictCheck
-     * is false, this method will check for ArrayIndexOutOfBounds conditions.  If
-     * strictCheck is true, this method will check for additional error
-     * conditions such as line wraparound (width of a line greater than
-     * the scanline stride).
-     * @return   String   Error string, if the layout is incompatible with
-     *                    the data.  Otherwise returns null.
+     * Verify that the layout parameters are consistent with the data.
+     *
+     * The method verifies whether scanline stride and pixel stride do not
+     * cause an integer overflow during calculation of a position of the pixel
+     * in data buffer. It also verifies whether the data buffer has enough data
+     *  to correspond the raster layout attributes.
+     *
+     * @throws RasterFormatException if an integer overflow is detected,
+     * or if data buffer has not enough capacity.
      */
-    private void verify (boolean strictCheck) {
+    protected final void verify() {
+        /* Need to re-verify the dimensions since a sample model may be
+         * specified to the constructor
+         */
+        if (width <= 0 || height <= 0 ||
+            height > (Integer.MAX_VALUE / width))
+        {
+            throw new RasterFormatException("Invalid raster dimension");
+        }
+
         if (dataOffsets[0] < 0) {
             throw new RasterFormatException("Data offset ("+dataOffsets[0]+
                                             ") must be >= 0");
@@ -647,17 +657,46 @@
         int maxSize = 0;
         int size;
 
-        for (int i=0; i < numDataElements; i++) {
-            size = (height-1)*scanlineStride + (width-1)*pixelStride +
-                dataOffsets[i];
+        // we can be sure that width and height are greater than 0
+        if (scanlineStride < 0 ||
+            scanlineStride > (Integer.MAX_VALUE / height))
+        {
+            // integer overflow
+            throw new RasterFormatException("Incorrect scanline stride: "
+                    + scanlineStride);
+        }
+        int lastScanOffset = (height - 1) * scanlineStride;
+
+        if (pixelStride < 0 ||
+            pixelStride > (Integer.MAX_VALUE / width))
+        {
+            // integer overflow
+            throw new RasterFormatException("Incorrect pixel stride: "
+                    + pixelStride);
+        }
+        int lastPixelOffset = (width - 1) * pixelStride;
+
+        if (lastPixelOffset > (Integer.MAX_VALUE - lastScanOffset)) {
+            // integer overflow
+            throw new RasterFormatException("Incorrect raster attributes");
+        }
+        lastPixelOffset += lastScanOffset;
+
+        for (int i = 0; i < numDataElements; i++) {
+            if (dataOffsets[i] > (Integer.MAX_VALUE - lastPixelOffset)) {
+                throw new RasterFormatException("Incorrect band offset: "
+                            + dataOffsets[i]);
+            }
+
+            size = lastPixelOffset + dataOffsets[i];
+
             if (size > maxSize) {
                 maxSize = size;
             }
         }
         if (data.length < maxSize) {
-            throw new RasterFormatException("Data array too small (should be "+
-                                          maxSize
-                                          +" but is "+data.length+" )");
+            throw new RasterFormatException("Data array too small (should be "
+                    + maxSize + " )");
         }
     }
 
--- a/src/share/classes/sun/awt/image/IntegerInterleavedRaster.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/awt/image/IntegerInterleavedRaster.java	Wed Apr 17 21:48:04 2013 -0700
@@ -151,7 +151,7 @@
             throw new RasterFormatException("IntegerInterleavedRasters must have"+
                                             " SinglePixelPackedSampleModel");
         }
-        verify(false);
+        verify();
     }
 
 
@@ -540,31 +540,6 @@
         return createCompatibleWritableRaster(width,height);
     }
 
-    /**
-     * Verify that the layout parameters are consistent with
-     * the data.  If strictCheck
-     * is false, this method will check for ArrayIndexOutOfBounds conditions.  If
-     * strictCheck is true, this method will check for additional error
-     * conditions such as line wraparound (width of a line greater than
-     * the scanline stride).
-     * @return   String   Error string, if the layout is incompatible with
-     *                    the data.  Otherwise returns null.
-     */
-    private void verify (boolean strictCheck) {
-        int maxSize = 0;
-        int size;
-
-        size = (height-1)*scanlineStride + (width-1) + dataOffsets[0];
-        if (size > maxSize) {
-            maxSize = size;
-        }
-        if (data.length < maxSize) {
-            throw new RasterFormatException("Data array too small (should be "+
-                                          maxSize
-                                          +" but is "+data.length+" )");
-        }
-    }
-
     public String toString() {
         return new String ("IntegerInterleavedRaster: width = "+width
                            +" height = " + height
--- a/src/share/classes/sun/awt/image/ShortComponentRaster.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/awt/image/ShortComponentRaster.java	Wed Apr 17 21:48:04 2013 -0700
@@ -802,6 +802,15 @@
      * or if data buffer has not enough capacity.
      */
     protected final void verify() {
+        /* Need to re-verify the dimensions since a sample model may be
+         * specified to the constructor
+         */
+        if (width <= 0 || height <= 0 ||
+            height > (Integer.MAX_VALUE / width))
+        {
+            throw new RasterFormatException("Invalid raster dimension");
+        }
+
         for (int i = 0; i < dataOffsets.length; i++) {
             if (dataOffsets[i] < 0) {
                 throw new RasterFormatException("Data offsets for band " + i
@@ -839,12 +848,13 @@
         lastPixelOffset += lastScanOffset;
 
         for (int i = 0; i < numDataElements; i++) {
-            size = lastPixelOffset + dataOffsets[i];
             if (dataOffsets[i] > (Integer.MAX_VALUE - lastPixelOffset)) {
                 throw new RasterFormatException("Incorrect band offset: "
                             + dataOffsets[i]);
             }
 
+            size = lastPixelOffset + dataOffsets[i];
+
             if (size > maxSize) {
                 maxSize = size;
             }
--- a/src/share/classes/sun/font/CMap.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/font/CMap.java	Wed Apr 17 21:48:04 2013 -0700
@@ -841,7 +841,6 @@
 
         CMapFormat6(ByteBuffer bbuffer, int offset, char[] xlat) {
 
-             System.err.println("WARNING: CMapFormat8 is untested.");
              bbuffer.position(offset+6);
              CharBuffer buffer = bbuffer.asCharBuffer();
              firstCode = buffer.get();
@@ -884,7 +883,6 @@
 
          CMapFormat8(ByteBuffer bbuffer, int offset, char[] xlat) {
 
-             System.err.println("WARNING: CMapFormat8 is untested.");
              bbuffer.position(12);
              bbuffer.get(is32);
              nGroups = bbuffer.getInt();
@@ -915,7 +913,6 @@
 
          CMapFormat10(ByteBuffer bbuffer, int offset, char[] xlat) {
 
-             System.err.println("WARNING: CMapFormat10 is untested.");
              firstCode = bbuffer.getInt() & INTMASK;
              entryCount = bbuffer.getInt() & INTMASK;
              bbuffer.position(offset+20);
--- a/src/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java	Wed Apr 17 21:48:04 2013 -0700
@@ -85,45 +85,72 @@
     private boolean imageAtOnce = false;
     Object dataArray;
 
-    private LCMSImageLayout(int np, int pixelType, int pixelSize) {
+    private int dataArrayLength; /* in bytes */
+
+    private LCMSImageLayout(int np, int pixelType, int pixelSize)
+            throws ImageLayoutException
+    {
         this.pixelType = pixelType;
         width = np;
         height = 1;
-        nextRowOffset = np * pixelSize;
+        nextRowOffset = safeMult(pixelSize, np);
         offset = 0;
     }
 
     private LCMSImageLayout(int width, int height, int pixelType,
-            int pixelSize) {
+                            int pixelSize)
+            throws ImageLayoutException
+    {
         this.pixelType = pixelType;
         this.width = width;
         this.height = height;
-        nextRowOffset = width * pixelSize;
+        nextRowOffset = safeMult(pixelSize, width);
         offset = 0;
     }
 
-    public LCMSImageLayout(byte[] data, int np, int pixelType, int pixelSize) {
+
+    public LCMSImageLayout(byte[] data, int np, int pixelType, int pixelSize)
+            throws ImageLayoutException
+    {
         this(np, pixelType, pixelSize);
         dataType = DT_BYTE;
         dataArray = data;
+        dataArrayLength = data.length;
+
+        verify();
     }
 
-    public LCMSImageLayout(short[] data, int np, int pixelType, int pixelSize) {
+    public LCMSImageLayout(short[] data, int np, int pixelType, int pixelSize)
+            throws ImageLayoutException
+    {
         this(np, pixelType, pixelSize);
         dataType = DT_SHORT;
         dataArray = data;
+        dataArrayLength = 2 * data.length;
+
+        verify();
     }
 
-    public LCMSImageLayout(int[] data, int np, int pixelType, int pixelSize) {
+    public LCMSImageLayout(int[] data, int np, int pixelType, int pixelSize)
+            throws ImageLayoutException
+    {
         this(np, pixelType, pixelSize);
         dataType = DT_INT;
         dataArray = data;
+        dataArrayLength = 4 * data.length;
+
+        verify();
     }
 
-    public LCMSImageLayout(double[] data, int np, int pixelType, int pixelSize) {
+    public LCMSImageLayout(double[] data, int np, int pixelType, int pixelSize)
+            throws ImageLayoutException
+    {
         this(np, pixelType, pixelSize);
         dataType = DT_DOUBLE;
         dataArray = data;
+        dataArrayLength = 8 * data.length;
+
+        verify();
     }
 
     private LCMSImageLayout() {
@@ -132,7 +159,7 @@
     /* This method creates a layout object for given image.
      * Returns null if the image is not supported by current implementation.
      */
-    public static LCMSImageLayout createImageLayout(BufferedImage image) {
+    public static LCMSImageLayout createImageLayout(BufferedImage image) throws ImageLayoutException {
         LCMSImageLayout l = new LCMSImageLayout();
 
         switch (image.getType()) {
@@ -193,9 +220,10 @@
                 do {
                     IntegerComponentRaster intRaster = (IntegerComponentRaster)
                             image.getRaster();
-                    l.nextRowOffset = intRaster.getScanlineStride() * 4;
-                    l.offset = intRaster.getDataOffset(0) * 4;
+                    l.nextRowOffset = safeMult(4, intRaster.getScanlineStride());
+                    l.offset = safeMult(4, intRaster.getDataOffset(0));
                     l.dataArray = intRaster.getDataStorage();
+                    l.dataArrayLength = 4 * intRaster.getDataStorage().length;
                     l.dataType = DT_INT;
 
                     if (l.nextRowOffset == l.width * 4 * intRaster.getPixelStride()) {
@@ -213,6 +241,7 @@
                     int firstBand = image.getSampleModel().getNumBands() - 1;
                     l.offset = byteRaster.getDataOffset(firstBand);
                     l.dataArray = byteRaster.getDataStorage();
+                    l.dataArrayLength = byteRaster.getDataStorage().length;
                     l.dataType = DT_BYTE;
                     if (l.nextRowOffset == l.width * byteRaster.getPixelStride()) {
                         l.imageAtOnce = true;
@@ -225,6 +254,7 @@
                     ByteComponentRaster byteRaster = (ByteComponentRaster)
                             image.getRaster();
                     l.nextRowOffset = byteRaster.getScanlineStride();
+                    l.dataArrayLength = byteRaster.getDataStorage().length;
                     l.offset = byteRaster.getDataOffset(0);
                     l.dataArray = byteRaster.getDataStorage();
                     l.dataType = DT_BYTE;
@@ -239,9 +269,10 @@
                 do {
                     ShortComponentRaster shortRaster = (ShortComponentRaster)
                             image.getRaster();
-                    l.nextRowOffset = shortRaster.getScanlineStride() * 2;
-                    l.offset = shortRaster.getDataOffset(0) * 2;
+                    l.nextRowOffset = safeMult(2, shortRaster.getScanlineStride());
+                    l.offset = safeMult(2, shortRaster.getDataOffset(0));
                     l.dataArray = shortRaster.getDataStorage();
+                    l.dataArrayLength = 2 * shortRaster.getDataStorage().length;
                     l.dataType = DT_SHORT;
 
                     if (l.nextRowOffset == l.width * 2 * shortRaster.getPixelStride()) {
@@ -252,6 +283,7 @@
             default:
                 return null;
         }
+        l.verify();
         return l;
     }
 
@@ -293,6 +325,46 @@
         }
     }
 
+    private void verify() throws ImageLayoutException {
+
+        if (offset < 0 || offset >= dataArrayLength) {
+            throw new ImageLayoutException("Invalid image layout");
+        }
+
+        int lastPixelOffset = safeMult(nextRowOffset, (height - 1));
+
+        lastPixelOffset = safeAdd(lastPixelOffset, (width - 1));
+
+        int off = safeAdd(offset, lastPixelOffset);
+
+        if (off < 0 || off >= dataArrayLength) {
+            throw new ImageLayoutException("Invalid image layout");
+        }
+    }
+
+    static int safeAdd(int a, int b) throws ImageLayoutException {
+        long res = a;
+        res += b;
+        if (res < Integer.MIN_VALUE || res > Integer.MAX_VALUE) {
+            throw new ImageLayoutException("Invalid image layout");
+        }
+        return (int)res;
+    }
+
+    static int safeMult(int a, int b) throws ImageLayoutException {
+        long res = a;
+        res *= b;
+        if (res < Integer.MIN_VALUE || res > Integer.MAX_VALUE) {
+            throw new ImageLayoutException("Invalid image layout");
+        }
+        return (int)res;
+    }
+
+    public static class ImageLayoutException extends Exception {
+        public ImageLayoutException(String message) {
+            super(message);
+        }
+    }
     public static LCMSImageLayout createImageLayout(Raster r) {
         LCMSImageLayout l = new LCMSImageLayout();
         if (r instanceof ByteComponentRaster) {
--- a/src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java	Wed Apr 17 21:48:04 2013 -0700
@@ -51,6 +51,7 @@
 import java.awt.image.ComponentSampleModel;
 import sun.java2d.cmm.*;
 import sun.java2d.cmm.lcms.*;
+import static sun.java2d.cmm.lcms.LCMSImageLayout.ImageLayoutException;
 
 
 public class LCMSTransform implements ColorTransform {
@@ -162,17 +163,20 @@
 
     public void colorConvert(BufferedImage src, BufferedImage dst) {
         LCMSImageLayout srcIL, dstIL;
-
-        if (!dst.getColorModel().hasAlpha()) {
-            dstIL = LCMSImageLayout.createImageLayout(dst);
+        try {
+            if (!dst.getColorModel().hasAlpha()) {
+                dstIL = LCMSImageLayout.createImageLayout(dst);
 
-            if (dstIL != null) {
-                srcIL = LCMSImageLayout.createImageLayout(src);
-                if (srcIL != null) {
-                    doTransform(srcIL, dstIL);
-                    return;
+                if (dstIL != null) {
+                    srcIL = LCMSImageLayout.createImageLayout(src);
+                    if (srcIL != null) {
+                        doTransform(srcIL, dstIL);
+                        return;
+                    }
                 }
             }
+        }  catch (ImageLayoutException e) {
+            throw new CMMException("Unable to convert images");
         }
 
         Raster srcRas = src.getRaster();
@@ -230,14 +234,18 @@
             }
             int idx;
             // TODO check for src npixels = dst npixels
-            srcIL = new LCMSImageLayout(
-                srcLine, srcLine.length/getNumInComponents(),
-                LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
-                LCMSImageLayout.BYTES_SH(1), getNumInComponents());
-            dstIL = new LCMSImageLayout(
-                dstLine, dstLine.length/getNumOutComponents(),
-                LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
-                LCMSImageLayout.BYTES_SH(1), getNumOutComponents());
+            try {
+                srcIL = new LCMSImageLayout(
+                        srcLine, srcLine.length/getNumInComponents(),
+                        LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
+                        LCMSImageLayout.BYTES_SH(1), getNumInComponents());
+                dstIL = new LCMSImageLayout(
+                        dstLine, dstLine.length/getNumOutComponents(),
+                        LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
+                        LCMSImageLayout.BYTES_SH(1), getNumOutComponents());
+            } catch (ImageLayoutException e) {
+                throw new CMMException("Unable to convert images");
+            }
             // process each scanline
             for (int y = 0; y < h; y++) {
                 // convert src scanline
@@ -286,16 +294,19 @@
                 alpha = new float[w];
             }
             int idx;
-            srcIL = new LCMSImageLayout(
-                srcLine, srcLine.length/getNumInComponents(),
-                LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
-                LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);
+            try {
+                srcIL = new LCMSImageLayout(
+                    srcLine, srcLine.length/getNumInComponents(),
+                    LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
+                    LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);
 
-            dstIL = new LCMSImageLayout(
-                dstLine, dstLine.length/getNumOutComponents(),
-                LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
-                LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);
-
+                dstIL = new LCMSImageLayout(
+                    dstLine, dstLine.length/getNumOutComponents(),
+                    LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
+                    LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);
+            } catch (ImageLayoutException e) {
+                throw new CMMException("Unable to convert images");
+            }
             // process each scanline
             for (int y = 0; y < h; y++) {
                 // convert src scanline
@@ -404,16 +415,19 @@
         short[] srcLine = new short[w * srcNumBands];
         short[] dstLine = new short[w * dstNumBands];
         int idx;
-        srcIL = new LCMSImageLayout(
-            srcLine, srcLine.length/getNumInComponents(),
-            LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
-            LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);
+        try {
+            srcIL = new LCMSImageLayout(
+                    srcLine, srcLine.length/getNumInComponents(),
+                    LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
+                    LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);
 
-        dstIL = new LCMSImageLayout(
-            dstLine, dstLine.length/getNumOutComponents(),
-            LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
-            LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);
-
+            dstIL = new LCMSImageLayout(
+                    dstLine, dstLine.length/getNumOutComponents(),
+                    LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
+                    LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);
+        } catch (ImageLayoutException e) {
+            throw new CMMException("Unable to convert rasters");
+        }
         // process each scanline
         for (int y = 0; y < h; y++, ys++, yd++) {
             // get src scanline
@@ -504,15 +518,18 @@
             byte[] dstLine = new byte[w * dstNumBands];
             int idx;
             // TODO check for src npixels = dst npixels
-            srcIL = new LCMSImageLayout(
-                srcLine, srcLine.length/getNumInComponents(),
-                LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
-                LCMSImageLayout.BYTES_SH(1), getNumInComponents());
-            dstIL = new LCMSImageLayout(
-                dstLine, dstLine.length/getNumOutComponents(),
-                LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
-                LCMSImageLayout.BYTES_SH(1), getNumOutComponents());
-
+            try {
+                srcIL = new LCMSImageLayout(
+                        srcLine, srcLine.length/getNumInComponents(),
+                        LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
+                        LCMSImageLayout.BYTES_SH(1), getNumInComponents());
+                dstIL = new LCMSImageLayout(
+                        dstLine, dstLine.length/getNumOutComponents(),
+                        LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
+                        LCMSImageLayout.BYTES_SH(1), getNumOutComponents());
+            } catch (ImageLayoutException e) {
+                throw new CMMException("Unable to convert rasters");
+            }
             // process each scanline
             for (int y = 0; y < h; y++, ys++, yd++) {
                 // get src scanline
@@ -544,16 +561,20 @@
             short[] srcLine = new short[w * srcNumBands];
             short[] dstLine = new short[w * dstNumBands];
             int idx;
-            srcIL = new LCMSImageLayout(
-                srcLine, srcLine.length/getNumInComponents(),
-                LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
-                LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);
+
+            try {
+                srcIL = new LCMSImageLayout(
+                        srcLine, srcLine.length/getNumInComponents(),
+                        LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
+                        LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);
 
-            dstIL = new LCMSImageLayout(
-                dstLine, dstLine.length/getNumOutComponents(),
-                LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
-                LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);
-
+                dstIL = new LCMSImageLayout(
+                        dstLine, dstLine.length/getNumOutComponents(),
+                        LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
+                        LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);
+            } catch (ImageLayoutException e) {
+                throw new CMMException("Unable to convert rasters");
+            }
             // process each scanline
             for (int y = 0; y < h; y++, ys++, yd++) {
                 // get src scanline
@@ -594,19 +615,23 @@
             dst = new short [(src.length/getNumInComponents())*getNumOutComponents()];
         }
 
-        LCMSImageLayout srcIL = new LCMSImageLayout(
-            src, src.length/getNumInComponents(),
-            LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
-            LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);
+        try {
+            LCMSImageLayout srcIL = new LCMSImageLayout(
+                    src, src.length/getNumInComponents(),
+                    LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
+                    LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);
 
-        LCMSImageLayout dstIL = new LCMSImageLayout(
-            dst, dst.length/getNumOutComponents(),
-            LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
-            LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);
+            LCMSImageLayout dstIL = new LCMSImageLayout(
+                    dst, dst.length/getNumOutComponents(),
+                    LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
+                    LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);
 
-        doTransform(srcIL, dstIL);
+            doTransform(srcIL, dstIL);
 
-        return dst;
+            return dst;
+        } catch (ImageLayoutException e) {
+            throw new CMMException("Unable to convert data");
+        }
     }
 
     public byte[] colorConvert(byte[] src, byte[] dst) {
@@ -614,18 +639,22 @@
             dst = new byte [(src.length/getNumInComponents())*getNumOutComponents()];
         }
 
-        LCMSImageLayout srcIL = new LCMSImageLayout(
-            src, src.length/getNumInComponents(),
-            LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
-            LCMSImageLayout.BYTES_SH(1), getNumInComponents());
+        try {
+            LCMSImageLayout srcIL = new LCMSImageLayout(
+                    src, src.length/getNumInComponents(),
+                    LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
+                    LCMSImageLayout.BYTES_SH(1), getNumInComponents());
 
-        LCMSImageLayout dstIL = new LCMSImageLayout(
-            dst, dst.length/getNumOutComponents(),
-            LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
-            LCMSImageLayout.BYTES_SH(1), getNumOutComponents());
+            LCMSImageLayout dstIL = new LCMSImageLayout(
+                    dst, dst.length/getNumOutComponents(),
+                    LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
+                    LCMSImageLayout.BYTES_SH(1), getNumOutComponents());
 
-        doTransform(srcIL, dstIL);
+            doTransform(srcIL, dstIL);
 
-        return dst;
+            return dst;
+        } catch (ImageLayoutException e) {
+            throw new CMMException("Unable to convert data");
+        }
     }
 }
--- a/src/share/classes/sun/misc/ProxyGenerator.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/misc/ProxyGenerator.java	Wed Apr 17 21:48:04 2013 -0700
@@ -27,11 +27,14 @@
 
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
-import java.io.FileOutputStream;
+import java.io.File;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.lang.reflect.Array;
 import java.lang.reflect.Method;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.LinkedList;
@@ -314,12 +317,25 @@
                 "sun.misc.ProxyGenerator.saveGeneratedFiles")).booleanValue();
 
     /**
-     * Generate a proxy class given a name and a list of proxy interfaces.
+     * Generate a public proxy class given a name and a list of proxy interfaces.
      */
     public static byte[] generateProxyClass(final String name,
-                                            Class[] interfaces)
+                                            Class<?>[] interfaces) {
+        return generateProxyClass(name, interfaces, (ACC_PUBLIC | ACC_FINAL | ACC_SUPER));
+    }
+
+    /**
+     * Generate a proxy class given a name and a list of proxy interfaces.
+     *
+     * @param name        the class name of the proxy class
+     * @param interfaces  proxy interfaces
+     * @param accessFlags access flags of the proxy class
+    */
+    public static byte[] generateProxyClass(final String name,
+                                            Class<?>[] interfaces,
+                                            int accessFlags)
     {
-        ProxyGenerator gen = new ProxyGenerator(name, interfaces);
+        ProxyGenerator gen = new ProxyGenerator(name, interfaces, accessFlags);
         final byte[] classFile = gen.generateClassFile();
 
         if (saveGeneratedFiles) {
@@ -327,10 +343,16 @@
             new java.security.PrivilegedAction<Void>() {
                 public Void run() {
                     try {
-                        FileOutputStream file =
-                            new FileOutputStream(dotToSlash(name) + ".class");
-                        file.write(classFile);
-                        file.close();
+                        int i = name.lastIndexOf('.');
+                        Path path;
+                        if (i > 0) {
+                            Path dir = Paths.get(name.substring(0, i).replace('.', File.separatorChar));
+                            Files.createDirectories(dir);
+                            path = dir.resolve(name.substring(i+1, name.length()) + ".class");
+                        } else {
+                            path = Paths.get(name + ".class");
+                        }
+                        Files.write(path, classFile);
                         return null;
                     } catch (IOException e) {
                         throw new InternalError(
@@ -364,21 +386,23 @@
     /** proxy interfaces */
     private Class[] interfaces;
 
+    /** proxy class access flags */
+    private int accessFlags;
+
     /** constant pool of class being generated */
     private ConstantPool cp = new ConstantPool();
 
     /** FieldInfo struct for each field of generated class */
-    private List<FieldInfo> fields = new ArrayList<FieldInfo>();
+    private List<FieldInfo> fields = new ArrayList<>();
 
     /** MethodInfo struct for each method of generated class */
-    private List<MethodInfo> methods = new ArrayList<MethodInfo>();
+    private List<MethodInfo> methods = new ArrayList<>();
 
     /**
      * maps method signature string to list of ProxyMethod objects for
      * proxy methods with that signature
      */
-    private Map<String, List<ProxyMethod>> proxyMethods =
-        new HashMap<String,List<ProxyMethod>>();
+    private Map<String, List<ProxyMethod>> proxyMethods = new HashMap<>();
 
     /** count of ProxyMethod objects added to proxyMethods */
     private int proxyMethodCount = 0;
@@ -390,9 +414,10 @@
      * A ProxyGenerator object contains the state for the ongoing
      * generation of a particular proxy class.
      */
-    private ProxyGenerator(String className, Class[] interfaces) {
+    private ProxyGenerator(String className, Class<?>[] interfaces, int accessFlags) {
         this.className = className;
         this.interfaces = interfaces;
+        this.accessFlags = accessFlags;
     }
 
     /**
@@ -422,10 +447,9 @@
          * earlier interfaces precedence over later ones with duplicate
          * methods.
          */
-        for (int i = 0; i < interfaces.length; i++) {
-            Method[] methods = interfaces[i].getMethods();
-            for (int j = 0; j < methods.length; j++) {
-                addProxyMethod(methods[j], interfaces[i]);
+        for (Class<?> intf : interfaces) {
+            for (Method m : intf.getMethods()) {
+                addProxyMethod(m, intf);
             }
         }
 
@@ -480,8 +504,8 @@
          */
         cp.getClass(dotToSlash(className));
         cp.getClass(superclassName);
-        for (int i = 0; i < interfaces.length; i++) {
-            cp.getClass(dotToSlash(interfaces[i].getName()));
+        for (Class<?> intf: interfaces) {
+            cp.getClass(dotToSlash(intf.getName()));
         }
 
         /*
@@ -508,7 +532,7 @@
             cp.write(dout);             // (write constant pool)
 
                                         // u2 access_flags;
-            dout.writeShort(ACC_PUBLIC | ACC_FINAL | ACC_SUPER);
+            dout.writeShort(accessFlags);
                                         // u2 this_class;
             dout.writeShort(cp.getClass(dotToSlash(className)));
                                         // u2 super_class;
@@ -517,9 +541,9 @@
                                         // u2 interfaces_count;
             dout.writeShort(interfaces.length);
                                         // u2 interfaces[interfaces_count];
-            for (int i = 0; i < interfaces.length; i++) {
+            for (Class<?> intf : interfaces) {
                 dout.writeShort(cp.getClass(
-                    dotToSlash(interfaces[i].getName())));
+                    dotToSlash(intf.getName())));
             }
 
                                         // u2 fields_count;
@@ -576,7 +600,7 @@
                      * compatibly with the throws clauses of both
                      * overridden methods.
                      */
-                    List<Class<?>> legalExceptions = new ArrayList<Class<?>>();
+                    List<Class<?>> legalExceptions = new ArrayList<>();
                     collectCompatibleTypes(
                         exceptionTypes, pm.exceptionTypes, legalExceptions);
                     collectCompatibleTypes(
@@ -588,7 +612,7 @@
                 }
             }
         } else {
-            sigmethods = new ArrayList<ProxyMethod>(3);
+            sigmethods = new ArrayList<>(3);
             proxyMethods.put(sig, sigmethods);
         }
         sigmethods.add(new ProxyMethod(name, parameterTypes, returnType,
@@ -618,7 +642,7 @@
          * List of return types that are not yet known to be
          * assignable from ("covered" by) any of the others.
          */
-        LinkedList<Class<?>> uncoveredReturnTypes = new LinkedList<Class<?>>();
+        LinkedList<Class<?>> uncoveredReturnTypes = new LinkedList<>();
 
     nextNewReturnType:
         for (ProxyMethod pm : methods) {
@@ -833,8 +857,8 @@
                                         // u2 number_of_exceptions;
             out.writeShort(declaredExceptions.length);
                         // u2 exception_index_table[number_of_exceptions];
-            for (int i = 0; i < declaredExceptions.length; i++) {
-                out.writeShort(declaredExceptions[i]);
+            for (short value : declaredExceptions) {
+                out.writeShort(value);
             }
         }
 
@@ -1525,11 +1549,11 @@
                                                Class<?>[] with,
                                                List<Class<?>> list)
     {
-        for (int i = 0; i < from.length; i++) {
-            if (!list.contains(from[i])) {
-                for (int j = 0; j < with.length; j++) {
-                    if (with[j].isAssignableFrom(from[i])) {
-                        list.add(from[i]);
+        for (Class<?> fc: from) {
+            if (!list.contains(fc)) {
+                for (Class<?> wc: with) {
+                    if (wc.isAssignableFrom(fc)) {
+                        list.add(fc);
                         break;
                     }
                 }
@@ -1559,15 +1583,14 @@
      * need to be caught.
      */
     private static List<Class<?>> computeUniqueCatchList(Class<?>[] exceptions) {
-        List<Class<?>> uniqueList = new ArrayList<Class<?>>();
+        List<Class<?>> uniqueList = new ArrayList<>();
                                                 // unique exceptions to catch
 
         uniqueList.add(Error.class);            // always catch/rethrow these
         uniqueList.add(RuntimeException.class);
 
     nextException:
-        for (int i = 0; i < exceptions.length; i++) {
-            Class<?> ex = exceptions[i];
+        for (Class<?> ex: exceptions) {
             if (ex.isAssignableFrom(Throwable.class)) {
                 /*
                  * If Throwable is declared to be thrown by the proxy method,
--- a/src/share/classes/sun/misc/Unsafe.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/misc/Unsafe.java	Wed Apr 17 21:48:04 2013 -0700
@@ -28,6 +28,9 @@
 import java.security.*;
 import java.lang.reflect.*;
 
+import sun.reflect.CallerSensitive;
+import sun.reflect.Reflection;
+
 
 /**
  * A collection of methods for performing low-level, unsafe operations.
@@ -80,9 +83,10 @@
      *             <code>checkPropertiesAccess</code> method doesn't allow
      *             access to the system properties.
      */
+    @CallerSensitive
     public static Unsafe getUnsafe() {
-        Class<?> cc = sun.reflect.Reflection.getCallerClass(2);
-        if (!VM.isSystemDomainLoader(cc.getClassLoader()))
+        Class<?> caller = Reflection.getCallerClass();
+        if (!VM.isSystemDomainLoader(caller.getClassLoader()))
             throw new SecurityException("Unsafe");
         return theUnsafe;
     }
@@ -817,8 +821,6 @@
                                        ClassLoader loader,
                                        ProtectionDomain protectionDomain);
 
-    public native Class<?> defineClass(String name, byte[] b, int off, int len);
-
     /**
      * Define a class but do not make it known to the class loader or system dictionary.
      * <p>
--- a/src/share/classes/sun/nio/ch/DatagramChannelImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/nio/ch/DatagramChannelImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -538,7 +538,7 @@
                     return 0;
                 readerThread = NativeThread.current();
                 do {
-                    n = IOUtil.read(fd, buf, -1, nd, readLock);
+                    n = IOUtil.read(fd, buf, -1, nd);
                 } while ((n == IOStatus.INTERRUPTED) && isOpen());
                 return IOStatus.normalize(n);
             } finally {
@@ -594,7 +594,7 @@
                     return 0;
                 writerThread = NativeThread.current();
                 do {
-                    n = IOUtil.write(fd, buf, -1, nd, writeLock);
+                    n = IOUtil.write(fd, buf, -1, nd);
                 } while ((n == IOStatus.INTERRUPTED) && isOpen());
                 return IOStatus.normalize(n);
             } finally {
--- a/src/share/classes/sun/nio/ch/FileChannelImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/nio/ch/FileChannelImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -140,7 +140,7 @@
                 if (!isOpen())
                     return 0;
                 do {
-                    n = IOUtil.read(fd, dst, -1, nd, positionLock);
+                    n = IOUtil.read(fd, dst, -1, nd);
                 } while ((n == IOStatus.INTERRUPTED) && isOpen());
                 return IOStatus.normalize(n);
             } finally {
@@ -192,7 +192,7 @@
                 if (!isOpen())
                     return 0;
                 do {
-                    n = IOUtil.write(fd, src, -1, nd, positionLock);
+                    n = IOUtil.write(fd, src, -1, nd);
                 } while ((n == IOStatus.INTERRUPTED) && isOpen());
                 return IOStatus.normalize(n);
             } finally {
@@ -671,6 +671,17 @@
         if (!readable)
             throw new NonReadableChannelException();
         ensureOpen();
+        if (nd.needsPositionLock()) {
+            synchronized (positionLock) {
+                return readInternal(dst, position);
+            }
+        } else {
+            return readInternal(dst, position);
+        }
+    }
+
+    private int readInternal(ByteBuffer dst, long position) throws IOException {
+        assert !nd.needsPositionLock() || Thread.holdsLock(positionLock);
         int n = 0;
         int ti = -1;
         try {
@@ -679,7 +690,7 @@
             if (!isOpen())
                 return -1;
             do {
-                n = IOUtil.read(fd, dst, position, nd, positionLock);
+                n = IOUtil.read(fd, dst, position, nd);
             } while ((n == IOStatus.INTERRUPTED) && isOpen());
             return IOStatus.normalize(n);
         } finally {
@@ -697,6 +708,17 @@
         if (!writable)
             throw new NonWritableChannelException();
         ensureOpen();
+        if (nd.needsPositionLock()) {
+            synchronized (positionLock) {
+                return writeInternal(src, position);
+            }
+        } else {
+            return writeInternal(src, position);
+        }
+    }
+
+    private int writeInternal(ByteBuffer src, long position) throws IOException {
+        assert !nd.needsPositionLock() || Thread.holdsLock(positionLock);
         int n = 0;
         int ti = -1;
         try {
@@ -705,7 +727,7 @@
             if (!isOpen())
                 return -1;
             do {
-                n = IOUtil.write(fd, src, position, nd, positionLock);
+                n = IOUtil.write(fd, src, position, nd);
             } while ((n == IOStatus.INTERRUPTED) && isOpen());
             return IOStatus.normalize(n);
         } finally {
--- a/src/share/classes/sun/nio/ch/IOUtil.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/nio/ch/IOUtil.java	Wed Apr 17 21:48:04 2013 -0700
@@ -44,11 +44,11 @@
     private IOUtil() { }                // No instantiation
 
     static int write(FileDescriptor fd, ByteBuffer src, long position,
-                     NativeDispatcher nd, Object lock)
+                     NativeDispatcher nd)
         throws IOException
     {
         if (src instanceof DirectBuffer)
-            return writeFromNativeBuffer(fd, src, position, nd, lock);
+            return writeFromNativeBuffer(fd, src, position, nd);
 
         // Substitute a native buffer
         int pos = src.position();
@@ -62,7 +62,7 @@
             // Do not update src until we see how many bytes were written
             src.position(pos);
 
-            int n = writeFromNativeBuffer(fd, bb, position, nd, lock);
+            int n = writeFromNativeBuffer(fd, bb, position, nd);
             if (n > 0) {
                 // now update src
                 src.position(pos + n);
@@ -74,8 +74,7 @@
     }
 
     private static int writeFromNativeBuffer(FileDescriptor fd, ByteBuffer bb,
-                                           long position, NativeDispatcher nd,
-                                             Object lock)
+                                             long position, NativeDispatcher nd)
         throws IOException
     {
         int pos = bb.position();
@@ -89,7 +88,7 @@
         if (position != -1) {
             written = nd.pwrite(fd,
                                 ((DirectBuffer)bb).address() + pos,
-                                rem, position, lock);
+                                rem, position);
         } else {
             written = nd.write(fd, ((DirectBuffer)bb).address() + pos, rem);
         }
@@ -184,18 +183,18 @@
     }
 
     static int read(FileDescriptor fd, ByteBuffer dst, long position,
-                    NativeDispatcher nd, Object lock)
+                    NativeDispatcher nd)
         throws IOException
     {
         if (dst.isReadOnly())
             throw new IllegalArgumentException("Read-only buffer");
         if (dst instanceof DirectBuffer)
-            return readIntoNativeBuffer(fd, dst, position, nd, lock);
+            return readIntoNativeBuffer(fd, dst, position, nd);
 
         // Substitute a native buffer
         ByteBuffer bb = Util.getTemporaryDirectBuffer(dst.remaining());
         try {
-            int n = readIntoNativeBuffer(fd, bb, position, nd, lock);
+            int n = readIntoNativeBuffer(fd, bb, position, nd);
             bb.flip();
             if (n > 0)
                 dst.put(bb);
@@ -206,8 +205,7 @@
     }
 
     private static int readIntoNativeBuffer(FileDescriptor fd, ByteBuffer bb,
-                                            long position, NativeDispatcher nd,
-                                            Object lock)
+                                            long position, NativeDispatcher nd)
         throws IOException
     {
         int pos = bb.position();
@@ -220,7 +218,7 @@
         int n = 0;
         if (position != -1) {
             n = nd.pread(fd, ((DirectBuffer)bb).address() + pos,
-                         rem, position, lock);
+                         rem, position);
         } else {
             n = nd.read(fd, ((DirectBuffer)bb).address() + pos, rem);
         }
--- a/src/share/classes/sun/nio/ch/NativeDispatcher.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/nio/ch/NativeDispatcher.java	Wed Apr 17 21:48:04 2013 -0700
@@ -38,8 +38,16 @@
     abstract int read(FileDescriptor fd, long address, int len)
         throws IOException;
 
-    int pread(FileDescriptor fd, long address, int len,
-                             long position, Object lock) throws IOException
+    /**
+     * Returns {@code true} if pread/pwrite needs to be synchronized with
+     * position sensitive methods.
+     */
+    boolean needsPositionLock() {
+        return false;
+    }
+
+    int pread(FileDescriptor fd, long address, int len, long position)
+        throws IOException
     {
         throw new IOException("Operation Unsupported");
     }
@@ -50,8 +58,8 @@
     abstract int write(FileDescriptor fd, long address, int len)
         throws IOException;
 
-    int pwrite(FileDescriptor fd, long address, int len,
-                             long position, Object lock) throws IOException
+    int pwrite(FileDescriptor fd, long address, int len, long position)
+        throws IOException
     {
         throw new IOException("Operation Unsupported");
     }
--- a/src/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -318,7 +318,7 @@
                 try {
                     begin();
                     do {
-                        n = IOUtil.read(fdObj, dst, position, nd, null);
+                        n = IOUtil.read(fdObj, dst, position, nd);
                     } while ((n == IOStatus.INTERRUPTED) && isOpen());
                     if (n < 0 && !isOpen())
                         throw new AsynchronousCloseException();
@@ -372,7 +372,7 @@
                 try {
                     begin();
                     do {
-                        n = IOUtil.write(fdObj, src, position, nd, null);
+                        n = IOUtil.write(fdObj, src, position, nd);
                     } while ((n == IOStatus.INTERRUPTED) && isOpen());
                     if (n < 0 && !isOpen())
                         throw new AsynchronousCloseException();
--- a/src/share/classes/sun/nio/ch/SocketChannelImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/nio/ch/SocketChannelImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -356,7 +356,7 @@
                 // except that the shutdown operation plays the role of
                 // nd.preClose().
                 for (;;) {
-                    n = IOUtil.read(fd, buf, -1, nd, readLock);
+                    n = IOUtil.read(fd, buf, -1, nd);
                     if ((n == IOStatus.INTERRUPTED) && isOpen()) {
                         // The system call was interrupted but the channel
                         // is still open, so retry
@@ -447,7 +447,7 @@
                     writerThread = NativeThread.current();
                 }
                 for (;;) {
-                    n = IOUtil.write(fd, buf, -1, nd, writeLock);
+                    n = IOUtil.write(fd, buf, -1, nd);
                     if ((n == IOStatus.INTERRUPTED) && isOpen())
                         continue;
                     return IOStatus.normalize(n);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/reflect/CallerSensitive.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.reflect;
+
+import java.lang.annotation.*;
+import static java.lang.annotation.ElementType.*;
+
+/**
+ * A method annotated @CallerSensitive is sensitive to its calling class,
+ * via {@link sun.reflect.Reflection#getCallerClass Reflection.getCallerClass},
+ * or via some equivalent.
+ *
+ * @author John R. Rose
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({CONSTRUCTOR, METHOD})
+public @interface CallerSensitive {
+}
--- a/src/share/classes/sun/reflect/Reflection.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/reflect/Reflection.java	Wed Apr 17 21:48:04 2013 -0700
@@ -51,16 +51,11 @@
         methodFilterMap = new HashMap<>();
     }
 
-    /** Returns the class of the method <code>realFramesToSkip</code>
-        frames up the stack (zero-based), ignoring frames associated
-        with java.lang.reflect.Method.invoke() and its implementation.
-        The first frame is that associated with this method, so
-        <code>getCallerClass(0)</code> returns the Class object for
-        sun.reflect.Reflection. Frames associated with
-        java.lang.reflect.Method.invoke() and its implementation are
-        completely ignored and do not count toward the number of "real"
-        frames skipped. */
-    public static native Class<?> getCallerClass(int realFramesToSkip);
+    /** Returns the class of the caller of the method calling this method,
+        ignoring frames associated with java.lang.reflect.Method.invoke()
+        and its implementation. */
+    @CallerSensitive
+    public static native Class<?> getCallerClass();
 
     /** Retrieves the access flags written to the class file. For
         inner classes these flags may differ from those returned by
@@ -321,4 +316,27 @@
         }
         return newMembers;
     }
+
+    /**
+     * Tests if the given method is caller-sensitive and the declaring class
+     * is defined by either the bootstrap class loader or extension class loader.
+     */
+    public static boolean isCallerSensitive(Method m) {
+        final ClassLoader loader = m.getDeclaringClass().getClassLoader();
+        if (sun.misc.VM.isSystemDomainLoader(loader) || isExtClassLoader(loader))  {
+            return m.isAnnotationPresent(CallerSensitive.class);
+        }
+        return false;
+    }
+
+    private static boolean isExtClassLoader(ClassLoader loader) {
+        ClassLoader cl = ClassLoader.getSystemClassLoader();
+        while (cl != null) {
+            if (cl.getParent() == null && cl == loader) {
+                return true;
+            }
+            cl = cl.getParent();
+        }
+        return false;
+    }
 }
--- a/src/share/classes/sun/reflect/annotation/AnnotationParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/reflect/annotation/AnnotationParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -30,6 +30,8 @@
 import java.nio.ByteBuffer;
 import java.nio.BufferUnderflowException;
 import java.lang.reflect.*;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import sun.reflect.ConstantPool;
 
 import sun.reflect.generics.parser.SignatureParser;
@@ -253,12 +255,15 @@
      * Returns an annotation of the given type backed by the given
      * member -> value map.
      */
-    public static Annotation annotationForMap(
-        Class<? extends Annotation> type, Map<String, Object> memberValues)
+    public static Annotation annotationForMap(final Class<? extends Annotation> type,
+                                              final Map<String, Object> memberValues)
     {
-        return (Annotation) Proxy.newProxyInstance(
-            type.getClassLoader(), new Class<?>[] { type },
-            new AnnotationInvocationHandler(type, memberValues));
+        return AccessController.doPrivileged(new PrivilegedAction<Annotation>() {
+            public Annotation run() {
+                return (Annotation) Proxy.newProxyInstance(
+                    type.getClassLoader(), new Class<?>[] { type },
+                    new AnnotationInvocationHandler(type, memberValues));
+            }});
     }
 
     /**
--- a/src/share/classes/sun/reflect/misc/MethodUtil.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/reflect/misc/MethodUtil.java	Wed Apr 17 21:48:04 2013 -0700
@@ -46,8 +46,28 @@
 
 
 class Trampoline {
+    static {
+        if (Trampoline.class.getClassLoader() == null) {
+            throw new Error(
+                "Trampoline must not be defined by the bootstrap classloader");
+        }
+    }
+
+    private static void ensureInvocableMethod(Method m)
+        throws InvocationTargetException
+    {
+        Class<?> clazz = m.getDeclaringClass();
+        if (clazz.equals(AccessController.class) ||
+            clazz.equals(Method.class) ||
+            clazz.getName().startsWith("java.lang.invoke."))
+            throw new InvocationTargetException(
+                new UnsupportedOperationException("invocation not supported"));
+    }
+
     private static Object invoke(Method m, Object obj, Object[] params)
-        throws InvocationTargetException, IllegalAccessException {
+        throws InvocationTargetException, IllegalAccessException
+    {
+        ensureInvocableMethod(m);
         return m.invoke(obj, params);
     }
 }
@@ -251,16 +271,6 @@
      */
     public static Object invoke(Method m, Object obj, Object[] params)
         throws InvocationTargetException, IllegalAccessException {
-        if (m.getDeclaringClass().equals(AccessController.class) ||
-           (m.getDeclaringClass().equals(java.lang.invoke.MethodHandles.class)
-            && m.getName().equals("lookup")) ||
-           (m.getDeclaringClass().equals(java.lang.invoke.MethodHandles.Lookup.class)
-            && (m.getName().startsWith("find") ||
-                m.getName().startsWith("bind") ||
-                m.getName().startsWith("unreflect"))) ||
-            m.getDeclaringClass().equals(Method.class))
-            throw new InvocationTargetException(
-                new UnsupportedOperationException("invocation not supported"));
         try {
             return bounce.invoke(null, new Object[] {m, obj, params});
         } catch (InvocationTargetException ie) {
@@ -293,10 +303,10 @@
                             Method.class, Object.class, Object[].class
                         };
                         Method b = t.getDeclaredMethod("invoke", types);
-                    ((AccessibleObject)b).setAccessible(true);
-                    return b;
-                }
-            });
+                        b.setAccessible(true);
+                        return b;
+                    }
+                });
         } catch (Exception e) {
             throw new InternalError("bouncer cannot be found", e);
         }
--- a/src/share/classes/sun/rmi/server/MarshalInputStream.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/rmi/server/MarshalInputStream.java	Wed Apr 17 21:48:04 2013 -0700
@@ -55,13 +55,19 @@
 public class MarshalInputStream extends ObjectInputStream {
 
     /**
-     * value of "java.rmi.server.useCodebaseOnly" property,
+     * Value of "java.rmi.server.useCodebaseOnly" property,
      * as cached at class initialization time.
+     *
+     * The default value is true. That is, the value is true
+     * if the property is absent or is not equal to "false".
+     * The value is only false when the property is present
+     * and is equal to "false".
      */
     private static final boolean useCodebaseOnlyProperty =
-        java.security.AccessController.doPrivileged(
-            new sun.security.action.GetBooleanAction(
-                "java.rmi.server.useCodebaseOnly")).booleanValue();
+        ! java.security.AccessController.doPrivileged(
+            new sun.security.action.GetPropertyAction(
+                "java.rmi.server.useCodebaseOnly", "true"))
+            .equalsIgnoreCase("false");
 
     /** table to hold sun classes to which access is explicitly permitted */
     protected static Map<String, Class<?>> permittedSunClasses
--- a/src/share/classes/sun/rmi/server/Util.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/rmi/server/Util.java	Wed Apr 17 21:48:04 2013 -0700
@@ -48,6 +48,7 @@
 import java.security.MessageDigest;
 import java.security.DigestOutputStream;
 import java.security.NoSuchAlgorithmException;
+import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Map;
@@ -140,17 +141,20 @@
             return createStub(remoteClass, clientRef);
         }
 
-        ClassLoader loader = implClass.getClassLoader();
-        Class[] interfaces = getRemoteInterfaces(implClass);
-        InvocationHandler handler =
+        final ClassLoader loader = implClass.getClassLoader();
+        final Class[] interfaces = getRemoteInterfaces(implClass);
+        final InvocationHandler handler =
             new RemoteObjectInvocationHandler(clientRef);
 
         /* REMIND: private remote interfaces? */
 
         try {
-            return (Remote) Proxy.newProxyInstance(loader,
-                                                   interfaces,
-                                                   handler);
+            return AccessController.doPrivileged(new PrivilegedAction<Remote>() {
+                public Remote run() {
+                    return (Remote) Proxy.newProxyInstance(loader,
+                                                           interfaces,
+                                                           handler);
+                }});
         } catch (IllegalArgumentException e) {
             throw new StubNotFoundException("unable to create proxy", e);
         }
--- a/src/share/classes/sun/security/internal/spec/TlsKeyMaterialParameterSpec.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/internal/spec/TlsKeyMaterialParameterSpec.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -212,12 +212,6 @@
      *     generated.
      */
     public int getIvLength() {
-        // TLS v1.1 or later uses an explicit IV to protect against
-        // the CBC attacks.
-        if (majorVersion >= 0x03 && minorVersion >= 0x02) {
-            return 0;
-        }
-
         return ivLength;
     }
 
--- a/src/share/classes/sun/security/internal/spec/TlsKeyMaterialSpec.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/internal/spec/TlsKeyMaterialSpec.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,9 +58,8 @@
      * <code>new TlsKeymaterialSpec(clientMacKey, serverMacKey,
      * null, null, null, null)</code>.
      *
-     * @param clientMacKey the client MAC key
-     * @param serverMacKey the server MAC key
-     * @throws NullPointerException if clientMacKey or serverMacKey is null
+     * @param clientMacKey the client MAC key (or null)
+     * @param serverMacKey the server MAC key (or null)
      */
     public TlsKeyMaterialSpec(SecretKey clientMacKey, SecretKey serverMacKey) {
         this(clientMacKey, serverMacKey, null, null, null, null);
@@ -73,11 +72,10 @@
      * <code>new TlsKeymaterialSpec(clientMacKey, serverMacKey,
      * clientCipherKey, serverCipherKey, null, null)</code>.
      *
-     * @param clientMacKey the client MAC key
-     * @param serverMacKey the server MAC key
+     * @param clientMacKey the client MAC key (or null)
+     * @param serverMacKey the server MAC key (or null)
      * @param clientCipherKey the client cipher key (or null)
      * @param serverCipherKey the server cipher key (or null)
-     * @throws NullPointerException if clientMacKey or serverMacKey is null
      */
     public TlsKeyMaterialSpec(SecretKey clientMacKey, SecretKey serverMacKey,
             SecretKey clientCipherKey, SecretKey serverCipherKey) {
@@ -90,21 +88,17 @@
      * keys, client and server cipher keys, and client and server
      * initialization vectors.
      *
-     * @param clientMacKey the client MAC key
-     * @param serverMacKey the server MAC key
+     * @param clientMacKey the client MAC key (or null)
+     * @param serverMacKey the server MAC key (or null)
      * @param clientCipherKey the client cipher key (or null)
      * @param clientIv the client initialization vector (or null)
      * @param serverCipherKey the server cipher key (or null)
      * @param serverIv the server initialization vector (or null)
-     *
-     * @throws NullPointerException if clientMacKey or serverMacKey is null
      */
     public TlsKeyMaterialSpec(SecretKey clientMacKey, SecretKey serverMacKey,
             SecretKey clientCipherKey, IvParameterSpec clientIv,
             SecretKey serverCipherKey, IvParameterSpec serverIv) {
-        if ((clientMacKey == null) || (serverMacKey == null)) {
-            throw new NullPointerException("MAC keys must not be null");
-        }
+
         this.clientMacKey = clientMacKey;
         this.serverMacKey = serverMacKey;
         this.clientCipherKey = clientCipherKey;
@@ -143,7 +137,7 @@
     /**
      * Returns the client MAC key.
      *
-     * @return the client MAC key.
+     * @return the client MAC key (or null).
      */
     public SecretKey getClientMacKey() {
         return clientMacKey;
@@ -152,7 +146,7 @@
     /**
      * Return the server MAC key.
      *
-     * @return the server MAC key.
+     * @return the server MAC key (or null).
      */
     public SecretKey getServerMacKey() {
         return serverMacKey;
--- a/src/share/classes/sun/security/krb5/KrbApReq.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/krb5/KrbApReq.java	Wed Apr 17 21:48:04 2013 -0700
@@ -204,7 +204,7 @@
         int usage)
         throws KrbException, IOException {
 
-        ctime = new KerberosTime(KerberosTime.NOW);
+        ctime = KerberosTime.now();
         init(options,
              tgs_creds.ticket,
              tgs_creds.key,
@@ -287,14 +287,14 @@
         authenticator = new Authenticator(temp2);
         ctime = authenticator.ctime;
         cusec = authenticator.cusec;
-        authenticator.ctime.setMicroSeconds(authenticator.cusec);
+        authenticator.ctime =
+                authenticator.ctime.withMicroSeconds(authenticator.cusec);
 
         if (!authenticator.cname.equals(enc_ticketPart.cname)) {
             throw new KrbApErrException(Krb5.KRB_AP_ERR_BADMATCH);
         }
 
-        KerberosTime currTime = new KerberosTime(KerberosTime.NOW);
-        if (!authenticator.ctime.inClockSkew(currTime))
+        if (!authenticator.ctime.inClockSkew())
             throw new KrbApErrException(Krb5.KRB_AP_ERR_SKEW);
 
         // start to check if it is a replay attack.
@@ -304,7 +304,7 @@
         if (table.get(time, authenticator.cname.toString()) != null) {
             throw new KrbApErrException(Krb5.KRB_AP_ERR_REPEAT);
         } else {
-            table.put(client, time, currTime.getTime());
+            table.put(client, time, System.currentTimeMillis());
         }
 
         if (initiator != null) {
@@ -329,7 +329,7 @@
         // else
         //    save authenticator to check for later
 
-        KerberosTime now = new KerberosTime(KerberosTime.NOW);
+        KerberosTime now = KerberosTime.now();
 
         if ((enc_ticketPart.starttime != null &&
              enc_ticketPart.starttime.greaterThanWRTClockSkew(now)) ||
--- a/src/share/classes/sun/security/krb5/KrbAppMessage.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/krb5/KrbAppMessage.java	Wed Apr 17 21:48:04 2013 -0700
@@ -71,12 +71,18 @@
         }
 
         if (packetTimestamp != null) {
-            packetTimestamp.setMicroSeconds(packetUsec);
-            if (!packetTimestamp.inClockSkew())
+            if (packetUsec != null) {
+                packetTimestamp =
+                    packetTimestamp.withMicroSeconds(packetUsec.intValue());
+            }
+            if (!packetTimestamp.inClockSkew()) {
                 throw new KrbApErrException(Krb5.KRB_AP_ERR_SKEW);
-        } else
-            if (timestampRequired)
+            }
+        } else {
+            if (timestampRequired) {
                 throw new KrbApErrException(Krb5.KRB_AP_ERR_SKEW);
+            }
+        }
 
         // XXX check replay cache
         // if (rcache.repeated(packetTimestamp, packetUsec, packetSAddress))
--- a/src/share/classes/sun/security/krb5/KrbCred.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/krb5/KrbCred.java	Wed Apr 17 21:48:04 2013 -0700
@@ -103,7 +103,7 @@
                                                delegatedCreds.renewTill, tgService,
                                                delegatedCreds.cAddr);
 
-        timeStamp = new KerberosTime(KerberosTime.NOW);
+        timeStamp = KerberosTime.now();
         KrbCredInfo[] credInfos = {credInfo};
         EncKrbCredPart encPart =
             new EncKrbCredPart(credInfos,
--- a/src/share/classes/sun/security/krb5/KrbTgsReq.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/krb5/KrbTgsReq.java	Wed Apr 17 21:48:04 2013 -0700
@@ -147,8 +147,7 @@
 
         princName = cname;
         servName = sname;
-        ctime = new KerberosTime(KerberosTime.NOW);
-
+        ctime = KerberosTime.now();
 
         // check if they are valid arguments. The optional fields
         // should be  consistent with settings in KDCOptions.
--- a/src/share/classes/sun/security/krb5/PrincipalName.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/krb5/PrincipalName.java	Wed Apr 17 21:48:04 2013 -0700
@@ -499,7 +499,7 @@
     }
 
     public String[] getNameStrings() {
-        return nameStrings;
+        return nameStrings.clone();
     }
 
     public byte[][] toByteArray() {
--- a/src/share/classes/sun/security/krb5/internal/KerberosTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/krb5/internal/KerberosTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -30,18 +30,20 @@
 
 package sun.security.krb5.internal;
 
-import java.util.TimeZone;
-import sun.security.util.*;
+import sun.security.krb5.Asn1Exception;
 import sun.security.krb5.Config;
 import sun.security.krb5.KrbException;
-import sun.security.krb5.Asn1Exception;
+import sun.security.util.DerInputStream;
+import sun.security.util.DerOutputStream;
+import sun.security.util.DerValue;
+
+import java.io.IOException;
+import java.util.Calendar;
 import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.Calendar;
-import java.io.IOException;
+import java.util.TimeZone;
 
 /**
- * Implements the ASN.1 KerberosTime type.
+ * Implements the ASN.1 KerberosTime type. This is an immutable class.
  *
  * <xmp>
  * KerberosTime    ::= GeneralizedTime -- with no fractional seconds
@@ -62,55 +64,38 @@
  * same class can be used as a precise timestamp in Authenticator etc.
  */
 
-public class KerberosTime implements Cloneable {
+public class KerberosTime {
 
-    private long kerberosTime; // milliseconds since epoch, a Date.getTime() value
-    private int  microSeconds; // the last three digits of the microsecond value
+    private final long kerberosTime; // milliseconds since epoch, Date.getTime()
+    private final int  microSeconds; // last 3 digits of the real microsecond
 
     // The time when this class is loaded. Used in setNow()
     private static long initMilli = System.currentTimeMillis();
     private static long initMicro = System.nanoTime() / 1000;
 
-    private static long syncTime;
     private static boolean DEBUG = Krb5.DEBUG;
 
-    public static final boolean NOW = true;
-    public static final boolean UNADJUSTED_NOW = false;
-
-    public KerberosTime(long time) {
-        kerberosTime = time;
-    }
-
+    // Do not make this public. It's a little confusing that micro
+    // is only the last 3 digits of microsecond.
     private KerberosTime(long time, int micro) {
         kerberosTime = time;
         microSeconds = micro;
     }
 
-    public Object clone() {
-        return new KerberosTime(kerberosTime, microSeconds);
+    /**
+     * Creates a KerberosTime object from milliseconds since epoch.
+     */
+    public KerberosTime(long time) {
+        this(time, 0);
     }
 
     // This constructor is used in the native code
     // src/windows/native/sun/security/krb5/NativeCreds.c
     public KerberosTime(String time) throws Asn1Exception {
-        kerberosTime = toKerberosTime(time);
-    }
-
-    /**
-     * Constructs a KerberosTime object.
-     * @param encoding a DER-encoded data.
-     * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data.
-     * @exception IOException if an I/O error occurs while reading encoded data.
-     */
-    public KerberosTime(DerValue encoding) throws Asn1Exception, IOException {
-        GregorianCalendar calendar = new GregorianCalendar();
-        Date temp = encoding.getGeneralizedTime();
-        kerberosTime = temp.getTime();
+        this(toKerberosTime(time), 0);
     }
 
     private static long toKerberosTime(String time) throws Asn1Exception {
-        // this method only used by KerberosTime class.
-
         // ASN.1 GeneralizedTime format:
 
         // "19700101000000Z"
@@ -133,30 +118,34 @@
                      Integer.parseInt(time.substring(8, 10)),
                      Integer.parseInt(time.substring(10, 12)),
                      Integer.parseInt(time.substring(12, 14)));
+        return calendar.getTimeInMillis();
+    }
 
-        //The Date constructor assumes the setting are local relative
-        //and converts the time to UTC before storing it.  Since we
-        //want the internal representation to correspond to local
-        //and not UTC time we subtract the UTC time offset.
-        return (calendar.getTime().getTime());
-
+    /**
+     * Creates a KerberosTime object from a Date object.
+     */
+    public KerberosTime(Date time) {
+        this(time.getTime(), 0);
     }
 
-    // should be moved to sun.security.krb5.util class
-    public static String zeroPad(String s, int length) {
-        StringBuffer temp = new StringBuffer(s);
-        while (temp.length() < length)
-            temp.insert(0, '0');
-        return temp.toString();
-    }
-
-    public KerberosTime(Date time) {
-        kerberosTime = time.getTime(); // (time.getTimezoneOffset() * 60000L);
-    }
-
-    public KerberosTime(boolean initToNow) {
-        if (initToNow) {
-            setNow();
+    /**
+     * Creates a KerberosTime object for now. It uses System.nanoTime()
+     * to get a more precise time than "new Date()".
+     */
+    public static KerberosTime now() {
+        long newMilli = System.currentTimeMillis();
+        long newMicro = System.nanoTime() / 1000;
+        long microElapsed = newMicro - initMicro;
+        long calcMilli = initMilli + microElapsed/1000;
+        if (calcMilli - newMilli > 100 || newMilli - calcMilli > 100) {
+            if (DEBUG) {
+                System.out.println("System time adjusted");
+            }
+            initMilli = newMilli;
+            initMicro = newMicro;
+            return new KerberosTime(newMilli, 0);
+        } else {
+            return new KerberosTime(calcMilli, (int)(microElapsed % 1000));
         }
     }
 
@@ -169,13 +158,13 @@
         calendar.clear();
 
         calendar.setTimeInMillis(kerberosTime);
-        return zeroPad(Integer.toString(calendar.get(Calendar.YEAR)), 4) +
-            zeroPad(Integer.toString(calendar.get(Calendar.MONTH) + 1), 2) +
-            zeroPad(Integer.toString(calendar.get(Calendar.DAY_OF_MONTH)), 2) +
-            zeroPad(Integer.toString(calendar.get(Calendar.HOUR_OF_DAY)), 2) +
-            zeroPad(Integer.toString(calendar.get(Calendar.MINUTE)), 2) +
-            zeroPad(Integer.toString(calendar.get(Calendar.SECOND)), 2) + 'Z';
-
+        return String.format("%04d%02d%02d%02d%02d%02dZ",
+                calendar.get(Calendar.YEAR),
+                calendar.get(Calendar.MONTH) + 1,
+                calendar.get(Calendar.DAY_OF_MONTH),
+                calendar.get(Calendar.HOUR_OF_DAY),
+                calendar.get(Calendar.MINUTE),
+                calendar.get(Calendar.SECOND));
     }
 
     /**
@@ -194,40 +183,8 @@
         return kerberosTime;
     }
 
-
-    public void setTime(Date time) {
-        kerberosTime = time.getTime(); // (time.getTimezoneOffset() * 60000L);
-        microSeconds = 0;
-    }
-
-    public void setTime(long time) {
-        kerberosTime = time;
-        microSeconds = 0;
-    }
-
     public Date toDate() {
-        Date temp = new Date(kerberosTime);
-        temp.setTime(temp.getTime());
-        return temp;
-    }
-
-    public void setNow() {
-        long newMilli = System.currentTimeMillis();
-        long newMicro = System.nanoTime() / 1000;
-        long microElapsed = newMicro - initMicro;
-        long calcMilli = initMilli + microElapsed/1000;
-        if (calcMilli - newMilli > 100 || newMilli - calcMilli > 100) {
-            if (DEBUG) {
-                System.out.println("System time adjusted");
-            }
-            initMilli = newMilli;
-            initMicro = newMicro;
-            setTime(newMilli);
-            microSeconds = 0;
-        } else {
-            setTime(calcMilli);
-            microSeconds = (int)(microElapsed % 1000);
-        }
+        return new Date(kerberosTime);
     }
 
     public int getMicroSeconds() {
@@ -235,45 +192,25 @@
         return temp_long.intValue() + microSeconds;
     }
 
-    public void setMicroSeconds(int usec) {
-        microSeconds = usec % 1000;
-        Integer temp_int = new Integer(usec);
-        long temp_long = temp_int.longValue() / 1000L;
-        kerberosTime = kerberosTime - (kerberosTime % 1000L) + temp_long;
+    /**
+     * Returns a new KerberosTime object with the original seconds
+     * and the given microseconds.
+     */
+    public KerberosTime withMicroSeconds(int usec) {
+        return new KerberosTime(
+                kerberosTime - kerberosTime%1000L + usec/1000L,
+                usec%1000);
     }
 
-    public void setMicroSeconds(Integer usec) {
-        if (usec != null) {
-            microSeconds = usec.intValue() % 1000;
-            long temp_long = usec.longValue() / 1000L;
-            kerberosTime = kerberosTime - (kerberosTime % 1000L) + temp_long;
-        }
-    }
-
-    public boolean inClockSkew(int clockSkew) {
-        KerberosTime now = new KerberosTime(KerberosTime.NOW);
-
-        if (java.lang.Math.abs(kerberosTime - now.kerberosTime) >
-            clockSkew * 1000L)
-            return false;
-        return true;
+    private boolean inClockSkew(int clockSkew) {
+        return java.lang.Math.abs(kerberosTime - System.currentTimeMillis())
+                <= clockSkew * 1000L;
     }
 
     public boolean inClockSkew() {
         return inClockSkew(getDefaultSkew());
     }
 
-    public boolean inClockSkew(int clockSkew, KerberosTime now) {
-        if (java.lang.Math.abs(kerberosTime - now.kerberosTime) >
-            clockSkew * 1000L)
-            return false;
-        return true;
-    }
-
-    public boolean inClockSkew(KerberosTime time) {
-        return inClockSkew(getDefaultSkew(), time);
-    }
-
     public boolean greaterThanWRTClockSkew(KerberosTime time, int clockSkew) {
         if ((kerberosTime - time.kerberosTime) > clockSkew * 1000L)
             return true;
@@ -317,24 +254,22 @@
         return temp_long.intValue();
     }
 
-    public void setSeconds(int sec) {
-        Integer temp_int = new Integer(sec);
-        kerberosTime = temp_int.longValue() * 1000L;
-    }
-
     /**
      * Parse (unmarshal) a kerberostime from a DER input stream.  This form
      * parsing might be used when expanding a value which is part of
      * a constructed sequence and uses explicitly tagged type.
      *
      * @exception Asn1Exception on error.
-     * @param data the Der input stream value, which contains one or more marshaled value.
+     * @param data the Der input stream value, which contains
+     *             one or more marshaled value.
      * @param explicitTag tag number.
      * @param optional indicates if this data field is optional
      * @return an instance of KerberosTime.
      *
      */
-    public static KerberosTime parse(DerInputStream data, byte explicitTag, boolean optional) throws Asn1Exception, IOException {
+    public static KerberosTime parse(
+            DerInputStream data, byte explicitTag, boolean optional)
+            throws Asn1Exception, IOException {
         if ((optional) && (((byte)data.peekByte() & (byte)0x1F)!= explicitTag))
             return null;
         DerValue der = data.getDerValue();
@@ -343,7 +278,8 @@
         }
         else {
             DerValue subDer = der.getData().getDerValue();
-            return new KerberosTime(subDer);
+            Date temp = subDer.getGeneralizedTime();
+            return new KerberosTime(temp.getTime(), 0);
         }
     }
 
--- a/src/share/classes/sun/security/krb5/internal/KrbCredInfo.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/krb5/internal/KrbCredInfo.java	Wed Apr 17 21:48:04 2013 -0700
@@ -187,14 +187,10 @@
             kcred.pname = (PrincipalName)pname.clone();
         if (flags != null)
             kcred.flags = (TicketFlags)flags.clone();
-        if (authtime != null)
-            kcred.authtime = (KerberosTime)authtime.clone();
-        if (starttime != null)
-            kcred.starttime = (KerberosTime)starttime.clone();
-        if (endtime != null)
-            kcred.endtime = (KerberosTime)endtime.clone();
-        if (renewTill != null)
-            kcred.renewTill = (KerberosTime)renewTill.clone();
+        kcred.authtime = authtime;
+        kcred.starttime = starttime;
+        kcred.endtime = endtime;
+        kcred.renewTill = renewTill;
         if (sname != null)
             kcred.sname = (PrincipalName)sname.clone();
         if (caddr != null)
--- a/src/share/classes/sun/security/krb5/internal/LastReqEntry.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/krb5/internal/LastReqEntry.java	Wed Apr 17 21:48:04 2013 -0700
@@ -90,7 +90,7 @@
     public Object clone() {
         LastReqEntry newEntry = new LastReqEntry();
         newEntry.lrType = lrType;
-        newEntry.lrValue = (KerberosTime)lrValue.clone();
+        newEntry.lrValue = lrValue;
         return newEntry;
     }
 }
--- a/src/share/classes/sun/security/krb5/internal/PAEncTSEnc.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/krb5/internal/PAEncTSEnc.java	Wed Apr 17 21:48:04 2013 -0700
@@ -65,7 +65,7 @@
     }
 
     public PAEncTSEnc() {
-        KerberosTime now = new KerberosTime(KerberosTime.NOW);
+        KerberosTime now = KerberosTime.now();
         pATimeStamp = now;
         pAUSec = new Integer(now.getMicroSeconds());
     }
--- a/src/share/classes/sun/security/krb5/internal/ccache/Credentials.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/krb5/internal/ccache/Credentials.java	Wed Apr 17 21:48:04 2013 -0700
@@ -68,14 +68,11 @@
         sname = (PrincipalName) new_sname.clone();
         key = (EncryptionKey) new_key.clone();
 
-        authtime = (KerberosTime) new_authtime.clone();
-        if (new_starttime != null) {
-            starttime = (KerberosTime) new_starttime.clone();
-        }
-        endtime = (KerberosTime) new_endtime.clone();
-        if (new_renewTill != null) {
-            renewTill = (KerberosTime) new_renewTill.clone();
-        }
+        authtime = new_authtime;
+        starttime = new_starttime;
+        endtime = new_endtime;
+        renewTill = new_renewTill;
+
         if (new_caddr != null) {
             caddr = (HostAddresses) new_caddr.clone();
         }
@@ -104,14 +101,11 @@
         ticket = (Ticket) kdcRep.ticket.clone();
         key = (EncryptionKey) kdcRep.encKDCRepPart.key.clone();
         flags = (TicketFlags) kdcRep.encKDCRepPart.flags.clone();
-        authtime = (KerberosTime) kdcRep.encKDCRepPart.authtime.clone();
-        if (kdcRep.encKDCRepPart.starttime != null) {
-            starttime = (KerberosTime) kdcRep.encKDCRepPart.starttime.clone();
-        }
-        endtime = (KerberosTime) kdcRep.encKDCRepPart.endtime.clone();
-        if (kdcRep.encKDCRepPart.renewTill != null) {
-            renewTill = (KerberosTime) kdcRep.encKDCRepPart.renewTill.clone();
-        }
+        authtime = kdcRep.encKDCRepPart.authtime;
+        starttime = kdcRep.encKDCRepPart.starttime;
+        endtime = kdcRep.encKDCRepPart.endtime;
+        renewTill = kdcRep.encKDCRepPart.renewTill;
+
         sname = (PrincipalName) kdcRep.encKDCRepPart.sname.clone();
         caddr = (HostAddresses) kdcRep.encKDCRepPart.caddr.clone();
         secondTicket = (Ticket) new_secondTicket.clone();
@@ -128,18 +122,10 @@
         sname = (PrincipalName) kdcRep.encKDCRepPart.sname.clone();
         cname = (PrincipalName) kdcRep.cname.clone();
         key = (EncryptionKey) kdcRep.encKDCRepPart.key.clone();
-        authtime = (KerberosTime) kdcRep.encKDCRepPart.authtime.clone();
-        if (kdcRep.encKDCRepPart.starttime != null) {
-            starttime = (KerberosTime) kdcRep.encKDCRepPart.starttime.clone();
-        } else {
-            starttime = null;
-        }
-        endtime = (KerberosTime) kdcRep.encKDCRepPart.endtime.clone();
-        if (kdcRep.encKDCRepPart.renewTill != null) {
-            renewTill = (KerberosTime) kdcRep.encKDCRepPart.renewTill.clone();
-        } else {
-            renewTill = null;
-        }
+        authtime = kdcRep.encKDCRepPart.authtime;
+        starttime = kdcRep.encKDCRepPart.starttime;
+        endtime = kdcRep.encKDCRepPart.endtime;
+        renewTill = kdcRep.encKDCRepPart.renewTill;
         // if (kdcRep.msgType == Krb5.KRB_AS_REP) {
         //    isEncInSKey = false;
         //    secondTicket = null;
--- a/src/share/classes/sun/security/pkcs/PKCS7.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/pkcs/PKCS7.java	Wed Apr 17 21:48:04 2013 -0700
@@ -161,7 +161,8 @@
             } catch (IOException ioe1) {
                 ParsingException pe = new ParsingException(
                     ioe1.getMessage());
-                pe.initCause(ioe1);
+                pe.initCause(ioe);
+                pe.addSuppressed(ioe1);
                 throw pe;
             }
         }
@@ -310,19 +311,26 @@
 
             len = certVals.length;
             certificates = new X509Certificate[len];
+            int count = 0;
 
             for (int i = 0; i < len; i++) {
                 ByteArrayInputStream bais = null;
                 try {
-                    if (certfac == null)
-                        certificates[i] = new X509CertImpl(certVals[i]);
-                    else {
-                        byte[] encoded = certVals[i].toByteArray();
-                        bais = new ByteArrayInputStream(encoded);
-                        certificates[i] =
-                            (X509Certificate)certfac.generateCertificate(bais);
-                        bais.close();
-                        bais = null;
+                    byte tag = certVals[i].getTag();
+                    // We only parse the normal certificate. Other types of
+                    // CertificateChoices ignored.
+                    if (tag == DerValue.tag_Sequence) {
+                        if (certfac == null) {
+                            certificates[count] = new X509CertImpl(certVals[i]);
+                        } else {
+                            byte[] encoded = certVals[i].toByteArray();
+                            bais = new ByteArrayInputStream(encoded);
+                            certificates[count] =
+                                (X509Certificate)certfac.generateCertificate(bais);
+                            bais.close();
+                            bais = null;
+                        }
+                        count++;
                     }
                 } catch (CertificateException ce) {
                     ParsingException pe = new ParsingException(ce.getMessage());
@@ -337,6 +345,9 @@
                         bais.close();
                 }
             }
+            if (count != len) {
+                certificates = Arrays.copyOf(certificates, count);
+            }
         }
 
         // check if crls (implicit tag) are provided (crls are OPTIONAL)
--- a/src/share/classes/sun/security/pkcs/PKCS9Attribute.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/pkcs/PKCS9Attribute.java	Wed Apr 17 21:48:04 2013 -0700
@@ -42,12 +42,14 @@
 
 /**
  * Class supporting any PKCS9 attributes.
- * Supports DER decoding and access to attribute values, but not
- * DER encoding or setting of values.
+ * Supports DER decoding/encoding and access to attribute values.
  *
  * <a name="classTable"><h3>Type/Class Table</h3></a>
  * The following table shows the correspondence between
  * PKCS9 attribute types and value component classes.
+ * For types not listed here, its name is the OID
+ * in string form, its value is a (single-valued)
+ * byte array that is the SET's encoding.
  *
  * <P>
  * <TABLE BORDER CELLPADDING=8 ALIGN=CENTER>
@@ -185,6 +187,8 @@
      */
     static final ObjectIdentifier[] PKCS9_OIDS = new ObjectIdentifier[18];
 
+    private final static Class<?> BYTE_ARRAY_CLASS;
+
     static {   // static initializer for PKCS9_OIDS
         for (int i = 1; i < PKCS9_OIDS.length - 2; i++) {
             PKCS9_OIDS[i] =
@@ -196,6 +200,12 @@
             ObjectIdentifier.newInternal(new int[]{1,2,840,113549,1,9,16,2,12});
         PKCS9_OIDS[PKCS9_OIDS.length - 1] =
             ObjectIdentifier.newInternal(new int[]{1,2,840,113549,1,9,16,2,14});
+
+        try {
+            BYTE_ARRAY_CLASS = Class.forName("[B");
+        } catch (ClassNotFoundException e) {
+            throw new ExceptionInInitializerError(e.toString());
+        }
     }
 
     // first element [0] not used
@@ -331,7 +341,7 @@
             VALUE_CLASSES[2] = str;   // UnstructuredName
             VALUE_CLASSES[3] =        // ContentType
                 Class.forName("sun.security.util.ObjectIdentifier");
-            VALUE_CLASSES[4] = Class.forName("[B"); // MessageDigest (byte[])
+            VALUE_CLASSES[4] = BYTE_ARRAY_CLASS; // MessageDigest (byte[])
             VALUE_CLASSES[5] = Class.forName("java.util.Date"); // SigningTime
             VALUE_CLASSES[6] =        // Countersignature
                 Class.forName("[Lsun.security.pkcs.SignerInfo;");
@@ -347,7 +357,7 @@
                 Class.forName("sun.security.x509.CertificateExtensions");
             VALUE_CLASSES[15] = null;  // not supported yet
             VALUE_CLASSES[16] = null;  // not supported yet
-            VALUE_CLASSES[17] = Class.forName("[B");  // SignatureTimestampToken
+            VALUE_CLASSES[17] = BYTE_ARRAY_CLASS;  // SignatureTimestampToken
         } catch (ClassNotFoundException e) {
             throw new ExceptionInInitializerError(e.toString());
         }
@@ -379,13 +389,20 @@
     };
 
     /**
-     * The OID of this attribute is <code>PKCS9_OIDS[index]</code>.
+     * The OID of this attribute.
+     */
+    private ObjectIdentifier oid;
+
+    /**
+     * The index of the OID of this attribute in <code>PKCS9_OIDS</code>,
+     * or -1 if it's unknown.
      */
     private int index;
 
     /**
      * Value set of this attribute.  Its class is given by
-     * <code>VALUE_CLASSES[index]</code>.
+     * <code>VALUE_CLASSES[index]</code>. The SET itself
+     * as byte[] if unknown.
      */
     private Object value;
 
@@ -400,6 +417,8 @@
      * <a href=#classTable>table</a> gives the class that <code>value</code>
      * must have for a given attribute.
      *
+     * @exception IllegalArgumentException
+     * if the <code>value</code> has the wrong type.
      */
     public PKCS9Attribute(ObjectIdentifier oid, Object value)
     throws IllegalArgumentException {
@@ -419,7 +438,7 @@
      * attributes are accepted; in particular, case does not matter.
      *
      * @exception IllegalArgumentException
-     * if the <code>name</code> is not recognized of the
+     * if the <code>name</code> is not recognized or the
      * <code>value</code> has the wrong type.
      */
     public PKCS9Attribute(String name, Object value)
@@ -437,21 +456,17 @@
     private void init(ObjectIdentifier oid, Object value)
         throws IllegalArgumentException {
 
+        this.oid = oid;
         index = indexOf(oid, PKCS9_OIDS, 1);
-
-        if (index == -1)
-            throw new IllegalArgumentException(
-                       "Unsupported OID " + oid +
-                       " constructing PKCS9Attribute.");
-
-        if (!VALUE_CLASSES[index].isInstance(value))
+        Class<?> clazz = index == -1 ? BYTE_ARRAY_CLASS: VALUE_CLASSES[index];
+        if (!clazz.isInstance(value)) {
                 throw new IllegalArgumentException(
                            "Wrong value class " +
                            " for attribute " + oid +
                            " constructing PKCS9Attribute; was " +
                            value.getClass().toString() + ", should be " +
-                           VALUE_CLASSES[index].toString());
-
+                           clazz.toString());
+        }
         this.value = value;
     }
 
@@ -475,16 +490,19 @@
             throw new IOException("PKCS9Attribute doesn't have two components");
 
         // get the oid
-        ObjectIdentifier oid = val[0].getOID();
+        oid = val[0].getOID();
+        byte[] content = val[1].toByteArray();
+        DerValue[] elems = new DerInputStream(content).getSet(1);
+
         index = indexOf(oid, PKCS9_OIDS, 1);
         if (index == -1) {
             if (debug != null) {
-                debug.println("ignoring unsupported signer attribute: " + oid);
+                debug.println("Unsupported signer attribute: " + oid);
             }
-            throw new ParsingException("Unsupported PKCS9 attribute: " + oid);
+            value = content;
+            return;
         }
 
-        DerValue[] elems = new DerInputStream(val[1].toByteArray()).getSet(1);
         // check single valued have only one value
         if (SINGLE_VALUED[index] && elems.length > 1)
             throwSingleValuedException();
@@ -584,8 +602,11 @@
      */
     public void derEncode(OutputStream out) throws IOException {
         DerOutputStream temp = new DerOutputStream();
-        temp.putOID(getOID());
+        temp.putOID(oid);
         switch (index) {
+        case -1:    // Unknown
+            temp.write((byte[])value);
+            break;
         case 1:     // email address
         case 2:     // unstructured name
             { // open scope
@@ -704,6 +725,14 @@
     }
 
     /**
+     * Returns if the attribute is known. Unknown attributes can be created
+     * from DER encoding with unknown OIDs.
+     */
+    public boolean isKnown() {
+        return index != -1;
+    }
+
+    /**
      * Get the value of this attribute.  If the attribute is
      * single-valued, return just the one value.  If the attribute is
      * multi-valued, return an array containing all the values.
@@ -721,21 +750,23 @@
      * Show whether this attribute is single-valued.
      */
     public boolean isSingleValued() {
-        return SINGLE_VALUED[index];
+        return index == -1 || SINGLE_VALUED[index];
     }
 
     /**
      *  Return the OID of this attribute.
      */
     public ObjectIdentifier getOID() {
-        return PKCS9_OIDS[index];
+        return oid;
     }
 
     /**
      *  Return the name of this attribute.
      */
     public String getName() {
-        return OID_NAME_TABLE.get(PKCS9_OIDS[index]);
+        return index == -1 ?
+                oid.toString() :
+                OID_NAME_TABLE.get(PKCS9_OIDS[index]);
     }
 
     /**
@@ -762,10 +793,14 @@
 
         buf.append("[");
 
-        buf.append(OID_NAME_TABLE.get(PKCS9_OIDS[index]));
+        if (index == -1) {
+            buf.append(oid.toString());
+        } else {
+            buf.append(OID_NAME_TABLE.get(PKCS9_OIDS[index]));
+        }
         buf.append(": ");
 
-        if (SINGLE_VALUED[index]) {
+        if (index == -1 || SINGLE_VALUED[index]) {
             if (value instanceof byte[]) { // special case for octet string
                 HexDumpEncoder hexDump = new HexDumpEncoder();
                 buf.append(hexDump.encodeBuffer((byte[]) value));
@@ -809,20 +844,21 @@
      */
     private void throwSingleValuedException() throws IOException {
         throw new IOException("Single-value attribute " +
-                              getOID() + " (" + getName() + ")" +
+                              oid + " (" + getName() + ")" +
                               " has multiple values.");
     }
 
     /**
      * Throw an exception when the tag on a value encoding is
-     * wrong for the attribute whose value it is.
+     * wrong for the attribute whose value it is. This method
+     * will only be called for known tags.
      */
     private void throwTagException(Byte tag)
     throws IOException {
         Byte[] expectedTags = PKCS9_VALUE_TAGS[index];
         StringBuffer msg = new StringBuffer(100);
         msg.append("Value of attribute ");
-        msg.append(getOID().toString());
+        msg.append(oid.toString());
         msg.append(" (");
         msg.append(getName());
         msg.append(") has wrong tag: ");
--- a/src/share/classes/sun/security/pkcs11/P11SecureRandom.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/pkcs11/P11SecureRandom.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, 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
@@ -25,12 +25,9 @@
 
 package sun.security.pkcs11;
 
-import java.util.*;
 import java.io.*;
 import java.security.*;
-
 import sun.security.pkcs11.wrapper.*;
-import sun.security.pkcs11.wrapper.PKCS11Constants.*;
 
 /**
  * SecureRandom implementation class. Some tokens support only
@@ -88,6 +85,7 @@
     }
 
     // see JCA spec
+    @Override
     protected synchronized void engineSetSeed(byte[] seed) {
         if (seed == null) {
             throw new NullPointerException("seed must not be null");
@@ -119,6 +117,7 @@
     }
 
     // see JCA spec
+    @Override
     protected void engineNextBytes(byte[] bytes) {
         if ((bytes == null) || (bytes.length == 0)) {
             return;
@@ -149,6 +148,7 @@
     }
 
     // see JCA spec
+    @Override
     protected byte[] engineGenerateSeed(int numBytes) {
         byte[] b = new byte[numBytes];
         engineNextBytes(b);
--- a/src/share/classes/sun/security/pkcs11/P11TlsKeyMaterialGenerator.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/pkcs11/P11TlsKeyMaterialGenerator.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -168,10 +168,22 @@
             // Note that the MAC keys do not inherit all attributes from the
             // template, but they do inherit the sensitive/extractable/token
             // flags, which is all P11Key cares about.
-            SecretKey clientMacKey = P11Key.secretKey
+            SecretKey clientMacKey, serverMacKey;
+
+            // The MAC size may be zero for GCM mode.
+            //
+            // PKCS11 does not support GCM mode as the author made the comment,
+            // so the macBits is unlikely to be zero. It's only a place holder.
+            if (macBits != 0) {
+                clientMacKey = P11Key.secretKey
                     (session, out.hClientMacSecret, "MAC", macBits, attributes);
-            SecretKey serverMacKey = P11Key.secretKey
+                serverMacKey = P11Key.secretKey
                     (session, out.hServerMacSecret, "MAC", macBits, attributes);
+            } else {
+                clientMacKey = null;
+                serverMacKey = null;
+            }
+
             SecretKey clientCipherKey, serverCipherKey;
             if (keyBits != 0) {
                 clientCipherKey = P11Key.secretKey(session, out.hClientKey,
--- a/src/share/classes/sun/security/provider/SHA2.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/provider/SHA2.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -101,7 +101,7 @@
         i2bBig4((int)bitsProcessed, buffer, 60);
         implCompress(buffer, 0);
 
-        i2bBig(state, 0, out, ofs, 32);
+        i2bBig(state, 0, out, ofs, engineGetDigestLength());
     }
 
     /**
--- a/src/share/classes/sun/security/provider/SecureRandom.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/provider/SecureRandom.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -79,7 +79,7 @@
     }
 
     /**
-     * This constructor is used to instatiate the private seeder object
+     * This constructor is used to instantiate the private seeder object
      * with a given seed from the SeedGenerator.
      *
      * @param seed the seed.
@@ -94,7 +94,7 @@
      */
     private void init(byte[] seed) {
         try {
-            digest = MessageDigest.getInstance ("SHA");
+            digest = MessageDigest.getInstance("SHA");
         } catch (NoSuchAlgorithmException e) {
             throw new InternalError("internal error: SHA-1 not available.", e);
         }
@@ -120,7 +120,10 @@
      *
      * @return the seed bytes.
      */
+    @Override
     public byte[] engineGenerateSeed(int numBytes) {
+        // Neither of the SeedGenerator implementations require
+        // locking, so no sync needed here.
         byte[] b = new byte[numBytes];
         SeedGenerator.generateSeed(b);
         return b;
@@ -133,19 +136,21 @@
      *
      * @param seed the seed.
      */
+    @Override
     synchronized public void engineSetSeed(byte[] seed) {
         if (state != null) {
             digest.update(state);
-            for (int i = 0; i < state.length; i++)
+            for (int i = 0; i < state.length; i++) {
                 state[i] = 0;
+            }
         }
         state = digest.digest(seed);
     }
 
     private static void updateState(byte[] state, byte[] output) {
         int last = 1;
-        int v = 0;
-        byte t = 0;
+        int v;
+        byte t;
         boolean zf = false;
 
         // state(n + 1) = (state(n) + output(n) + 1) % 2^160;
@@ -162,8 +167,9 @@
         }
 
         // Make sure at least one bit changes!
-        if (!zf)
+        if (!zf) {
            state[0]++;
+        }
     }
 
     /**
@@ -193,6 +199,7 @@
      *
      * @param bytes the array to be filled in with random bytes.
      */
+    @Override
     public synchronized void engineNextBytes(byte[] result) {
         int index = 0;
         int todo;
@@ -258,7 +265,7 @@
         s.defaultReadObject ();
 
         try {
-            digest = MessageDigest.getInstance ("SHA");
+            digest = MessageDigest.getInstance("SHA");
         } catch (NoSuchAlgorithmException e) {
             throw new InternalError("internal error: SHA-1 not available.", e);
         }
--- a/src/share/classes/sun/security/provider/SeedGenerator.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/provider/SeedGenerator.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,13 @@
 package sun.security.provider;
 
 /**
- * <P> This class generates seeds for the cryptographically strong random
- * number generator.
- * <P> The seed is produced using one of two techniques, via a computation
+ * This class generates seeds for the SHA1PRNG cryptographically strong
+ * random number generator.
+ * <p>
+ * The seed is produced using one of two techniques, via a computation
  * of current system activity or from an entropy gathering device.
- * <p> In the default technique the seed is  produced by counting the
+ * <p>
+ * In the default technique the seed is produced by counting the
  * number of times the VM manages to loop in a given period. This number
  * roughly reflects the machine load at that point in time.
  * The samples are translated using a permutation (s-box)
@@ -41,23 +43,24 @@
  * We also create a number of sleeper threads which add entropy
  * to the system by keeping the scheduler busy.
  * Twenty such samples should give us roughly 160 bits of randomness.
- * <P> These values are gathered in the background by a daemon thread
+ * <p>
+ * These values are gathered in the background by a daemon thread
  * thus allowing the system to continue performing it's different
  * activites, which in turn add entropy to the random seed.
- * <p> The class also gathers miscellaneous system information, some
+ * <p>
+ * The class also gathers miscellaneous system information, some
  * machine dependent, some not. This information is then hashed together
  * with the 20 seed bytes.
- * <P> The alternative to the above approach is to acquire seed material
+ * <p>
+ * The alternative to the above approach is to acquire seed material
  * from an entropy gathering device, such as /dev/random. This can be
- * accomplished by setting the value of the "securerandom.source"
- * security property (in the Java security properties file) to a URL
- * specifying the location of the entropy gathering device.
+ * accomplished by setting the value of the {@code securerandom.source}
+ * Security property to a URL specifying the location of the entropy
+ * gathering device, or by setting the {@code java.security.egd} System
+ * property.
+ * <p>
  * In the event the specified URL cannot be accessed the default
- * mechanism is used.
- * The Java security properties file is located in the file named
- * &lt;JAVA_HOME&gt;/lib/security/java.security.
- * &lt;JAVA_HOME&gt; refers to the value of the java.home system property,
- * and specifies the directory where the JRE is installed.
+ * threading mechanism is used.
  *
  * @author Joshua Bloch
  * @author Gadi Guy
@@ -81,27 +84,28 @@
 
     private static final Debug debug = Debug.getInstance("provider");
 
-    final static String URL_DEV_RANDOM = SunEntries.URL_DEV_RANDOM;
-    final static String URL_DEV_URANDOM = SunEntries.URL_DEV_URANDOM;
-
     // Static initializer to hook in selected or best performing generator
     static {
         String egdSource = SunEntries.getSeedSource();
 
-        // Try the URL specifying the source
-        // e.g. file:/dev/random
-        //
-        // The URL file:/dev/random or file:/dev/urandom is used to indicate
-        // the SeedGenerator using OS support, if available.
-        // On Windows, the causes MS CryptoAPI to be used.
-        // On Solaris and Linux, this is the identical to using
-        // URLSeedGenerator to read from /dev/random
-
-        if (egdSource.equals(URL_DEV_RANDOM) || egdSource.equals(URL_DEV_URANDOM)) {
+        /*
+         * Try the URL specifying the source (e.g. file:/dev/random)
+         *
+         * The URLs "file:/dev/random" or "file:/dev/urandom" are used to
+         * indicate the SeedGenerator should use OS support, if available.
+         *
+         * On Windows, this causes the MS CryptoAPI seeder to be used.
+         *
+         * On Solaris/Linux/MacOS, this is identical to using
+         * URLSeedGenerator to read from /dev/[u]random
+         */
+        if (egdSource.equals(SunEntries.URL_DEV_RANDOM) ||
+                egdSource.equals(SunEntries.URL_DEV_URANDOM)) {
             try {
-                instance = new NativeSeedGenerator();
+                instance = new NativeSeedGenerator(egdSource);
                 if (debug != null) {
-                    debug.println("Using operating system seed generator");
+                    debug.println(
+                        "Using operating system seed generator" + egdSource);
                 }
             } catch (IOException e) {
                 if (debug != null) {
@@ -117,9 +121,10 @@
                                   + egdSource);
                 }
             } catch (IOException e) {
-                if (debug != null)
+                if (debug != null) {
                     debug.println("Failed to create seed generator with "
                                   + egdSource + ": " + e.toString());
+                }
             }
         }
 
@@ -161,8 +166,8 @@
 
         java.security.AccessController.doPrivileged
             (new java.security.PrivilegedAction<Void>() {
+                @Override
                 public Void run() {
-
                     try {
                         // System properties can change from machine to machine
                         String s;
@@ -180,7 +185,9 @@
                         // The temporary dir
                         File f = new File(p.getProperty("java.io.tmpdir"));
                         int count = 0;
-                        try (DirectoryStream<Path> stream = Files.newDirectoryStream(f.toPath())) {
+                        try (
+                            DirectoryStream<Path> stream =
+                                Files.newDirectoryStream(f.toPath())) {
                             // We use a Random object to choose what file names
                             // should be used. Otherwise on a machine with too
                             // many files, the same first 1024 files always get
@@ -189,7 +196,8 @@
                             Random r = new Random();
                             for (Path entry: stream) {
                                 if (count < 512 || r.nextBoolean()) {
-                                    md.update(entry.getFileName().toString().getBytes());
+                                    md.update(entry.getFileName()
+                                        .toString().getBytes());
                                 }
                                 if (count++ > 1024) {
                                     break;
@@ -236,7 +244,8 @@
     */
 
 
-    private static class ThreadedSeedGenerator extends SeedGenerator implements Runnable {
+    private static class ThreadedSeedGenerator extends SeedGenerator
+            implements Runnable {
         // Queue is used to collect seed bytes
         private byte[] pool;
         private int start, end, count;
@@ -245,11 +254,10 @@
         ThreadGroup seedGroup;
 
         /**
-     * The constructor is only called once to construct the one
-     * instance we actually use. It instantiates the message digest
-     * and starts the thread going.
-     */
-
+         * The constructor is only called once to construct the one
+         * instance we actually use. It instantiates the message digest
+         * and starts the thread going.
+         */
         ThreadedSeedGenerator() {
             pool = new byte[20];
             start = end = 0;
@@ -266,16 +274,18 @@
             final ThreadGroup[] finalsg = new ThreadGroup[1];
             Thread t = java.security.AccessController.doPrivileged
                 (new java.security.PrivilegedAction<Thread>() {
+                        @Override
                         public Thread run() {
                             ThreadGroup parent, group =
                                 Thread.currentThread().getThreadGroup();
-                            while ((parent = group.getParent()) != null)
+                            while ((parent = group.getParent()) != null) {
                                 group = parent;
+                            }
                             finalsg[0] = new ThreadGroup
                                 (group, "SeedGenerator ThreadGroup");
                             Thread newT = new Thread(finalsg[0],
-                                                     ThreadedSeedGenerator.this,
-                                                     "SeedGenerator Thread");
+                                ThreadedSeedGenerator.this,
+                                "SeedGenerator Thread");
                             newT.setPriority(Thread.MIN_PRIORITY);
                             newT.setDaemon(true);
                             return newT;
@@ -289,21 +299,23 @@
          * This method does the actual work. It collects random bytes and
          * pushes them into the queue.
          */
+        @Override
         final public void run() {
             try {
                 while (true) {
                     // Queue full? Wait till there's room.
                     synchronized(this) {
-                        while (count >= pool.length)
+                        while (count >= pool.length) {
                             wait();
+                        }
                     }
 
                     int counter, quanta;
                     byte v = 0;
 
                     // Spin count must not be under 64000
-                    for (counter = quanta = 0; (counter < 64000) && (quanta < 6);
-                         quanta++) {
+                    for (counter = quanta = 0;
+                            (counter < 64000) && (quanta < 6); quanta++) {
 
                         // Start some noisy threads
                         try {
@@ -313,14 +325,12 @@
                             t.start();
                         } catch (Exception e) {
                             throw new InternalError("internal error: " +
-                                                    "SeedGenerator thread creation error."
-                                    , e);
+                                "SeedGenerator thread creation error.", e);
                         }
 
                         // We wait 250milli quanta, so the minimum wait time
                         // cannot be under 250milli.
                         int latch = 0;
-                        latch = 0;
                         long l = System.currentTimeMillis() + 250;
                         while (System.currentTimeMillis() < l) {
                             synchronized(this){};
@@ -339,16 +349,16 @@
                         pool[end] = v;
                         end++;
                         count++;
-                        if (end >= pool.length)
+                        if (end >= pool.length) {
                             end = 0;
+                        }
 
                         notifyAll();
                     }
                 }
             } catch (Exception e) {
                 throw new InternalError("internal error: " +
-                                        "SeedGenerator thread generated an exception."
-                        , e);
+                    "SeedGenerator thread generated an exception.", e);
             }
         }
 
@@ -360,19 +370,20 @@
         }
 
         byte getSeedByte() {
-            byte b = 0;
+            byte b;
 
             try {
                 // Wait for it...
                 synchronized(this) {
-                    while (count <= 0)
+                    while (count <= 0) {
                         wait();
+                    }
                 }
             } catch (Exception e) {
-                if (count <= 0)
+                if (count <= 0) {
                     throw new InternalError("internal error: " +
-                                            "SeedGenerator thread generated an exception."
-                            ,e);
+                        "SeedGenerator thread generated an exception.", e);
+                }
             }
 
             synchronized(this) {
@@ -381,8 +392,9 @@
                 pool[start] = 0;
                 start++;
                 count--;
-                if (start == pool.length)
+                if (start == pool.length) {
                     start = 0;
+                }
 
                 // Notify the daemon thread, just in case it is
                 // waiting for us to make room in the queue.
@@ -430,12 +442,13 @@
          * thus adding entropy to the system load.
          * At least one instance of this class is generated for every seed byte.
          */
-
         private static class BogusThread implements Runnable {
+            @Override
             final public void run() {
                 try {
-                    for(int i = 0; i < 5; i++)
+                    for (int i = 0; i < 5; i++) {
                         Thread.sleep(50);
+                    }
                     // System.gc();
                 } catch (Exception e) {
                 }
@@ -446,7 +459,7 @@
     static class URLSeedGenerator extends SeedGenerator {
 
         private String deviceName;
-        private InputStream devRandom;
+        private InputStream seedStream;
 
         /**
          * The constructor is only called once to construct the one
@@ -462,15 +475,12 @@
             init();
         }
 
-        URLSeedGenerator() throws IOException {
-            this(SeedGenerator.URL_DEV_RANDOM);
-        }
-
         private void init() throws IOException {
             final URL device = new URL(deviceName);
             try {
-                devRandom = java.security.AccessController.doPrivileged
+                seedStream = java.security.AccessController.doPrivileged
                     (new java.security.PrivilegedExceptionAction<InputStream>() {
+                        @Override
                         public InputStream run() throws IOException {
                             /*
                              * return a FileInputStream for file URLs and
@@ -481,7 +491,8 @@
                              * can be slow to replenish.
                              */
                             if (device.getProtocol().equalsIgnoreCase("file")) {
-                                File deviceFile = getDeviceFile(device);
+                                File deviceFile =
+                                    SunEntries.getDeviceFile(device);
                                 return new FileInputStream(deviceFile);
                             } else {
                                 return device.openStream();
@@ -489,36 +500,8 @@
                         }
                     });
             } catch (Exception e) {
-                throw new IOException("Failed to open " + deviceName, e.getCause());
-            }
-        }
-
-        /*
-         * Use a URI to access this File. Previous code used a URL
-         * which is less strict on syntax. If we encounter a
-         * URISyntaxException we make best efforts for backwards
-         * compatibility. e.g. space character in deviceName string.
-         *
-         * Method called within PrivilegedExceptionAction block.
-         */
-        private File getDeviceFile(URL device) throws IOException {
-            try {
-                URI deviceURI = device.toURI();
-                if(deviceURI.isOpaque()) {
-                    // File constructor does not accept opaque URI
-                    URI localDir = new File(System.getProperty("user.dir")).toURI();
-                    String uriPath = localDir.toString() +
-                                         deviceURI.toString().substring(5);
-                    return new File(URI.create(uriPath));
-                } else {
-                    return new File(deviceURI);
-                }
-            } catch (URISyntaxException use) {
-                /*
-                 * Make best effort to access this File.
-                 * We can try using the URL path.
-                 */
-                return new File(device.getPath());
+                throw new IOException(
+                    "Failed to open " + deviceName, e.getCause());
             }
         }
 
@@ -528,19 +511,19 @@
             int read = 0;
             try {
                 while (read < len) {
-                    int count = devRandom.read(result, read, len - read);
+                    int count = seedStream.read(result, read, len - read);
                     // /dev/random blocks - should never have EOF
-                    if (count < 0)
-                        throw new InternalError("URLSeedGenerator " + deviceName +
-                                        " reached end of file");
+                    if (count < 0) {
+                        throw new InternalError(
+                            "URLSeedGenerator " + deviceName +
+                            " reached end of file");
+                    }
                     read += count;
                 }
             } catch (IOException ioe) {
                 throw new InternalError("URLSeedGenerator " + deviceName +
-                                        " generated exception: " +
-                                        ioe.getMessage(), ioe);
+                    " generated exception: " + ioe.getMessage(), ioe);
             }
         }
-
     }
 }
--- a/src/share/classes/sun/security/provider/SunEntries.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/provider/SunEntries.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
 
 package sun.security.provider;
 
+import java.io.*;
+import java.net.*;
 import java.util.Map;
 import java.security.*;
 
@@ -92,26 +94,41 @@
         // if user selected /dev/urandom, we put it before SHA1PRNG,
         // otherwise after it
         boolean nativeAvailable = NativePRNG.isAvailable();
-        boolean useUrandom = seedSource.equals(URL_DEV_URANDOM);
-        if (nativeAvailable && useUrandom) {
+        boolean useNativePRNG = seedSource.equals(URL_DEV_URANDOM) ||
+            seedSource.equals(URL_DEV_RANDOM);
+
+        if (nativeAvailable && useNativePRNG) {
             map.put("SecureRandom.NativePRNG",
                 "sun.security.provider.NativePRNG");
         }
         map.put("SecureRandom.SHA1PRNG",
              "sun.security.provider.SecureRandom");
-        if (nativeAvailable && !useUrandom) {
+        if (nativeAvailable && !useNativePRNG) {
             map.put("SecureRandom.NativePRNG",
                 "sun.security.provider.NativePRNG");
         }
 
+        if (NativePRNG.Blocking.isAvailable()) {
+            map.put("SecureRandom.NativePRNGBlocking",
+                "sun.security.provider.NativePRNG$Blocking");
+        }
+
+        if (NativePRNG.NonBlocking.isAvailable()) {
+            map.put("SecureRandom.NativePRNGNonBlocking",
+                "sun.security.provider.NativePRNG$NonBlocking");
+        }
+
         /*
          * Signature engines
          */
-        map.put("Signature.SHA1withDSA", "sun.security.provider.DSA$SHA1withDSA");
+        map.put("Signature.SHA1withDSA",
+                "sun.security.provider.DSA$SHA1withDSA");
         map.put("Signature.NONEwithDSA", "sun.security.provider.DSA$RawDSA");
         map.put("Alg.Alias.Signature.RawDSA", "NONEwithDSA");
-        map.put("Signature.SHA224withDSA", "sun.security.provider.DSA$SHA224withDSA");
-        map.put("Signature.SHA256withDSA", "sun.security.provider.DSA$SHA256withDSA");
+        map.put("Signature.SHA224withDSA",
+                "sun.security.provider.DSA$SHA224withDSA");
+        map.put("Signature.SHA256withDSA",
+                "sun.security.provider.DSA$SHA256withDSA");
 
         String dsaKeyClasses = "java.security.interfaces.DSAPublicKey" +
                 "|java.security.interfaces.DSAPrivateKey";
@@ -128,13 +145,15 @@
         map.put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA");
         map.put("Alg.Alias.Signature.DSAWithSHA1", "SHA1withDSA");
         map.put("Alg.Alias.Signature.OID.1.2.840.10040.4.3",
-            "SHA1withDSA");
+                "SHA1withDSA");
         map.put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA");
         map.put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA");
         map.put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA");
-        map.put("Alg.Alias.Signature.OID.2.16.840.1.101.3.4.3.1", "SHA224withDSA");
+        map.put("Alg.Alias.Signature.OID.2.16.840.1.101.3.4.3.1",
+                "SHA224withDSA");
         map.put("Alg.Alias.Signature.2.16.840.1.101.3.4.3.1", "SHA224withDSA");
-        map.put("Alg.Alias.Signature.OID.2.16.840.1.101.3.4.3.2", "SHA256withDSA");
+        map.put("Alg.Alias.Signature.OID.2.16.840.1.101.3.4.3.2",
+                "SHA256withDSA");
         map.put("Alg.Alias.Signature.2.16.840.1.101.3.4.3.2", "SHA256withDSA");
 
         /*
@@ -160,17 +179,21 @@
 
         map.put("MessageDigest.SHA-224", "sun.security.provider.SHA2$SHA224");
         map.put("Alg.Alias.MessageDigest.2.16.840.1.101.3.4.2.4", "SHA-224");
-        map.put("Alg.Alias.MessageDigest.OID.2.16.840.1.101.3.4.2.4", "SHA-224");
+        map.put("Alg.Alias.MessageDigest.OID.2.16.840.1.101.3.4.2.4",
+                "SHA-224");
 
         map.put("MessageDigest.SHA-256", "sun.security.provider.SHA2$SHA256");
         map.put("Alg.Alias.MessageDigest.2.16.840.1.101.3.4.2.1", "SHA-256");
-        map.put("Alg.Alias.MessageDigest.OID.2.16.840.1.101.3.4.2.1", "SHA-256");
+        map.put("Alg.Alias.MessageDigest.OID.2.16.840.1.101.3.4.2.1",
+                "SHA-256");
         map.put("MessageDigest.SHA-384", "sun.security.provider.SHA5$SHA384");
         map.put("Alg.Alias.MessageDigest.2.16.840.1.101.3.4.2.2", "SHA-384");
-        map.put("Alg.Alias.MessageDigest.OID.2.16.840.1.101.3.4.2.2", "SHA-384");
+        map.put("Alg.Alias.MessageDigest.OID.2.16.840.1.101.3.4.2.2",
+                "SHA-384");
         map.put("MessageDigest.SHA-512", "sun.security.provider.SHA5$SHA512");
         map.put("Alg.Alias.MessageDigest.2.16.840.1.101.3.4.2.3", "SHA-512");
-        map.put("Alg.Alias.MessageDigest.OID.2.16.840.1.101.3.4.2.3", "SHA-512");
+        map.put("Alg.Alias.MessageDigest.OID.2.16.840.1.101.3.4.2.3",
+                "SHA-512");
 
         /*
          * Algorithm Parameter Generator engines
@@ -296,6 +319,7 @@
         seedSource = AccessController.doPrivileged(
                 new PrivilegedAction<String>() {
 
+            @Override
             public String run() {
                 String egdSource = System.getProperty(PROP_EGD, "");
                 if (egdSource.length() != 0) {
@@ -314,4 +338,36 @@
         return seedSource;
     }
 
+    /*
+     * Use a URI to access this File. Previous code used a URL
+     * which is less strict on syntax. If we encounter a
+     * URISyntaxException we make best efforts for backwards
+     * compatibility. e.g. space character in deviceName string.
+     *
+     * Method called within PrivilegedExceptionAction block.
+     *
+     * Moved from SeedGenerator to avoid initialization problems with
+     * signed providers.
+     */
+    static File getDeviceFile(URL device) throws IOException {
+        try {
+            URI deviceURI = device.toURI();
+            if(deviceURI.isOpaque()) {
+                // File constructor does not accept opaque URI
+                URI localDir = new File(
+                    System.getProperty("user.dir")).toURI();
+                String uriPath = localDir.toString() +
+                                     deviceURI.toString().substring(5);
+                return new File(URI.create(uriPath));
+            } else {
+                return new File(deviceURI);
+            }
+        } catch (URISyntaxException use) {
+            /*
+             * Make best effort to access this File.
+             * We can try using the URL path.
+             */
+            return new File(device.getPath());
+        }
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/security/ssl/Authenticator.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+import java.util.Arrays;
+
+/**
+ * This class represents an SSL/TLS message authentication token,
+ * which encapsulates a sequence number and ensures that attempts to
+ * delete or reorder messages can be detected.
+ *
+ * Each SSL/TLS connection state contains a sequence number, which
+ * is maintained separately for read and write states.  The sequence
+ * number MUST be set to zero whenever a connection state is made the
+ * active state.  Sequence numbers are of type uint64 and may not
+ * exceed 2^64-1.  Sequence numbers do not wrap.  If a SSL/TLS
+ * implementation would need to wrap a sequence number, it must
+ * renegotiate instead.  A sequence number is incremented after each
+ * record: specifically, the first record transmitted under a
+ * particular connection state MUST use sequence number 0.
+ */
+class Authenticator {
+
+    // byte array containing the additional authentication information for
+    // each record
+    private final byte[] block;
+
+    // the block size of SSL v3.0:
+    // sequence number + record type + + record length
+    private static final int BLOCK_SIZE_SSL = 8 + 1 + 2;
+
+    // the block size of TLS v1.0 and later:
+    // sequence number + record type + protocol version + record length
+    private static final int BLOCK_SIZE_TLS = 8 + 1 + 2 + 2;
+
+    /**
+     * Default construct, no message authentication token is initialized.
+     *
+     * Note that this construct can only be called for null MAC
+     */
+    Authenticator() {
+        block = new byte[0];
+    }
+
+    /**
+     * Constructs the message authentication token for the specified
+     * SSL/TLS protocol.
+     */
+    Authenticator(ProtocolVersion protocolVersion) {
+        if (protocolVersion.v >= ProtocolVersion.TLS10.v) {
+            block = new byte[BLOCK_SIZE_TLS];
+            block[9] = protocolVersion.major;
+            block[10] = protocolVersion.minor;
+        } else {
+            block = new byte[BLOCK_SIZE_SSL];
+        }
+    }
+
+    /**
+     * Checks whether the sequence number is close to wrap.
+     *
+     * Sequence numbers are of type uint64 and may not exceed 2^64-1.
+     * Sequence numbers do not wrap. When the sequence number is near
+     * to wrap, we need to close the connection immediately.
+     *
+     * @return true if the sequence number is close to wrap
+     */
+    final boolean seqNumOverflow() {
+        /*
+         * Conservatively, we don't allow more records to be generated
+         * when there are only 2^8 sequence numbers left.
+         */
+        return (block.length != 0 &&
+                block[0] == (byte)0xFF && block[1] == (byte)0xFF &&
+                block[2] == (byte)0xFF && block[3] == (byte)0xFF &&
+                block[4] == (byte)0xFF && block[5] == (byte)0xFF &&
+                block[6] == (byte)0xFF);
+    }
+
+    /**
+     * Checks whether the sequence number close to renew.
+     *
+     * Sequence numbers are of type uint64 and may not exceed 2^64-1.
+     * Sequence numbers do not wrap.  If a TLS
+     * implementation would need to wrap a sequence number, it must
+     * renegotiate instead.
+     *
+     * @return true if the sequence number is huge enough to renew
+     */
+    final boolean seqNumIsHuge() {
+        /*
+         * Conservatively, we should ask for renegotiation when there are
+         * only 2^48 sequence numbers left.
+         */
+        return (block.length != 0 &&
+                block[0] == (byte)0xFF && block[1] == (byte)0xFF);
+    }
+
+    /**
+     * Gets the current sequence number.
+     *
+     * @return the byte array of the current sequence number
+     */
+    final byte[] sequenceNumber() {
+        return Arrays.copyOf(block, 8);
+    }
+
+    /**
+     * Acquires the current message authentication information with the
+     * specified record type and fragment length, and then increases the
+     * sequence number.
+     *
+     * @param  type the record type
+     * @param  length the fragment of the record
+     * @return the byte array of the current message authentication information
+     */
+    final byte[] acquireAuthenticationBytes(byte type, int length) {
+        byte[] copy = block.clone();
+
+        if (block.length != 0) {
+            copy[8] = type;
+            copy[copy.length - 2] = (byte)(length >> 8);
+            copy[copy.length - 1] = (byte)(length);
+
+            /*
+             * Increase the sequence number in the block array
+             * it is a 64-bit number stored in big-endian format
+             */
+            int k = 7;
+            while ((k >= 0) && (++block[k] == 0)) {
+                k--;
+            }
+        }
+
+        return copy;
+    }
+
+}
--- a/src/share/classes/sun/security/ssl/CipherBox.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/ssl/CipherBox.java	Wed Apr 17 21:48:04 2013 -0700
@@ -29,15 +29,18 @@
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.util.Hashtable;
+import java.util.Arrays;
 
 import java.security.*;
 import javax.crypto.*;
 import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.GCMParameterSpec;
 
 import java.nio.*;
 
 import sun.security.ssl.CipherSuite.*;
 import static sun.security.ssl.CipherSuite.*;
+import static sun.security.ssl.CipherSuite.CipherType.*;
 
 import sun.misc.HexDumpEncoder;
 
@@ -102,19 +105,40 @@
     private final Cipher cipher;
 
     /**
-     * Cipher blocksize, 0 for stream ciphers
-     */
-    private int blockSize;
-
-    /**
      * secure random
      */
     private SecureRandom random;
 
     /**
-     * Is the cipher of CBC mode?
+     * fixed IV, the implicit nonce of AEAD cipher suite, only apply to
+     * AEAD cipher suites
+     */
+    private final byte[] fixedIv;
+
+    /**
+     * the key, reserved only for AEAD cipher initialization
+     */
+    private final Key key;
+
+    /**
+     * the operation mode, reserved for AEAD cipher initialization
      */
-    private final boolean isCBCMode;
+    private final int mode;
+
+    /**
+     * the authentication tag size, only apply to AEAD cipher suites
+     */
+    private final int tagSize;
+
+    /**
+     * the record IV length, only apply to AEAD cipher suites
+     */
+    private final int recordIvSize;
+
+    /**
+     * cipher type
+     */
+    private final CipherType cipherType;
 
     /**
      * Fixed masks of various block size, as the initial decryption IVs
@@ -132,7 +156,13 @@
     private CipherBox() {
         this.protocolVersion = ProtocolVersion.DEFAULT;
         this.cipher = null;
-        this.isCBCMode = false;
+        this.cipherType = STREAM_CIPHER;
+        this.fixedIv = new byte[0];
+        this.key = null;
+        this.mode = Cipher.ENCRYPT_MODE;    // choose at random
+        this.random = null;
+        this.tagSize = 0;
+        this.recordIvSize = 0;
     }
 
     /**
@@ -147,13 +177,13 @@
         try {
             this.protocolVersion = protocolVersion;
             this.cipher = JsseJce.getCipher(bulkCipher.transformation);
-            int mode = encrypt ? Cipher.ENCRYPT_MODE : Cipher.DECRYPT_MODE;
+            this.mode = encrypt ? Cipher.ENCRYPT_MODE : Cipher.DECRYPT_MODE;
 
             if (random == null) {
                 random = JsseJce.getSecureRandom();
             }
             this.random = random;
-            this.isCBCMode = bulkCipher.isCBCMode;
+            this.cipherType = bulkCipher.cipherType;
 
             /*
              * RFC 4346 recommends two algorithms used to generated the
@@ -171,14 +201,40 @@
                 iv = getFixedMask(bulkCipher.ivSize);
             }
 
-            cipher.init(mode, key, iv, random);
+            if (cipherType == AEAD_CIPHER) {
+                // AEAD must completely initialize the cipher for each packet,
+                // and so we save initialization parameters for packet
+                // processing time.
+
+                // Set the tag size for AEAD cipher
+                tagSize = bulkCipher.tagSize;
+
+                // Reserve the key for AEAD cipher initialization
+                this.key = key;
+
+                fixedIv = iv.getIV();
+                if (fixedIv == null ||
+                        fixedIv.length != bulkCipher.fixedIvSize) {
+                    throw new RuntimeException("Improper fixed IV for AEAD");
+                }
 
-            // Do not call getBlockSize until after init()
-            // otherwise we would disrupt JCE delayed provider selection
-            blockSize = cipher.getBlockSize();
-            // some providers implement getBlockSize() incorrectly
-            if (blockSize == 1) {
-                blockSize = 0;
+                // Set the record IV length for AEAD cipher
+                recordIvSize = bulkCipher.ivSize - bulkCipher.fixedIvSize;
+
+                // DON'T initialize the cipher for AEAD!
+            } else {
+                // CBC only requires one initialization during its lifetime
+                // (future packets/IVs set the proper CBC state), so we can
+                // initialize now.
+
+                // Zeroize the variables that only apply to AEAD cipher
+                this.tagSize = 0;
+                this.fixedIv = new byte[0];
+                this.recordIvSize = 0;
+                this.key = null;
+
+                // Initialize the cipher
+                cipher.init(mode, key, iv, random);
             }
         } catch (NoSuchAlgorithmException e) {
             throw e;
@@ -235,26 +291,11 @@
         }
 
         try {
-            if (blockSize != 0) {
-                // TLSv1.1 needs a IV block
-                if (protocolVersion.v >= ProtocolVersion.TLS11.v) {
-                    // generate a random number
-                    byte[] prefix = new byte[blockSize];
-                    random.nextBytes(prefix);
-
-                    // move forward the plaintext
-                    System.arraycopy(buf, offset,
-                                     buf, offset + prefix.length, len);
-
-                    // prefix the plaintext
-                    System.arraycopy(prefix, 0,
-                                     buf, offset, prefix.length);
-
-                    len += prefix.length;
-                }
-
+            int blockSize = cipher.getBlockSize();
+            if (cipherType == BLOCK_CIPHER) {
                 len = addPadding(buf, offset, len, blockSize);
             }
+
             if (debug != null && Debug.isOn("plaintext")) {
                 try {
                     HexDumpEncoder hd = new HexDumpEncoder();
@@ -267,14 +308,28 @@
                         System.out);
                 } catch (IOException e) { }
             }
-            int newLen = cipher.update(buf, offset, len, buf, offset);
-            if (newLen != len) {
-                // catch BouncyCastle buffering error
-                throw new RuntimeException("Cipher buffering error " +
-                    "in JCE provider " + cipher.getProvider().getName());
+
+
+            if (cipherType == AEAD_CIPHER) {
+                try {
+                    return cipher.doFinal(buf, offset, len, buf, offset);
+                } catch (IllegalBlockSizeException | BadPaddingException ibe) {
+                    // unlikely to happen
+                    throw new RuntimeException(
+                        "Cipher error in AEAD mode in JCE provider " +
+                        cipher.getProvider().getName(), ibe);
+                }
+            } else {
+                int newLen = cipher.update(buf, offset, len, buf, offset);
+                if (newLen != len) {
+                    // catch BouncyCastle buffering error
+                    throw new RuntimeException("Cipher buffering error " +
+                        "in JCE provider " + cipher.getProvider().getName());
+                }
+                return newLen;
             }
-            return newLen;
         } catch (ShortBufferException e) {
+            // unlikely to happen, we should have enough buffer space here
             throw new ArrayIndexOutOfBoundsException(e.toString());
         }
     }
@@ -288,7 +343,7 @@
      * set to last position padded/encrypted.  The limit may have changed
      * because of the added padding bytes.
      */
-    int encrypt(ByteBuffer bb) {
+    int encrypt(ByteBuffer bb, int outLimit) {
 
         int len = bb.remaining();
 
@@ -297,66 +352,71 @@
             return len;
         }
 
-        try {
-            int pos = bb.position();
+        int pos = bb.position();
 
-            if (blockSize != 0) {
-                // TLSv1.1 needs a IV block
-                if (protocolVersion.v >= ProtocolVersion.TLS11.v) {
-                    // generate a random number
-                    byte[] prefix = new byte[blockSize];
-                    random.nextBytes(prefix);
+        int blockSize = cipher.getBlockSize();
+        if (cipherType == BLOCK_CIPHER) {
+            // addPadding adjusts pos/limit
+            len = addPadding(bb, blockSize);
+            bb.position(pos);
+        }
 
-                    // move forward the plaintext
-                    byte[] buf = null;
-                    int limit = bb.limit();
-                    if (bb.hasArray()) {
-                        int arrayOffset = bb.arrayOffset();
-                        buf = bb.array();
-                        System.arraycopy(buf, arrayOffset + pos,
-                            buf, arrayOffset + pos + prefix.length,
-                            limit - pos);
-                        bb.limit(limit + prefix.length);
-                    } else {
-                        buf = new byte[limit - pos];
-                        bb.get(buf, 0, limit - pos);
-                        bb.position(pos + prefix.length);
-                        bb.limit(limit + prefix.length);
-                        bb.put(buf);
-                    }
-                    bb.position(pos);
+        if (debug != null && Debug.isOn("plaintext")) {
+            try {
+                HexDumpEncoder hd = new HexDumpEncoder();
+
+                System.out.println(
+                    "Padded plaintext before ENCRYPTION:  len = "
+                    + len);
+                hd.encodeBuffer(bb.duplicate(), System.out);
+
+            } catch (IOException e) { }
+        }
 
-                    // prefix the plaintext
-                    bb.put(prefix);
-                    bb.position(pos);
+        /*
+         * Encrypt "in-place".  This does not add its own padding.
+         */
+        ByteBuffer dup = bb.duplicate();
+        if (cipherType == AEAD_CIPHER) {
+            try {
+                int outputSize = cipher.getOutputSize(dup.remaining());
+                if (outputSize > bb.remaining()) {
+                    // need to expand the limit of the output buffer for
+                    // the authentication tag.
+                    //
+                    // DON'T worry about the buffer's capacity, we have
+                    // reserved space for the authentication tag.
+                    if (outLimit < pos + outputSize) {
+                        // unlikely to happen
+                        throw new ShortBufferException(
+                                    "need more space in output buffer");
+                    }
+                    bb.limit(pos + outputSize);
                 }
-
-                // addPadding adjusts pos/limit
-                len = addPadding(bb, blockSize);
-                bb.position(pos);
+                int newLen = cipher.doFinal(dup, bb);
+                if (newLen != outputSize) {
+                    throw new RuntimeException(
+                            "Cipher buffering error in JCE provider " +
+                            cipher.getProvider().getName());
+                }
+                return newLen;
+            } catch (IllegalBlockSizeException |
+                           BadPaddingException | ShortBufferException ibse) {
+                // unlikely to happen
+                throw new RuntimeException(
+                        "Cipher error in AEAD mode in JCE provider " +
+                        cipher.getProvider().getName(), ibse);
             }
-            if (debug != null && Debug.isOn("plaintext")) {
-                try {
-                    HexDumpEncoder hd = new HexDumpEncoder();
-
-                    System.out.println(
-                        "Padded plaintext before ENCRYPTION:  len = "
-                        + len);
-                    hd.encodeBuffer(bb, System.out);
-
-                } catch (IOException e) { }
-                /*
-                 * reset back to beginning
-                 */
-                bb.position(pos);
+        } else {
+            int newLen;
+            try {
+                newLen = cipher.update(dup, bb);
+            } catch (ShortBufferException sbe) {
+                // unlikely to happen
+                throw new RuntimeException("Cipher buffering error " +
+                    "in JCE provider " + cipher.getProvider().getName());
             }
 
-            /*
-             * Encrypt "in-place".  This does not add its own padding.
-             */
-            ByteBuffer dup = bb.duplicate();
-            int newLen = cipher.update(dup, bb);
-
             if (bb.position() != dup.position()) {
                 throw new RuntimeException("bytebuffer padding error");
             }
@@ -367,10 +427,6 @@
                     "in JCE provider " + cipher.getProvider().getName());
             }
             return newLen;
-        } catch (ShortBufferException e) {
-            RuntimeException exc = new RuntimeException(e.toString());
-            exc.initCause(e);
-            throw exc;
         }
     }
 
@@ -399,11 +455,23 @@
         }
 
         try {
-            int newLen = cipher.update(buf, offset, len, buf, offset);
-            if (newLen != len) {
-                // catch BouncyCastle buffering error
-                throw new RuntimeException("Cipher buffering error " +
-                    "in JCE provider " + cipher.getProvider().getName());
+            int newLen;
+            if (cipherType == AEAD_CIPHER) {
+                try {
+                    newLen = cipher.doFinal(buf, offset, len, buf, offset);
+                } catch (IllegalBlockSizeException ibse) {
+                    // unlikely to happen
+                    throw new RuntimeException(
+                        "Cipher error in AEAD mode in JCE provider " +
+                        cipher.getProvider().getName(), ibse);
+                }
+            } else {
+                newLen = cipher.update(buf, offset, len, buf, offset);
+                if (newLen != len) {
+                    // catch BouncyCastle buffering error
+                    throw new RuntimeException("Cipher buffering error " +
+                        "in JCE provider " + cipher.getProvider().getName());
+                }
             }
             if (debug != null && Debug.isOn("plaintext")) {
                 try {
@@ -418,7 +486,8 @@
                 } catch (IOException e) { }
             }
 
-            if (blockSize != 0) {
+            if (cipherType == BLOCK_CIPHER) {
+                int blockSize = cipher.getBlockSize();
                 newLen = removePadding(
                     buf, offset, newLen, tagLen, blockSize, protocolVersion);
 
@@ -426,16 +495,11 @@
                     if (newLen < blockSize) {
                         throw new BadPaddingException("invalid explicit IV");
                     }
-
-                    // discards the first cipher block, the IV component.
-                    System.arraycopy(buf, offset + blockSize,
-                                     buf, offset, newLen - blockSize);
-
-                    newLen -= blockSize;
                 }
             }
             return newLen;
         } catch (ShortBufferException e) {
+            // unlikely to happen, we should have enough buffer space here
             throw new ArrayIndexOutOfBoundsException(e.toString());
         }
     }
@@ -465,13 +529,28 @@
              */
             int pos = bb.position();
             ByteBuffer dup = bb.duplicate();
-            int newLen = cipher.update(dup, bb);
-            if (newLen != len) {
-                // catch BouncyCastle buffering error
-                throw new RuntimeException("Cipher buffering error " +
-                    "in JCE provider " + cipher.getProvider().getName());
+            int newLen;
+            if (cipherType == AEAD_CIPHER) {
+                try {
+                    newLen = cipher.doFinal(dup, bb);
+                } catch (IllegalBlockSizeException ibse) {
+                    // unlikely to happen
+                    throw new RuntimeException(
+                        "Cipher error in AEAD mode \"" + ibse.getMessage() +
+                        " \"in JCE provider " + cipher.getProvider().getName());
+                }
+            } else {
+                newLen = cipher.update(dup, bb);
+                if (newLen != len) {
+                    // catch BouncyCastle buffering error
+                    throw new RuntimeException("Cipher buffering error " +
+                        "in JCE provider " + cipher.getProvider().getName());
+                }
             }
 
+            // reset the limit to the end of the decryted data
+            bb.limit(pos + newLen);
+
             if (debug != null && Debug.isOn("plaintext")) {
                 try {
                     HexDumpEncoder hd = new HexDumpEncoder();
@@ -488,44 +567,25 @@
             /*
              * Remove the block padding.
              */
-            if (blockSize != 0) {
+            if (cipherType == BLOCK_CIPHER) {
+                int blockSize = cipher.getBlockSize();
                 bb.position(pos);
-                newLen = removePadding(
-                    bb, tagLen, blockSize, protocolVersion);
+                newLen = removePadding(bb, tagLen, blockSize, protocolVersion);
 
+                // check the explicit IV of TLS v1.1 or later
                 if (protocolVersion.v >= ProtocolVersion.TLS11.v) {
                     if (newLen < blockSize) {
                         throw new BadPaddingException("invalid explicit IV");
                     }
 
-                    // discards the first cipher block, the IV component.
-                    byte[] buf = null;
-                    int limit = bb.limit();
-                    if (bb.hasArray()) {
-                        int arrayOffset = bb.arrayOffset();
-                        buf = bb.array();
-                        System.arraycopy(buf, arrayOffset + pos + blockSize,
-                            buf, arrayOffset + pos, limit - pos - blockSize);
-                        bb.limit(limit - blockSize);
-                    } else {
-                        buf = new byte[limit - pos - blockSize];
-                        bb.position(pos + blockSize);
-                        bb.get(buf);
-                        bb.position(pos);
-                        bb.put(buf);
-                        bb.limit(limit - blockSize);
-                    }
-
                     // reset the position to the end of the decrypted data
-                    limit = bb.limit();
-                    bb.position(limit);
+                    bb.position(bb.limit());
                 }
             }
             return newLen;
         } catch (ShortBufferException e) {
-            RuntimeException exc = new RuntimeException(e.toString());
-            exc.initCause(e);
-            throw exc;
+            // unlikely to happen, we should have enough buffer space here
+            throw new ArrayIndexOutOfBoundsException(e.toString());
         }
     }
 
@@ -766,8 +826,8 @@
                 // ignore return value.
                 cipher.doFinal();
             }
-        } catch (GeneralSecurityException e) {
-            // swallow for now.
+        } catch (Exception e) {
+            // swallow all types of exceptions.
         }
     }
 
@@ -777,10 +837,19 @@
      * @return true if the cipher use CBC mode, false otherwise.
      */
     boolean isCBCMode() {
-        return isCBCMode;
+        return cipherType == BLOCK_CIPHER;
     }
 
-    /**
+    /*
+     * Does the cipher use AEAD mode?
+     *
+     * @return true if the cipher use AEAD mode, false otherwise.
+     */
+    boolean isAEADMode() {
+        return cipherType == AEAD_CIPHER;
+    }
+
+    /*
      * Is the cipher null?
      *
      * @return true if the cipher is null, false otherwise.
@@ -789,6 +858,226 @@
         return cipher == null;
     }
 
+    /*
+     * Gets the explicit nonce/IV size of the cipher.
+     *
+     * The returned value is the SecurityParameters.record_iv_length in
+     * RFC 4346/5246.  It is the size of explicit IV for CBC mode, and the
+     * size of explicit nonce for AEAD mode.
+     *
+     * @return the explicit nonce size of the cipher.
+     */
+    int getExplicitNonceSize() {
+        switch (cipherType) {
+            case BLOCK_CIPHER:
+                // For block ciphers, the explicit IV length is of length
+                // SecurityParameters.record_iv_length, which is equal to
+                // the SecurityParameters.block_size.
+                if (protocolVersion.v >= ProtocolVersion.TLS11.v) {
+                    return cipher.getBlockSize();
+                }
+                break;
+            case AEAD_CIPHER:
+                return recordIvSize;
+                        // It is also the length of sequence number, which is
+                        // used as the nonce_explicit for AEAD cipher suites.
+        }
+
+        return 0;
+    }
+
+    /*
+     * Applies the explicit nonce/IV to this cipher. This method is used to
+     * decrypt an SSL/TLS input record.
+     *
+     * The returned value is the SecurityParameters.record_iv_length in
+     * RFC 4346/5246.  It is the size of explicit IV for CBC mode, and the
+     * size of explicit nonce for AEAD mode.
+     *
+     * @param  authenticator the authenticator to get the additional
+     *         authentication data
+     * @param  contentType the content type of the input record
+     * @param  bb the byte buffer to get the explicit nonce from
+     *
+     * @return the explicit nonce size of the cipher.
+     */
+    int applyExplicitNonce(Authenticator authenticator, byte contentType,
+            ByteBuffer bb) throws BadPaddingException {
+        switch (cipherType) {
+            case BLOCK_CIPHER:
+                // sanity check length of the ciphertext
+                int tagLen = (authenticator instanceof MAC) ?
+                                    ((MAC)authenticator).MAClen() : 0;
+                if (tagLen != 0) {
+                    if (!sanityCheck(tagLen, bb.remaining())) {
+                        throw new BadPaddingException(
+                                "ciphertext sanity check failed");
+                    }
+                }
+
+                // For block ciphers, the explicit IV length is of length
+                // SecurityParameters.record_iv_length, which is equal to
+                // the SecurityParameters.block_size.
+                if (protocolVersion.v >= ProtocolVersion.TLS11.v) {
+                    return cipher.getBlockSize();
+                }
+                break;
+            case AEAD_CIPHER:
+                if (bb.remaining() < (recordIvSize + tagSize)) {
+                    throw new BadPaddingException(
+                                        "invalid AEAD cipher fragment");
+                }
+
+                // initialize the AEAD cipher for the unique IV
+                byte[] iv = Arrays.copyOf(fixedIv,
+                                    fixedIv.length + recordIvSize);
+                bb.get(iv, fixedIv.length, recordIvSize);
+                bb.position(bb.position() - recordIvSize);
+                GCMParameterSpec spec = new GCMParameterSpec(tagSize * 8, iv);
+                try {
+                    cipher.init(mode, key, spec, random);
+                } catch (InvalidKeyException |
+                            InvalidAlgorithmParameterException ikae) {
+                    // unlikely to happen
+                    throw new RuntimeException(
+                                "invalid key or spec in GCM mode", ikae);
+                }
+
+                // update the additional authentication data
+                byte[] aad = authenticator.acquireAuthenticationBytes(
+                        contentType, bb.remaining() - recordIvSize - tagSize);
+                cipher.updateAAD(aad);
+
+                return recordIvSize;
+                        // It is also the length of sequence number, which is
+                        // used as the nonce_explicit for AEAD cipher suites.
+        }
+
+       return 0;
+    }
+
+    /*
+     * Applies the explicit nonce/IV to this cipher. This method is used to
+     * decrypt an SSL/TLS input record.
+     *
+     * The returned value is the SecurityParameters.record_iv_length in
+     * RFC 4346/5246.  It is the size of explicit IV for CBC mode, and the
+     * size of explicit nonce for AEAD mode.
+     *
+     * @param  authenticator the authenticator to get the additional
+     *         authentication data
+     * @param  contentType the content type of the input record
+     * @param  buf the byte array to get the explicit nonce from
+     * @param  offset the offset of the byte buffer
+     * @param  cipheredLength the ciphered fragment length of the output
+     *         record, it is the TLSCiphertext.length in RFC 4346/5246.
+     *
+     * @return the explicit nonce size of the cipher.
+     */
+    int applyExplicitNonce(Authenticator authenticator,
+            byte contentType, byte[] buf, int offset,
+            int cipheredLength) throws BadPaddingException {
+
+        ByteBuffer bb = ByteBuffer.wrap(buf, offset, cipheredLength);
+
+        return applyExplicitNonce(authenticator, contentType, bb);
+    }
+
+    /*
+     * Creates the explicit nonce/IV to this cipher. This method is used to
+     * encrypt an SSL/TLS output record.
+     *
+     * The size of the returned array is the SecurityParameters.record_iv_length
+     * in RFC 4346/5246.  It is the size of explicit IV for CBC mode, and the
+     * size of explicit nonce for AEAD mode.
+     *
+     * @param  authenticator the authenticator to get the additional
+     *         authentication data
+     * @param  contentType the content type of the input record
+     * @param  fragmentLength the fragment length of the output record, it is
+     *         the TLSCompressed.length in RFC 4346/5246.
+     *
+     * @return the explicit nonce of the cipher.
+     */
+    byte[] createExplicitNonce(Authenticator authenticator,
+            byte contentType, int fragmentLength) {
+
+        byte[] nonce = new byte[0];
+        switch (cipherType) {
+            case BLOCK_CIPHER:
+                if (protocolVersion.v >= ProtocolVersion.TLS11.v) {
+                    // For block ciphers, the explicit IV length is of length
+                    // SecurityParameters.record_iv_length, which is equal to
+                    // the SecurityParameters.block_size.
+                    //
+                    // Generate a random number as the explicit IV parameter.
+                    nonce = new byte[cipher.getBlockSize()];
+                    random.nextBytes(nonce);
+                }
+                break;
+            case AEAD_CIPHER:
+                // To be unique and aware of overflow-wrap, sequence number
+                // is used as the nonce_explicit of AEAD cipher suites.
+                nonce = authenticator.sequenceNumber();
+
+                // initialize the AEAD cipher for the unique IV
+                byte[] iv = Arrays.copyOf(fixedIv,
+                                            fixedIv.length + nonce.length);
+                System.arraycopy(nonce, 0, iv, fixedIv.length, nonce.length);
+                GCMParameterSpec spec = new GCMParameterSpec(tagSize * 8, iv);
+                try {
+                    cipher.init(mode, key, spec, random);
+                } catch (InvalidKeyException |
+                            InvalidAlgorithmParameterException ikae) {
+                    // unlikely to happen
+                    throw new RuntimeException(
+                                "invalid key or spec in GCM mode", ikae);
+                }
+
+                // update the additional authentication data
+                byte[] aad = authenticator.acquireAuthenticationBytes(
+                                                contentType, fragmentLength);
+                cipher.updateAAD(aad);
+                break;
+        }
+
+        return nonce;
+    }
+
+    /*
+     * Is this cipher available?
+     *
+     * This method can only be called by CipherSuite.BulkCipher.isAvailable()
+     * to test the availability of a cipher suites.  Please DON'T use it in
+     * other places, otherwise, the behavior may be unexpected because we may
+     * initialize AEAD cipher improperly in the method.
+     */
+    Boolean isAvailable() {
+        // We won't know whether a cipher for a particular key size is
+        // available until the cipher is successfully initialized.
+        //
+        // We do not initialize AEAD cipher in the constructor.  Need to
+        // initialize the cipher to ensure that the AEAD mode for a
+        // particular key size is supported.
+        if (cipherType == AEAD_CIPHER) {
+            try {
+                Authenticator authenticator =
+                    new Authenticator(protocolVersion);
+                byte[] nonce = authenticator.sequenceNumber();
+                byte[] iv = Arrays.copyOf(fixedIv,
+                                            fixedIv.length + nonce.length);
+                System.arraycopy(nonce, 0, iv, fixedIv.length, nonce.length);
+                GCMParameterSpec spec = new GCMParameterSpec(tagSize * 8, iv);
+
+                cipher.init(mode, key, spec, random);
+            } catch (Exception e) {
+                return Boolean.FALSE;
+            }
+        }   // Otherwise, we have initialized the cipher in the constructor.
+
+        return Boolean.TRUE;
+    }
+
     /**
      * Sanity check the length of a fragment before decryption.
      *
@@ -802,11 +1091,12 @@
      *
      * @return true if the length of a fragment matches above requirements
      */
-    boolean sanityCheck(int tagLen, int fragmentLen) {
-        if (!isCBCMode) {
+    private boolean sanityCheck(int tagLen, int fragmentLen) {
+        if (!isCBCMode()) {
             return fragmentLen >= tagLen;
         }
 
+        int blockSize = cipher.getBlockSize();
         if ((fragmentLen % blockSize) == 0) {
             int minimal = tagLen + 1;
             minimal = (minimal >= blockSize) ? minimal : blockSize;
--- a/src/share/classes/sun/security/ssl/CipherSuite.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/ssl/CipherSuite.java	Wed Apr 17 21:48:04 2013 -0700
@@ -33,12 +33,14 @@
 import java.security.SecureRandom;
 import java.security.KeyManagementException;
 
+import javax.crypto.Cipher;
 import javax.crypto.SecretKey;
 import javax.crypto.spec.IvParameterSpec;
 import javax.crypto.spec.SecretKeySpec;
 
 import static sun.security.ssl.CipherSuite.KeyExchange.*;
 import static sun.security.ssl.CipherSuite.PRF.*;
+import static sun.security.ssl.CipherSuite.CipherType.*;
 import static sun.security.ssl.JsseJce.*;
 
 /**
@@ -135,7 +137,9 @@
         this.keyExchange = keyExchange;
         this.cipher = cipher;
         this.exportable = cipher.exportable;
-        if (name.endsWith("_MD5")) {
+        if (cipher.cipherType == CipherType.AEAD_CIPHER) {
+            macAlg = M_NULL;
+        } else if (name.endsWith("_MD5")) {
             macAlg = M_MD5;
         } else if (name.endsWith("_SHA")) {
             macAlg = M_SHA;
@@ -385,6 +389,12 @@
         }
     }
 
+    static enum CipherType {
+        STREAM_CIPHER,         // null or stream cipher
+        BLOCK_CIPHER,          // block cipher in CBC mode
+        AEAD_CIPHER            // AEAD cipher
+    }
+
     /**
      * An SSL/TLS bulk cipher algorithm. One instance per combination of
      * cipher and key length.
@@ -417,14 +427,26 @@
         // for non-exportable ciphers, this is the same as keySize
         final int expandedKeySize;
 
-        // size of the IV (also block size)
+        // size of the IV
         final int ivSize;
 
+        // size of fixed IV
+        //
+        // record_iv_length = ivSize - fixedIvSize
+        final int fixedIvSize;
+
         // exportable under 512/40 bit rules
         final boolean exportable;
 
         // Is the cipher algorithm of Cipher Block Chaining (CBC) mode?
-        final boolean isCBCMode;
+        final CipherType cipherType;
+
+        // size of the authentication tag, only applicable to cipher suites in
+        // Galois Counter Mode (GCM)
+        //
+        // As far as we know, all supported GCM cipher suites use 128-bits
+        // authentication tags.
+        final int tagSize = 16;
 
         // The secure random used to detect the cipher availability.
         private final static SecureRandom secureRandom;
@@ -437,32 +459,34 @@
             }
         }
 
-        BulkCipher(String transformation, int keySize,
-                int expandedKeySize, int ivSize, boolean allowed) {
+        BulkCipher(String transformation, CipherType cipherType, int keySize,
+                int expandedKeySize, int ivSize,
+                int fixedIvSize, boolean allowed) {
+
             this.transformation = transformation;
             String[] splits = transformation.split("/");
             this.algorithm = splits[0];
-            this.isCBCMode =
-                splits.length <= 1 ? false : "CBC".equalsIgnoreCase(splits[1]);
+            this.cipherType = cipherType;
             this.description = this.algorithm + "/" + (keySize << 3);
             this.keySize = keySize;
             this.ivSize = ivSize;
+            this.fixedIvSize = fixedIvSize;
             this.allowed = allowed;
 
             this.expandedKeySize = expandedKeySize;
             this.exportable = true;
         }
 
-        BulkCipher(String transformation, int keySize,
-                int ivSize, boolean allowed) {
+        BulkCipher(String transformation, CipherType cipherType, int keySize,
+                int ivSize, int fixedIvSize, boolean allowed) {
             this.transformation = transformation;
             String[] splits = transformation.split("/");
             this.algorithm = splits[0];
-            this.isCBCMode =
-                splits.length <= 1 ? false : "CBC".equalsIgnoreCase(splits[1]);
+            this.cipherType = cipherType;
             this.description = this.algorithm + "/" + (keySize << 3);
             this.keySize = keySize;
             this.ivSize = ivSize;
+            this.fixedIvSize = fixedIvSize;
             this.allowed = allowed;
 
             this.expandedKeySize = keySize;
@@ -486,16 +510,20 @@
          * Test if this bulk cipher is available. For use by CipherSuite.
          *
          * Currently all supported ciphers except AES are always available
-         * via the JSSE internal implementations. We also assume AES/128
-         * is always available since it is shipped with the SunJCE provider.
-         * However, AES/256 is unavailable when the default JCE policy
-         * jurisdiction files are installed because of key length restrictions.
+         * via the JSSE internal implementations. We also assume AES/128 of
+         * CBC mode is always available since it is shipped with the SunJCE
+         * provider.  However, AES/256 is unavailable when the default JCE
+         * policy jurisdiction files are installed because of key length
+         * restrictions, and AEAD is unavailable when the underlying providers
+         * do not support AEAD/GCM mode.
          */
         boolean isAvailable() {
             if (allowed == false) {
                 return false;
             }
-            if (this == B_AES_256) {
+
+            if ((this == B_AES_256) ||
+                    (this.cipherType == CipherType.AEAD_CIPHER)) {
                 return isAvailable(this);
             }
 
@@ -513,19 +541,50 @@
         private static synchronized boolean isAvailable(BulkCipher cipher) {
             Boolean b = availableCache.get(cipher);
             if (b == null) {
-                try {
-                    SecretKey key = new SecretKeySpec
-                        (new byte[cipher.expandedKeySize], cipher.algorithm);
-                    IvParameterSpec iv =
-                        new IvParameterSpec(new byte[cipher.ivSize]);
-                    cipher.newCipher(ProtocolVersion.DEFAULT,
+                int keySizeInBits = cipher.keySize * 8;
+                if (keySizeInBits > 128) {    // need the JCE unlimited
+                                               // strength jurisdiction policy
+                    try {
+                        if (Cipher.getMaxAllowedKeyLength(
+                                cipher.transformation) < keySizeInBits) {
+                            b = Boolean.FALSE;
+                        }
+                    } catch (Exception e) {
+                        b = Boolean.FALSE;
+                    }
+                }
+
+                if (b == null) {
+                    b = Boolean.FALSE;          // may be reset to TRUE if
+                                                // the cipher is available
+                    CipherBox temporary = null;
+                    try {
+                        SecretKey key = new SecretKeySpec(
+                                            new byte[cipher.expandedKeySize],
+                                            cipher.algorithm);
+                        IvParameterSpec iv;
+                        if (cipher.cipherType == CipherType.AEAD_CIPHER) {
+                            iv = new IvParameterSpec(
+                                            new byte[cipher.fixedIvSize]);
+                        } else {
+                            iv = new IvParameterSpec(new byte[cipher.ivSize]);
+                        }
+                        temporary = cipher.newCipher(
+                                            ProtocolVersion.DEFAULT,
                                             key, iv, secureRandom, true);
-                    b = Boolean.TRUE;
-                } catch (NoSuchAlgorithmException e) {
-                    b = Boolean.FALSE;
+                        b = temporary.isAvailable();
+                    } catch (NoSuchAlgorithmException e) {
+                        // not available
+                    } finally {
+                        if (temporary != null) {
+                            temporary.dispose();
+                        }
+                    }
                 }
+
                 availableCache.put(cipher, b);
             }
+
             return b.booleanValue();
         }
 
@@ -582,27 +641,31 @@
 
     // export strength ciphers
     final static BulkCipher B_NULL    =
-                        new BulkCipher("NULL",         0,  0, 0, true);
+        new BulkCipher("NULL",          STREAM_CIPHER,    0,  0,  0, 0, true);
     final static BulkCipher B_RC4_40  =
-                        new BulkCipher(CIPHER_RC4,     5, 16, 0, true);
+        new BulkCipher(CIPHER_RC4,      STREAM_CIPHER,    5, 16,  0, 0, true);
     final static BulkCipher B_RC2_40  =
-                        new BulkCipher("RC2",          5, 16, 8, false);
+        new BulkCipher("RC2",           BLOCK_CIPHER,     5, 16,  8, 0, false);
     final static BulkCipher B_DES_40  =
-                        new BulkCipher(CIPHER_DES,     5,  8, 8, true);
+        new BulkCipher(CIPHER_DES,      BLOCK_CIPHER,     5,  8,  8, 0, true);
 
     // domestic strength ciphers
     final static BulkCipher B_RC4_128 =
-                        new BulkCipher(CIPHER_RC4,     16,  0, true);
+        new BulkCipher(CIPHER_RC4,      STREAM_CIPHER,   16,  0,  0, true);
     final static BulkCipher B_DES     =
-                        new BulkCipher(CIPHER_DES,      8,  8, true);
+        new BulkCipher(CIPHER_DES,      BLOCK_CIPHER,     8,  8,  0, true);
     final static BulkCipher B_3DES    =
-                        new BulkCipher(CIPHER_3DES,    24,  8, true);
+        new BulkCipher(CIPHER_3DES,     BLOCK_CIPHER,    24,  8,  0, true);
     final static BulkCipher B_IDEA    =
-                        new BulkCipher("IDEA",         16,  8, false);
+        new BulkCipher("IDEA",          BLOCK_CIPHER,    16,  8,  0, false);
     final static BulkCipher B_AES_128 =
-                        new BulkCipher(CIPHER_AES,     16, 16, true);
+        new BulkCipher(CIPHER_AES,      BLOCK_CIPHER,    16, 16,  0, true);
     final static BulkCipher B_AES_256 =
-                        new BulkCipher(CIPHER_AES,     32, 16, true);
+        new BulkCipher(CIPHER_AES,      BLOCK_CIPHER,    32, 16,  0, true);
+    final static BulkCipher B_AES_128_GCM =
+        new BulkCipher(CIPHER_AES_GCM,  AEAD_CIPHER,     16, 12,  4, true);
+    final static BulkCipher B_AES_256_GCM =
+        new BulkCipher(CIPHER_AES_GCM,  AEAD_CIPHER,     32, 12,  4, true);
 
     // MACs
     final static MacAlg M_NULL    = new MacAlg("NULL",     0,   0,   0);
@@ -902,11 +965,13 @@
          * Definition of the CipherSuites that are enabled by default.
          * They are listed in preference order, most preferred first, using
          * the following criteria:
-         * 1. Prefer the stronger buld cipher, in the order of AES_256,
-         *    AES_128, RC-4, 3DES-EDE.
-         * 2. Prefer the stronger MAC algorithm, in the order of SHA384,
+         * 1. Prefer Suite B compliant cipher suites, see RFC6460 (To be
+         *    changed later, see below).
+         * 2. Prefer the stronger bulk cipher, in the order of AES_256(GCM),
+         *    AES_128(GCM), AES_256, AES_128, RC-4, 3DES-EDE.
+         * 3. Prefer the stronger MAC algorithm, in the order of SHA384,
          *    SHA256, SHA, MD5.
-         * 3. Prefer the better performance of key exchange and digital
+         * 4. Prefer the better performance of key exchange and digital
          *    signature algorithm, in the order of ECDHE-ECDSA, ECDHE-RSA,
          *    RSA, ECDH-ECDSA, ECDH-RSA, DHE-RSA, DHE-DSS.
          */
@@ -919,6 +984,16 @@
 
         //  ID           Key Exchange   Cipher     A  obs  suprt  PRF
         //  ======       ============   =========  =  ===  =====  ========
+
+
+        // Placeholder for cipher suites in GCM mode.
+        //
+        // For better compatibility and interoperability, we decrease the
+        // priority of cipher suites in GCM mode for a while as GCM
+        // technologies mature in the industry.  Eventually we'll move
+        // the GCM suites here.
+
+        // AES_256(CBC)
         add("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",
             0xc024, --p, K_ECDHE_ECDSA, B_AES_256, T, max, tls12, P_SHA384);
         add("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",
@@ -949,6 +1024,7 @@
         add("TLS_DHE_DSS_WITH_AES_256_CBC_SHA",
             0x0038, --p, K_DHE_DSS,     B_AES_256, T);
 
+        // AES_128(CBC)
         add("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
             0xc023, --p, K_ECDHE_ECDSA, B_AES_128, T, max, tls12, P_SHA256);
         add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
@@ -979,6 +1055,7 @@
         add("TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
             0x0032, --p, K_DHE_DSS,     B_AES_128, T);
 
+        // RC-4
         add("TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
             0xC007, --p, K_ECDHE_ECDSA, B_RC4_128, N);
         add("TLS_ECDHE_RSA_WITH_RC4_128_SHA",
@@ -990,6 +1067,51 @@
         add("TLS_ECDH_RSA_WITH_RC4_128_SHA",
             0xC00C, --p, K_ECDH_RSA,    B_RC4_128, N);
 
+        // Cipher suites in GCM mode, see RFC 5288/5289.
+        //
+        // We may increase the priority of cipher suites in GCM mode when
+        // GCM technologies become mature in the industry.
+
+        // Suite B compliant cipher suites, see RFC 6460.
+        //
+        // Note that, at present this provider is not Suite B compliant. The
+        // preference order of the GCM cipher suites does not follow the spec
+        // of RFC 6460.
+        add("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+            0xc02c, --p, K_ECDHE_ECDSA, B_AES_256_GCM, T, max, tls12, P_SHA384);
+        add("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+            0xc02b, --p, K_ECDHE_ECDSA, B_AES_128_GCM, T, max, tls12, P_SHA256);
+
+        // AES_256(GCM)
+        add("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+            0xc030, --p, K_ECDHE_RSA,   B_AES_256_GCM, T, max, tls12, P_SHA384);
+        add("TLS_RSA_WITH_AES_256_GCM_SHA384",
+            0x009d, --p, K_RSA,         B_AES_256_GCM, T, max, tls12, P_SHA384);
+        add("TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384",
+            0xc02e, --p, K_ECDH_ECDSA,  B_AES_256_GCM, T, max, tls12, P_SHA384);
+        add("TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384",
+            0xc032, --p, K_ECDH_RSA,    B_AES_256_GCM, T, max, tls12, P_SHA384);
+        add("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",
+            0x009f, --p, K_DHE_RSA,     B_AES_256_GCM, T, max, tls12, P_SHA384);
+        add("TLS_DHE_DSS_WITH_AES_256_GCM_SHA384",
+            0x00a3, --p, K_DHE_DSS,     B_AES_256_GCM, T, max, tls12, P_SHA384);
+
+        // AES_128(GCM)
+        add("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+            0xc02f, --p, K_ECDHE_RSA,   B_AES_128_GCM, T, max, tls12, P_SHA256);
+        add("TLS_RSA_WITH_AES_128_GCM_SHA256",
+            0x009c, --p, K_RSA,         B_AES_128_GCM, T, max, tls12, P_SHA256);
+        add("TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",
+            0xc02d, --p, K_ECDH_ECDSA,  B_AES_128_GCM, T, max, tls12, P_SHA256);
+        add("TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",
+            0xc031, --p, K_ECDH_RSA,    B_AES_128_GCM, T, max, tls12, P_SHA256);
+        add("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
+            0x009e, --p, K_DHE_RSA,     B_AES_128_GCM, T, max, tls12, P_SHA256);
+        add("TLS_DHE_DSS_WITH_AES_128_GCM_SHA256",
+            0x00a2, --p, K_DHE_DSS,     B_AES_128_GCM, T, max, tls12, P_SHA256);
+        // End of cipher suites in GCM mode.
+
+        // 3DES_EDE
         add("TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
             0xC008, --p, K_ECDHE_ECDSA, B_3DES,    T);
         add("TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
@@ -1033,17 +1155,22 @@
          */
         p = DEFAULT_SUITES_PRIORITY;
 
+        add("TLS_DH_anon_WITH_AES_256_GCM_SHA384",
+            0x00a7, --p, K_DH_ANON,     B_AES_256_GCM, N, max, tls12, P_SHA384);
+        add("TLS_DH_anon_WITH_AES_128_GCM_SHA256",
+            0x00a6, --p, K_DH_ANON,     B_AES_128_GCM, N, max, tls12, P_SHA256);
+
         add("TLS_DH_anon_WITH_AES_256_CBC_SHA256",
             0x006d, --p, K_DH_ANON,     B_AES_256, N, max, tls12, P_SHA256);
         add("TLS_ECDH_anon_WITH_AES_256_CBC_SHA",
-            0xC019, --p, K_ECDH_ANON,   B_AES_256, T);
+            0xC019, --p, K_ECDH_ANON,   B_AES_256, N);
         add("TLS_DH_anon_WITH_AES_256_CBC_SHA",
             0x003a, --p, K_DH_ANON,     B_AES_256, N);
 
         add("TLS_DH_anon_WITH_AES_128_CBC_SHA256",
             0x006c, --p, K_DH_ANON,     B_AES_128, N, max, tls12, P_SHA256);
         add("TLS_ECDH_anon_WITH_AES_128_CBC_SHA",
-            0xC018, --p, K_ECDH_ANON,   B_AES_128, T);
+            0xC018, --p, K_ECDH_ANON,   B_AES_128, N);
         add("TLS_DH_anon_WITH_AES_128_CBC_SHA",
             0x0034, --p, K_DH_ANON,     B_AES_128, N);
 
@@ -1053,7 +1180,7 @@
             0x0018, --p, K_DH_ANON,     B_RC4_128, N);
 
         add("TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA",
-            0xC017, --p, K_ECDH_ANON,   B_3DES,    T);
+            0xC017, --p, K_ECDH_ANON,   B_3DES,    N);
         add("SSL_DH_anon_WITH_3DES_EDE_CBC_SHA",
             0x001b, --p, K_DH_ANON,     B_3DES,    N);
 
@@ -1208,18 +1335,10 @@
         add("TLS_DH_RSA_WITH_AES_256_CBC_SHA256",          0x0069);
 
         // Unsupported cipher suites from RFC 5288
-        add("TLS_RSA_WITH_AES_128_GCM_SHA256",             0x009c);
-        add("TLS_RSA_WITH_AES_256_GCM_SHA384",             0x009d);
-        add("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",         0x009e);
-        add("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",         0x009f);
         add("TLS_DH_RSA_WITH_AES_128_GCM_SHA256",          0x00a0);
         add("TLS_DH_RSA_WITH_AES_256_GCM_SHA384",          0x00a1);
-        add("TLS_DHE_DSS_WITH_AES_128_GCM_SHA256",         0x00a2);
-        add("TLS_DHE_DSS_WITH_AES_256_GCM_SHA384",         0x00a3);
         add("TLS_DH_DSS_WITH_AES_128_GCM_SHA256",          0x00a4);
         add("TLS_DH_DSS_WITH_AES_256_GCM_SHA384",          0x00a5);
-        add("TLS_DH_anon_WITH_AES_128_GCM_SHA256",         0x00a6);
-        add("TLS_DH_anon_WITH_AES_256_GCM_SHA384",         0x00a7);
 
         // Unsupported cipher suites from RFC 5487
         add("TLS_PSK_WITH_AES_128_GCM_SHA256",             0x00a8);
@@ -1278,16 +1397,6 @@
         add("TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA",        0xc021);
         add("TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA",        0xc022);
 
-        // Unsupported cipher suites from RFC 5289
-        add("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",     0xc02b);
-        add("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",     0xc02c);
-        add("TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",      0xc02d);
-        add("TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384",      0xc02e);
-        add("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",       0xc02f);
-        add("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",       0xc030);
-        add("TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",        0xc031);
-        add("TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384",        0xc032);
-
         // Unsupported cipher suites from RFC 5489
         add("TLS_ECDHE_PSK_WITH_RC4_128_SHA",              0xc033);
         add("TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA",         0xc034);
--- a/src/share/classes/sun/security/ssl/EngineInputRecord.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/ssl/EngineInputRecord.java	Wed Apr 17 21:48:04 2013 -0700
@@ -186,29 +186,35 @@
      * If external data(app), return a new ByteBuffer with data to
      * process.
      */
-    ByteBuffer decrypt(MAC signer,
+    ByteBuffer decrypt(Authenticator authenticator,
             CipherBox box, ByteBuffer bb) throws BadPaddingException {
 
         if (internalData) {
-            decrypt(signer, box);   // MAC is checked during decryption
+            decrypt(authenticator, box);   // MAC is checked during decryption
             return tmpBB;
         }
 
         BadPaddingException reservedBPE = null;
-        int tagLen = signer.MAClen();
+        int tagLen =
+            (authenticator instanceof MAC) ? ((MAC)authenticator).MAClen() : 0;
         int cipheredLength = bb.remaining();
 
         if (!box.isNullCipher()) {
-            // sanity check length of the ciphertext
-            if (!box.sanityCheck(tagLen, cipheredLength)) {
-                throw new BadPaddingException(
-                    "ciphertext sanity check failed");
-            }
+            try {
+                // apply explicit nonce for AEAD/CBC cipher suites if needed
+                int nonceSize =
+                    box.applyExplicitNonce(authenticator, contentType(), bb);
 
-            try {
+                // decrypt the content
+                if (box.isAEADMode()) {
+                    // DON'T encrypt the nonce_explicit for AEAD mode
+                    bb.position(bb.position() + nonceSize);
+                }   // The explicit IV for CBC mode can be decrypted.
+
                 // Note that the CipherBox.decrypt() does not change
                 // the capacity of the buffer.
                 box.decrypt(bb, tagLen);
+                bb.position(nonceSize); // We don't actually remove the nonce.
             } catch (BadPaddingException bpe) {
                 // RFC 2246 states that decryption_failed should be used
                 // for this purpose. However, that allows certain attacks,
@@ -219,12 +225,13 @@
                 //
                 // Failover to message authentication code checking.
                 reservedBPE = bpe;
-            } finally {
-                bb.rewind();
             }
         }
 
-        if (tagLen != 0) {
+        // Requires message authentication code for null, stream and block
+        // cipher suites.
+        if ((authenticator instanceof MAC) && (tagLen != 0)) {
+            MAC signer = (MAC)authenticator;
             int macOffset = bb.limit() - tagLen;
 
             // Note that although it is not necessary, we run the same MAC
@@ -297,6 +304,7 @@
     private static boolean checkMacTags(byte contentType, ByteBuffer bb,
             MAC signer, boolean isSimulated) {
 
+        int position = bb.position();
         int tagLen = signer.MAClen();
         int lim = bb.limit();
         int macData = lim - tagLen;
@@ -314,7 +322,8 @@
             int[] results = compareMacTags(bb, hash);
             return (results[0] != 0);
         } finally {
-            bb.rewind();
+            // reset to the data
+            bb.position(position);
             bb.limit(macData);
         }
     }
@@ -416,8 +425,8 @@
         if (debug != null && Debug.isOn("packet")) {
             try {
                 HexDumpEncoder hd = new HexDumpEncoder();
-                srcBB.limit(srcPos + len);
                 ByteBuffer bb = srcBB.duplicate();  // Use copy of BB
+                bb.limit(srcPos + len);
 
                 System.out.println("[Raw read (bb)]: length = " + len);
                 hd.encodeBuffer(bb, System.out);
--- a/src/share/classes/sun/security/ssl/EngineOutputRecord.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/ssl/EngineOutputRecord.java	Wed Apr 17 21:48:04 2013 -0700
@@ -29,7 +29,6 @@
 import java.io.*;
 import java.nio.*;
 
-
 /**
  * A OutputRecord class extension which uses external ByteBuffers
  * or the internal ByteArrayOutputStream for data manipulations.
@@ -101,51 +100,6 @@
         return finishedMsg;
     }
 
-
-    /**
-     * Calculate the MAC value, storing the result either in
-     * the internal buffer, or at the end of the destination
-     * ByteBuffer.
-     * <P>
-     * We assume that the higher levels have assured us enough
-     * room, otherwise we'll indirectly throw a
-     * BufferOverFlowException runtime exception.
-     *
-     * position should equal limit, and points to the next
-     * free spot.
-     */
-    private void addMAC(MAC signer, ByteBuffer bb)
-            throws IOException {
-
-        if (signer.MAClen() != 0) {
-            byte[] hash = signer.compute(contentType(), bb, false);
-
-            /*
-             * position was advanced to limit in compute above.
-             *
-             * Mark next area as writable (above layers should have
-             * established that we have plenty of room), then write
-             * out the hash.
-             */
-            bb.limit(bb.limit() + hash.length);
-            bb.put(hash);
-        }
-    }
-
-    /*
-     * Encrypt a ByteBuffer.
-     *
-     * We assume that the higher levels have assured us enough
-     * room for the encryption (plus padding), otherwise we'll
-     * indirectly throw a BufferOverFlowException runtime exception.
-     *
-     * position and limit will be the same, and points to the
-     * next free spot.
-     */
-    void encrypt(CipherBox box, ByteBuffer bb) {
-        box.encrypt(bb);
-    }
-
     /*
      * Override the actual write below.  We do things this way to be
      * consistent with InputRecord.  InputRecord may try to write out
@@ -160,7 +114,8 @@
          * Copy data out of buffer, it's ready to go.
          */
         ByteBuffer netBB = (ByteBuffer)
-            ByteBuffer.allocate(len).put(buf, 0, len).flip();
+            ByteBuffer.allocate(len).put(buf, off, len).flip();
+
         writer.putOutboundData(netBB);
     }
 
@@ -168,17 +123,19 @@
      * Main method for writing non-application data.
      * We MAC/encrypt, then send down for processing.
      */
-    void write(MAC writeMAC, CipherBox writeCipher) throws IOException {
+    void write(Authenticator authenticator, CipherBox writeCipher)
+            throws IOException {
+
         /*
          * Sanity check.
          */
         switch (contentType()) {
-        case ct_change_cipher_spec:
-        case ct_alert:
-        case ct_handshake:
-            break;
-        default:
-            throw new RuntimeException("unexpected byte buffers");
+            case ct_change_cipher_spec:
+            case ct_alert:
+            case ct_handshake:
+                break;
+            default:
+                throw new RuntimeException("unexpected byte buffers");
         }
 
         /*
@@ -193,10 +150,10 @@
          */
         if (!isEmpty()) {
             // compress();              // eventually
-            addMAC(writeMAC);
-            encrypt(writeCipher);
-            write((OutputStream)null, false,  // send down for processing
-                (ByteArrayOutputStream)null);
+            encrypt(authenticator, writeCipher);
+
+            // send down for processing
+            write((OutputStream)null, false, (ByteArrayOutputStream)null);
         }
         return;
     }
@@ -204,8 +161,8 @@
     /**
      * Main wrap/write driver.
      */
-    void write(EngineArgs ea, MAC writeMAC, CipherBox writeCipher)
-            throws IOException {
+    void write(EngineArgs ea, Authenticator authenticator,
+            CipherBox writeCipher) throws IOException {
         /*
          * sanity check to make sure someone didn't inadvertantly
          * send us an impossible combination we don't know how
@@ -217,7 +174,7 @@
          * Have we set the MAC's yet?  If not, we're not ready
          * to process application data yet.
          */
-        if (writeMAC == MAC.NULL) {
+        if (authenticator == MAC.NULL) {
             return;
         }
 
@@ -255,7 +212,7 @@
          */
         int length;
         if (engine.needToSplitPayload(writeCipher, protocolVersion)) {
-            write(ea, writeMAC, writeCipher, 0x01);
+            write(ea, authenticator, writeCipher, 0x01);
             ea.resetLim();      // reset application data buffer limit
             length = Math.min(ea.getAppRemaining(),
                         maxDataSizeMinusOneByteRecord);
@@ -265,14 +222,14 @@
 
         // Don't bother to really write empty records.
         if (length > 0) {
-            write(ea, writeMAC, writeCipher, length);
+            write(ea, authenticator, writeCipher, length);
         }
 
         return;
     }
 
-    void write(EngineArgs ea, MAC writeMAC, CipherBox writeCipher,
-            int length) throws IOException {
+    void write(EngineArgs ea, Authenticator authenticator,
+            CipherBox writeCipher, int length) throws IOException {
         /*
          * Copy out existing buffer values.
          */
@@ -286,39 +243,76 @@
          * Don't need to worry about SSLv2 rewrites, if we're here,
          * that's long since done.
          */
-        int dstData = dstPos + headerSize;
+        int dstData = dstPos + headerSize + writeCipher.getExplicitNonceSize();
         dstBB.position(dstData);
 
+        /*
+         * transfer application data into the network data buffer
+         */
         ea.gather(length);
+        dstBB.limit(dstBB.position());
+        dstBB.position(dstData);
 
         /*
          * "flip" but skip over header again, add MAC & encrypt
-         * addMAC will expand the limit to reflect the new
-         * data.
          */
-        dstBB.limit(dstBB.position());
-        dstBB.position(dstData);
-        addMAC(writeMAC, dstBB);
+        if (authenticator instanceof MAC) {
+            MAC signer = (MAC)authenticator;
+            if (signer.MAClen() != 0) {
+                byte[] hash = signer.compute(contentType(), dstBB, false);
+
+                /*
+                 * position was advanced to limit in compute above.
+                 *
+                 * Mark next area as writable (above layers should have
+                 * established that we have plenty of room), then write
+                 * out the hash.
+                 */
+                dstBB.limit(dstBB.limit() + hash.length);
+                dstBB.put(hash);
+
+                // reset the position and limit
+                dstBB.limit(dstBB.position());
+                dstBB.position(dstData);
+            }
+        }
 
-        /*
-         * Encrypt may pad, so again the limit may have changed.
-         */
-        dstBB.limit(dstBB.position());
-        dstBB.position(dstData);
-        encrypt(writeCipher, dstBB);
+        if (!writeCipher.isNullCipher()) {
+            /*
+             * Requires explicit IV/nonce for CBC/AEAD cipher suites for TLS 1.1
+             * or later.
+             */
+            if (protocolVersion.v >= ProtocolVersion.TLS11.v &&
+                    (writeCipher.isCBCMode() || writeCipher.isAEADMode())) {
+                byte[] nonce = writeCipher.createExplicitNonce(
+                        authenticator, contentType(), dstBB.remaining());
+                dstBB.position(dstPos + headerSize);
+                dstBB.put(nonce);
+                if (!writeCipher.isAEADMode()) {
+                    // The explicit IV in TLS 1.1 and later can be encrypted.
+                    dstBB.position(dstPos + headerSize);
+                }   // Otherwise, DON'T encrypt the nonce_explicit for AEAD mode
+            }
 
-        if (debug != null
-                && (Debug.isOn("record") || Debug.isOn("handshake"))) {
-            if ((debug != null && Debug.isOn("record"))
-                    || contentType() == ct_change_cipher_spec)
+            /*
+             * Encrypt may pad, so again the limit may have changed.
+             */
+            writeCipher.encrypt(dstBB, dstLim);
+
+            if ((debug != null) && (Debug.isOn("record") ||
+                    (Debug.isOn("handshake") &&
+                        (contentType() == ct_change_cipher_spec)))) {
                 System.out.println(Thread.currentThread().getName()
                     // v3.0/v3.1 ...
                     + ", WRITE: " + protocolVersion
                     + " " + InputRecord.contentName(contentType())
                     + ", length = " + length);
+            }
+        } else {
+            dstBB.position(dstBB.limit());
         }
 
-        int packetLength = dstBB.limit() - dstData;
+        int packetLength = dstBB.limit() - dstPos - headerSize;
 
         /*
          * Finish out the record header.
@@ -333,7 +327,5 @@
          * Position was already set by encrypt() above.
          */
         dstBB.limit(dstLim);
-
-        return;
     }
 }
--- a/src/share/classes/sun/security/ssl/EngineWriter.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/ssl/EngineWriter.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -99,7 +99,8 @@
      * other writeRecord.
      */
     synchronized void writeRecord(EngineOutputRecord outputRecord,
-            MAC writeMAC, CipherBox writeCipher) throws IOException {
+            Authenticator authenticator,
+            CipherBox writeCipher) throws IOException {
 
         /*
          * Only output if we're still open.
@@ -108,7 +109,7 @@
             throw new IOException("writer side was already closed.");
         }
 
-        outputRecord.write(writeMAC, writeCipher);
+        outputRecord.write(authenticator, writeCipher);
 
         /*
          * Did our handshakers notify that we just sent the
@@ -151,7 +152,8 @@
      * Return any determined status.
      */
     synchronized HandshakeStatus writeRecord(
-            EngineOutputRecord outputRecord, EngineArgs ea, MAC writeMAC,
+            EngineOutputRecord outputRecord, EngineArgs ea,
+            Authenticator authenticator,
             CipherBox writeCipher) throws IOException {
 
         /*
@@ -181,7 +183,7 @@
             throw new IOException("The write side was already closed");
         }
 
-        outputRecord.write(ea, writeMAC, writeCipher);
+        outputRecord.write(ea, authenticator, writeCipher);
 
         if (debug != null && Debug.isOn("packet")) {
             dumpPacket(ea, false);
--- a/src/share/classes/sun/security/ssl/Handshaker.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/ssl/Handshaker.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,6 +49,7 @@
 import sun.security.ssl.CipherSuite.*;
 
 import static sun.security.ssl.CipherSuite.PRF.*;
+import static sun.security.ssl.CipherSuite.CipherType.*;
 
 /**
  * Handshaker ... processes handshake records from an SSL V3.0
@@ -714,33 +715,47 @@
     /**
      * Create a new read MAC and return it to caller.
      */
-    MAC newReadMAC() throws NoSuchAlgorithmException, InvalidKeyException {
-        MacAlg macAlg = cipherSuite.macAlg;
-        MAC mac;
-        if (isClient) {
-            mac = macAlg.newMac(protocolVersion, svrMacSecret);
-            svrMacSecret = null;
+    Authenticator newReadAuthenticator()
+            throws NoSuchAlgorithmException, InvalidKeyException {
+
+        Authenticator authenticator = null;
+        if (cipherSuite.cipher.cipherType == AEAD_CIPHER) {
+            authenticator = new Authenticator(protocolVersion);
         } else {
-            mac = macAlg.newMac(protocolVersion, clntMacSecret);
-            clntMacSecret = null;
+            MacAlg macAlg = cipherSuite.macAlg;
+            if (isClient) {
+                authenticator = macAlg.newMac(protocolVersion, svrMacSecret);
+                svrMacSecret = null;
+            } else {
+                authenticator = macAlg.newMac(protocolVersion, clntMacSecret);
+                clntMacSecret = null;
+            }
         }
-        return mac;
+
+        return authenticator;
     }
 
     /**
      * Create a new write MAC and return it to caller.
      */
-    MAC newWriteMAC() throws NoSuchAlgorithmException, InvalidKeyException {
-        MacAlg macAlg = cipherSuite.macAlg;
-        MAC mac;
-        if (isClient) {
-            mac = macAlg.newMac(protocolVersion, clntMacSecret);
-            clntMacSecret = null;
+    Authenticator newWriteAuthenticator()
+            throws NoSuchAlgorithmException, InvalidKeyException {
+
+        Authenticator authenticator = null;
+        if (cipherSuite.cipher.cipherType == AEAD_CIPHER) {
+            authenticator = new Authenticator(protocolVersion);
         } else {
-            mac = macAlg.newMac(protocolVersion, svrMacSecret);
-            svrMacSecret = null;
+            MacAlg macAlg = cipherSuite.macAlg;
+            if (isClient) {
+                authenticator = macAlg.newMac(protocolVersion, clntMacSecret);
+                clntMacSecret = null;
+            } else {
+                authenticator = macAlg.newMac(protocolVersion, svrMacSecret);
+                svrMacSecret = null;
+            }
         }
-        return mac;
+
+        return authenticator;
     }
 
     /*
@@ -1189,11 +1204,23 @@
         int prfHashLength = prf.getPRFHashLength();
         int prfBlockSize = prf.getPRFBlockSize();
 
+        // TLS v1.1 or later uses an explicit IV in CBC cipher suites to
+        // protect against the CBC attacks.  AEAD/GCM cipher suites in TLS
+        // v1.2 or later use a fixed IV as the implicit part of the partially
+        // implicit nonce technique described in RFC 5116.
+        int ivSize = cipher.ivSize;
+        if (cipher.cipherType == AEAD_CIPHER) {
+            ivSize = cipher.fixedIvSize;
+        } else if (protocolVersion.v >= ProtocolVersion.TLS11.v &&
+                cipher.cipherType == BLOCK_CIPHER) {
+            ivSize = 0;
+        }
+
         TlsKeyMaterialParameterSpec spec = new TlsKeyMaterialParameterSpec(
             masterKey, protocolVersion.major, protocolVersion.minor,
             clnt_random.random_bytes, svr_random.random_bytes,
             cipher.algorithm, cipher.keySize, expandedKeySize,
-            cipher.ivSize, hashSize,
+            ivSize, hashSize,
             prfHashAlg, prfHashLength, prfBlockSize);
 
         try {
@@ -1201,14 +1228,15 @@
             kg.init(spec);
             TlsKeyMaterialSpec keySpec = (TlsKeyMaterialSpec)kg.generateKey();
 
+            // Return null if cipher keys are not supposed to be generated.
             clntWriteKey = keySpec.getClientCipherKey();
             svrWriteKey = keySpec.getServerCipherKey();
 
             // Return null if IVs are not supposed to be generated.
-            // e.g. TLS 1.1+.
             clntWriteIV = keySpec.getClientIv();
             svrWriteIV = keySpec.getServerIv();
 
+            // Return null if MAC keys are not supposed to be generated.
             clntMacSecret = keySpec.getClientMacKey();
             svrMacSecret = keySpec.getServerMacKey();
         } catch (GeneralSecurityException e) {
@@ -1233,10 +1261,14 @@
                 printHex(dump, masterKey.getEncoded());
 
                 // Outputs:
-                System.out.println("Client MAC write Secret:");
-                printHex(dump, clntMacSecret.getEncoded());
-                System.out.println("Server MAC write Secret:");
-                printHex(dump, svrMacSecret.getEncoded());
+                if (clntMacSecret != null) {
+                    System.out.println("Client MAC write Secret:");
+                    printHex(dump, clntMacSecret.getEncoded());
+                    System.out.println("Server MAC write Secret:");
+                    printHex(dump, svrMacSecret.getEncoded());
+                } else {
+                    System.out.println("... no MAC keys used for this cipher");
+                }
 
                 if (clntWriteKey != null) {
                     System.out.println("Client write key:");
--- a/src/share/classes/sun/security/ssl/InputRecord.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/ssl/InputRecord.java	Wed Apr 17 21:48:04 2013 -0700
@@ -77,6 +77,17 @@
     /*
      * Construct the record to hold the maximum sized input record.
      * Data will be filled in separately.
+     *
+     * The structure of the byte buffer looks like:
+     *
+     *     |--------+---------+---------------------------------|
+     *     | header |   IV    | content, MAC/TAG, padding, etc. |
+     *     | headerPlusIVSize |
+     *
+     * header: the header of an SSL records
+     * IV:     the optional IV/nonce field, it is only required for block
+     *         (TLS 1.1 or later) and AEAD cipher suites.
+     *
      */
     InputRecord() {
         super(new byte[maxRecordSize]);
@@ -133,24 +144,34 @@
         return handshakeHash;
     }
 
-    void decrypt(MAC signer, CipherBox box) throws BadPaddingException {
-
+    void decrypt(Authenticator authenticator,
+            CipherBox box) throws BadPaddingException {
         BadPaddingException reservedBPE = null;
-        int tagLen = signer.MAClen();
+        int tagLen =
+            (authenticator instanceof MAC) ? ((MAC)authenticator).MAClen() : 0;
         int cipheredLength = count - headerSize;
 
         if (!box.isNullCipher()) {
-            // sanity check length of the ciphertext
-            if (!box.sanityCheck(tagLen, cipheredLength)) {
-                throw new BadPaddingException(
-                    "ciphertext sanity check failed");
-            }
+            try {
+                // apply explicit nonce for AEAD/CBC cipher suites if needed
+                int nonceSize = box.applyExplicitNonce(authenticator,
+                        contentType(), buf, headerSize, cipheredLength);
+                pos = headerSize + nonceSize;
+                lastHashed = pos;   // don't digest the explicit nonce
 
-            try {
+                // decrypt the content
+                int offset = headerSize;
+                if (box.isAEADMode()) {
+                    // DON'T encrypt the nonce_explicit for AEAD mode
+                    offset += nonceSize;
+                }   // The explicit IV for CBC mode can be decrypted.
+
                 // Note that the CipherBox.decrypt() does not change
                 // the capacity of the buffer.
-                count = headerSize +
-                        box.decrypt(buf, headerSize, cipheredLength, tagLen);
+                count = offset +
+                    box.decrypt(buf, offset, count - offset, tagLen);
+
+                // Note that we don't remove the nonce from the buffer.
             } catch (BadPaddingException bpe) {
                 // RFC 2246 states that decryption_failed should be used
                 // for this purpose. However, that allows certain attacks,
@@ -164,9 +185,12 @@
             }
         }
 
-        if (tagLen != 0) {
+        // Requires message authentication code for null, stream and block
+        // cipher suites.
+        if (authenticator instanceof MAC && tagLen != 0) {
+            MAC signer = (MAC)authenticator;
             int macOffset = count - tagLen;
-            int contentLen = macOffset - headerSize;
+            int contentLen = macOffset - pos;
 
             // Note that although it is not necessary, we run the same MAC
             // computation and comparison on the payload for both stream
@@ -190,7 +214,7 @@
 
             // Run MAC computation and comparison on the payload.
             if (checkMacTags(contentType(),
-                    buf, headerSize, contentLen, signer, false)) {
+                    buf, pos, contentLen, signer, false)) {
                 if (reservedBPE == null) {
                     reservedBPE = new BadPaddingException("bad record MAC");
                 }
--- a/src/share/classes/sun/security/ssl/JsseJce.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/ssl/JsseJce.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -155,6 +155,11 @@
      */
     final static String CIPHER_AES = "AES/CBC/NoPadding";
     /**
+     * JCE transformation string for AES in GCM mode
+     * without padding.
+     */
+    final static String CIPHER_AES_GCM = "AES/GCM/NoPadding";
+    /**
      * JCA identifier string for DSA, i.e. a DSA with SHA-1.
      */
     final static String SIGNATURE_DSA = "DSA";
--- a/src/share/classes/sun/security/ssl/MAC.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/ssl/MAC.java	Wed Apr 17 21:48:04 2013 -0700
@@ -39,19 +39,15 @@
 
 /**
  * This class computes the "Message Authentication Code" (MAC) for each
- * SSL message.  This is essentially a shared-secret signature, used to
- * provide integrity protection for SSL messages.  The MAC is actually
- * one of several keyed hashes, as associated with the cipher suite and
- * protocol version.  (SSL v3.0 uses one construct, TLS uses another.)
- * <P>
- * NOTE: MAC computation is the only place in the SSL protocol that the
- * sequence number is used.  It's also reset to zero with each change of
- * a cipher spec, so this is the only place this state is needed.
+ * SSL stream and block cipher message.  This is essentially a shared-secret
+ * signature, used to provide integrity protection for SSL messages.  The
+ * MAC is actually one of several keyed hashes, as associated with the cipher
+ * suite and protocol version. (SSL v3.0 uses one construct, TLS uses another.)
  *
  * @author David Brownell
  * @author Andreas Sterbenz
  */
-final class MAC {
+final class MAC extends Authenticator {
 
     final static MAC NULL = new MAC();
 
@@ -61,33 +57,12 @@
     // internal identifier for the MAC algorithm
     private final MacAlg        macAlg;
 
-    // stuff defined by the kind of MAC algorithm
-    private final int           macSize;
-
     // JCE Mac object
     private final Mac mac;
 
-    // byte array containing the additional information we MAC in each record
-    // (see below)
-    private final byte[] block;
-
-    // sequence number + record type + + record length
-    private static final int BLOCK_SIZE_SSL = 8 + 1 + 2;
-
-    // sequence number + record type + protocol version + record length
-    private static final int BLOCK_SIZE_TLS = 8 + 1 + 2 + 2;
-
-    // offset of record type in block
-    private static final int BLOCK_OFFSET_TYPE    = 8;
-
-    // offset of protocol version number in block (TLS only)
-    private static final int BLOCK_OFFSET_VERSION = 8 + 1;
-
     private MAC() {
-        macSize = 0;
         macAlg = M_NULL;
         mac = null;
-        block = null;
     }
 
     /**
@@ -95,8 +70,8 @@
      */
     MAC(MacAlg macAlg, ProtocolVersion protocolVersion, SecretKey key)
             throws NoSuchAlgorithmException, InvalidKeyException {
+        super(protocolVersion);
         this.macAlg = macAlg;
-        this.macSize = macAlg.size;
 
         String algorithm;
         boolean tls = (protocolVersion.v >= ProtocolVersion.TLS10.v);
@@ -115,21 +90,13 @@
 
         mac = JsseJce.getMac(algorithm);
         mac.init(key);
-
-        if (tls) {
-            block = new byte[BLOCK_SIZE_TLS];
-            block[BLOCK_OFFSET_VERSION]   = protocolVersion.major;
-            block[BLOCK_OFFSET_VERSION+1] = protocolVersion.minor;
-        } else {
-            block = new byte[BLOCK_SIZE_SSL];
-        }
     }
 
     /**
      * Returns the length of the MAC.
      */
     int MAClen() {
-        return macSize;
+        return macAlg.size;
     }
 
     /**
@@ -157,7 +124,17 @@
      */
     final byte[] compute(byte type, byte buf[],
             int offset, int len, boolean isSimulated) {
-        return compute(type, null, buf, offset, len, isSimulated);
+        if (macAlg.size == 0) {
+            return nullMAC;
+        }
+
+        if (!isSimulated) {
+            byte[] additional = acquireAuthenticationBytes(type, len);
+            mac.update(additional);
+        }
+        mac.update(buf, offset, len);
+
+        return mac.doFinal();
     }
 
     /**
@@ -173,83 +150,19 @@
      * @param isSimulated if true, simulate the the MAC computation
      */
     final byte[] compute(byte type, ByteBuffer bb, boolean isSimulated) {
-        return compute(type, bb, null, 0, bb.remaining(), isSimulated);
-    }
-
-    /**
-     * Check whether the sequence number is close to wrap
-     *
-     * Sequence numbers are of type uint64 and may not exceed 2^64-1.
-     * Sequence numbers do not wrap. When the sequence number is near
-     * to wrap, we need to close the connection immediately.
-     */
-    final boolean seqNumOverflow() {
-        /*
-         * Conservatively, we don't allow more records to be generated
-         * when there are only 2^8 sequence numbers left.
-         */
-        return (block != null && mac != null &&
-                block[0] == (byte)0xFF && block[1] == (byte)0xFF &&
-                block[2] == (byte)0xFF && block[3] == (byte)0xFF &&
-                block[4] == (byte)0xFF && block[5] == (byte)0xFF &&
-                block[6] == (byte)0xFF);
-    }
-
-    /*
-     * Check whether to renew the sequence number
-     *
-     * Sequence numbers are of type uint64 and may not exceed 2^64-1.
-     * Sequence numbers do not wrap.  If a TLS
-     * implementation would need to wrap a sequence number, it must
-     * renegotiate instead.
-     */
-    final boolean seqNumIsHuge() {
-        /*
-         * Conservatively, we should ask for renegotiation when there are
-         * only 2^48 sequence numbers left.
-         */
-        return (block != null && mac != null &&
-                block[0] == (byte)0xFF && block[1] == (byte)0xFF);
-    }
-
-    // increment the sequence number in the block array
-    // it is a 64-bit number stored in big-endian format
-    private void incrementSequenceNumber() {
-        int k = 7;
-        while ((k >= 0) && (++block[k] == 0)) {
-            k--;
-        }
-    }
-
-    /*
-     * Compute based on either buffer type, either bb.position/limit
-     * or buf/offset/len.
-     */
-    private byte[] compute(byte type, ByteBuffer bb, byte[] buf,
-            int offset, int len, boolean isSimulated) {
-
-        if (macSize == 0) {
+        if (macAlg.size == 0) {
             return nullMAC;
         }
 
-        // MUST NOT increase the sequence number for a simulated computation.
         if (!isSimulated) {
-            block[BLOCK_OFFSET_TYPE] = type;
-            block[block.length - 2]  = (byte)(len >> 8);
-            block[block.length - 1]  = (byte)(len     );
-
-            mac.update(block);
-            incrementSequenceNumber();
+            byte[] additional =
+                    acquireAuthenticationBytes(type, bb.remaining());
+            mac.update(additional);
         }
-
-        // content
-        if (bb != null) {
-            mac.update(bb);
-        } else {
-            mac.update(buf, offset, len);
-        }
+        mac.update(bb);
 
         return mac.doFinal();
     }
 
 }
+
--- a/src/share/classes/sun/security/ssl/OutputRecord.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/ssl/OutputRecord.java	Wed Apr 17 21:48:04 2013 -0700
@@ -54,6 +54,7 @@
     private int                 lastHashed;
     private boolean             firstMessage;
     final private byte          contentType;
+    private int                 headerOffset;
 
     // current protocol version, sent as record version
     ProtocolVersion     protocolVersion;
@@ -70,6 +71,23 @@
      * Default constructor makes a record supporting the maximum
      * SSL record size.  It allocates the header bytes directly.
      *
+     * The structure of the byte buffer looks like:
+     *
+     *     |---------+--------+-------+---------------------------------|
+     *     | unused  | header |  IV   | content, MAC/TAG, padding, etc. |
+     *     |    headerPlusMaxIVSize   |
+     *
+     * unused: unused part of the buffer of size
+     *
+     *             headerPlusMaxIVSize - header size - IV size
+     *
+     *         When this object is created, we don't know the protocol
+     *         version number, IV length, etc., so reserve space in front
+     *         to avoid extra data movement (copies).
+     * header: the header of an SSL record
+     * IV:     the optional IV/nonce field, it is only required for block
+     *         (TLS 1.1 or later) and AEAD cipher suites.
+     *
      * @param type the content type for the record
      */
     OutputRecord(byte type, int size) {
@@ -77,9 +95,10 @@
         this.protocolVersion = ProtocolVersion.DEFAULT;
         this.helloVersion = ProtocolVersion.DEFAULT_HELLO;
         firstMessage = true;
-        count = headerSize;
+        count = headerPlusMaxIVSize;
         contentType = type;
         lastHashed = count;
+        headerOffset = headerPlusMaxIVSize - headerSize;
     }
 
     OutputRecord(byte type) {
@@ -119,8 +138,9 @@
     @Override
     public synchronized void reset() {
         super.reset();
-        count = headerSize;
+        count = headerPlusMaxIVSize;
         lastHashed = count;
+        headerOffset = headerPlusMaxIVSize - headerSize;
     }
 
     /*
@@ -173,58 +193,84 @@
      * of sending empty records over the network.
      */
     boolean isEmpty() {
-        return count == headerSize;
+        return count == headerPlusMaxIVSize;
     }
 
     /*
-     * Return true if the record is of a given alert.
+     * Return true if the record is of an alert of the given description.
+     *
+     * Per SSL/TLS specifications, alert messages convey the severity of the
+     * message (warning or fatal) and a description of the alert. An alert
+     * is defined with a two bytes struct, {byte level, byte description},
+     * following after the header bytes.
      */
     boolean isAlert(byte description) {
-        // An alert is defined with a two bytes struct,
-        // {byte level, byte description}, following after the header bytes.
-        if (count > (headerSize + 1) && contentType == ct_alert) {
-            return buf[headerSize + 1] == description;
+        if ((count > (headerPlusMaxIVSize + 1)) && (contentType == ct_alert)) {
+            return buf[headerPlusMaxIVSize + 1] == description;
         }
 
         return false;
     }
 
     /*
-     * Compute the MAC and append it to this record.  In case we
-     * are automatically flushing a handshake stream, make sure we
-     * have hashed the message first.
+     * Encrypt ... length may grow due to block cipher padding, or
+     * message authentication code or tag.
      */
-    void addMAC(MAC signer) throws IOException {
+    void encrypt(Authenticator authenticator, CipherBox box)
+            throws IOException {
+
+        // In case we are automatically flushing a handshake stream, make
+        // sure we have hashed the message first.
         //
         // when we support compression, hashing can't go here
         // since it'll need to be done on the uncompressed data,
         // and the MAC applies to the compressed data.
-        //
         if (contentType == ct_handshake) {
             doHashes();
         }
-        if (signer.MAClen() != 0) {
-            byte[] hash = signer.compute(contentType, buf,
-                    headerSize, count - headerSize, false);
-            write(hash);
+
+        // Requires message authentication code for stream and block
+        // cipher suites.
+        if (authenticator instanceof MAC) {
+            MAC signer = (MAC)authenticator;
+            if (signer.MAClen() != 0) {
+                byte[] hash = signer.compute(contentType, buf,
+                    headerPlusMaxIVSize, count - headerPlusMaxIVSize, false);
+                write(hash);
+            }
+        }
+
+        if (!box.isNullCipher()) {
+            // Requires explicit IV/nonce for CBC/AEAD cipher suites for
+            // TLS 1.1 or later.
+            if ((protocolVersion.v >= ProtocolVersion.TLS11.v) &&
+                                    (box.isCBCMode() || box.isAEADMode())) {
+                byte[] nonce = box.createExplicitNonce(authenticator,
+                                    contentType, count - headerPlusMaxIVSize);
+                int offset = headerPlusMaxIVSize - nonce.length;
+                System.arraycopy(nonce, 0, buf, offset, nonce.length);
+                headerOffset = offset - headerSize;
+            } else {
+                headerOffset = headerPlusMaxIVSize - headerSize;
+            }
+
+            // encrypt the content
+            int offset = headerPlusMaxIVSize;
+            if (!box.isAEADMode()) {
+                // The explicit IV can be encrypted.
+                offset = headerOffset + headerSize;
+            }   // Otherwise, DON'T encrypt the nonce_explicit for AEAD mode
+
+            count = offset + box.encrypt(buf, offset, count - offset);
         }
     }
 
     /*
-     * Encrypt ... length may grow due to block cipher padding
-     */
-    void encrypt(CipherBox box) {
-        int len = count - headerSize;
-        count = headerSize + box.encrypt(buf, headerSize, len);
-    }
-
-
-    /*
      * Tell how full the buffer is ... for filling it with application or
      * handshake data.
      */
     final int availableDataBytes() {
-        int dataSize = count - headerSize;
+        int dataSize = count - headerPlusMaxIVSize;
         return maxDataSize - dataSize;
     }
 
@@ -270,11 +316,11 @@
          * Don't emit content-free records.  (Even change cipher spec
          * messages have a byte of data!)
          */
-        if (count == headerSize) {
+        if (count == headerPlusMaxIVSize) {
             return;
         }
 
-        int length = count - headerSize;
+        int length = count - headerOffset - headerSize;
         // "should" really never write more than about 14 Kb...
         if (length < 0) {
             throw new SSLException("output record size too small: "
@@ -299,7 +345,9 @@
          */
          if (firstMessage && useV2Hello()) {
             byte[] v3Msg = new byte[length - 4];
-            System.arraycopy(buf, headerSize + 4, v3Msg, 0, v3Msg.length);
+            System.arraycopy(buf, headerPlusMaxIVSize + 4,
+                                        v3Msg, 0, v3Msg.length);
+            headerOffset = 0;   // reset the header offset
             V3toV2ClientHello(v3Msg);
             handshakeHash.reset();
             lastHashed = 2;
@@ -314,11 +362,11 @@
             /*
              * Fill out the header, write it and the message.
              */
-            buf[0] = contentType;
-            buf[1] = protocolVersion.major;
-            buf[2] = protocolVersion.minor;
-            buf[3] = (byte)(length >> 8);
-            buf[4] = (byte)(length);
+            buf[headerOffset + 0] = contentType;
+            buf[headerOffset + 1] = protocolVersion.major;
+            buf[headerOffset + 2] = protocolVersion.minor;
+            buf[headerOffset + 3] = (byte)(length >> 8);
+            buf[headerOffset + 4] = (byte)(length);
         }
         firstMessage = false;
 
@@ -338,7 +386,8 @@
              * when holdRecord is true, the implementation in this class
              * will be used.
              */
-            writeBuffer(heldRecordBuffer, buf, 0, count, debugOffset);
+            writeBuffer(heldRecordBuffer,
+                        buf, headerOffset, count - headerOffset, debugOffset);
         } else {
             // It's time to send, do we have buffered data?
             // May or may not have a heldRecordBuffer.
@@ -346,15 +395,18 @@
                 int heldLen = heldRecordBuffer.size();
 
                 // Ensure the capacity of this buffer.
-                ensureCapacity(count + heldLen);
+                int newCount = count + heldLen - headerOffset;
+                ensureCapacity(newCount);
 
                 // Slide everything in the buffer to the right.
-                System.arraycopy(buf, 0, buf, heldLen, count);
+                System.arraycopy(buf, headerOffset,
+                                    buf, heldLen, count - headerOffset);
 
                 // Prepend the held record to the buffer.
                 System.arraycopy(
                     heldRecordBuffer.toByteArray(), 0, buf, 0, heldLen);
-                count += heldLen;
+                count = newCount;
+                headerOffset = 0;
 
                 // Clear the held buffer.
                 heldRecordBuffer.reset();
@@ -362,7 +414,8 @@
                 // The held buffer has been dumped, set the debug dump offset.
                 debugOffset = heldLen;
             }
-            writeBuffer(s, buf, 0, count, debugOffset);
+            writeBuffer(s, buf, headerOffset,
+                        count - headerOffset, debugOffset);
         }
 
         reset();
@@ -382,12 +435,11 @@
         if (debug != null && Debug.isOn("packet")) {
             try {
                 HexDumpEncoder hd = new HexDumpEncoder();
-                ByteBuffer bb = ByteBuffer.wrap(
-                        buf, off + debugOffset, len - debugOffset);
 
                 System.out.println("[Raw write]: length = " +
-                    bb.remaining());
-                hd.encodeBuffer(bb, System.out);
+                                                    (len - debugOffset));
+                hd.encodeBuffer(new ByteArrayInputStream(buf,
+                    off + debugOffset, len - debugOffset), System.out);
             } catch (IOException e) { }
         }
     }
@@ -400,8 +452,13 @@
         return firstMessage
             && (helloVersion == ProtocolVersion.SSL20Hello)
             && (contentType == ct_handshake)
-            && (buf[5] == HandshakeMessage.ht_client_hello)
-            && (buf[headerSize + 4+2+32] == 0); // V3 session ID is empty
+            && (buf[headerOffset + 5] == HandshakeMessage.ht_client_hello)
+                                            //  5: recode header size
+            && (buf[headerPlusMaxIVSize + 4 + 2 + 32] == 0);
+                                            // V3 session ID is empty
+                                            //  4: handshake header size
+                                            //  2: client_version in ClientHello
+                                            // 32: random in ClientHello
     }
 
     /*
--- a/src/share/classes/sun/security/ssl/Record.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/ssl/Record.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,20 +52,29 @@
     static final int    trailerSize = 20;       // SHA1 hash size
     static final int    maxDataSize = 16384;    // 2^14 bytes of data
     static final int    maxPadding = 256;       // block cipher padding
-    static final int    maxIVLength = 256;      // block length
+    static final int    maxIVLength = 256;      // IV length
+
+    /*
+     * The size of the header plus the max IV length
+     */
+    static final int    headerPlusMaxIVSize =
+                                      headerSize        // header
+                                    + maxIVLength;      // iv
 
     /*
      * SSL has a maximum record size.  It's header, (compressed) data,
-     * padding, and a trailer for the MAC.
+     * padding, and a trailer for the message authentication information (MAC
+     * for block and stream ciphers, and message authentication tag for AEAD
+     * ciphers).
+     *
      * Some compression algorithms have rare cases where they expand the data.
      * As we don't support compression at this time, leave that out.
      */
     static final int    maxRecordSize =
-                                      headerSize        // header
-                                    + maxIVLength       // iv
-                                    + maxDataSize       // data
-                                    + maxPadding        // padding
-                                    + trailerSize;      // MAC
+                                      headerPlusMaxIVSize   // header + iv
+                                    + maxDataSize           // data
+                                    + maxPadding            // padding
+                                    + trailerSize;          // MAC or AEAD tag
 
     static final boolean enableCBCProtection =
             Debug.getBooleanProperty("jsse.enableCBCProtection", true);
@@ -77,8 +86,7 @@
     static final int    maxDataSizeMinusOneByteRecord =
                                   maxDataSize       // max data size
                                 - (                 // max one byte record size
-                                      headerSize    // header
-                                    + maxIVLength   // iv
+                                      headerPlusMaxIVSize   // header + iv
                                     + 1             // one byte data
                                     + maxPadding    // padding
                                     + trailerSize   // MAC
@@ -104,11 +112,10 @@
      * Allocate a smaller array.
      */
     static final int    maxAlertRecordSize =
-                                      headerSize        // header
-                                    + maxIVLength       // iv
-                                    + 2                 // alert
-                                    + maxPadding        // padding
-                                    + trailerSize;      // MAC
+                                      headerPlusMaxIVSize   // header + iv
+                                    + 2                     // alert
+                                    + maxPadding            // padding
+                                    + trailerSize;          // MAC
 
     /*
      * The overflow values of integers of 8, 16 and 24 bits.
--- a/src/share/classes/sun/security/ssl/SSLEngineImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/ssl/SSLEngineImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -280,7 +280,7 @@
     /*
      * Crypto state that's reinitialized when the session changes.
      */
-    private MAC                 readMAC, writeMAC;
+    private Authenticator       readAuthenticator, writeAuthenticator;
     private CipherBox           readCipher, writeCipher;
     // NOTE: compression state would be saved here
 
@@ -377,9 +377,9 @@
          * Note:  compression support would go here too
          */
         readCipher = CipherBox.NULL;
-        readMAC = MAC.NULL;
+        readAuthenticator = MAC.NULL;
         writeCipher = CipherBox.NULL;
-        writeMAC = MAC.NULL;
+        writeAuthenticator = MAC.NULL;
 
         // default security parameters for secure renegotiation
         secureRenegotiation = false;
@@ -586,7 +586,7 @@
 
         try {
             readCipher = handshaker.newReadCipher();
-            readMAC = handshaker.newReadMAC();
+            readAuthenticator = handshaker.newReadAuthenticator();
         } catch (GeneralSecurityException e) {
             // "can't happen"
             throw new SSLException("Algorithm missing:  ", e);
@@ -622,7 +622,7 @@
 
         try {
             writeCipher = handshaker.newWriteCipher();
-            writeMAC = handshaker.newWriteMAC();
+            writeAuthenticator = handshaker.newWriteAuthenticator();
         } catch (GeneralSecurityException e) {
             // "can't happen"
             throw new SSLException("Algorithm missing:  ", e);
@@ -958,7 +958,8 @@
              * throw a fatal alert if the integrity check fails.
              */
             try {
-                decryptedBB = inputRecord.decrypt(readMAC, readCipher, readBB);
+                decryptedBB = inputRecord.decrypt(
+                                    readAuthenticator, readCipher, readBB);
             } catch (BadPaddingException e) {
                 byte alertType = (inputRecord.contentType() ==
                     Record.ct_handshake) ?
@@ -967,7 +968,6 @@
                 fatal(alertType, e.getMessage(), e);
             }
 
-
             // if (!inputRecord.decompress(c))
             //     fatal(Alerts.alert_decompression_failure,
             //     "decompression failure");
@@ -1117,7 +1117,7 @@
                 hsStatus = getHSStatus(hsStatus);
                 if (connectionState < cs_ERROR && !isInboundDone() &&
                         (hsStatus == HandshakeStatus.NOT_HANDSHAKING)) {
-                    if (checkSequenceNumber(readMAC,
+                    if (checkSequenceNumber(readAuthenticator,
                             inputRecord.contentType())) {
                         hsStatus = getHSStatus(null);
                     }
@@ -1270,7 +1270,7 @@
 
         // eventually compress as well.
         HandshakeStatus hsStatus =
-                writer.writeRecord(eor, ea, writeMAC, writeCipher);
+                writer.writeRecord(eor, ea, writeAuthenticator, writeCipher);
 
         /*
          * We only need to check the sequence number state for
@@ -1287,7 +1287,7 @@
         hsStatus = getHSStatus(hsStatus);
         if (connectionState < cs_ERROR && !isOutboundDone() &&
                 (hsStatus == HandshakeStatus.NOT_HANDSHAKING)) {
-            if (checkSequenceNumber(writeMAC, eor.contentType())) {
+            if (checkSequenceNumber(writeAuthenticator, eor.contentType())) {
                 hsStatus = getHSStatus(null);
             }
         }
@@ -1326,7 +1326,7 @@
      */
     void writeRecord(EngineOutputRecord eor) throws IOException {
         // eventually compress as well.
-        writer.writeRecord(eor, writeMAC, writeCipher);
+        writer.writeRecord(eor, writeAuthenticator, writeCipher);
 
         /*
          * Check the sequence number state
@@ -1340,7 +1340,7 @@
          * of the last record cannot be wrapped.
          */
         if ((connectionState < cs_ERROR) && !isOutboundDone()) {
-            checkSequenceNumber(writeMAC, eor.contentType());
+            checkSequenceNumber(writeAuthenticator, eor.contentType());
         }
     }
 
@@ -1358,14 +1358,14 @@
      *
      * Return true if the handshake status may be changed.
      */
-    private boolean checkSequenceNumber(MAC mac, byte type)
+    private boolean checkSequenceNumber(Authenticator authenticator, byte type)
             throws IOException {
 
         /*
          * Don't bother to check the sequence number for error or
          * closed connections, or NULL MAC
          */
-        if (connectionState >= cs_ERROR || mac == MAC.NULL) {
+        if (connectionState >= cs_ERROR || authenticator == MAC.NULL) {
             return false;
         }
 
@@ -1373,7 +1373,7 @@
          * Conservatively, close the connection immediately when the
          * sequence number is close to overflow
          */
-        if (mac.seqNumOverflow()) {
+        if (authenticator.seqNumOverflow()) {
             /*
              * TLS protocols do not define a error alert for sequence
              * number overflow. We use handshake_failure error alert
@@ -1396,7 +1396,7 @@
          * Don't bother to kickstart the renegotiation when the local is
          * asking for it.
          */
-        if ((type != Record.ct_handshake) && mac.seqNumIsHuge()) {
+        if ((type != Record.ct_handshake) && authenticator.seqNumIsHuge()) {
             if (debug != null && Debug.isOn("ssl")) {
                 System.out.println(Thread.currentThread().getName() +
                         ", request renegotiation " +
--- a/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -292,7 +292,7 @@
     /*
      * Crypto state that's reinitialized when the session changes.
      */
-    private MAC                 readMAC, writeMAC;
+    private Authenticator       readAuthenticator, writeAuthenticator;
     private CipherBox           readCipher, writeCipher;
     // NOTE: compression state would be saved here
 
@@ -586,9 +586,9 @@
          * Note:  compression support would go here too
          */
         readCipher = CipherBox.NULL;
-        readMAC = MAC.NULL;
+        readAuthenticator = MAC.NULL;
         writeCipher = CipherBox.NULL;
-        writeMAC = MAC.NULL;
+        writeAuthenticator = MAC.NULL;
 
         // initial security parameters for secure renegotiation
         secureRenegotiation = false;
@@ -829,8 +829,7 @@
             boolean holdRecord) throws IOException {
 
         // r.compress(c);
-        r.addMAC(writeMAC);
-        r.encrypt(writeCipher);
+        r.encrypt(writeAuthenticator, writeCipher);
 
         if (holdRecord) {
             // If we were requested to delay the record due to possibility
@@ -861,7 +860,7 @@
          * of the last record cannot be wrapped.
          */
         if (connectionState < cs_ERROR) {
-            checkSequenceNumber(writeMAC, r.contentType());
+            checkSequenceNumber(writeAuthenticator, r.contentType());
         }
 
         // turn off the flag of the first application record
@@ -986,7 +985,7 @@
              * throw a fatal alert if the integrity check fails.
              */
             try {
-                r.decrypt(readMAC, readCipher);
+                r.decrypt(readAuthenticator, readCipher);
             } catch (BadPaddingException e) {
                 byte alertType = (r.contentType() == Record.ct_handshake)
                                         ? Alerts.alert_handshake_failure
@@ -1143,7 +1142,7 @@
                * of the last record cannot be wrapped.
                */
               if (connectionState < cs_ERROR) {
-                  checkSequenceNumber(readMAC, r.contentType());
+                  checkSequenceNumber(readAuthenticator, r.contentType());
               }
 
               return;
@@ -1166,14 +1165,14 @@
      * implementation would need to wrap a sequence number, it must
      * renegotiate instead."
      */
-    private void checkSequenceNumber(MAC mac, byte type)
+    private void checkSequenceNumber(Authenticator authenticator, byte type)
             throws IOException {
 
         /*
          * Don't bother to check the sequence number for error or
          * closed connections, or NULL MAC.
          */
-        if (connectionState >= cs_ERROR || mac == MAC.NULL) {
+        if (connectionState >= cs_ERROR || authenticator == MAC.NULL) {
             return;
         }
 
@@ -1181,7 +1180,7 @@
          * Conservatively, close the connection immediately when the
          * sequence number is close to overflow
          */
-        if (mac.seqNumOverflow()) {
+        if (authenticator.seqNumOverflow()) {
             /*
              * TLS protocols do not define a error alert for sequence
              * number overflow. We use handshake_failure error alert
@@ -1203,7 +1202,7 @@
          * Don't bother to kickstart the renegotiation when the local is
          * asking for it.
          */
-        if ((type != Record.ct_handshake) && mac.seqNumIsHuge()) {
+        if ((type != Record.ct_handshake) && authenticator.seqNumIsHuge()) {
             if (debug != null && Debug.isOn("ssl")) {
                 System.out.println(Thread.currentThread().getName() +
                         ", request renegotiation " +
@@ -2065,7 +2064,7 @@
 
         try {
             readCipher = handshaker.newReadCipher();
-            readMAC = handshaker.newReadMAC();
+            readAuthenticator = handshaker.newReadAuthenticator();
         } catch (GeneralSecurityException e) {
             // "can't happen"
             throw new SSLException("Algorithm missing:  ", e);
@@ -2096,7 +2095,7 @@
 
         try {
             writeCipher = handshaker.newWriteCipher();
-            writeMAC = handshaker.newWriteMAC();
+            writeAuthenticator = handshaker.newWriteAuthenticator();
         } catch (GeneralSecurityException e) {
             // "can't happen"
             throw new SSLException("Algorithm missing:  ", e);
--- a/src/share/classes/sun/security/util/UntrustedCertificates.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/security/util/UntrustedCertificates.java	Wed Apr 17 21:48:04 2013 -0700
@@ -843,5 +843,52 @@
         "zCOfhbsRWdMLYepauaNZOIMZXmFwcrIl0TGMkTAtATz+XmZc\n" +
         "-----END CERTIFICATE-----");
 
+        //
+        // Revoked code signing certificate w/ a stolen key issued by GoDaddy
+        // used to sign malware
+        //
+
+        // Subject: CN=CLEARESULT CONSULTING INC., OU=Corporate IT,
+        //          O=CLEARESULT CONSULTING INC., L=Austin, ST=TX, C=US
+        // Issuer:  SERIALNUMBER=07969287,
+        //          CN=Go Daddy Secure Certification Authority,
+        //          OU=http://certificates.godaddy.com/repository,
+        //          O="GoDaddy.com, Inc.",
+        //          L=Scottsdale,
+        //          ST=Arizona,
+        //          C=US
+        // Serial:  2b:73:43:2a:a8:4f:44
+        add("clearesult-consulting-inc-2AA84F44",
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIIFYjCCBEqgAwIBAgIHK3NDKqhPRDANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE\n" +
+        "BhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAY\n" +
+        "BgNVBAoTEUdvRGFkZHkuY29tLCBJbmMuMTMwMQYDVQQLEypodHRwOi8vY2VydGlm\n" +
+        "aWNhdGVzLmdvZGFkZHkuY29tL3JlcG9zaXRvcnkxMDAuBgNVBAMTJ0dvIERhZGR5\n" +
+        "IFNlY3VyZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTERMA8GA1UEBRMIMDc5Njky\n" +
+        "ODcwHhcNMTIwMjE1MjEwOTA2WhcNMTQwMjE1MjEwOTA2WjCBjDELMAkGA1UEBgwC\n" +
+        "VVMxCzAJBgNVBAgMAlRYMQ8wDQYDVQQHDAZBdXN0aW4xIzAhBgNVBAoMGkNMRUFS\n" +
+        "RVNVTFQgQ09OU1VMVElORyBJTkMuMRUwEwYDVQQLDAxDb3Jwb3JhdGUgSVQxIzAh\n" +
+        "BgNVBAMMGkNMRUFSRVNVTFQgQ09OU1VMVElORyBJTkMuMIIBIjANBgkqhkiG9w0B\n" +
+        "AQEFAAOCAQ8AMIIBCgKCAQEAtIOjCKeAicull+7ZIzt0/4ya3IeXUFlfypqKMLkU\n" +
+        "IbKjn0P5uMj6VE3rlbZr44RCegxvdnR6umBh1c0ZXoN3o+yc0JKcKcLiApmJJ277\n" +
+        "p7IbLwYDhBXRQNoIJm187IOMRPIxsKN4hL91txn9jGBmW+9zKlJlNhR5R7vjwU2E\n" +
+        "jrH/6oqsc9EM2yYpfjlNv6+3jSwAYZCkSWr+27PQOV+YHKmIxtJjX0upFz5FdIrV\n" +
+        "9CCX+L2Kji1THOkSgG4QTbYxmEcHqGViWz8hXLeNXjcbEsPuIiAu3hknxRHfUTE/\n" +
+        "U0Lh0Ug1e3LrJu+WnxM2SmUY4krsZ22c0yWUW9hzWITIjQIDAQABo4IBhzCCAYMw\n" +
+        "DwYDVR0TAQH/BAUwAwEBADATBgNVHSUEDDAKBggrBgEFBQcDAzAOBgNVHQ8BAf8E\n" +
+        "BAMCB4AwMwYDVR0fBCwwKjAooCagJIYiaHR0cDovL2NybC5nb2RhZGR5LmNvbS9n\n" +
+        "ZHM1LTE2LmNybDBTBgNVHSAETDBKMEgGC2CGSAGG/W0BBxcCMDkwNwYIKwYBBQUH\n" +
+        "AgEWK2h0dHA6Ly9jZXJ0aWZpY2F0ZXMuZ29kYWRkeS5jb20vcmVwb3NpdG9yeS8w\n" +
+        "gYAGCCsGAQUFBwEBBHQwcjAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZ29kYWRk\n" +
+        "eS5jb20vMEoGCCsGAQUFBzAChj5odHRwOi8vY2VydGlmaWNhdGVzLmdvZGFkZHku\n" +
+        "Y29tL3JlcG9zaXRvcnkvZ2RfaW50ZXJtZWRpYXRlLmNydDAfBgNVHSMEGDAWgBT9\n" +
+        "rGEyk2xF1uLuhV+auud2mWjM5zAdBgNVHQ4EFgQUDtdeKqeN2QkcbEp1HovFieNB\n" +
+        "XiowDQYJKoZIhvcNAQEFBQADggEBAD74Agw5tvi2aBl4/f/s7/VE/BClzDsKMb9K\n" +
+        "v9qpeC45ZA/jelxV11HKbQnVF194gDb7D2H9OsAsRUy8HVKbXEcc/8dKvwOqb+BC\n" +
+        "2i/EmfjLgmCfezNFtLq8xcPxF3zIRc44vPrK0z4YZsaHdH+yTEJ51p5EMdTqaLaP\n" +
+        "4n5m8LX3RfqlQB9dYFe6dUoYZjKm9d/pIRww3VqfOzjl42Edi1w6dWmBVMx1NZuR\n" +
+        "DBabJH1vJ9Gd+KwxMCmBZ6pQPl28JDimhJhI2LNqU349uADQVV0HJosddN/ARyyI\n" +
+        "LSIQO7BnNVKVG9Iujf33bvPNeg0qNz5qw+rKKq97Pqeum+L5oKU=\n" +
+        "-----END CERTIFICATE-----");
     }
 }
--- a/src/share/classes/sun/text/resources/FormatData.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/FormatData.java	Wed Apr 17 21:48:04 2013 -0700
@@ -79,9 +79,9 @@
 
 package sun.text.resources;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData extends ListResourceBundle {
+public class FormatData extends ParallelListResourceBundle {
     /**
      * Overrides ListResourceBundle
      */
@@ -117,12 +117,6 @@
             "Heisei",
         };
 
-        // Minguo era strings
-        final String[] rocEras ={
-            "Before R.O.C.",
-            "R.O.C.",
-        };
-
         return new Object[][] {
             { "MonthNames",
                 new String[] {
@@ -158,6 +152,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "J",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "Sunday", // Sunday
@@ -205,13 +216,7 @@
             },
             { "Eras",
                 julianEras },
-            { "cldr.long.Eras",
-                new String[] {
-                    "Before Christ",
-                    "Anno Domini"
-                }
-            },
-            { "cldr.short.Eras",
+            { "short.Eras",
                 julianEras },
             { "narrow.Eras",
                 new String[] {
@@ -230,10 +235,6 @@
             },
             { "japanese.Eras",
                 japaneseEras },
-            { "cldr.japanese.long.Eras",
-                japaneseEras },
-            { "cldr.japanese.short.Eras",
-                japaneseEras },
             { "japanese.short.Eras",
                 japaneseEraAbbrs
             },
@@ -822,14 +823,6 @@
                     "H:mm",               // short time pattern
                 }
             },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, G y MMMM dd",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "GGGGG yyyy-MM-dd",
-                }
-            },
             { "buddhist.DatePatterns",
                 new String[] {
                     "EEEE d MMMM G yyyy", // full date pattern
@@ -851,14 +844,6 @@
                     "h:mm a",                  // short time pattern
                 }
             },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, G y MMMM dd",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "GGGGG yy-MM-dd",
-                }
-            },
             { "japanese.DatePatterns",
                 new String[] {
                     "GGGG yyyy MMMM d (EEEE)", // full date pattern
@@ -872,99 +857,7 @@
                     "{1} {0}"                  // date-time pattern
                 }
             },
-            { "roc.Eras", rocEras },
-            { "roc.short.Eras", rocEras },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE, G y MMMM dd",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "GGGGG yyy-MM-dd",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, GGGG y MMMM dd",
-                    "GGGG y MMMM d",
-                    "GGGG y MMM d",
-                    "G yyy-MM-dd",
-                }
-            },
-            { "islamic.MonthNames",
-                new String[] {
-                    "Muharram",
-                    "Safar",
-                    "Rabi\u02bb I",
-                    "Rabi\u02bb II",
-                    "Jumada I",
-                    "Jumada II",
-                    "Rajab",
-                    "Sha\u02bbban",
-                    "Ramadan",
-                    "Shawwal",
-                    "Dhu\u02bbl-Qi\u02bbdah",
-                    "Dhu\u02bbl-Hijjah",
-                    "",
-                }
-            },
-            { "islamic.MonthAbbreviations",
-                new String[] {
-                    "Muh.",
-                    "Saf.",
-                    "Rab. I",
-                    "Rab. II",
-                    "Jum. I",
-                    "Jum. II",
-                    "Raj.",
-                    "Sha.",
-                    "Ram.",
-                    "Shaw.",
-                    "Dhu\u02bbl-Q.",
-                    "Dhu\u02bbl-H.",
-                    "",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, MMMM d, y G",
-                    "MMMM d, y G",
-                    "MMM d, y G",
-                    "M/d/yy G",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, MMMM d, y GGGG",
-                    "MMMM d, y GGGG",
-                    "MMM d, y GGGG",
-                    "M/d/yy GGGG",
-                }
-            },
             { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
-            { "calendarname.islamic-civil", "Islamic-Civil Calendar" },
-            { "calendarname.islamicc", "Islamic-Civil Calendar" },
-            { "calendarname.islamic", "Islamic Calendar" },
-            { "calendarname.japanese", "Japanese Calendar" },
-            { "calendarname.gregorian", "Gregorian Calendar" },
-            { "calendarname.gregory", "Gregorian Calendar" },
-            { "calendarname.roc", "Minguo Calendar" },
-            { "calendarname.buddhist", "Buddhist Calendar" },
-            { "field.era", "Era" },
-            { "field.year", "Year" },
-            { "field.month", "Month" },
-            { "field.week", "Week" },
-            { "field.weekday", "Day of the Week" },
-            { "field.dayperiod", "Dayperiod" },
-            { "field.hour", "Hour" },
-            { "field.minute", "Minute" },
-            { "field.second", "Second" },
-            { "field.zone", "Zone" },
         };
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/JavaTimeSupplementary.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,287 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "Q1",
+                    "Q2",
+                    "Q3",
+                    "Q4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "Q1",
+                    "Q2",
+                    "Q3",
+                    "Q4",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "Buddhist Calendar" },
+            { "calendarname.gregorian",
+                "Gregorian Calendar" },
+            { "calendarname.gregory",
+                "Gregorian Calendar" },
+            { "calendarname.islamic",
+                "Islamic Calendar" },
+            { "calendarname.islamic-civil",
+                "Islamic-Civil Calendar" },
+            { "calendarname.islamicc",
+                "Islamic-Civil Calendar" },
+            { "calendarname.japanese",
+                "Japanese Calendar" },
+            { "calendarname.roc",
+                "Minguo Calendar" },
+            { "field.dayperiod",
+                "Dayperiod" },
+            { "field.era",
+                "Era" },
+            { "field.hour",
+                "Hour" },
+            { "field.minute",
+                "Minute" },
+            { "field.month",
+                "Month" },
+            { "field.second",
+                "Second" },
+            { "field.week",
+                "Week" },
+            { "field.weekday",
+                "Day of the Week" },
+            { "field.year",
+                "Year" },
+            { "field.zone",
+                "Zone" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE, MMMM d, y GGGG",
+                    "MMMM d, y GGGG",
+                    "MMM d, y GGGG",
+                    "M/d/yy GGGG",
+                }
+            },
+            { "islamic.Eras",
+                new String[] {
+                    "",
+                    "AH",
+                }
+            },
+            { "islamic.MonthAbbreviations",
+                new String[] {
+                    "Muh.",
+                    "Saf.",
+                    "Rab. I",
+                    "Rab. II",
+                    "Jum. I",
+                    "Jum. II",
+                    "Raj.",
+                    "Sha.",
+                    "Ram.",
+                    "Shaw.",
+                    "Dhu\u02bbl-Q.",
+                    "Dhu\u02bbl-H.",
+                    "",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "Muharram",
+                    "Safar",
+                    "Rabi\u02bb I",
+                    "Rabi\u02bb II",
+                    "Jumada I",
+                    "Jumada II",
+                    "Rajab",
+                    "Sha\u02bbban",
+                    "Ramadan",
+                    "Shawwal",
+                    "Dhu\u02bbl-Qi\u02bbdah",
+                    "Dhu\u02bbl-Hijjah",
+                    "",
+                }
+            },
+            { "islamic.MonthNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                    "5",
+                    "6",
+                    "7",
+                    "8",
+                    "9",
+                    "10",
+                    "11",
+                    "12",
+                    "",
+                }
+            },
+            { "islamic.short.Eras",
+                new String[] {
+                    "",
+                    "AH",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, G y MMMM dd",
+                    "G y MMMM d",
+                    "G y MMM d",
+                    "GGGGG yyyy-MM-dd",
+                }
+            },
+            { "java.time.buddhist.short.Eras",
+                new String[] {
+                    "BC",
+                    "B.E.",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE, MMMM d, y G",
+                    "MMMM d, y G",
+                    "MMM d, y G",
+                    "M/d/yy G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "G y MMMM d (EEEE)",
+                    "G y MMMM d",
+                    "G y MMM d",
+                    "GGGGGy.MM.dd",
+                }
+            },
+            { "java.time.japanese.long.Eras",
+                new String[] {
+                    "",
+                    "Meiji",
+                    "Taisho",
+                    "Showa",
+                    "Heisei",
+                }
+            },
+            { "java.time.japanese.short.Eras",
+                new String[] {
+                    "",
+                    "Meiji",
+                    "Taisho",
+                    "Showa",
+                    "Heisei",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE, G y MMMM dd",
+                    "G y MMMM d",
+                    "G y MMM d",
+                    "GGGGG yyy-MM-dd",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "BC",
+                    "AD",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE, GGGG y MMMM dd",
+                    "GGGG y MMMM d",
+                    "GGGG y MMM d",
+                    "G yyy-MM-dd",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "Before R.O.C.",
+                    "R.O.C.",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "Before R.O.C.",
+                    "R.O.C.",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/ar/FormatData_ar.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ar/FormatData_ar.java	Wed Apr 17 21:48:04 2013 -0700
@@ -79,11 +79,11 @@
 
 package sun.text.resources.ar;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ar extends ListResourceBundle {
+public class FormatData_ar extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     @Override
     protected final Object[][] getContents() {
@@ -126,6 +126,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "\u064a",
+                    "\u0641",
+                    "\u0645",
+                    "\u0623",
+                    "\u0648",
+                    "\u0646",
+                    "\u0644",
+                    "\u063a",
+                    "\u0633",
+                    "\u0643",
+                    "\u0628",
+                    "\u062f",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "\u0627\u0644\u0623\u062d\u062f", // Sunday
@@ -148,6 +165,17 @@
                     "\u0633" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "\u0627\u0644\u0623\u062d\u062f",
+                    "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
+                    "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
+                    "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
+                    "\u0627\u0644\u062e\u0645\u064a\u0633",
+                    "\u0627\u0644\u062c\u0645\u0639\u0629",
+                    "\u0627\u0644\u0633\u0628\u062a",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "\u062d",
@@ -171,6 +199,42 @@
                     "\u0645"
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "\u0642.\u0645",
+                    "\u0645",
+                }
+            },
+            { "japanese.Eras",
+                new String[] {
+                    "\u0645",
+                    "\u0645\u064a\u062c\u064a",
+                    "\u062a\u064a\u0634\u0648",
+                    "\u0634\u0648\u0648\u0627",
+                    "\u0647\u064a\u0633\u064a",
+                }
+            },
+            { "japanese.short.Eras",
+                new String[] {
+                    "\u0645",
+                    "\u0645\u064a\u062c\u064a",
+                    "\u062a\u064a\u0634\u0648",
+                    "\u0634\u0648\u0648\u0627",
+                    "\u0647\u064a\u0633\u064a",
+                }
+            },
+            { "buddhist.Eras",
+                new String[] {
+                    "BC",
+                    "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a",
+                }
+            },
+            { "buddhist.short.Eras",
+                new String[] {
+                    "BC",
+                    "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a",
+                }
+            },
             { "NumberPatterns",
                 new String[] {
                     "#,##0.###;#,##0.###-", // decimal pattern
@@ -200,114 +264,6 @@
                 }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE\u060c d MMMM\u060c y G",
-                    "d MMMM\u060c y G",
-                    "dd\u200f/MM\u200f/y G",
-                    "d\u200f/M\u200f/y G",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE\u060c d MMMM\u060c y G",
-                    "d MMMM\u060c y G",
-                    "dd\u200f/MM\u200f/y G",
-                    "d\u200f/M\u200f/y G",
-                }
-            },
-            { "roc.Eras", rocEras },
-            { "roc.short.Eras", rocEras },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE\u060c d MMMM\u060c y G",
-                    "d MMMM\u060c y G",
-                    "dd\u200f/MM\u200f/y G",
-                    "d\u200f/M\u200f/y G",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE\u060c d MMMM\u060c y GGGG",
-                    "d MMMM\u060c y GGGG",
-                    "dd\u200f/MM\u200f/y GGGG",
-                    "d\u200f/M\u200f/y GGGG",
-                }
-            },
-            { "islamic.MonthNames",
-                new String[] {
-                    "\u0645\u062d\u0631\u0645",
-                    "\u0635\u0641\u0631",
-                    "\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644",
-                    "\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631",
-                    "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649",
-                    "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629",
-                    "\u0631\u062c\u0628",
-                    "\u0634\u0639\u0628\u0627\u0646",
-                    "\u0631\u0645\u0636\u0627\u0646",
-                    "\u0634\u0648\u0627\u0644",
-                    "\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629",
-                    "\u0630\u0648 \u0627\u0644\u062d\u062c\u0629",
-                    "",
-                }
-            },
-            { "islamic.MonthAbbreviations",
-                new String[] {
-                    "\u0645\u062d\u0631\u0645",
-                    "\u0635\u0641\u0631",
-                    "\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644",
-                    "\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631",
-                    "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649",
-                    "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629",
-                    "\u0631\u062c\u0628",
-                    "\u0634\u0639\u0628\u0627\u0646",
-                    "\u0631\u0645\u0636\u0627\u0646",
-                    "\u0634\u0648\u0627\u0644",
-                    "\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629",
-                    "\u0630\u0648 \u0627\u0644\u062d\u062c\u0629",
-                    "",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "\u0647\u0640",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "EEEE\u060c d MMMM y",
-                    "d MMMM y",
-                    "d MMM\u060c y G",
-                    "d\u200f/M\u200f/yyyy",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE\u060c d MMMM y",
-                    "d MMMM y",
-                    "d MMM\u060c y GGGG",
-                    "d\u200f/M\u200f/yyyy",
-                }
-            },
-            { "calendarname.islamic-civil", "\u062a\u0642\u0648\u064a\u0645 \u0627\u0633\u0644\u0627\u0645\u064a \u0645\u062f\u0646\u064a" },
-            { "calendarname.islamicc", "\u062a\u0642\u0648\u064a\u0645 \u0627\u0633\u0644\u0627\u0645\u064a \u0645\u062f\u0646\u064a" },
-            { "calendarname.islamic", "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0647\u062c\u0631\u064a" },
-            { "calendarname.japanese", "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u064a\u0627\u0628\u0627\u0646\u064a" },
-            { "calendarname.gregorian", "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0645\u064a\u0644\u0627\u062f\u064a" },
-            { "calendarname.gregory", "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0645\u064a\u0644\u0627\u062f\u064a" },
-            { "calendarname.roc", "\u062a\u0642\u0648\u064a\u0645 \u0645\u064a\u0646\u062c\u0648" },
-            { "calendarname.buddhist", "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a" },
-            { "field.era", "\u0627\u0644\u0639\u0635\u0631" },
-            { "field.year", "\u0627\u0644\u0633\u0646\u0629" },
-            { "field.month", "\u0627\u0644\u0634\u0647\u0631" },
-            { "field.week", "\u0627\u0644\u0623\u0633\u0628\u0648\u0639" },
-            { "field.weekday", "\u0627\u0644\u064a\u0648\u0645" },
-            { "field.dayperiod", "\u0635/\u0645" },
-            { "field.hour", "\u0627\u0644\u0633\u0627\u0639\u0627\u062a" },
-            { "field.minute", "\u0627\u0644\u062f\u0642\u0627\u0626\u0642" },
-            { "field.second", "\u0627\u0644\u062b\u0648\u0627\u0646\u064a" },
-            { "field.zone", "\u0627\u0644\u062a\u0648\u0642\u064a\u062a" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/ar/FormatData_ar_JO.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ar/FormatData_ar_JO.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,11 +42,11 @@
 
 package sun.text.resources.ar;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ar_JO extends ListResourceBundle {
+public class FormatData_ar_JO extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/ar/FormatData_ar_LB.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ar/FormatData_ar_LB.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,11 +42,11 @@
 
 package sun.text.resources.ar;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ar_LB extends ListResourceBundle {
+public class FormatData_ar_LB extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/ar/FormatData_ar_SY.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ar/FormatData_ar_SY.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,11 +42,11 @@
 
 package sun.text.resources.ar;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ar_SY extends ListResourceBundle {
+public class FormatData_ar_SY extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/ar/JavaTimeSupplementary_ar.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,285 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ar;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_ar extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterNames",
+                new String[] {
+                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644",
+                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a",
+                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b",
+                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "\u0661",
+                    "\u0662",
+                    "\u0663",
+                    "\u0664",
+                }
+            },
+            { "calendarname.buddhist",
+                "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a" },
+            { "calendarname.gregorian",
+                "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0645\u064a\u0644\u0627\u062f\u064a" },
+            { "calendarname.gregory",
+                "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0645\u064a\u0644\u0627\u062f\u064a" },
+            { "calendarname.islamic",
+                "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0647\u062c\u0631\u064a" },
+            { "calendarname.islamic-civil",
+                "\u062a\u0642\u0648\u064a\u0645 \u0627\u0633\u0644\u0627\u0645\u064a \u0645\u062f\u0646\u064a" },
+            { "calendarname.islamicc",
+                "\u062a\u0642\u0648\u064a\u0645 \u0627\u0633\u0644\u0627\u0645\u064a \u0645\u062f\u0646\u064a" },
+            { "calendarname.japanese",
+                "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u064a\u0627\u0628\u0627\u0646\u064a" },
+            { "calendarname.roc",
+                "\u062a\u0642\u0648\u064a\u0645 \u0645\u064a\u0646\u062c\u0648" },
+            { "field.dayperiod",
+                "\u0635/\u0645" },
+            { "field.era",
+                "\u0627\u0644\u0639\u0635\u0631" },
+            { "field.hour",
+                "\u0627\u0644\u0633\u0627\u0639\u0627\u062a" },
+            { "field.minute",
+                "\u0627\u0644\u062f\u0642\u0627\u0626\u0642" },
+            { "field.month",
+                "\u0627\u0644\u0634\u0647\u0631" },
+            { "field.second",
+                "\u0627\u0644\u062b\u0648\u0627\u0646\u064a" },
+            { "field.week",
+                "\u0627\u0644\u0623\u0633\u0628\u0648\u0639" },
+            { "field.weekday",
+                "\u0627\u0644\u064a\u0648\u0645" },
+            { "field.year",
+                "\u0627\u0644\u0633\u0646\u0629" },
+            { "field.zone",
+                "\u0627\u0644\u062a\u0648\u0642\u064a\u062a" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE\u060c d MMMM y",
+                    "d MMMM y",
+                    "d MMM\u060c y GGGG",
+                    "d\u200f/M\u200f/yyyy",
+                }
+            },
+            { "islamic.Eras",
+                new String[] {
+                    "",
+                    "\u0647\u0640",
+                }
+            },
+            { "islamic.MonthAbbreviations",
+                new String[] {
+                    "\u0645\u062d\u0631\u0645",
+                    "\u0635\u0641\u0631",
+                    "\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644",
+                    "\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631",
+                    "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649",
+                    "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629",
+                    "\u0631\u062c\u0628",
+                    "\u0634\u0639\u0628\u0627\u0646",
+                    "\u0631\u0645\u0636\u0627\u0646",
+                    "\u0634\u0648\u0627\u0644",
+                    "\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629",
+                    "\u0630\u0648 \u0627\u0644\u062d\u062c\u0629",
+                    "",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "\u0645\u062d\u0631\u0645",
+                    "\u0635\u0641\u0631",
+                    "\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644",
+                    "\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631",
+                    "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649",
+                    "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629",
+                    "\u0631\u062c\u0628",
+                    "\u0634\u0639\u0628\u0627\u0646",
+                    "\u0631\u0645\u0636\u0627\u0646",
+                    "\u0634\u0648\u0627\u0644",
+                    "\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629",
+                    "\u0630\u0648 \u0627\u0644\u062d\u062c\u0629",
+                    "",
+                }
+            },
+            { "islamic.MonthNarrows",
+                new String[] {
+                    "\u0661",
+                    "\u0662",
+                    "\u0663",
+                    "\u0664",
+                    "\u0665",
+                    "\u0666",
+                    "\u0667",
+                    "\u0668",
+                    "\u0669",
+                    "\u0661\u0660",
+                    "\u0661\u0661",
+                    "\u0661\u0662",
+                    "",
+                }
+            },
+            { "islamic.short.Eras",
+                new String[] {
+                    "",
+                    "\u0647\u0640",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE\u060c d MMMM\u060c y G",
+                    "d MMMM\u060c y G",
+                    "dd\u200f/MM\u200f/y G",
+                    "d\u200f/M\u200f/y G",
+                }
+            },
+            { "java.time.buddhist.short.Eras",
+                new String[] {
+                    "BC",
+                    "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE\u060c d MMMM y",
+                    "d MMMM y",
+                    "d MMM\u060c y G",
+                    "d\u200f/M\u200f/yyyy",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE\u060c d MMMM\u060c y G",
+                    "d MMMM\u060c y G",
+                    "dd\u200f/MM\u200f/y G",
+                    "d\u200f/M\u200f/y G",
+                }
+            },
+            { "java.time.japanese.long.Eras",
+                new String[] {
+                    "\u0645",
+                    "\u0645\u064a\u062c\u064a",
+                    "\u062a\u064a\u0634\u0648",
+                    "\u0634\u0648\u0648\u0627",
+                    "\u0647\u064a\u0633\u064a",
+                }
+            },
+            { "java.time.japanese.short.Eras",
+                new String[] {
+                    "\u0645",
+                    "\u0645\u064a\u062c\u064a",
+                    "\u062a\u064a\u0634\u0648",
+                    "\u0634\u0648\u0648\u0627",
+                    "\u0647\u064a\u0633\u064a",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
+                    "\u0645\u064a\u0644\u0627\u062f\u064a",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE\u060c d MMMM\u060c y G",
+                    "d MMMM\u060c y G",
+                    "dd\u200f/MM\u200f/y G",
+                    "d\u200f/M\u200f/y G",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\u0642.\u0645",
+                    "\u0645",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE\u060c d MMMM\u060c y GGGG",
+                    "d MMMM\u060c y GGGG",
+                    "dd\u200f/MM\u200f/y GGGG",
+                    "d\u200f/M\u200f/y GGGG",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "Before R.O.C.",
+                    "\u062c\u0645\u0647\u0648\u0631\u064a\u0629 \u0627\u0644\u0635\u064a",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "Before R.O.C.",
+                    "\u062c\u0645\u0647\u0648\u0631\u064a\u0629 \u0627\u0644\u0635\u064a",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/be/FormatData_be.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/be/FormatData_be.java	Wed Apr 17 21:48:04 2013 -0700
@@ -79,11 +79,11 @@
 
 package sun.text.resources.be;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_be extends ListResourceBundle {
+public class FormatData_be extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -177,6 +177,12 @@
                     "\u043d.\u0435."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "\u0434\u0430 \u043d.\u044d.",
+                    "\u043d.\u044d.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
@@ -214,29 +220,6 @@
                 }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d.M.yy",
-                }
-            },
-            { "calendarname.islamic-civil", "\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u0441\u0432\u0435\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" },
-            { "calendarname.islamicc", "\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u0441\u0432\u0435\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" },
-            { "calendarname.islamic", "\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" },
-            { "calendarname.buddhist", "\u0431\u0443\u0434\u044b\u0441\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" },
-            { "calendarname.japanese", "\u044f\u043f\u043e\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" },
-            { "calendarname.gregorian", "\u0433\u0440\u044d\u0433\u0430\u0440\u044b\u044f\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" },
-            { "calendarname.gregory", "\u0433\u0440\u044d\u0433\u0430\u0440\u044b\u044f\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" },
-            { "field.era", "\u044d\u0440\u0430" },
-            { "field.year", "\u0433\u043e\u0434" },
-            { "field.month", "\u043c\u0435\u0441\u044f\u0446" },
-            { "field.week", "\u0442\u044b\u0434\u0437\u0435\u043d\u044c" },
-            { "field.weekday", "\u0434\u0437\u0435\u043d\u044c \u0442\u044b\u0434\u043d\u044f" },
-            { "field.hour", "\u0433\u0430\u0434\u0437\u0456\u043d\u0430" },
-            { "field.minute", "\u0445\u0432\u0456\u043b\u0456\u043d\u0430" },
-            { "field.second", "\u0441\u0435\u043a\u0443\u043d\u0434\u0430" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/be/FormatData_be_BY.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/be/FormatData_be_BY.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,11 +43,11 @@
 
 package sun.text.resources.be;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_be_BY extends ListResourceBundle {
+public class FormatData_be_BY extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/be/JavaTimeSupplementary_be.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.be;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_be extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "1-\u0448\u044b \u043a\u0432.",
+                    "2-\u0433\u0456 \u043a\u0432.",
+                    "3-\u0446\u0456 \u043a\u0432.",
+                    "4-\u0442\u044b \u043a\u0432.",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1-\u0448\u044b \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+                    "2-\u0433\u0456 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+                    "3-\u0446\u0456 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+                    "4-\u0442\u044b \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+                }
+            },
+            { "calendarname.buddhist",
+                "\u0431\u0443\u0434\u044b\u0441\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" },
+            { "calendarname.gregorian",
+                "\u0433\u0440\u044d\u0433\u0430\u0440\u044b\u044f\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" },
+            { "calendarname.gregory",
+                "\u0433\u0440\u044d\u0433\u0430\u0440\u044b\u044f\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" },
+            { "calendarname.islamic",
+                "\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" },
+            { "calendarname.islamic-civil",
+                "\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u0441\u0432\u0435\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" },
+            { "calendarname.islamicc",
+                "\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u0441\u0432\u0435\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" },
+            { "calendarname.japanese",
+                "\u044f\u043f\u043e\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" },
+            { "field.dayperiod",
+                "\u0414\u041f/\u041f\u041f" },
+            { "field.era",
+                "\u044d\u0440\u0430" },
+            { "field.hour",
+                "\u0433\u0430\u0434\u0437\u0456\u043d\u0430" },
+            { "field.minute",
+                "\u0445\u0432\u0456\u043b\u0456\u043d\u0430" },
+            { "field.month",
+                "\u043c\u0435\u0441\u044f\u0446" },
+            { "field.second",
+                "\u0441\u0435\u043a\u0443\u043d\u0434\u0430" },
+            { "field.week",
+                "\u0442\u044b\u0434\u0437\u0435\u043d\u044c" },
+            { "field.weekday",
+                "\u0434\u0437\u0435\u043d\u044c \u0442\u044b\u0434\u043d\u044f" },
+            { "field.year",
+                "\u0433\u043e\u0434" },
+            { "field.zone",
+                "Zone" },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM y G",
+                    "d.M.yy",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\u0434\u0430 \u043d.\u0435.",
+                    "\u043d.\u0435.",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/bg/FormatData_bg.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/bg/FormatData_bg.java	Wed Apr 17 21:48:04 2013 -0700
@@ -79,11 +79,11 @@
 
 package sun.text.resources.bg;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_bg extends ListResourceBundle {
+public class FormatData_bg extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -121,6 +121,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "\u044f",
+                    "\u0444",
+                    "\u043c",
+                    "\u0430",
+                    "\u043c",
+                    "\u044e",
+                    "\u044e",
+                    "\u0430",
+                    "\u0441",
+                    "\u043e",
+                    "\u043d",
+                    "\u0434",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "\u041d\u0435\u0434\u0435\u043b\u044f", // Sunday
@@ -160,6 +177,12 @@
                     "\u043d.\u0435."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "\u043f\u0440. \u043d. \u0435.",
+                    "\u043e\u0442 \u043d. \u0435.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
@@ -197,41 +220,6 @@
                              }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "islamic.MonthNames",
-                new String[] {
-                    "\u043c\u0443\u0445\u0430\u0440\u0430\u043c",
-                    "\u0441\u0430\u0444\u0430\u0440",
-                    "\u0440\u0430\u0431\u0438-1",
-                    "\u0440\u0430\u0431\u0438-2",
-                    "\u0434\u0436\u0443\u043c\u0430\u0434\u0430-1",
-                    "\u0434\u0436\u0443\u043c\u0430\u0434\u0430-2",
-                    "\u0440\u0430\u0434\u0436\u0430\u0431",
-                    "\u0448\u0430\u0431\u0430\u043d",
-                    "\u0440\u0430\u043c\u0430\u0437\u0430\u043d",
-                    "\u0428\u0430\u0432\u0430\u043b",
-                    "\u0414\u0445\u0443\u043b-\u041a\u0430\u0430\u0434\u0430",
-                    "\u0414\u0445\u0443\u043b-\u0445\u0438\u0434\u0436\u0430",
-                    "",
-                }
-            },
-            { "calendarname.islamic-civil", "\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u0435\u043d \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.islamicc", "\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u0435\u043d \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.islamic", "\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.japanese", "\u042f\u043f\u043e\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.gregorian", "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.gregory", "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.roc", "\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u043d\u0430 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u041a\u0438\u0442\u0430\u0439" },
-            { "calendarname.buddhist", "\u0411\u0443\u0434\u0438\u0441\u0442\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "field.era", "\u0435\u0440\u0430" },
-            { "field.year", "\u0433\u043e\u0434\u0438\u043d\u0430" },
-            { "field.month", "\u043c\u0435\u0441\u0435\u0446" },
-            { "field.week", "\u0441\u0435\u0434\u043c\u0438\u0446\u0430" },
-            { "field.weekday", "\u0414\u0435\u043d \u043e\u0442 \u0441\u0435\u0434\u043c\u0438\u0446\u0430\u0442\u0430" },
-            { "field.dayperiod", "\u0434\u0435\u043d" },
-            { "field.hour", "\u0447\u0430\u0441" },
-            { "field.minute", "\u043c\u0438\u043d\u0443\u0442\u0430" },
-            { "field.second", "\u0441\u0435\u043a\u0443\u043d\u0434\u0430" },
-            { "field.zone", "\u0437\u043e\u043d\u0430" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/bg/FormatData_bg_BG.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/bg/FormatData_bg_BG.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,11 +43,11 @@
 
 package sun.text.resources.bg;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_bg_BG extends ListResourceBundle {
+public class FormatData_bg_BG extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/bg/JavaTimeSupplementary_bg.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.bg;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_bg extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "I \u0442\u0440\u0438\u043c.",
+                    "II \u0442\u0440\u0438\u043c.",
+                    "III \u0442\u0440\u0438\u043c.",
+                    "IV \u0442\u0440\u0438\u043c.",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1-\u0432\u043e \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
+                    "2-\u0440\u043e \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
+                    "3-\u0442\u043e \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
+                    "4-\u0442\u043e \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "\u0411\u0443\u0434\u0438\u0441\u0442\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.gregorian",
+                "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.gregory",
+                "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.islamic",
+                "\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.islamic-civil",
+                "\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u0435\u043d \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.islamicc",
+                "\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u0435\u043d \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.japanese",
+                "\u042f\u043f\u043e\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.roc",
+                "\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u043d\u0430 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u041a\u0438\u0442\u0430\u0439" },
+            { "field.dayperiod",
+                "\u0434\u0435\u043d" },
+            { "field.era",
+                "\u0435\u0440\u0430" },
+            { "field.hour",
+                "\u0447\u0430\u0441" },
+            { "field.minute",
+                "\u043c\u0438\u043d\u0443\u0442\u0430" },
+            { "field.month",
+                "\u043c\u0435\u0441\u0435\u0446" },
+            { "field.second",
+                "\u0441\u0435\u043a\u0443\u043d\u0434\u0430" },
+            { "field.week",
+                "\u0441\u0435\u0434\u043c\u0438\u0446\u0430" },
+            { "field.weekday",
+                "\u0414\u0435\u043d \u043e\u0442 \u0441\u0435\u0434\u043c\u0438\u0446\u0430\u0442\u0430" },
+            { "field.year",
+                "\u0433\u043e\u0434\u0438\u043d\u0430" },
+            { "field.zone",
+                "\u0437\u043e\u043d\u0430" },
+            { "islamic.MonthNames",
+                new String[] {
+                    "\u043c\u0443\u0445\u0430\u0440\u0430\u043c",
+                    "\u0441\u0430\u0444\u0430\u0440",
+                    "\u0440\u0430\u0431\u0438-1",
+                    "\u0440\u0430\u0431\u0438-2",
+                    "\u0434\u0436\u0443\u043c\u0430\u0434\u0430-1",
+                    "\u0434\u0436\u0443\u043c\u0430\u0434\u0430-2",
+                    "\u0440\u0430\u0434\u0436\u0430\u0431",
+                    "\u0448\u0430\u0431\u0430\u043d",
+                    "\u0440\u0430\u043c\u0430\u0437\u0430\u043d",
+                    "\u0428\u0430\u0432\u0430\u043b",
+                    "\u0414\u0445\u0443\u043b-\u041a\u0430\u0430\u0434\u0430",
+                    "\u0414\u0445\u0443\u043b-\u0445\u0438\u0434\u0436\u0430",
+                    "",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "\u043f\u0440.\u0425\u0440.",
+                    "\u0441\u043b.\u0425\u0440.",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\u043f\u0440.\u043d.\u0435.",
+                    "\u043d.\u0435.",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/ca/FormatData_ca.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ca/FormatData_ca.java	Wed Apr 17 21:48:04 2013 -0700
@@ -79,11 +79,11 @@
 
 package sun.text.resources.ca;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ca extends ListResourceBundle {
+public class FormatData_ca extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -104,6 +104,23 @@
                     "",
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "G",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "G",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "standalone.MonthNames",
                 new String[] {
                     "gener", // january
@@ -183,6 +200,17 @@
                     "dissabte" // Saturday
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "Diumenge",
+                    "Dilluns",
+                    "Dimarts",
+                    "Dimecres",
+                    "Dijous",
+                    "Divendres",
+                    "Dissabte",
+                }
+            },
             { "DayAbbreviations",
                 new String[] {
                     "dg.", // abb Sunday
@@ -194,6 +222,17 @@
                     "ds." // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "dg",
+                    "dl",
+                    "dt",
+                    "dc",
+                    "dj",
+                    "dv",
+                    "ds",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "G",
@@ -216,6 +255,12 @@
                     "s",
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "aC",
+                    "dC",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
@@ -253,24 +298,6 @@
                 }
             },
             { "DateTimePatternChars", "GuMtkHmsSEDFwWahKzZ" },
-            { "calendarname.islamic-civil", "calendari civil isl\u00e0mic" },
-            { "calendarname.islamicc", "calendari civil isl\u00e0mic" },
-            { "calendarname.roc", "calendari de la Rep\u00fablica de Xina" },
-            { "calendarname.islamic", "calendari musulm\u00e0" },
-            { "calendarname.buddhist", "calendari budista" },
-            { "calendarname.japanese", "calendari japon\u00e8s" },
-            { "calendarname.gregorian", "calendari gregori\u00e0" },
-            { "calendarname.gregory", "calendari gregori\u00e0" },
-            { "field.era", "era" },
-            { "field.year", "any" },
-            { "field.month", "mes" },
-            { "field.week", "setmana" },
-            { "field.weekday", "dia de la setmana" },
-            { "field.dayperiod", "a.m./p.m." },
-            { "field.hour", "hora" },
-            { "field.minute", "minut" },
-            { "field.second", "segon" },
-            { "field.zone", "zona" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/ca/FormatData_ca_ES.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ca/FormatData_ca_ES.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,11 +43,11 @@
 
 package sun.text.resources.ca;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ca_ES extends ListResourceBundle {
+public class FormatData_ca_ES extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/ca/JavaTimeSupplementary_ca.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ca;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_ca extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "1T",
+                    "2T",
+                    "3T",
+                    "4T",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1r trimestre",
+                    "2n trimestre",
+                    "3r trimestre",
+                    "4t trimestre",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "calendari budista" },
+            { "calendarname.gregorian",
+                "calendari gregori\u00e0" },
+            { "calendarname.gregory",
+                "calendari gregori\u00e0" },
+            { "calendarname.islamic",
+                "calendari musulm\u00e0" },
+            { "calendarname.islamic-civil",
+                "calendari civil isl\u00e0mic" },
+            { "calendarname.islamicc",
+                "calendari civil isl\u00e0mic" },
+            { "calendarname.japanese",
+                "calendari japon\u00e8s" },
+            { "calendarname.roc",
+                "calendari de la Rep\u00fablica de Xina" },
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "field.era",
+                "era" },
+            { "field.hour",
+                "hora" },
+            { "field.minute",
+                "minut" },
+            { "field.month",
+                "mes" },
+            { "field.second",
+                "segon" },
+            { "field.week",
+                "setmana" },
+            { "field.weekday",
+                "dia de la setmana" },
+            { "field.year",
+                "any" },
+            { "field.zone",
+                "zona" },
+            { "java.time.short.Eras",
+                new String[] {
+                    "aC",
+                    "dC",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/cs/FormatData_cs.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/cs/FormatData_cs.java	Wed Apr 17 21:48:04 2013 -0700
@@ -79,11 +79,11 @@
 
 package sun.text.resources.cs;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_cs extends ListResourceBundle {
+public class FormatData_cs extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -155,6 +155,40 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "l",
+                    "\u00fa",
+                    "b",
+                    "d",
+                    "k",
+                    "\u010d",
+                    "\u010d",
+                    "s",
+                    "z",
+                    "\u0159",
+                    "l",
+                    "p",
+                    "",
+                }
+            },
+            { "standalone.MonthNarrows",
+                new String[] {
+                    "l",
+                    "\u00fa",
+                    "b",
+                    "d",
+                    "k",
+                    "\u010d",
+                    "\u010d",
+                    "s",
+                    "z",
+                    "\u0159",
+                    "l",
+                    "p",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "Ned\u011ble", // Sunday
@@ -166,6 +200,17 @@
                     "Sobota" // Saturday
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "ned\u011ble",
+                    "pond\u011bl\u00ed",
+                    "\u00fater\u00fd",
+                    "st\u0159eda",
+                    "\u010dtvrtek",
+                    "p\u00e1tek",
+                    "sobota",
+                }
+            },
             { "DayAbbreviations",
                 new String[] {
                     "Ne", // abb Sunday
@@ -177,6 +222,17 @@
                     "So" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "ne",
+                    "po",
+                    "\u00fat",
+                    "st",
+                    "\u010dt",
+                    "p\u00e1",
+                    "so",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "N",
@@ -188,6 +244,17 @@
                     "S",
                 }
             },
+            { "standalone.DayNarrows",
+                new String[] {
+                    "N",
+                    "P",
+                    "\u00da",
+                    "S",
+                    "\u010c",
+                    "P",
+                    "S",
+                }
+            },
             { "AmPmMarkers",
                 new String[] {
                     "dop.", // am marker
@@ -200,6 +267,18 @@
                     "po Kr."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "p\u0159. n. l.",
+                    "n. l.",
+                }
+            },
+            { "narrow.Eras",
+                new String[] {
+                    "p\u0159.n.l.",
+                    "n. l.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
@@ -237,22 +316,6 @@
                 }
             },
             { "DateTimePatternChars", "GuMtkHmsSEDFwWahKzZ" },
-            { "calendarname.islamic-civil", "Muslimsk\u00fd ob\u010dansk\u00fd kalend\u00e1\u0159" },
-            { "calendarname.islamicc", "Muslimsk\u00fd ob\u010dansk\u00fd kalend\u00e1\u0159" },
-            { "calendarname.islamic", "Muslimsk\u00fd kalend\u00e1\u0159" },
-            { "calendarname.buddhist", "Buddhistick\u00fd kalend\u00e1\u0159" },
-            { "calendarname.japanese", "Japonsk\u00fd kalend\u00e1\u0159" },
-            { "calendarname.gregorian", "Gregori\u00e1nsk\u00fd kalend\u00e1\u0159" },
-            { "calendarname.gregory", "Gregori\u00e1nsk\u00fd kalend\u00e1\u0159" },
-            { "field.year", "Rok" },
-            { "field.month", "M\u011bs\u00edc" },
-            { "field.week", "T\u00fdden" },
-            { "field.weekday", "Den v t\u00fddnu" },
-            { "field.dayperiod", "AM/PM" },
-            { "field.hour", "Hodina" },
-            { "field.minute", "Minuta" },
-            { "field.second", "Sekunda" },
-            { "field.zone", "\u010casov\u00e9 p\u00e1smo" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/cs/FormatData_cs_CZ.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/cs/FormatData_cs_CZ.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,11 +43,11 @@
 
 package sun.text.resources.cs;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_cs_CZ extends ListResourceBundle {
+public class FormatData_cs_CZ extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/cs/JavaTimeSupplementary_cs.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,190 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.cs;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_cs extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "Q1",
+                    "Q2",
+                    "Q3",
+                    "Q4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1. \u010dtvrtlet\u00ed",
+                    "2. \u010dtvrtlet\u00ed",
+                    "3. \u010dtvrtlet\u00ed",
+                    "4. \u010dtvrtlet\u00ed",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "Buddhistick\u00fd kalend\u00e1\u0159" },
+            { "calendarname.gregorian",
+                "Gregori\u00e1nsk\u00fd kalend\u00e1\u0159" },
+            { "calendarname.gregory",
+                "Gregori\u00e1nsk\u00fd kalend\u00e1\u0159" },
+            { "calendarname.islamic",
+                "Muslimsk\u00fd kalend\u00e1\u0159" },
+            { "calendarname.islamic-civil",
+                "Muslimsk\u00fd ob\u010dansk\u00fd kalend\u00e1\u0159" },
+            { "calendarname.islamicc",
+                "Muslimsk\u00fd ob\u010dansk\u00fd kalend\u00e1\u0159" },
+            { "calendarname.japanese",
+                "Japonsk\u00fd kalend\u00e1\u0159" },
+            { "calendarname.roc",
+                "Kalend\u00e1\u0159 \u010c\u00ednsk\u00e9 republiky" },
+            { "field.dayperiod",
+                "AM/PM" },
+            { "field.era",
+                "Letopo\u010det" },
+            { "field.hour",
+                "Hodina" },
+            { "field.minute",
+                "Minuta" },
+            { "field.month",
+                "M\u011bs\u00edc" },
+            { "field.second",
+                "Sekunda" },
+            { "field.week",
+                "T\u00fdden" },
+            { "field.weekday",
+                "Den v t\u00fddnu" },
+            { "field.year",
+                "Rok" },
+            { "field.zone",
+                "\u010casov\u00e9 p\u00e1smo" },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, d. MMMM y G",
+                    "d. MMMM y G",
+                    "d. M. y G",
+                    "dd.MM.yy GGGGG",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y G",
+                    "d. MMMM y G",
+                    "d. M. y G",
+                    "dd.MM.yy GGGGG",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "p\u0159. n. l.",
+                    "n. l.",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE, d. MMMM y G",
+                    "d. MMMM y G",
+                    "d. M. y G",
+                    "dd.MM.yy GGGGG",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "p\u0159.Kr.",
+                    "po Kr.",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE, d. MMMM y GGGG",
+                    "d. MMMM y GGGG",
+                    "d. M. y GGGG",
+                    "dd.MM.yy G",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "P\u0159ed R. O. C.",
+                    "",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "P\u0159ed R. O. C.",
+                    "",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/da/FormatData_da.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/da/FormatData_da.java	Wed Apr 17 21:48:04 2013 -0700
@@ -79,11 +79,11 @@
 
 package sun.text.resources.da;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_da extends ListResourceBundle {
+public class FormatData_da extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -121,6 +121,23 @@
                     "",
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "J",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "standalone.MonthAbbreviations",
                 new String[] {
                     "jan", // abb january
@@ -186,6 +203,18 @@
                     "\ufffd" // NaN
                 }
             },
+            { "Eras",
+                new String[] {
+                    "f.Kr.",
+                    "e.Kr.",
+                }
+            },
+            { "short.Eras",
+                new String[] {
+                    "f.Kr.",
+                    "e.Kr.",
+                }
+            },
             { "TimePatterns",
                 new String[] {
                     "HH:mm:ss z", // full time pattern
@@ -208,64 +237,6 @@
                 }
             },
             { "DateTimePatternChars", "GuMtkHmsSEDFwWahKzZ" },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. MMM y G",
-                    "d/M/y GGGGG",
-                }
-            },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. MMM y G",
-                    "d/M/y GGGGG",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d. MMM y GGGG",
-                    "d/M/y G",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. MMM y G",
-                    "d/M/y G",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d. MMM y GGGG",
-                    "d/M/y GGGG",
-                }
-            },
-            { "calendarname.islamic-civil", "verdslig islamisk kalender" },
-            { "calendarname.islamicc", "verdslig islamisk kalender" },
-            { "calendarname.roc", "kalender for Republikken Kina" },
-            { "calendarname.islamic", "islamisk kalender" },
-            { "calendarname.buddhist", "buddhistisk kalender" },
-            { "calendarname.japanese", "japansk kalender" },
-            { "calendarname.gregorian", "gregoriansk kalender" },
-            { "calendarname.gregory", "gregoriansk kalender" },
-            { "field.era", "\u00e6ra" },
-            { "field.year", "\u00e5r" },
-            { "field.month", "m\u00e5ned" },
-            { "field.week", "uge" },
-            { "field.weekday", "ugedag" },
-            { "field.dayperiod", "dagtid" },
-            { "field.hour", "time" },
-            { "field.minute", "minut" },
-            { "field.second", "sekund" },
-            { "field.zone", "tidszone" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/da/FormatData_da_DK.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/da/FormatData_da_DK.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,11 +43,11 @@
 
 package sun.text.resources.da;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_da_DK extends ListResourceBundle {
+public class FormatData_da_DK extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/da/JavaTimeSupplementary_da.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.da;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_da extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "K1",
+                    "K2",
+                    "K3",
+                    "K4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1. kvartal",
+                    "2. kvartal",
+                    "3. kvartal",
+                    "4. kvartal",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "buddhistisk kalender" },
+            { "calendarname.gregorian",
+                "gregoriansk kalender" },
+            { "calendarname.gregory",
+                "gregoriansk kalender" },
+            { "calendarname.islamic",
+                "islamisk kalender" },
+            { "calendarname.islamic-civil",
+                "verdslig islamisk kalender" },
+            { "calendarname.islamicc",
+                "verdslig islamisk kalender" },
+            { "calendarname.japanese",
+                "japansk kalender" },
+            { "calendarname.roc",
+                "kalender for Republikken Kina" },
+            { "field.dayperiod",
+                "dagtid" },
+            { "field.era",
+                "\u00e6ra" },
+            { "field.hour",
+                "time" },
+            { "field.minute",
+                "minut" },
+            { "field.month",
+                "m\u00e5ned" },
+            { "field.second",
+                "sekund" },
+            { "field.week",
+                "uge" },
+            { "field.weekday",
+                "ugedag" },
+            { "field.year",
+                "\u00e5r" },
+            { "field.zone",
+                "tidszone" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y GGGG",
+                    "d. MMMM y GGGG",
+                    "d. MMM y GGGG",
+                    "d/M/y GGGG",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y G",
+                    "d. MMMM y G",
+                    "d. MMM y G",
+                    "d/M/yyyy",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y G",
+                    "d. MMMM y G",
+                    "d. MMM y G",
+                    "d/M/y G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y G",
+                    "d. MMMM y G",
+                    "d. MMM y G",
+                    "d/M/y GGGGG",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "f.Kr.",
+                    "e.Kr.",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y G",
+                    "d. MMMM y G",
+                    "d. MMM y G",
+                    "d/M/y GGGGG",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "f.Kr.",
+                    "e.Kr.",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y GGGG",
+                    "d. MMMM y GGGG",
+                    "d. MMM y GGGG",
+                    "d/M/y G",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/de/FormatData_de.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/de/FormatData_de.java	Wed Apr 17 21:48:04 2013 -0700
@@ -79,11 +79,11 @@
 
 package sun.text.resources.de;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_de extends ListResourceBundle {
+public class FormatData_de extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -121,6 +121,23 @@
                     "",
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "J",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "standalone.MonthAbbreviations",
                 new String[] {
                     "Jan", // abb january
@@ -160,6 +177,17 @@
                     "Sa" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "So",
+                    "Mo",
+                    "Di",
+                    "Mi",
+                    "Do",
+                    "Fr",
+                    "Sa",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "S",
@@ -177,6 +205,12 @@
                     "n. Chr."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "v. Chr.",
+                    "n. Chr.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
@@ -214,72 +248,6 @@
                 }
             },
             { "DateTimePatternChars", "GuMtkHmsSEDFwWahKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. MMM y G",
-                    "d.M.yyyy",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. MMM y G",
-                    "d.M.y GGGGG",
-                }
-            },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. MMM y G",
-                    "d.M.y GGGGG",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d. MMM y GGGG",
-                    "d.M.y G",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. MMM y G",
-                    "d.M.y G",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d. MMM y GGGG",
-                    "d.M.y GGGG",
-                }
-            },
-            { "calendarname.islamic-civil", "B\u00fcrgerlicher islamischer Kalender" },
-            { "calendarname.islamicc", "B\u00fcrgerlicher islamischer Kalender" },
-            { "calendarname.roc", "Kalender der Republik China" },
-            { "calendarname.islamic", "Islamischer Kalender" },
-            { "calendarname.buddhist", "Buddhistischer Kalender" },
-            { "calendarname.japanese", "Japanischer Kalender" },
-            { "calendarname.gregorian", "Gregorianischer Kalender" },
-            { "calendarname.gregory", "Gregorianischer Kalender" },
-            { "field.era", "Epoche" },
-            { "field.year", "Jahr" },
-            { "field.month", "Monat" },
-            { "field.week", "Woche" },
-            { "field.weekday", "Wochentag" },
-            { "field.dayperiod", "Tagesh\u00e4lfte" },
-            { "field.hour", "Stunde" },
-            { "field.minute", "Minute" },
-            { "field.second", "Sekunde" },
-            { "field.zone", "Zone" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/de/FormatData_de_AT.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/de/FormatData_de_AT.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,11 +43,11 @@
 
 package sun.text.resources.de;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_de_AT extends ListResourceBundle {
+public class FormatData_de_AT extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/de/FormatData_de_CH.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/de/FormatData_de_CH.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,11 +43,11 @@
 
 package sun.text.resources.de;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_de_CH extends ListResourceBundle {
+public class FormatData_de_CH extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/de/FormatData_de_DE.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/de/FormatData_de_DE.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,11 +43,11 @@
 
 package sun.text.resources.de;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_de_DE extends ListResourceBundle {
+public class FormatData_de_DE extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/de/FormatData_de_LU.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/de/FormatData_de_LU.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.de;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_de_LU extends ListResourceBundle {
+public class FormatData_de_LU extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/de/JavaTimeSupplementary_de.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.de;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_de extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "Q1",
+                    "Q2",
+                    "Q3",
+                    "Q4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1. Quartal",
+                    "2. Quartal",
+                    "3. Quartal",
+                    "4. Quartal",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "Buddhistischer Kalender" },
+            { "calendarname.gregorian",
+                "Gregorianischer Kalender" },
+            { "calendarname.gregory",
+                "Gregorianischer Kalender" },
+            { "calendarname.islamic",
+                "Islamischer Kalender" },
+            { "calendarname.islamic-civil",
+                "B\u00fcrgerlicher islamischer Kalender" },
+            { "calendarname.islamicc",
+                "B\u00fcrgerlicher islamischer Kalender" },
+            { "calendarname.japanese",
+                "Japanischer Kalender" },
+            { "calendarname.roc",
+                "Kalender der Republik China" },
+            { "field.dayperiod",
+                "Tagesh\u00e4lfte" },
+            { "field.era",
+                "Epoche" },
+            { "field.hour",
+                "Stunde" },
+            { "field.minute",
+                "Minute" },
+            { "field.month",
+                "Monat" },
+            { "field.second",
+                "Sekunde" },
+            { "field.week",
+                "Woche" },
+            { "field.weekday",
+                "Wochentag" },
+            { "field.year",
+                "Jahr" },
+            { "field.zone",
+                "Zone" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y GGGG",
+                    "d. MMMM y GGGG",
+                    "d. MMM y GGGG",
+                    "d.M.y GGGG",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y G",
+                    "d. MMMM y G",
+                    "d. MMM y G",
+                    "d.M.yyyy",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y G",
+                    "d. MMMM y G",
+                    "d. MMM y G",
+                    "d.M.y G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y G",
+                    "d. MMMM y G",
+                    "d. MMM y G",
+                    "d.M.y GGGGG",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "v. Chr.",
+                    "n. Chr.",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y G",
+                    "d. MMMM y G",
+                    "d. MMM y G",
+                    "d.M.y GGGGG",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "v. Chr.",
+                    "n. Chr.",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y GGGG",
+                    "d. MMMM y GGGG",
+                    "d. MMM y GGGG",
+                    "d.M.y G",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/el/FormatData_el.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/el/FormatData_el.java	Wed Apr 17 21:48:04 2013 -0700
@@ -79,11 +79,11 @@
 
 package sun.text.resources.el;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_el extends ListResourceBundle {
+public class FormatData_el extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     @Override
     protected final Object[][] getContents() {
@@ -143,6 +143,57 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "standalone.MonthAbbreviations",
+                new String[] {
+                    "\u0399\u03b1\u03bd",
+                    "\u03a6\u03b5\u03b2",
+                    "\u039c\u03ac\u03c1",
+                    "\u0391\u03c0\u03c1",
+                    "\u039c\u03ac\u03b9",
+                    "\u0399\u03bf\u03cd\u03bd",
+                    "\u0399\u03bf\u03cd\u03bb",
+                    "\u0391\u03c5\u03b3",
+                    "\u03a3\u03b5\u03c0",
+                    "\u039f\u03ba\u03c4",
+                    "\u039d\u03bf\u03ad",
+                    "\u0394\u03b5\u03ba",
+                    "",
+                }
+            },
+            { "MonthNarrows",
+                new String[] {
+                    "\u0399",
+                    "\u03a6",
+                    "\u039c",
+                    "\u0391",
+                    "\u039c",
+                    "\u0399",
+                    "\u0399",
+                    "\u0391",
+                    "\u03a3",
+                    "\u039f",
+                    "\u039d",
+                    "\u0394",
+                    "",
+                }
+            },
+            { "standalone.MonthNarrows",
+                new String[] {
+                    "\u0399",
+                    "\u03a6",
+                    "\u039c",
+                    "\u0391",
+                    "\u039c",
+                    "\u0399",
+                    "\u0399",
+                    "\u0391",
+                    "\u03a3",
+                    "\u039f",
+                    "\u039d",
+                    "\u0394",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae", // Sunday
@@ -154,6 +205,17 @@
                     "\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf" // Saturday
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae",
+                    "\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1",
+                    "\u03a4\u03c1\u03af\u03c4\u03b7",
+                    "\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7",
+                    "\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7",
+                    "\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae",
+                    "\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf",
+                }
+            },
             { "DayAbbreviations",
                 new String[] {
                     "\u039a\u03c5\u03c1", // abb Sunday
@@ -165,6 +227,17 @@
                     "\u03a3\u03b1\u03b2" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "\u039a\u03c5\u03c1",
+                    "\u0394\u03b5\u03c5",
+                    "\u03a4\u03c1\u03af",
+                    "\u03a4\u03b5\u03c4",
+                    "\u03a0\u03ad\u03bc",
+                    "\u03a0\u03b1\u03c1",
+                    "\u03a3\u03ac\u03b2",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "\u039a",
@@ -176,6 +249,23 @@
                     "\u03a3",
                 }
             },
+            { "standalone.DayNarrows",
+                new String[] {
+                    "\u039a",
+                    "\u0394",
+                    "\u03a4",
+                    "\u03a4",
+                    "\u03a0",
+                    "\u03a0",
+                    "\u03a3",
+                }
+            },
+            { "short.Eras",
+                new String[] {
+                    "\u03c0.\u03a7.",
+                    "\u03bc.\u03a7.",
+                }
+            },
             { "AmPmMarkers",
                 new String[] {
                     "\u03c0\u03bc", // am marker
@@ -219,58 +309,6 @@
                 }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM, y G",
-                    "d MMMM, y G",
-                    "d MMM, y G",
-                    "d/M/yyyy",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM, y G",
-                    "d MMMM, y G",
-                    "d MMM, y G",
-                    "d/M/yy",
-                }
-            },
-            { "roc.Eras", rocEras },
-            { "roc.short.Eras", rocEras },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM, y G",
-                    "d MMMM, y G",
-                    "d MMM, y G",
-                    "d/M/y G",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM, y GGGG",
-                    "d MMMM, y GGGG",
-                    "d MMM, y GGGG",
-                    "d/M/y GGGG",
-                }
-            },
-            { "calendarname.islamic-civil", "\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b1\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" },
-            { "calendarname.islamicc", "\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b1\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" },
-            { "calendarname.islamic", "\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" },
-            { "calendarname.japanese", "\u0399\u03b1\u03c0\u03c9\u03bd\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" },
-            { "calendarname.gregorian", "\u0393\u03c1\u03b7\u03b3\u03bf\u03c1\u03b9\u03b1\u03bd\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" },
-            { "calendarname.gregory", "\u0393\u03c1\u03b7\u03b3\u03bf\u03c1\u03b9\u03b1\u03bd\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" },
-            { "calendarname.roc", "\u0397\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf \u03c4\u03b7\u03c2 \u0394\u03b7\u03bc\u03bf\u03ba\u03c1\u03b1\u03c4\u03af\u03b1\u03c2 \u03c4\u03b7\u03c2 \u039a\u03af\u03bd\u03b1\u03c2" },
-            { "calendarname.buddhist", "\u0392\u03bf\u03c5\u03b4\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" },
-            { "field.era", "\u03a0\u03b5\u03c1\u03af\u03bf\u03b4\u03bf\u03c2" },
-            { "field.year", "\u0388\u03c4\u03bf\u03c2" },
-            { "field.month", "\u039c\u03ae\u03bd\u03b1\u03c2" },
-            { "field.week", "\u0395\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1" },
-            { "field.weekday", "\u0397\u03bc\u03ad\u03c1\u03b1 \u03b5\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1\u03c2" },
-            { "field.dayperiod", "\u03c0.\u03bc./\u03bc.\u03bc." },
-            { "field.hour", "\u038f\u03c1\u03b1" },
-            { "field.minute", "\u039b\u03b5\u03c0\u03c4\u03cc" },
-            { "field.second", "\u0394\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03bf" },
-            { "field.zone", "\u0396\u03ce\u03bd\u03b7" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/el/FormatData_el_CY.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/el/FormatData_el_CY.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.el;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_el_CY extends ListResourceBundle {
+public class FormatData_el_CY extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "MonthNames",
--- a/src/share/classes/sun/text/resources/el/FormatData_el_GR.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/el/FormatData_el_GR.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.el;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_el_GR extends ListResourceBundle {
+public class FormatData_el_GR extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/el/JavaTimeSupplementary_el.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.el;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_el extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "\u03a41",
+                    "\u03a42",
+                    "\u03a43",
+                    "\u03a44",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
+                    "2\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
+                    "3\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
+                    "4\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "\u0392\u03bf\u03c5\u03b4\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" },
+            { "calendarname.gregorian",
+                "\u0393\u03c1\u03b7\u03b3\u03bf\u03c1\u03b9\u03b1\u03bd\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" },
+            { "calendarname.gregory",
+                "\u0393\u03c1\u03b7\u03b3\u03bf\u03c1\u03b9\u03b1\u03bd\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" },
+            { "calendarname.islamic",
+                "\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" },
+            { "calendarname.islamic-civil",
+                "\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b1\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" },
+            { "calendarname.islamicc",
+                "\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b1\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" },
+            { "calendarname.japanese",
+                "\u0399\u03b1\u03c0\u03c9\u03bd\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" },
+            { "calendarname.roc",
+                "\u0397\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf \u03c4\u03b7\u03c2 \u0394\u03b7\u03bc\u03bf\u03ba\u03c1\u03b1\u03c4\u03af\u03b1\u03c2 \u03c4\u03b7\u03c2 \u039a\u03af\u03bd\u03b1\u03c2" },
+            { "field.dayperiod",
+                "\u03c0.\u03bc./\u03bc.\u03bc." },
+            { "field.era",
+                "\u03a0\u03b5\u03c1\u03af\u03bf\u03b4\u03bf\u03c2" },
+            { "field.hour",
+                "\u038f\u03c1\u03b1" },
+            { "field.minute",
+                "\u039b\u03b5\u03c0\u03c4\u03cc" },
+            { "field.month",
+                "\u039c\u03ae\u03bd\u03b1\u03c2" },
+            { "field.second",
+                "\u0394\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03bf" },
+            { "field.week",
+                "\u0395\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1" },
+            { "field.weekday",
+                "\u0397\u03bc\u03ad\u03c1\u03b1 \u03b5\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1\u03c2" },
+            { "field.year",
+                "\u0388\u03c4\u03bf\u03c2" },
+            { "field.zone",
+                "\u0396\u03ce\u03bd\u03b7" },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, y G",
+                    "d MMMM, y G",
+                    "d MMM, y G",
+                    "d/M/yyyy",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, y G",
+                    "d MMMM, y G",
+                    "d MMM, y G",
+                    "d/M/yy",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, y G",
+                    "d MMMM, y G",
+                    "d MMM, y G",
+                    "d/M/y G",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\u03c0.\u03a7.",
+                    "\u03bc.\u03a7.",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, y GGGG",
+                    "d MMMM, y GGGG",
+                    "d MMM, y GGGG",
+                    "d/M/y GGGG",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "\u03a0\u03c1\u03b9\u03bd R.O.C.",
+                    "R.O.C.",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "\u03a0\u03c1\u03b9\u03bd R.O.C.",
+                    "R.O.C.",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/en/FormatData_en.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/en/FormatData_en.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.en;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_en extends ListResourceBundle {
+public class FormatData_en extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         // This locale inherits almost everything from the root default locale.  However,
--- a/src/share/classes/sun/text/resources/en/FormatData_en_AU.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/en/FormatData_en_AU.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.en;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_en_AU extends ListResourceBundle {
+public class FormatData_en_AU extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/en/FormatData_en_CA.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/en/FormatData_en_CA.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.en;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_en_CA extends ListResourceBundle {
+public class FormatData_en_CA extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/en/FormatData_en_GB.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/en/FormatData_en_GB.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.en;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_en_GB extends ListResourceBundle {
+public class FormatData_en_GB extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/en/FormatData_en_IE.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/en/FormatData_en_IE.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.en;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_en_IE extends ListResourceBundle {
+public class FormatData_en_IE extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/en/FormatData_en_IN.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/en/FormatData_en_IN.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,16 +31,16 @@
 
 package sun.text.resources.en;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
 
 /**
  * The locale elements for English in India.
  *
  */
-public class FormatData_en_IN extends ListResourceBundle {
+public class FormatData_en_IN extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/en/FormatData_en_MT.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/en/FormatData_en_MT.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.en;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_en_MT extends ListResourceBundle {
+public class FormatData_en_MT extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "NumberPatterns",
--- a/src/share/classes/sun/text/resources/en/FormatData_en_NZ.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/en/FormatData_en_NZ.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.en;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_en_NZ extends ListResourceBundle {
+public class FormatData_en_NZ extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/en/FormatData_en_PH.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/en/FormatData_en_PH.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.en;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_en_PH extends ListResourceBundle {
+public class FormatData_en_PH extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "NumberPatterns",
--- a/src/share/classes/sun/text/resources/en/FormatData_en_SG.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/en/FormatData_en_SG.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.en;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_en_SG extends ListResourceBundle {
+public class FormatData_en_SG extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "NumberPatterns",
--- a/src/share/classes/sun/text/resources/en/FormatData_en_US.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/en/FormatData_en_US.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.en;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_en_US extends ListResourceBundle {
+public class FormatData_en_US extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/en/FormatData_en_ZA.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/en/FormatData_en_ZA.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.en;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_en_ZA extends ListResourceBundle {
+public class FormatData_en_ZA extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/en/JavaTimeSupplementary_en.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.en;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_en extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "Q1",
+                    "Q2",
+                    "Q3",
+                    "Q4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1st quarter",
+                    "2nd quarter",
+                    "3rd quarter",
+                    "4th quarter",
+                }
+            },
+            { "calendarname.buddhist",
+                "Buddhist Calendar" },
+            { "calendarname.gregorian",
+                "Gregorian Calendar" },
+            { "calendarname.gregory",
+                "Gregorian Calendar" },
+            { "calendarname.islamic",
+                "Islamic Calendar" },
+            { "calendarname.islamic-civil",
+                "Islamic-Civil Calendar" },
+            { "calendarname.islamicc",
+                "Islamic-Civil Calendar" },
+            { "calendarname.japanese",
+                "Japanese Calendar" },
+            { "calendarname.roc",
+                "Minguo Calendar" },
+            { "field.dayperiod",
+                "AM/PM" },
+            { "field.era",
+                "Era" },
+            { "field.hour",
+                "Hour" },
+            { "field.minute",
+                "Minute" },
+            { "field.month",
+                "Month" },
+            { "field.second",
+                "Second" },
+            { "field.week",
+                "Week" },
+            { "field.weekday",
+                "Day of the Week" },
+            { "field.year",
+                "Year" },
+            { "field.zone",
+                "Time Zone" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE, MMMM d, y GGGG",
+                    "MMMM d, y GGGG",
+                    "MMM d, y GGGG",
+                    "M/d/yy GGGG",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, MMMM d, y G",
+                    "MMMM d, y G",
+                    "MMM d, y G",
+                    "M/d/yy GGGGG",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE, MMMM d, y G",
+                    "MMMM d, y G",
+                    "MMM d, y G",
+                    "M/d/yy G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE, MMMM d, y G",
+                    "MMMM d, y G",
+                    "MMM d, y G",
+                    "M/d/yy GGGGG",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "Before Christ",
+                    "Anno Domini",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE, MMMM d, y G",
+                    "MMMM d, y G",
+                    "MMM d, y G",
+                    "M/d/yy GGGGG",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "BC",
+                    "AD",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE, MMMM d, y GGGG",
+                    "MMMM d, y GGGG",
+                    "MMM d, y GGGG",
+                    "M/d/yy G",
+                }
+            },
+        };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/en/JavaTimeSupplementary_en_GB.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.en;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_en_GB extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y GGGG",
+                    "d MMMM y GGGG",
+                    "d MMM y GGGG",
+                    "dd/MM/y GGGG",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM y G",
+                    "dd/MM/y G",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM y G",
+                    "dd/MM/y G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM y G",
+                    "dd/MM/y GGGGG",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM y G",
+                    "dd/MM/y GGGGG",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y GGGG",
+                    "d MMMM y GGGG",
+                    "d MMM y GGGG",
+                    "dd/MM/y G",
+                }
+            },
+        };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/en/JavaTimeSupplementary_en_SG.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.en;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_en_SG extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, y G",
+                    "d MMMM, y G",
+                    "d MMM, y G",
+                    "d/M/yy GGGGG",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, y G",
+                    "d MMMM, y G",
+                    "d MMM, y G",
+                    "d/M/yy GGGGG",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, y G",
+                    "d MMMM, y G",
+                    "d MMM, y G",
+                    "d/M/yy GGGGG",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, y GGGG",
+                    "d MMMM, y GGGG",
+                    "d MMM, y GGGG",
+                    "d/M/yy G",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/es/FormatData_es.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es extends ListResourceBundle {
+public class FormatData_es extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -118,6 +118,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "E",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "J",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "domingo", // Sunday
@@ -151,6 +168,18 @@
                     "S",
                 }
             },
+            { "Eras",
+                new String[] {
+                    "antes de Cristo",
+                    "anno D\u00f3mini",
+                }
+            },
+            { "short.Eras",
+                new String[] {
+                    "a.C.",
+                    "d.C.",
+                }
+            },
             { "NumberPatterns",
                 new String[] {
                     "#,##0.###;-#,##0.###", // decimal pattern
@@ -195,72 +224,6 @@
                 }
             },
             { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y G",
-                    "d 'de' MMMM 'de' y G",
-                    "dd/MM/y G",
-                    "dd/MM/y G",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y G",
-                    "d 'de' MMMM 'de' y G",
-                    "dd/MM/y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y G",
-                    "d 'de' MMMM 'de' y G",
-                    "dd/MM/y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y GGGG",
-                    "d 'de' MMMM 'de' y GGGG",
-                    "dd/MM/y GGGG",
-                    "dd/MM/y G",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y G",
-                    "d 'de' MMMM 'de' y G",
-                    "dd/MM/y G",
-                    "dd/MM/y G",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y GGGG",
-                    "d 'de' MMMM 'de' y GGGG",
-                    "dd/MM/y GGGG",
-                    "dd/MM/y GGGG",
-                }
-            },
-            { "calendarname.islamic-civil", "calendario civil isl\u00e1mico" },
-            { "calendarname.islamicc", "calendario civil isl\u00e1mico" },
-            { "calendarname.islamic", "calendario isl\u00e1mico" },
-            { "calendarname.japanese", "calendario japon\u00e9s" },
-            { "calendarname.gregorian", "calendario gregoriano" },
-            { "calendarname.gregory", "calendario gregoriano" },
-            { "calendarname.roc", "calendario de la Rep\u00fablica de China" },
-            { "calendarname.buddhist", "calendario budista" },
-            { "field.era", "era" },
-            { "field.year", "a\u00f1o" },
-            { "field.month", "mes" },
-            { "field.week", "semana" },
-            { "field.weekday", "d\u00eda de la semana" },
-            { "field.dayperiod", "periodo del d\u00eda" },
-            { "field.hour", "hora" },
-            { "field.minute", "minuto" },
-            { "field.second", "segundo" },
-            { "field.zone", "zona" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/es/FormatData_es_AR.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_AR.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_AR extends ListResourceBundle {
+public class FormatData_es_AR extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_BO.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_BO.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_BO extends ListResourceBundle {
+public class FormatData_es_BO extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_CL.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_CL.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_CL extends ListResourceBundle {
+public class FormatData_es_CL extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_CO.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_CO.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_CO extends ListResourceBundle {
+public class FormatData_es_CO extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_CR.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_CR.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_CR extends ListResourceBundle {
+public class FormatData_es_CR extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_DO.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_DO.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_DO extends ListResourceBundle {
+public class FormatData_es_DO extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_EC.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_EC.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_EC extends ListResourceBundle {
+public class FormatData_es_EC extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_ES.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_ES.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_ES extends ListResourceBundle {
+public class FormatData_es_ES extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_GT.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_GT.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_GT extends ListResourceBundle {
+public class FormatData_es_GT extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_HN.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_HN.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_HN extends ListResourceBundle {
+public class FormatData_es_HN extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_MX.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_MX.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_MX extends ListResourceBundle {
+public class FormatData_es_MX extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_NI.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_NI.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_NI extends ListResourceBundle {
+public class FormatData_es_NI extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_PA.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_PA.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_PA extends ListResourceBundle {
+public class FormatData_es_PA extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_PE.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_PE.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_PE extends ListResourceBundle {
+public class FormatData_es_PE extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_PR.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_PR.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_PR extends ListResourceBundle {
+public class FormatData_es_PR extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_PY.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_PY.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_PY extends ListResourceBundle {
+public class FormatData_es_PY extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_SV.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_SV.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_SV extends ListResourceBundle {
+public class FormatData_es_SV extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_US.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_US.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_US extends ListResourceBundle {
+public class FormatData_es_US extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "AmPmMarkers",
--- a/src/share/classes/sun/text/resources/es/FormatData_es_UY.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_UY.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_UY extends ListResourceBundle {
+public class FormatData_es_UY extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_VE.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_VE.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.es;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_es_VE extends ListResourceBundle {
+public class FormatData_es_VE extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/es/JavaTimeSupplementary_es.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,206 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.es;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_es extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "T1",
+                    "T2",
+                    "T3",
+                    "T4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1er trimestre",
+                    "2\u00ba trimestre",
+                    "3er trimestre",
+                    "4\u00ba trimestre",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1T",
+                    "2T",
+                    "3T",
+                    "4T",
+                }
+            },
+            { "calendarname.buddhist",
+                "calendario budista" },
+            { "calendarname.gregorian",
+                "calendario gregoriano" },
+            { "calendarname.gregory",
+                "calendario gregoriano" },
+            { "calendarname.islamic",
+                "calendario isl\u00e1mico" },
+            { "calendarname.islamic-civil",
+                "calendario civil isl\u00e1mico" },
+            { "calendarname.islamicc",
+                "calendario civil isl\u00e1mico" },
+            { "calendarname.japanese",
+                "calendario japon\u00e9s" },
+            { "calendarname.roc",
+                "calendario de la Rep\u00fablica de China" },
+            { "field.dayperiod",
+                "periodo del d\u00eda" },
+            { "field.era",
+                "era" },
+            { "field.hour",
+                "hora" },
+            { "field.minute",
+                "minuto" },
+            { "field.month",
+                "mes" },
+            { "field.second",
+                "segundo" },
+            { "field.week",
+                "semana" },
+            { "field.weekday",
+                "d\u00eda de la semana" },
+            { "field.year",
+                "a\u00f1o" },
+            { "field.zone",
+                "zona" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y GGGG",
+                    "d 'de' MMMM 'de' y GGGG",
+                    "dd/MM/y GGGG",
+                    "dd/MM/y GGGG",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y G",
+                    "d 'de' MMMM 'de' y G",
+                    "dd/MM/y G",
+                    "dd/MM/y G",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y G",
+                    "d 'de' MMMM 'de' y G",
+                    "dd/MM/y G",
+                    "dd/MM/y G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y G",
+                    "d 'de' MMMM 'de' y G",
+                    "dd/MM/y G",
+                    "dd/MM/y GGGGG",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "antes de Cristo",
+                    "anno D\u00f3mini",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y G",
+                    "d 'de' MMMM 'de' y G",
+                    "dd/MM/y G",
+                    "dd/MM/y GGGGG",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "antes de Cristo",
+                    "anno D\u00f3mini",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y GGGG",
+                    "d 'de' MMMM 'de' y GGGG",
+                    "dd/MM/y GGGG",
+                    "dd/MM/y G",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "antes de R.O.C.",
+                    "",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "antes de R.O.C.",
+                    "",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/et/FormatData_et.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/et/FormatData_et.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.et;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_et extends ListResourceBundle {
+public class FormatData_et extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -118,6 +118,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "V",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "J",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "p\u00fchap\u00e4ev", // Sunday
@@ -157,6 +174,12 @@
                     "m.a.j."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "e.m.a.",
+                    "m.a.j.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
@@ -193,25 +216,6 @@
                     "{1} {0}" // date-time pattern
                 }
             },
-            { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "calendarname.islamic-civil", "islami ilmalik kalender" },
-            { "calendarname.islamicc", "islami ilmalik kalender" },
-            { "calendarname.roc", "Hiina Vabariigi kalender" },
-            { "calendarname.islamic", "islamikalender" },
-            { "calendarname.buddhist", "budistlik kalender" },
-            { "calendarname.japanese", "Jaapani kalender" },
-            { "calendarname.gregorian", "Gregoriuse kalender" },
-            { "calendarname.gregory", "Gregoriuse kalender" },
-            { "field.era", "ajastu" },
-            { "field.year", "aasta" },
-            { "field.month", "kuu" },
-            { "field.week", "n\u00e4dal" },
-            { "field.weekday", "n\u00e4dalap\u00e4ev" },
-            { "field.dayperiod", "enne/p\u00e4rast l\u00f5unat" },
-            { "field.hour", "tund" },
-            { "field.minute", "minut" },
-            { "field.second", "sekund" },
-            { "field.zone", "v\u00f6\u00f6nd" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/et/FormatData_et_EE.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/et/FormatData_et_EE.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.et;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_et_EE extends ListResourceBundle {
+public class FormatData_et_EE extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/et/JavaTimeSupplementary_et.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.et;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_et extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "K1",
+                    "K2",
+                    "K3",
+                    "K4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1. kvartal",
+                    "2. kvartal",
+                    "3. kvartal",
+                    "4. kvartal",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "budistlik kalender" },
+            { "calendarname.gregorian",
+                "Gregoriuse kalender" },
+            { "calendarname.gregory",
+                "Gregoriuse kalender" },
+            { "calendarname.islamic",
+                "islamikalender" },
+            { "calendarname.islamic-civil",
+                "islami ilmalik kalender" },
+            { "calendarname.islamicc",
+                "islami ilmalik kalender" },
+            { "calendarname.japanese",
+                "Jaapani kalender" },
+            { "calendarname.roc",
+                "Hiina Vabariigi kalender" },
+            { "field.dayperiod",
+                "enne/p\u00e4rast l\u00f5unat" },
+            { "field.era",
+                "ajastu" },
+            { "field.hour",
+                "tund" },
+            { "field.minute",
+                "minut" },
+            { "field.month",
+                "kuu" },
+            { "field.second",
+                "sekund" },
+            { "field.week",
+                "n\u00e4dal" },
+            { "field.weekday",
+                "n\u00e4dalap\u00e4ev" },
+            { "field.year",
+                "aasta" },
+            { "field.zone",
+                "v\u00f6\u00f6nd" },
+            { "java.time.long.Eras",
+                new String[] {
+                    "enne meie aega",
+                    "meie aja j\u00e4rgi",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "e.m.a.",
+                    "m.a.j.",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/fi/FormatData_fi.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/fi/FormatData_fi.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.fi;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_fi extends ListResourceBundle {
+public class FormatData_fi extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -152,6 +152,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "T",
+                    "H",
+                    "M",
+                    "H",
+                    "T",
+                    "K",
+                    "H",
+                    "E",
+                    "S",
+                    "L",
+                    "M",
+                    "J",
+                    "",
+                }
+            },
             { "standalone.MonthNarrows",
                 new String[] {
                     "T",
@@ -169,6 +186,24 @@
                     "",
                 }
             },
+            { "long.Eras",
+                new String[] {
+                    "ennen Kristuksen syntym\u00e4\u00e4",
+                    "j\u00e4lkeen Kristuksen syntym\u00e4n",
+                }
+            },
+            { "Eras",
+                new String[] {
+                    "eKr.",
+                    "jKr.",
+                }
+            },
+            { "narrow.Eras",
+                new String[] {
+                    "eK",
+                    "jK",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "sunnuntai", // Sunday
@@ -180,6 +215,17 @@
                     "lauantai" // Saturday
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "sunnuntai",
+                    "maanantai",
+                    "tiistai",
+                    "keskiviikko",
+                    "torstai",
+                    "perjantai",
+                    "lauantai",
+                }
+            },
             { "DayAbbreviations",
                 new String[] {
                     "su", // abb Sunday
@@ -191,6 +237,17 @@
                     "la" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "su",
+                    "ma",
+                    "ti",
+                    "ke",
+                    "to",
+                    "pe",
+                    "la",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "S",
@@ -236,14 +293,6 @@
                     "H:mm", // short time pattern
                 }
             },
-            { "cldr.DatePatterns",
-                new String[] {
-                    "cccc, d. MMMM y",
-                    "d. MMMM y",
-                    "d.M.yyyy",
-                    "d.M.yyyy",
-                }
-            },
             { "DatePatterns",
                 new String[] {
                     "d. MMMM'ta 'yyyy", // full date pattern
@@ -270,89 +319,6 @@
                     "ip.",
                 }
             },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "cccc d. MMMM y G",
-                    "d. MMMM y G",
-                    "d.M.y G",
-                    "d.M.y G",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "cccc d. MMMM y G",
-                    "d. MMMM y G",
-                    "d.M.y G",
-                    "d.M.y G",
-                }
-            },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "cccc d. MMMM y G",
-                    "d. MMMM y G",
-                    "d.M.y G",
-                    "d.M.y G",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d.M.y GGGG",
-                    "d.M.y GGGG",
-                }
-            },
-            { "islamic.MonthNames",
-                new String[] {
-                    "muharram",
-                    "safar",
-                    "rabi\u2019 al-awwal",
-                    "rabi\u2019 al-akhir",
-                    "d\u017eumada-l-ula",
-                    "d\u017eumada-l-akhira",
-                    "rad\u017eab",
-                    "\u0161a\u2019ban",
-                    "ramadan",
-                    "\u0161awwal",
-                    "dhu-l-qa\u2019da",
-                    "dhu-l-hidd\u017ea",
-                    "",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "cccc d. MMMM y G",
-                    "d. MMMM y G",
-                    "d.M.y G",
-                    "d.M.y G",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d.M.y GGGG",
-                    "d.M.y GGGG",
-                }
-            },
-            { "calendarname.islamic-civil", "islamilainen siviilikalenteri" },
-            { "calendarname.islamicc", "islamilainen siviilikalenteri" },
-            { "calendarname.islamic", "islamilainen kalenteri" },
-            { "calendarname.japanese", "japanilainen kalenteri" },
-            { "calendarname.gregorian", "gregoriaaninen kalenteri" },
-            { "calendarname.gregory", "gregoriaaninen kalenteri" },
-            { "calendarname.roc", "Kiinan tasavallan kalenteri" },
-            { "calendarname.buddhist", "buddhalainen kalenteri" },
-            { "field.era", "aikakausi" },
-            { "field.year", "vuosi" },
-            { "field.month", "kuukausi" },
-            { "field.week", "viikko" },
-            { "field.weekday", "viikonp\u00e4iv\u00e4" },
-            { "field.dayperiod", "vuorokaudenaika" },
-            { "field.hour", "tunti" },
-            { "field.minute", "minuutti" },
-            { "field.second", "sekunti" },
-            { "field.zone", "aikavy\u00f6hyke" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/fi/FormatData_fi_FI.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/fi/FormatData_fi_FI.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.fi;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_fi_FI extends ListResourceBundle {
+public class FormatData_fi_FI extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/fi/JavaTimeSupplementary_fi.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,219 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.fi;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_fi extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "1. nelj.",
+                    "2. nelj.",
+                    "3. nelj.",
+                    "4. nelj.",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1. nelj\u00e4nnes",
+                    "2. nelj\u00e4nnes",
+                    "3. nelj\u00e4nnes",
+                    "4. nelj\u00e4nnes",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "buddhalainen kalenteri" },
+            { "calendarname.gregorian",
+                "gregoriaaninen kalenteri" },
+            { "calendarname.gregory",
+                "gregoriaaninen kalenteri" },
+            { "calendarname.islamic",
+                "islamilainen kalenteri" },
+            { "calendarname.islamic-civil",
+                "islamilainen siviilikalenteri" },
+            { "calendarname.islamicc",
+                "islamilainen siviilikalenteri" },
+            { "calendarname.japanese",
+                "japanilainen kalenteri" },
+            { "calendarname.roc",
+                "Kiinan tasavallan kalenteri" },
+            { "field.dayperiod",
+                "vuorokaudenaika" },
+            { "field.era",
+                "aikakausi" },
+            { "field.hour",
+                "tunti" },
+            { "field.minute",
+                "minuutti" },
+            { "field.month",
+                "kuukausi" },
+            { "field.second",
+                "sekunti" },
+            { "field.week",
+                "viikko" },
+            { "field.weekday",
+                "viikonp\u00e4iv\u00e4" },
+            { "field.year",
+                "vuosi" },
+            { "field.zone",
+                "aikavy\u00f6hyke" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y GGGG",
+                    "d. MMMM y GGGG",
+                    "d.M.y GGGG",
+                    "d.M.y GGGG",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "muharram",
+                    "safar",
+                    "rabi\u2019 al-awwal",
+                    "rabi\u2019 al-akhir",
+                    "d\u017eumada-l-ula",
+                    "d\u017eumada-l-akhira",
+                    "rad\u017eab",
+                    "\u0161a\u2019ban",
+                    "ramadan",
+                    "\u0161awwal",
+                    "dhu-l-qa\u2019da",
+                    "dhu-l-hidd\u017ea",
+                    "",
+                }
+            },
+            { "java.time.DatePatterns",
+                new String[] {
+                    "cccc, d. MMMM y",
+                    "d. MMMM y",
+                    "d.M.yyyy",
+                    "d.M.yyyy",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "cccc d. MMMM y G",
+                    "d. MMMM y G",
+                    "d.M.y G",
+                    "d.M.y G",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "cccc d. MMMM y G",
+                    "d. MMMM y G",
+                    "d.M.y G",
+                    "d.M.y G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "cccc d. MMMM y G",
+                    "d. MMMM y G",
+                    "d.M.y G",
+                    "d.M.y G",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "ennen Kristuksen syntym\u00e4\u00e4",
+                    "j\u00e4lkeen Kristuksen syntym\u00e4n",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "cccc d. MMMM y G",
+                    "d. MMMM y G",
+                    "d.M.y G",
+                    "d.M.y G",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "eKr.",
+                    "jKr.",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y GGGG",
+                    "d. MMMM y GGGG",
+                    "d.M.y GGGG",
+                    "d.M.y GGGG",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/fr/FormatData_fr.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/fr/FormatData_fr.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.fr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_fr extends ListResourceBundle {
+public class FormatData_fr extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -118,6 +118,23 @@
                     "" // abb mo month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "J",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "dimanche", // Sunday
@@ -140,6 +157,17 @@
                     "sam." // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "dim.",
+                    "lun.",
+                    "mar.",
+                    "mer.",
+                    "jeu.",
+                    "ven.",
+                    "sam.",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "D",
@@ -157,6 +185,30 @@
                     "ap. J.-C."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "av. J.-C.",
+                    "ap. J.-C.",
+                }
+            },
+            { "buddhist.Eras",
+                new String[] {
+                    "BC",
+                    "\u00e8re bouddhiste",
+                }
+            },
+            { "buddhist.short.Eras",
+                new String[] {
+                    "BC",
+                    "\u00e8re b.",
+                }
+            },
+            { "buddhist.narrow.Eras",
+                new String[] {
+                    "BC",
+                    "E.B.",
+                }
+            },
             { "NumberPatterns",
                 new String[] {
                     "#,##0.###;-#,##0.###", // decimal pattern
@@ -201,112 +253,6 @@
                 }
             },
             { "DateTimePatternChars", "GaMjkHmsSEDFwWxhKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM, y G",
-                    "d/M/yyyy",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM, y G",
-                    "d/M/y GGGGG",
-                }
-            },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM, y G",
-                    "d/M/y GGGGG",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM, y GGGG",
-                    "d/M/y G",
-                }
-            },
-            { "islamic.MonthNames",
-                new String[] {
-                    "Mouharram",
-                    "Safar",
-                    "Rabi\u02bb-oul-Aououal",
-                    "Rabi\u02bb-out-Tani",
-                    "Djoumada-l-Oula",
-                    "Djoumada-t-Tania",
-                    "Radjab",
-                    "Cha\u02bbban",
-                    "Ramadan",
-                    "Chaououal",
-                    "Dou-l-Qa\u02bbda",
-                    "Dou-l-Hidjja",
-                    "",
-                }
-            },
-            { "islamic.MonthAbbreviations",
-                new String[] {
-                    "Mouh.",
-                    "Saf.",
-                    "Rabi\u02bb-oul-A.",
-                    "Rabi\u02bb-out-T.",
-                    "Djoum.-l-O.",
-                    "Djoum.-t-T.",
-                    "Radj.",
-                    "Cha.",
-                    "Ram.",
-                    "Chaou.",
-                    "Dou-l-Q.",
-                    "Dou-l-H.",
-                    "",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM, y G",
-                    "d/M/y G",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM, y GGGG",
-                    "d/M/y GGGG",
-                }
-            },
-            { "calendarname.islamic-civil", "Calendrier civil musulman" },
-            { "calendarname.islamicc", "Calendrier civil musulman" },
-            { "calendarname.islamic", "Calendrier musulman" },
-            { "calendarname.japanese", "Calendrier japonais" },
-            { "calendarname.gregorian", "Calendrier gr\u00e9gorien" },
-            { "calendarname.gregory", "Calendrier gr\u00e9gorien" },
-            { "calendarname.roc", "Calendrier r\u00e9publicain chinois" },
-            { "calendarname.buddhist", "Calendrier bouddhiste" },
-            { "field.era", "\u00e8re" },
-            { "field.year", "ann\u00e9e" },
-            { "field.month", "mois" },
-            { "field.week", "semaine" },
-            { "field.weekday", "jour de la semaine" },
-            { "field.dayperiod", "cadran" },
-            { "field.hour", "heure" },
-            { "field.minute", "minute" },
-            { "field.second", "seconde" },
-            { "field.zone", "fuseau horaire" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/fr/FormatData_fr_BE.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/fr/FormatData_fr_BE.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.fr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_fr_BE extends ListResourceBundle {
+public class FormatData_fr_BE extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/fr/FormatData_fr_CA.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/fr/FormatData_fr_CA.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.fr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_fr_CA extends ListResourceBundle {
+public class FormatData_fr_CA extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/fr/FormatData_fr_CH.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/fr/FormatData_fr_CH.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.fr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_fr_CH extends ListResourceBundle {
+public class FormatData_fr_CH extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/fr/FormatData_fr_FR.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/fr/FormatData_fr_FR.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.fr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_fr_FR extends ListResourceBundle {
+public class FormatData_fr_FR extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/fr/JavaTimeSupplementary_fr.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,264 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.fr;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_fr extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "T1",
+                    "T2",
+                    "T3",
+                    "T4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1er trimestre",
+                    "2e trimestre",
+                    "3e trimestre",
+                    "4e trimestre",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "T1",
+                    "T2",
+                    "T3",
+                    "T4",
+                }
+            },
+            { "calendarname.buddhist",
+                "Calendrier bouddhiste" },
+            { "calendarname.gregorian",
+                "Calendrier gr\u00e9gorien" },
+            { "calendarname.gregory",
+                "Calendrier gr\u00e9gorien" },
+            { "calendarname.islamic",
+                "Calendrier musulman" },
+            { "calendarname.islamic-civil",
+                "Calendrier civil musulman" },
+            { "calendarname.islamicc",
+                "Calendrier civil musulman" },
+            { "calendarname.japanese",
+                "Calendrier japonais" },
+            { "calendarname.roc",
+                "Calendrier r\u00e9publicain chinois" },
+            { "field.dayperiod",
+                "cadran" },
+            { "field.era",
+                "\u00e8re" },
+            { "field.hour",
+                "heure" },
+            { "field.minute",
+                "minute" },
+            { "field.month",
+                "mois" },
+            { "field.second",
+                "seconde" },
+            { "field.week",
+                "semaine" },
+            { "field.weekday",
+                "jour de la semaine" },
+            { "field.year",
+                "ann\u00e9e" },
+            { "field.zone",
+                "fuseau horaire" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y GGGG",
+                    "d MMMM y GGGG",
+                    "d MMM, y GGGG",
+                    "d/M/y GGGG",
+                }
+            },
+            { "islamic.Eras",
+                new String[] {
+                    "",
+                    "AH",
+                }
+            },
+            { "islamic.MonthAbbreviations",
+                new String[] {
+                    "Mouh.",
+                    "Saf.",
+                    "Rabi\u02bb-oul-A.",
+                    "Rabi\u02bb-out-T.",
+                    "Djoum.-l-O.",
+                    "Djoum.-t-T.",
+                    "Radj.",
+                    "Cha.",
+                    "Ram.",
+                    "Chaou.",
+                    "Dou-l-Q.",
+                    "Dou-l-H.",
+                    "",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "Mouharram",
+                    "Safar",
+                    "Rabi\u02bb-oul-Aououal",
+                    "Rabi\u02bb-out-Tani",
+                    "Djoumada-l-Oula",
+                    "Djoumada-t-Tania",
+                    "Radjab",
+                    "Cha\u02bbban",
+                    "Ramadan",
+                    "Chaououal",
+                    "Dou-l-Qa\u02bbda",
+                    "Dou-l-Hidjja",
+                    "",
+                }
+            },
+            { "islamic.short.Eras",
+                new String[] {
+                    "",
+                    "AH",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM, y G",
+                    "d/M/yyyy",
+                }
+            },
+            { "java.time.buddhist.long.Eras",
+                new String[] {
+                    "BC",
+                    "\u00e8re bouddhiste",
+                }
+            },
+            { "java.time.buddhist.short.Eras",
+                new String[] {
+                    "BC",
+                    "\u00e8re bouddhiste",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM, y G",
+                    "d/M/y G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM, y G",
+                    "d/M/y GGGGG",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "avant J\u00e9sus-Christ",
+                    "apr\u00e8s J\u00e9sus-Christ",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM, y G",
+                    "d/M/y GGGGG",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "BC",
+                    "ap. J.-C.",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y GGGG",
+                    "d MMMM y GGGG",
+                    "d MMM, y GGGG",
+                    "d/M/y G",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "avant RdC",
+                    "RdC",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "avant RdC",
+                    "RdC",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/ga/FormatData_ga.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ga/FormatData_ga.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.ga;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ga extends ListResourceBundle {
+public class FormatData_ga extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "MonthNames",
@@ -81,6 +100,23 @@
                     "",
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "E",
+                    "F",
+                    "M",
+                    "A",
+                    "B",
+                    "M",
+                    "I",
+                    "L",
+                    "M",
+                    "D",
+                    "S",
+                    "N",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "D\u00e9 Domhnaigh",
@@ -115,6 +151,12 @@
                     "AD",
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "RC",
+                    "AD",
+                }
+            },
             { "NumberPatterns",
                 new String[] {
                     "#,##0.###",
--- a/src/share/classes/sun/text/resources/ga/FormatData_ga_IE.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ga/FormatData_ga_IE.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.ga;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ga_IE extends ListResourceBundle {
+public class FormatData_ga_IE extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "NumberPatterns",
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/ga/JavaTimeSupplementary_ga.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ga;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_ga extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "R1",
+                    "R2",
+                    "R3",
+                    "R4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1\u00fa r\u00e1ithe",
+                    "2\u00fa r\u00e1ithe",
+                    "3\u00fa r\u00e1ithe",
+                    "4\u00fa r\u00e1ithe",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "RC",
+                    "AD",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/hi/FormatData_hi_IN.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/hi/FormatData_hi_IN.java	Wed Apr 17 21:48:04 2013 -0700
@@ -67,15 +67,15 @@
 
 package sun.text.resources.hi;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
 /**
  * The locale elements for Hindi.
  *
  */
-public class FormatData_hi_IN extends ListResourceBundle {
+public class FormatData_hi_IN extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -113,6 +113,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "\u091c",
+                    "\u092b\u093c",
+                    "\u092e\u093e",
+                    "\u0905",
+                    "\u092e",
+                    "\u091c\u0942",
+                    "\u091c\u0941",
+                    "\u0905",
+                    "\u0938\u093f",
+                    "\u0905",
+                    "\u0928",
+                    "\u0926\u093f",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "\u0930\u0935\u093f\u0935\u093e\u0930", // Sunday
@@ -158,6 +175,12 @@
                     "\u0938\u0928"
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "\u0908\u0938\u093e\u092a\u0942\u0930\u094d\u0935",
+                    "\u0938\u0928",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ".", // decimal separator
@@ -195,24 +218,6 @@
                 }
             },
             { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
-            { "calendarname.islamic-civil", "\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u0928\u093e\u0917\u0930\u093f\u0915 \u092a\u0902\u091a\u093e\u0902\u0917" },
-            { "calendarname.islamicc", "\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u0928\u093e\u0917\u0930\u093f\u0915 \u092a\u0902\u091a\u093e\u0902\u0917" },
-            { "calendarname.roc", "\u091a\u0940\u0928\u0940 \u0917\u0923\u0924\u0902\u0924\u094d\u0930 \u092a\u0902\u091a\u093e\u0902\u0917" },
-            { "calendarname.islamic", "\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" },
-            { "calendarname.buddhist", "\u092c\u094c\u0926\u094d\u0927 \u092a\u0902\u091a\u093e\u0902\u0917" },
-            { "calendarname.japanese", "\u091c\u093e\u092a\u093e\u0928\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" },
-            { "calendarname.gregorian", "\u0917\u094d\u0930\u0947\u0917\u0930\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" },
-            { "calendarname.gregory", "\u0917\u094d\u0930\u0947\u0917\u0930\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" },
-            { "field.era", "\u092f\u0941\u0917" },
-            { "field.year", "\u0935\u0930\u094d\u0937" },
-            { "field.month", "\u092e\u093e\u0938" },
-            { "field.week", "\u0938\u092a\u094d\u0924\u093e\u0939" },
-            { "field.weekday", "\u0938\u092a\u094d\u0924\u093e\u0939 \u0915\u093e \u0926\u093f\u0928" },
-            { "field.dayperiod", "\u0938\u092e\u092f \u0905\u0935\u0927\u093f" },
-            { "field.hour", "\u0918\u0902\u091f\u093e" },
-            { "field.minute", "\u092e\u093f\u0928\u091f" },
-            { "field.second", "\u0938\u0947\u0915\u0947\u0902\u0921" },
-            { "field.zone", "\u0915\u094d\u0937\u0947\u0924\u094d\u0930" },
         };
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/hi/JavaTimeSupplementary_hi_IN.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.hi;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_hi_IN extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterNames",
+                new String[] {
+                    "\u0924\u093f\u092e\u093e\u0939\u0940",
+                    "\u0926\u0942\u0938\u0930\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
+                    "\u0924\u0940\u0938\u0930\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
+                    "\u091a\u094c\u0925\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "\u092c\u094c\u0926\u094d\u0927 \u092a\u0902\u091a\u093e\u0902\u0917" },
+            { "calendarname.gregorian",
+                "\u0917\u094d\u0930\u0947\u0917\u0930\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" },
+            { "calendarname.gregory",
+                "\u0917\u094d\u0930\u0947\u0917\u0930\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" },
+            { "calendarname.islamic",
+                "\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" },
+            { "calendarname.islamic-civil",
+                "\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u0928\u093e\u0917\u0930\u093f\u0915 \u092a\u0902\u091a\u093e\u0902\u0917" },
+            { "calendarname.islamicc",
+                "\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u0928\u093e\u0917\u0930\u093f\u0915 \u092a\u0902\u091a\u093e\u0902\u0917" },
+            { "calendarname.japanese",
+                "\u091c\u093e\u092a\u093e\u0928\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" },
+            { "calendarname.roc",
+                "\u091a\u0940\u0928\u0940 \u0917\u0923\u0924\u0902\u0924\u094d\u0930 \u092a\u0902\u091a\u093e\u0902\u0917" },
+            { "field.dayperiod",
+                "\u0938\u092e\u092f \u0905\u0935\u0927\u093f" },
+            { "field.era",
+                "\u092f\u0941\u0917" },
+            { "field.hour",
+                "\u0918\u0902\u091f\u093e" },
+            { "field.minute",
+                "\u092e\u093f\u0928\u091f" },
+            { "field.month",
+                "\u092e\u093e\u0938" },
+            { "field.second",
+                "\u0938\u0947\u0915\u0947\u0902\u0921" },
+            { "field.week",
+                "\u0938\u092a\u094d\u0924\u093e\u0939" },
+            { "field.weekday",
+                "\u0938\u092a\u094d\u0924\u093e\u0939 \u0915\u093e \u0926\u093f\u0928" },
+            { "field.year",
+                "\u0935\u0930\u094d\u0937" },
+            { "field.zone",
+                "\u0915\u094d\u0937\u0947\u0924\u094d\u0930" },
+            { "islamic.MonthNames",
+                new String[] {
+                    "\u092e\u0941\u0939\u0930\u094d\u0930\u092e",
+                    "\u0938\u092b\u0930",
+                    "\u0930\u093e\u092c\u0940 \u092a\u094d\u0930\u0925\u092e",
+                    "\u0930\u093e\u092c\u0940 \u0926\u094d\u0935\u093f\u0924\u0940\u092f",
+                    "\u091c\u0941\u092e\u094d\u0921\u093e \u092a\u094d\u0930\u0925\u092e",
+                    "\u091c\u0941\u092e\u094d\u0921\u093e \u0926\u094d\u0935\u093f\u0924\u0940\u092f",
+                    "\u0930\u091c\u092c",
+                    "\u0936\u093e\u0935\u0928",
+                    "\u0930\u092e\u091c\u093e\u0928",
+                    "\u0936\u0935\u094d\u0935\u094d\u0932",
+                    "Dhu\u02bbl-Qi\u02bbdah",
+                    "Dhu\u02bbl-Hijjah",
+                    "",
+                }
+            },
+            { "java.time.japanese.long.Eras",
+                new String[] {
+                    "\u0938\u0928",
+                    "\u092e\u0947\u091c\u0940",
+                    "\u0924\u093e\u0908\u0936\u094b",
+                    "\u0936\u094b\u0935\u093e",
+                    "\u0939\u0947\u0908\u0938\u0947\u0908",
+                }
+            },
+            { "java.time.japanese.short.Eras",
+                new String[] {
+                    "\u0938\u0928",
+                    "\u092e\u0947\u091c\u0940",
+                    "\u0924\u093e\u0908\u0936\u094b",
+                    "\u0936\u094b\u0935\u093e",
+                    "\u0939\u0947\u0908\u0938\u0947\u0908",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\u0908\u0938\u093e\u092a\u0942\u0930\u094d\u0935",
+                    "\u0938\u0928",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/hr/FormatData_hr.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/hr/FormatData_hr.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.hr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_hr extends ListResourceBundle {
+public class FormatData_hr extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     @Override
     protected final Object[][] getContents() {
@@ -157,6 +157,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "1.",
+                    "2.",
+                    "3.",
+                    "4.",
+                    "5.",
+                    "6.",
+                    "7.",
+                    "8.",
+                    "9.",
+                    "10.",
+                    "11.",
+                    "12.",
+                    "",
+                }
+            },
             { "standalone.MonthNarrows",
                 new String[] {
                     "1.",
@@ -185,6 +202,17 @@
                     "subota" // Saturday
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "nedjelja",
+                    "ponedjeljak",
+                    "utorak",
+                    "srijeda",
+                    "\u010detvrtak",
+                    "petak",
+                    "subota",
+                }
+            },
             { "DayAbbreviations",
                 new String[] {
                     "ned", // abb Sunday
@@ -196,6 +224,17 @@
                     "sub" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "ned",
+                    "pon",
+                    "uto",
+                    "sri",
+                    "\u010det",
+                    "pet",
+                    "sub",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "N",
@@ -218,6 +257,18 @@
                     "s",
                 }
             },
+            { "Eras",
+                new String[] {
+                    "Prije Krista",
+                    "Poslije Krista",
+                }
+            },
+            { "short.Eras",
+                new String[] {
+                    "p. n. e.",
+                    "A. D.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
@@ -255,58 +306,6 @@
                 }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y. G",
-                    "d. MMMM y. G",
-                    "d. M. y. G",
-                    "d.M.y.",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y. G",
-                    "d. MMMM y. G",
-                    "d. M. y. G",
-                    "d.M.y. G",
-                }
-            },
-            { "roc.Eras", rocEras },
-            { "roc.short.Eras", rocEras },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y. G",
-                    "d. MMMM y. G",
-                    "d. M. y. G",
-                    "d.M.y. G",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y. GGGG",
-                    "d. MMMM y. GGGG",
-                    "d. M. y. GGGG",
-                    "d.M.y. GGGG",
-                }
-            },
-            { "calendarname.islamic-civil", "islamski civilni kalendar" },
-            { "calendarname.islamicc", "islamski civilni kalendar" },
-            { "calendarname.roc", "kalendar Republike Kine" },
-            { "calendarname.islamic", "islamski kalendar" },
-            { "calendarname.buddhist", "budisti\u010dki kalendar" },
-            { "calendarname.japanese", "japanski kalendar" },
-            { "calendarname.gregorian", "gregorijanski kalendar" },
-            { "calendarname.gregory", "gregorijanski kalendar" },
-            { "field.era", "era" },
-            { "field.year", "godina" },
-            { "field.month", "mjesec" },
-            { "field.week", "tjedan" },
-            { "field.weekday", "dan u tjednu" },
-            { "field.dayperiod", "dio dana" },
-            { "field.hour", "sat" },
-            { "field.minute", "minuta" },
-            { "field.second", "sekunda" },
-            { "field.zone", "zona" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/hr/FormatData_hr_HR.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/hr/FormatData_hr_HR.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.hr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_hr_HR extends ListResourceBundle {
+public class FormatData_hr_HR extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/hr/JavaTimeSupplementary_hr.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,190 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.hr;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_hr extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "1kv",
+                    "2kv",
+                    "3kv",
+                    "4kv",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1. kvartal",
+                    "2. kvartal",
+                    "3. kvartal",
+                    "4. kvartal",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1.",
+                    "2.",
+                    "3.",
+                    "4.",
+                }
+            },
+            { "calendarname.buddhist",
+                "budisti\u010dki kalendar" },
+            { "calendarname.gregorian",
+                "gregorijanski kalendar" },
+            { "calendarname.gregory",
+                "gregorijanski kalendar" },
+            { "calendarname.islamic",
+                "islamski kalendar" },
+            { "calendarname.islamic-civil",
+                "islamski civilni kalendar" },
+            { "calendarname.islamicc",
+                "islamski civilni kalendar" },
+            { "calendarname.japanese",
+                "japanski kalendar" },
+            { "calendarname.roc",
+                "kalendar Republike Kine" },
+            { "field.dayperiod",
+                "dio dana" },
+            { "field.era",
+                "era" },
+            { "field.hour",
+                "sat" },
+            { "field.minute",
+                "minuta" },
+            { "field.month",
+                "mjesec" },
+            { "field.second",
+                "sekunda" },
+            { "field.week",
+                "tjedan" },
+            { "field.weekday",
+                "dan u tjednu" },
+            { "field.year",
+                "godina" },
+            { "field.zone",
+                "zona" },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, d. MMMM y. G",
+                    "d. MMMM y. G",
+                    "d. M. y. G",
+                    "d.M.y.",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE, d. MMMM y. G",
+                    "d. MMMM y. G",
+                    "d. M. y. G",
+                    "d.M.y. G",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "Prije Krista",
+                    "Poslije Krista",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE, d. MMMM y. G",
+                    "d. MMMM y. G",
+                    "d. M. y. G",
+                    "d.M.y. G",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "Prije Krista",
+                    "Poslije Krista",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE, d. MMMM y. GGGG",
+                    "d. MMMM y. GGGG",
+                    "d. M. y. GGGG",
+                    "d.M.y. GGGG",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "prije R.O.C.",
+                    "R.O.C.",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "prije R.O.C.",
+                    "R.O.C.",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/hu/FormatData_hu.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/hu/FormatData_hu.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.hu;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_hu extends ListResourceBundle {
+public class FormatData_hu extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -101,6 +101,23 @@
                     "" // month 13 if applicable
                 }
             },
+            { "standalone.MonthNames",
+                new String[] {
+                    "janu\u00e1r",
+                    "febru\u00e1r",
+                    "m\u00e1rcius",
+                    "\u00e1prilis",
+                    "m\u00e1jus",
+                    "j\u00fanius",
+                    "j\u00falius",
+                    "augusztus",
+                    "szeptember",
+                    "okt\u00f3ber",
+                    "november",
+                    "december",
+                    "",
+                }
+            },
             { "MonthAbbreviations",
                 new String[] {
                     "jan.", // abb january
@@ -118,6 +135,57 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "standalone.MonthAbbreviations",
+                new String[] {
+                    "jan.",
+                    "febr.",
+                    "m\u00e1rc.",
+                    "\u00e1pr.",
+                    "m\u00e1j.",
+                    "j\u00fan.",
+                    "j\u00fal.",
+                    "aug.",
+                    "szept.",
+                    "okt.",
+                    "nov.",
+                    "dec.",
+                    "",
+                }
+            },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "\u00c1",
+                    "M",
+                    "J",
+                    "J",
+                    "A",
+                    "Sz",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
+            { "standalone.MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "\u00c1",
+                    "M",
+                    "J",
+                    "J",
+                    "A",
+                    "Sz",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "vas\u00e1rnap", // Sunday
@@ -129,6 +197,17 @@
                     "szombat" // Saturday
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "vas\u00e1rnap",
+                    "h\u00e9tf\u0151",
+                    "kedd",
+                    "szerda",
+                    "cs\u00fct\u00f6rt\u00f6k",
+                    "p\u00e9ntek",
+                    "szombat",
+                }
+            },
             { "DayAbbreviations",
                 new String[] {
                     "V", // abb Sunday
@@ -140,6 +219,17 @@
                     "Szo" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "V",
+                    "H",
+                    "K",
+                    "Sze",
+                    "Cs",
+                    "P",
+                    "Szo",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "V",
@@ -151,6 +241,17 @@
                     "Sz",
                 }
             },
+            { "standalone.DayNarrows",
+                new String[] {
+                    "V",
+                    "H",
+                    "K",
+                    "Sz",
+                    "Cs",
+                    "P",
+                    "Sz",
+                }
+            },
             { "AmPmMarkers",
                 new String[] {
                     "DE", // am marker
@@ -163,6 +264,12 @@
                     "i.u."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "i. e.",
+                    "i. sz.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
@@ -200,47 +307,18 @@
                 }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "islamic.MonthNames",
+            { "buddhist.Eras",
                 new String[] {
-                    "Moharrem",
-                    "Safar",
-                    "R\u00e9bi el avvel",
-                    "R\u00e9bi el accher",
-                    "Dsem\u00e1di el avvel",
-                    "Dsem\u00e1di el accher",
-                    "Redseb",
-                    "Sab\u00e1n",
-                    "Ramad\u00e1n",
-                    "Sevv\u00e1l",
-                    "Ds\u00fcl kade",
-                    "Ds\u00fcl hedse",
-                    "",
+                    "BC",
+                    "BK",
                 }
             },
-            { "islamic.Eras",
+            { "buddhist.short.Eras",
                 new String[] {
-                    "",
-                    "MF",
+                    "BC",
+                    "BK",
                 }
             },
-            { "calendarname.islamic-civil", "iszl\u00e1m civil napt\u00e1r" },
-            { "calendarname.islamicc", "iszl\u00e1m civil napt\u00e1r" },
-            { "calendarname.islamic", "iszl\u00e1m napt\u00e1r" },
-            { "calendarname.japanese", "jap\u00e1n napt\u00e1r" },
-            { "calendarname.gregorian", "Gergely-napt\u00e1r" },
-            { "calendarname.gregory", "Gergely-napt\u00e1r" },
-            { "calendarname.roc", "K\u00ednai k\u00f6zt\u00e1rsas\u00e1gi napt\u00e1r" },
-            { "calendarname.buddhist", "buddhista napt\u00e1r" },
-            { "field.era", "\u00e9ra" },
-            { "field.year", "\u00e9v" },
-            { "field.month", "h\u00f3nap" },
-            { "field.week", "h\u00e9t" },
-            { "field.weekday", "h\u00e9t napja" },
-            { "field.dayperiod", "napszak" },
-            { "field.hour", "\u00f3ra" },
-            { "field.minute", "perc" },
-            { "field.second", "m\u00e1sodperc" },
-            { "field.zone", "z\u00f3na" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/hu/FormatData_hu_HU.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/hu/FormatData_hu_HU.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.hu;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_hu_HU extends ListResourceBundle {
+public class FormatData_hu_HU extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/hu/JavaTimeSupplementary_hu.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,235 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.hu;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_hu extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "N1",
+                    "N2",
+                    "N3",
+                    "N4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "I. negyed\u00e9v",
+                    "II. negyed\u00e9v",
+                    "III. negyed\u00e9v",
+                    "IV. negyed\u00e9v",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "buddhista napt\u00e1r" },
+            { "calendarname.gregorian",
+                "Gergely-napt\u00e1r" },
+            { "calendarname.gregory",
+                "Gergely-napt\u00e1r" },
+            { "calendarname.islamic",
+                "iszl\u00e1m napt\u00e1r" },
+            { "calendarname.islamic-civil",
+                "iszl\u00e1m civil napt\u00e1r" },
+            { "calendarname.islamicc",
+                "iszl\u00e1m civil napt\u00e1r" },
+            { "calendarname.japanese",
+                "jap\u00e1n napt\u00e1r" },
+            { "calendarname.roc",
+                "K\u00ednai k\u00f6zt\u00e1rsas\u00e1gi napt\u00e1r" },
+            { "field.dayperiod",
+                "napszak" },
+            { "field.era",
+                "\u00e9ra" },
+            { "field.hour",
+                "\u00f3ra" },
+            { "field.minute",
+                "perc" },
+            { "field.month",
+                "h\u00f3nap" },
+            { "field.second",
+                "m\u00e1sodperc" },
+            { "field.week",
+                "h\u00e9t" },
+            { "field.weekday",
+                "h\u00e9t napja" },
+            { "field.year",
+                "\u00e9v" },
+            { "field.zone",
+                "z\u00f3na" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "y. MMMM d., EEEE",
+                    "y. MMMM d.",
+                    "yyyy.MM.dd.",
+                    "yyyy.MM.dd.",
+                }
+            },
+            { "islamic.Eras",
+                new String[] {
+                    "",
+                    "MF",
+                }
+            },
+            { "islamic.MonthAbbreviations",
+                new String[] {
+                    "Muh.",
+                    "Saf.",
+                    "Rab. I",
+                    "Rab. II",
+                    "Jum. I",
+                    "Jum. II",
+                    "Raj.",
+                    "Sha.",
+                    "Ram.",
+                    "Shaw.",
+                    "Ds\u00fcl-Q.",
+                    "Ds\u00fcl-H.",
+                    "",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "Moharrem",
+                    "Safar",
+                    "R\u00e9bi el avvel",
+                    "R\u00e9bi el accher",
+                    "Dsem\u00e1di el avvel",
+                    "Dsem\u00e1di el accher",
+                    "Redseb",
+                    "Sab\u00e1n",
+                    "Ramad\u00e1n",
+                    "Sevv\u00e1l",
+                    "Ds\u00fcl kade",
+                    "Ds\u00fcl hedse",
+                    "",
+                }
+            },
+            { "islamic.MonthNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                    "5",
+                    "6",
+                    "7",
+                    "8",
+                    "9",
+                    "10",
+                    "11",
+                    "12",
+                    "",
+                }
+            },
+            { "islamic.short.Eras",
+                new String[] {
+                    "",
+                    "MF",
+                }
+            },
+            { "java.time.buddhist.short.Eras",
+                new String[] {
+                    "BC",
+                    "BK",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "id\u0151sz\u00e1m\u00edt\u00e1sunk el\u0151tt",
+                    "id\u0151sz\u00e1m\u00edt\u00e1sunk szerint",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "i.e.",
+                    "i.u.",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "R.O.C. el\u0151tt",
+                    "",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "R.O.C. el\u0151tt",
+                    "",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/in/FormatData_in.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/in/FormatData_in.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.in;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_in extends ListResourceBundle {
+public class FormatData_in extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "MonthNames",
--- a/src/share/classes/sun/text/resources/in/FormatData_in_ID.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/in/FormatData_in_ID.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.in;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_in_ID extends ListResourceBundle {
+public class FormatData_in_ID extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "TimePatterns",
--- a/src/share/classes/sun/text/resources/is/FormatData_is.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/is/FormatData_is.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.is;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_is extends ListResourceBundle {
+public class FormatData_is extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -118,6 +118,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "J",
+                    "\u00c1",
+                    "L",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "standalone.MonthNarrows",
                 new String[] {
                     "j",
@@ -216,13 +233,6 @@
                 }
             },
             { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
-            { "calendarname.islamic-civil", "\u00cdslamskt borgaradagatal" },
-            { "calendarname.islamicc", "\u00cdslamskt borgaradagatal" },
-            { "calendarname.islamic", "\u00cdslamskt dagatal" },
-            { "calendarname.buddhist", "B\u00fadd\u00edskt dagatal" },
-            { "calendarname.japanese", "Japanskt dagatal" },
-            { "calendarname.gregorian", "Gregor\u00edskt dagatal" },
-            { "calendarname.gregory", "Gregor\u00edskt dagatal" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/is/FormatData_is_IS.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/is/FormatData_is_IS.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.is;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_is_IS extends ListResourceBundle {
+public class FormatData_is_IS extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/is/JavaTimeSupplementary_is.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.is;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_is extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "F1",
+                    "F2",
+                    "F3",
+                    "F4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1st fj\u00f3r\u00f0ungur",
+                    "2nd fj\u00f3r\u00f0ungur",
+                    "3rd fj\u00f3r\u00f0ungur",
+                    "4th fj\u00f3r\u00f0ungur",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "B\u00fadd\u00edskt dagatal" },
+            { "calendarname.gregorian",
+                "Gregor\u00edskt dagatal" },
+            { "calendarname.gregory",
+                "Gregor\u00edskt dagatal" },
+            { "calendarname.islamic",
+                "\u00cdslamskt dagatal" },
+            { "calendarname.islamic-civil",
+                "\u00cdslamskt borgaradagatal" },
+            { "calendarname.islamicc",
+                "\u00cdslamskt borgaradagatal" },
+            { "calendarname.japanese",
+                "Japanskt dagatal" },
+            { "calendarname.roc",
+                "k\u00ednverskt dagatal" },
+            { "field.dayperiod",
+                "f.h./e.h." },
+            { "field.era",
+                "t\u00edmabil" },
+            { "field.hour",
+                "klukkustund" },
+            { "field.minute",
+                "m\u00edn\u00fata" },
+            { "field.month",
+                "m\u00e1nu\u00f0ur" },
+            { "field.second",
+                "sek\u00fanda" },
+            { "field.week",
+                "vika" },
+            { "field.weekday",
+                "vikudagur" },
+            { "field.year",
+                "\u00e1r" },
+            { "field.zone",
+                "sv\u00e6\u00f0i" },
+            { "java.time.short.Eras",
+                new String[] {
+                    "fyrir Krist",
+                    "eftir Krist",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/it/FormatData_it.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/it/FormatData_it.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.it;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_it extends ListResourceBundle {
+public class FormatData_it extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -135,6 +135,40 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "G",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "G",
+                    "L",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
+            { "standalone.MonthNarrows",
+                new String[] {
+                    "G",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "G",
+                    "L",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "domenica", // Sunday
@@ -146,6 +180,17 @@
                     "sabato" // Saturday
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "Domenica",
+                    "Luned\u00ec",
+                    "Marted\u00ec",
+                    "Mercoled\u00ec",
+                    "Gioved\u00ec",
+                    "Venerd\u00ec",
+                    "Sabato",
+                }
+            },
             { "DayAbbreviations",
                 new String[] {
                     "dom", // abb Sunday
@@ -174,6 +219,12 @@
                     "dopo Cristo"
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "aC",
+                    "dC",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
@@ -211,71 +262,6 @@
                 }
             },
             { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "dd MMMM y G",
-                    "dd/MMM/y G",
-                    "dd/MM/y G",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "dd MMMM y G",
-                    "dd/MMM/y G",
-                    "dd/MM/y G",
-                }
-            },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "dd MMMM y G",
-                    "dd/MMM/y G",
-                    "dd/MM/y G",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "dd MMMM y GGGG",
-                    "dd/MMM/y GGGG",
-                    "dd/MM/y GGGG",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "dd MMMM y G",
-                    "dd/MMM/y G",
-                    "dd/MM/y G",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "dd MMMM y GGGG",
-                    "dd/MMM/y GGGG",
-                    "dd/MM/y GGGG",
-                }
-            },
-            { "calendarname.islamic-civil", "calendario civile islamico" },
-            { "calendarname.islamicc", "calendario civile islamico" },
-            { "calendarname.islamic", "calendario islamico" },
-            { "calendarname.buddhist", "calendario buddista" },
-            { "calendarname.japanese", "calendario giapponese" },
-            { "calendarname.gregorian", "calendario gregoriano" },
-            { "calendarname.gregory", "calendario gregoriano" },
-            { "field.era", "era" },
-            { "field.year", "anno" },
-            { "field.month", "mese" },
-            { "field.week", "settimana" },
-            { "field.weekday", "giorno della settimana" },
-            { "field.dayperiod", "periodo del giorno" },
-            { "field.hour", "ora" },
-            { "field.minute", "minuto" },
-            { "field.second", "secondo" },
-            { "field.zone", "zona" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/it/FormatData_it_CH.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/it/FormatData_it_CH.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.it;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_it_CH extends ListResourceBundle {
+public class FormatData_it_CH extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/it/FormatData_it_IT.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/it/FormatData_it_IT.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.it;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_it_IT extends ListResourceBundle {
+public class FormatData_it_IT extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/it/JavaTimeSupplementary_it.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.it;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_it extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "T1",
+                    "T2",
+                    "T3",
+                    "T4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1o trimestre",
+                    "2o trimestre",
+                    "3o trimestre",
+                    "4o trimestre",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "calendario buddista" },
+            { "calendarname.gregorian",
+                "calendario gregoriano" },
+            { "calendarname.gregory",
+                "calendario gregoriano" },
+            { "calendarname.islamic",
+                "calendario islamico" },
+            { "calendarname.islamic-civil",
+                "calendario civile islamico" },
+            { "calendarname.islamicc",
+                "calendario civile islamico" },
+            { "calendarname.japanese",
+                "calendario giapponese" },
+            { "calendarname.roc",
+                "Calendario Minguo" },
+            { "field.dayperiod",
+                "periodo del giorno" },
+            { "field.era",
+                "era" },
+            { "field.hour",
+                "ora" },
+            { "field.minute",
+                "minuto" },
+            { "field.month",
+                "mese" },
+            { "field.second",
+                "secondo" },
+            { "field.week",
+                "settimana" },
+            { "field.weekday",
+                "giorno della settimana" },
+            { "field.year",
+                "anno" },
+            { "field.zone",
+                "zona" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y GGGG",
+                    "dd MMMM y GGGG",
+                    "dd/MMM/y GGGG",
+                    "dd/MM/y GGGG",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "dd MMMM y G",
+                    "dd/MMM/y G",
+                    "dd/MM/y G",
+                }
+            },
+            { "java.time.buddhist.short.Eras",
+                new String[] {
+                    "BC",
+                    "EB",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "dd MMMM y G",
+                    "dd/MMM/y G",
+                    "dd/MM/y G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "dd MMMM y G",
+                    "dd/MMM/y G",
+                    "dd/MM/y G",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "a.C.",
+                    "d.C",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "dd MMMM y G",
+                    "dd/MMM/y G",
+                    "dd/MM/y G",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "BC",
+                    "dopo Cristo",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y GGGG",
+                    "dd MMMM y GGGG",
+                    "dd/MMM/y GGGG",
+                    "dd/MM/y GGGG",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/iw/FormatData_iw.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/iw/FormatData_iw.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.iw;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_iw extends ListResourceBundle {
+public class FormatData_iw extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -135,6 +135,23 @@
                     "",
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                    "5",
+                    "6",
+                    "7",
+                    "8",
+                    "9",
+                    "10",
+                    "11",
+                    "12",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df", // Sunday
@@ -185,6 +202,12 @@
                     "\u05dc\u05e4\u05e1\u05d4\"\u05e0"
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e1",
+                    "\u05dc\u05e1\u05d4\u05f4\u05e0",
+                }
+            },
             { "TimePatterns",
                 new String[] {
                     "HH:mm:ss z", // full time pattern
@@ -207,46 +230,6 @@
                 }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "islamic.MonthNames",
-                new String[] {
-                    "\u05de\u05d5\u05d7\u05e8\u05dd",
-                    "\u05e1\u05e4\u05e8",
-                    "\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc",
-                    "\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05ea\u05e0\u05d9",
-                    "\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc",
-                    "\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05ea\u05e0\u05d9",
-                    "\u05e8\u05d2\u05f3\u05d0\u05d1",
-                    "\u05e9\u05e2\u05d1\u05d0\u05df",
-                    "\u05e8\u05d0\u05de\u05d3\u05df",
-                    "\u05e9\u05d5\u05d5\u05d0\u05dc",
-                    "\u05d6\u05d5 \u05d0\u05dc-QI'DAH",
-                    "\u05d6\u05d5 \u05d0\u05dc-\u05d7\u05d9\u05d2\u05f3\u05d4",
-                    "",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4",
-                }
-            },
-            { "calendarname.islamic-civil", "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9" },
-            { "calendarname.islamicc", "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9" },
-            { "calendarname.islamic", "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9" },
-            { "calendarname.buddhist", "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d1\u05d5\u05d3\u05d4\u05d9\u05e1\u05d8\u05d9" },
-            { "calendarname.japanese", "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d9\u05e4\u05e0\u05d9" },
-            { "calendarname.gregorian", "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9" },
-            { "calendarname.gregory", "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9" },
-            { "field.era", "\u05ea\u05e7\u05d5\u05e4\u05d4" },
-            { "field.year", "\u05e9\u05e0\u05d4" },
-            { "field.month", "\u05d7\u05d5\u05d3\u05e9" },
-            { "field.week", "\u05e9\u05d1\u05d5\u05e2" },
-            { "field.weekday", "\u05d9\u05d5\u05dd \u05d1\u05e9\u05d1\u05d5\u05e2" },
-            { "field.dayperiod", "\u05dc\u05e4\u05d4\u05f4\u05e6/\u05d0\u05d7\u05d4\u05f4\u05e6" },
-            { "field.hour", "\u05e9\u05e2\u05d4" },
-            { "field.minute", "\u05d3\u05e7\u05d4" },
-            { "field.second", "\u05e9\u05e0\u05d9\u05d9\u05d4" },
-            { "field.zone", "\u05d0\u05d6\u05d5\u05e8" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/iw/FormatData_iw_IL.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/iw/FormatData_iw_IL.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.iw;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_iw_IL extends ListResourceBundle {
+public class FormatData_iw_IL extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/iw/JavaTimeSupplementary_iw.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.iw;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_iw extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterNames",
+                new String[] {
+                    "\u05e8\u05d1\u05e2\u05d5\u05df 1",
+                    "\u05e8\u05d1\u05e2\u05d5\u05df 2",
+                    "\u05e8\u05d1\u05e2\u05d5\u05df 3",
+                    "\u05e8\u05d1\u05e2\u05d5\u05df 4",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d1\u05d5\u05d3\u05d4\u05d9\u05e1\u05d8\u05d9" },
+            { "calendarname.gregorian",
+                "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9" },
+            { "calendarname.gregory",
+                "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9" },
+            { "calendarname.islamic",
+                "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9" },
+            { "calendarname.islamic-civil",
+                "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9" },
+            { "calendarname.islamicc",
+                "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9" },
+            { "calendarname.japanese",
+                "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d9\u05e4\u05e0\u05d9" },
+            { "calendarname.roc",
+                "\u05dc\u05d5\u05d7 \u05d4\u05e9\u05e0\u05d4 \u05d4\u05e1\u05d9\u05e0\u05d9 Minguo" },
+            { "field.dayperiod",
+                "\u05dc\u05e4\u05d4\u05f4\u05e6/\u05d0\u05d7\u05d4\u05f4\u05e6" },
+            { "field.era",
+                "\u05ea\u05e7\u05d5\u05e4\u05d4" },
+            { "field.hour",
+                "\u05e9\u05e2\u05d4" },
+            { "field.minute",
+                "\u05d3\u05e7\u05d4" },
+            { "field.month",
+                "\u05d7\u05d5\u05d3\u05e9" },
+            { "field.second",
+                "\u05e9\u05e0\u05d9\u05d9\u05d4" },
+            { "field.week",
+                "\u05e9\u05d1\u05d5\u05e2" },
+            { "field.weekday",
+                "\u05d9\u05d5\u05dd \u05d1\u05e9\u05d1\u05d5\u05e2" },
+            { "field.year",
+                "\u05e9\u05e0\u05d4" },
+            { "field.zone",
+                "\u05d0\u05d6\u05d5\u05e8" },
+            { "islamic.Eras",
+                new String[] {
+                    "",
+                    "\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "\u05de\u05d5\u05d7\u05e8\u05dd",
+                    "\u05e1\u05e4\u05e8",
+                    "\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc",
+                    "\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05ea\u05e0\u05d9",
+                    "\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc",
+                    "\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05ea\u05e0\u05d9",
+                    "\u05e8\u05d2\u05f3\u05d0\u05d1",
+                    "\u05e9\u05e2\u05d1\u05d0\u05df",
+                    "\u05e8\u05d0\u05de\u05d3\u05df",
+                    "\u05e9\u05d5\u05d5\u05d0\u05dc",
+                    "\u05d6\u05d5 \u05d0\u05dc-QI'DAH",
+                    "\u05d6\u05d5 \u05d0\u05dc-\u05d7\u05d9\u05d2\u05f3\u05d4",
+                    "",
+                }
+            },
+            { "islamic.short.Eras",
+                new String[] {
+                    "",
+                    "\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e1\u05e4\u05d9\u05e8\u05d4",
+                    "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\u05dc\u05e1\u05d4\"\u05e0",
+                    "\u05dc\u05e4\u05e1\u05d4\"\u05e0",
+                }
+            },
+        };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/iw/JavaTimeSupplementary_iw_IL.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.iw;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_iw_IL extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterNames",
+                new String[] {
+                    "\u05e8\u05d1\u05e2\u05d5\u05df 1",
+                    "\u05e8\u05d1\u05e2\u05d5\u05df 2",
+                    "\u05e8\u05d1\u05e2\u05d5\u05df 3",
+                    "\u05e8\u05d1\u05e2\u05d5\u05df 4",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d1\u05d5\u05d3\u05d4\u05d9\u05e1\u05d8\u05d9" },
+            { "calendarname.gregorian",
+                "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9" },
+            { "calendarname.gregory",
+                "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9" },
+            { "calendarname.islamic",
+                "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9" },
+            { "calendarname.islamic-civil",
+                "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9" },
+            { "calendarname.islamicc",
+                "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9" },
+            { "calendarname.japanese",
+                "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d9\u05e4\u05e0\u05d9" },
+            { "calendarname.roc",
+                "\u05dc\u05d5\u05d7 \u05d4\u05e9\u05e0\u05d4 \u05d4\u05e1\u05d9\u05e0\u05d9 Minguo" },
+            { "field.dayperiod",
+                "\u05dc\u05e4\u05d4\u05f4\u05e6/\u05d0\u05d7\u05d4\u05f4\u05e6" },
+            { "field.era",
+                "\u05ea\u05e7\u05d5\u05e4\u05d4" },
+            { "field.hour",
+                "\u05e9\u05e2\u05d4" },
+            { "field.minute",
+                "\u05d3\u05e7\u05d4" },
+            { "field.month",
+                "\u05d7\u05d5\u05d3\u05e9" },
+            { "field.second",
+                "\u05e9\u05e0\u05d9\u05d9\u05d4" },
+            { "field.week",
+                "\u05e9\u05d1\u05d5\u05e2" },
+            { "field.weekday",
+                "\u05d9\u05d5\u05dd \u05d1\u05e9\u05d1\u05d5\u05e2" },
+            { "field.year",
+                "\u05e9\u05e0\u05d4" },
+            { "field.zone",
+                "\u05d0\u05d6\u05d5\u05e8" },
+            { "islamic.Eras",
+                new String[] {
+                    "",
+                    "\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "\u05de\u05d5\u05d7\u05e8\u05dd",
+                    "\u05e1\u05e4\u05e8",
+                    "\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc",
+                    "\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05ea\u05e0\u05d9",
+                    "\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc",
+                    "\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05ea\u05e0\u05d9",
+                    "\u05e8\u05d2\u05f3\u05d0\u05d1",
+                    "\u05e9\u05e2\u05d1\u05d0\u05df",
+                    "\u05e8\u05d0\u05de\u05d3\u05df",
+                    "\u05e9\u05d5\u05d5\u05d0\u05dc",
+                    "\u05d6\u05d5 \u05d0\u05dc-QI'DAH",
+                    "\u05d6\u05d5 \u05d0\u05dc-\u05d7\u05d9\u05d2\u05f3\u05d4",
+                    "",
+                }
+            },
+            { "islamic.short.Eras",
+                new String[] {
+                    "",
+                    "\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e1\u05e4\u05d9\u05e8\u05d4",
+                    "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e1",
+                    "\u05dc\u05e1\u05d4\u05f4\u05e0",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/ja/FormatData_ja.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ja/FormatData_ja.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.ja;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ja extends ListResourceBundle {
+public class FormatData_ja extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     @Override
     protected final Object[][] getContents() {
@@ -182,16 +182,7 @@
                     "\u4ecf\u66a6",       // Butsureki
                 }
             },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "GGGGy\u5e74M\u6708d\u65e5EEEE",
-                    "GGGGy\u5e74M\u6708d\u65e5",
-                    "Gy/MM/dd",
-                    "Gy/MM/dd",
-                }
-            },
             { "japanese.Eras", japaneseEras },
-            { "cldr.japanese.short.Eras", japaneseEras },
             { "japanese.FirstYear",
                 new String[] {  // first year name
                     "\u5143",   // "Gan"-nen
@@ -233,14 +224,6 @@
                     "{1} {0}"                          // date-time pattern
                 }
             },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "Gy\u5e74M\u6708d\u65e5EEEE",
-                    "Gy\u5e74M\u6708d\u65e5",
-                    "Gy\u5e74M\u6708d\u65e5",
-                    "Gyy/MM/dd",
-                }
-            },
             { "japanese.DatePatterns",
                 new String[] {
                     "GGGGyyyy'\u5e74'M'\u6708'd'\u65e5'", // full date pattern
@@ -263,42 +246,6 @@
                 }
             },
             { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
-            { "roc.Eras", rocEras },
-            { "roc.short.Eras", rocEras },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "Gy\u5e74M\u6708d\u65e5EEEE",
-                    "Gy\u5e74M\u6708d\u65e5",
-                    "Gy/MM/dd",
-                    "Gy/MM/dd",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "GGGGy\u5e74M\u6708d\u65e5EEEE",
-                    "GGGGy\u5e74M\u6708d\u65e5",
-                    "GGGGy/MM/dd",
-                    "GGGGy/MM/dd",
-                }
-            },
-            { "calendarname.islamic-civil", "\u592a\u967d\u30a4\u30b9\u30e9\u30e0\u66a6" },
-            { "calendarname.islamicc", "\u592a\u967d\u30a4\u30b9\u30e9\u30e0\u66a6" },
-            { "calendarname.islamic", "\u30a4\u30b9\u30e9\u30e0\u66a6" },
-            { "calendarname.japanese", "\u548c\u66a6" },
-            { "calendarname.gregorian", "\u897f\u66a6[\u30b0\u30ec\u30b4\u30ea\u30aa\u66a6]" },
-            { "calendarname.gregory", "\u897f\u66a6[\u30b0\u30ec\u30b4\u30ea\u30aa\u66a6]" },
-            { "calendarname.roc", "\u4e2d\u83ef\u6c11\u56fd\u66a6" },
-            { "calendarname.buddhist", "\u30bf\u30a4\u4ecf\u6559\u66a6" },
-            { "field.era", "\u6642\u4ee3" },
-            { "field.year", "\u5e74" },
-            { "field.month", "\u6708" },
-            { "field.week", "\u9031" },
-            { "field.weekday", "\u66dc\u65e5" },
-            { "field.dayperiod", "\u5348\u524d/\u5348\u5f8c" },
-            { "field.hour", "\u6642" },
-            { "field.minute", "\u5206" },
-            { "field.second", "\u79d2" },
-            { "field.zone", "\u30bf\u30a4\u30e0\u30be\u30fc\u30f3" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/ja/FormatData_ja_JP.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ja/FormatData_ja_JP.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.ja;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ja_JP extends ListResourceBundle {
+public class FormatData_ja_JP extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/ja/JavaTimeSupplementary_ja.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,254 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ja;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_ja extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "Q1",
+                    "Q2",
+                    "Q3",
+                    "Q4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "\u7b2c1\u56db\u534a\u671f",
+                    "\u7b2c2\u56db\u534a\u671f",
+                    "\u7b2c3\u56db\u534a\u671f",
+                    "\u7b2c4\u56db\u534a\u671f",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "\u30bf\u30a4\u4ecf\u6559\u66a6" },
+            { "calendarname.gregorian",
+                "\u897f\u66a6[\u30b0\u30ec\u30b4\u30ea\u30aa\u66a6]" },
+            { "calendarname.gregory",
+                "\u897f\u66a6[\u30b0\u30ec\u30b4\u30ea\u30aa\u66a6]" },
+            { "calendarname.islamic",
+                "\u30a4\u30b9\u30e9\u30e0\u66a6" },
+            { "calendarname.islamic-civil",
+                "\u592a\u967d\u30a4\u30b9\u30e9\u30e0\u66a6" },
+            { "calendarname.islamicc",
+                "\u592a\u967d\u30a4\u30b9\u30e9\u30e0\u66a6" },
+            { "calendarname.japanese",
+                "\u548c\u66a6" },
+            { "calendarname.roc",
+                "\u4e2d\u83ef\u6c11\u56fd\u66a6" },
+            { "field.dayperiod",
+                "\u5348\u524d/\u5348\u5f8c" },
+            { "field.era",
+                "\u6642\u4ee3" },
+            { "field.hour",
+                "\u6642" },
+            { "field.minute",
+                "\u5206" },
+            { "field.month",
+                "\u6708" },
+            { "field.second",
+                "\u79d2" },
+            { "field.week",
+                "\u9031" },
+            { "field.weekday",
+                "\u66dc\u65e5" },
+            { "field.year",
+                "\u5e74" },
+            { "field.zone",
+                "\u30bf\u30a4\u30e0\u30be\u30fc\u30f3" },
+            { "islamic.MonthAbbreviations",
+                new String[] {
+                    "\u30e0\u30cf\u30c3\u30e9\u30e0",
+                    "\u30b5\u30d5\u30a2\u30eb",
+                    "\u30e9\u30d3\u30fc\u30fb\u30a6\u30eb\u30fb\u30a2\u30a6\u30ef\u30eb",
+                    "\u30e9\u30d3\u30fc\u30fb\u30a6\u30c3\u30fb\u30b5\u30fc\u30cb\u30fc",
+                    "\u30b8\u30e5\u30de\u30fc\u30c0\u30eb\u30fb\u30a2\u30a6\u30ef\u30eb",
+                    "\u30b8\u30e5\u30de\u30fc\u30c0\u30c3\u30b5\u30fc\u30cb\u30fc",
+                    "\u30e9\u30b8\u30e3\u30d6",
+                    "\u30b7\u30e3\u30a2\u30d0\u30fc\u30f3",
+                    "\u30e9\u30de\u30c0\u30fc\u30f3",
+                    "\u30b7\u30e3\u30a6\u30ef\u30fc\u30eb",
+                    "\u30ba\u30eb\u30fb\u30ab\u30a4\u30c0",
+                    "\u30ba\u30eb\u30fb\u30d2\u30c3\u30b8\u30e3",
+                    "",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "\u30e0\u30cf\u30c3\u30e9\u30e0",
+                    "\u30b5\u30d5\u30a2\u30eb",
+                    "\u30e9\u30d3\u30fc\u30fb\u30a6\u30eb\u30fb\u30a2\u30a6\u30ef\u30eb",
+                    "\u30e9\u30d3\u30fc\u30fb\u30a6\u30c3\u30fb\u30b5\u30fc\u30cb\u30fc",
+                    "\u30b8\u30e5\u30de\u30fc\u30c0\u30eb\u30fb\u30a2\u30a6\u30ef\u30eb",
+                    "\u30b8\u30e5\u30de\u30fc\u30c0\u30c3\u30b5\u30fc\u30cb\u30fc",
+                    "\u30e9\u30b8\u30e3\u30d6",
+                    "\u30b7\u30e3\u30a2\u30d0\u30fc\u30f3",
+                    "\u30e9\u30de\u30c0\u30fc\u30f3",
+                    "\u30b7\u30e3\u30a6\u30ef\u30fc\u30eb",
+                    "\u30ba\u30eb\u30fb\u30ab\u30a4\u30c0",
+                    "\u30ba\u30eb\u30fb\u30d2\u30c3\u30b8\u30e3",
+                    "",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "GGGGy\u5e74M\u6708d\u65e5EEEE",
+                    "GGGGy\u5e74M\u6708d\u65e5",
+                    "Gy/MM/dd",
+                    "Gy/MM/dd",
+                }
+            },
+            { "java.time.buddhist.long.Eras",
+                new String[] {
+                    "BC",
+                    "\u4ecf\u66a6",
+                }
+            },
+            { "java.time.buddhist.short.Eras",
+                new String[] {
+                    "\u7d00\u5143\u524d",
+                    "\u4ecf\u66a6",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "Gy'\u5e74'M'\u6708'd'\u65e5'",
+                    "GGGGGy.MM.dd",
+                    "GGGGGy.MM.dd",
+                    "GGGGGy.MM.dd",
+                }
+            },
+            { "java.time.japanese.long.Eras",
+                new String[] {
+                    "\u897f\u66a6",
+                    "\u660e\u6cbb",
+                    "\u5927\u6b63",
+                    "\u662d\u548c",
+                    "\u5e73\u6210",
+                }
+            },
+            { "java.time.japanese.short.Eras",
+                new String[] {
+                    "\u897f\u66a6",
+                    "\u660e\u6cbb",
+                    "\u5927\u6b63",
+                    "\u662d\u548c",
+                    "\u5e73\u6210",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "\u7d00\u5143\u524d",
+                    "\u897f\u66a6",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "Gy\u5e74M\u6708d\u65e5EEEE",
+                    "Gy\u5e74M\u6708d\u65e5",
+                    "Gy/MM/dd",
+                    "Gy/MM/dd",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\u7d00\u5143\u524d",
+                    "\u897f\u66a6",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "GGGGy\u5e74M\u6708d\u65e5EEEE",
+                    "GGGGy\u5e74M\u6708d\u65e5",
+                    "GGGGy/MM/dd",
+                    "GGGGy/MM/dd",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "\u6c11\u56fd\u524d",
+                    "\u6c11\u56fd",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "\u6c11\u56fd\u524d",
+                    "\u6c11\u56fd",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/ko/FormatData_ko.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ko/FormatData_ko.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.ko;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ko extends ListResourceBundle {
+public class FormatData_ko extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     @Override
     protected final Object[][] getContents() {
@@ -123,6 +123,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "1\uc6d4",
+                    "2\uc6d4",
+                    "3\uc6d4",
+                    "4\uc6d4",
+                    "5\uc6d4",
+                    "6\uc6d4",
+                    "7\uc6d4",
+                    "8\uc6d4",
+                    "9\uc6d4",
+                    "10\uc6d4",
+                    "11\uc6d4",
+                    "12\uc6d4",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "\uc77c\uc694\uc77c", // Sunday
@@ -156,6 +173,27 @@
                     "\ud1a0",
                 }
             },
+            { "Eras",
+                new String[] {
+                    "\uae30\uc6d0\uc804",
+                    "\uc11c\uae30",
+                }
+            },
+            { "buddhist.Eras",
+                new String[] {
+                    "BC",
+                    "\ubd88\uae30",
+                }
+            },
+            { "japanese.Eras",
+                new String[] {
+                    "\uc11c\uae30",
+                    "\uba54\uc774\uc9c0",
+                    "\ub2e4\uc774\uc1fc",
+                    "\uc1fc\uc640",
+                    "\ud5e4\uc774\uc138\uc774",
+                }
+            },
             { "AmPmMarkers",
                 new String[] {
                     "\uc624\uc804", // am marker
@@ -183,34 +221,7 @@
                     "{1} {0}" // date-time pattern
                 }
             },
-            { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "G y\ub144 M\uc6d4 d\uc77c EEEE",
-                    "G y\ub144 M\uc6d4 d\uc77c",
-                    "G y. M. d",
-                    "G y. M. d",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "G y\ub144 M\uc6d4 d\uc77c EEEE",
-                    "G y\ub144 M\uc6d4 d\uc77c",
-                    "G y. M. d",
-                    "G y. M. d",
-                }
-            },
-            { "roc.Eras", rocEras },
-            { "roc.short.Eras", rocEras },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "G y\ub144 M\uc6d4 d\uc77c EEEE",
-                    "G y\ub144 M\uc6d4 d\uc77c",
-                    "G y. M. d",
-                    "G y. M. d",
-                }
-            },
-            { "roc.DatePatterns",
+            { "buddhist.DatePatterns",
                 new String[] {
                     "GGGG y\ub144 M\uc6d4 d\uc77c EEEE",
                     "GGGG y\ub144 M\uc6d4 d\uc77c",
@@ -218,24 +229,15 @@
                     "GGGG y. M. d",
                 }
             },
-            { "calendarname.islamic-civil", "\uc774\uc2ac\ub78c \uc0c1\uc6a9\ub825" },
-            { "calendarname.islamicc", "\uc774\uc2ac\ub78c \uc0c1\uc6a9\ub825" },
-            { "calendarname.islamic", "\uc774\uc2ac\ub78c\ub825" },
-            { "calendarname.japanese", "\uc77c\ubcf8\ub825" },
-            { "calendarname.gregorian", "\ud0dc\uc591\ub825" },
-            { "calendarname.gregory", "\ud0dc\uc591\ub825" },
-            { "calendarname.roc", "\ub300\ub9cc\ub825" },
-            { "calendarname.buddhist", "\ubd88\uad50\ub825" },
-            { "field.era", "\uc5f0\ud638" },
-            { "field.year", "\ub144" },
-            { "field.month", "\uc6d4" },
-            { "field.week", "\uc8fc" },
-            { "field.weekday", "\uc694\uc77c" },
-            { "field.dayperiod", "\uc624\uc804/\uc624\ud6c4" },
-            { "field.hour", "\uc2dc" },
-            { "field.minute", "\ubd84" },
-            { "field.second", "\ucd08" },
-            { "field.zone", "\uc2dc\uac04\ub300" },
+            { "japanese.DatePatterns",
+                new String[] {
+                    "GGGG y\ub144 M\uc6d4 d\uc77c EEEE",
+                    "GGGG y\ub144 M\uc6d4 d\uc77c",
+                    "GGGG y. M. d",
+                    "GGGG y. M. d",
+                }
+            },
+            { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/ko/FormatData_ko_KR.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ko/FormatData_ko_KR.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.ko;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ko_KR extends ListResourceBundle {
+public class FormatData_ko_KR extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/ko/JavaTimeSupplementary_ko.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ko;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_ko extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "1\ubd84\uae30",
+                    "2\ubd84\uae30",
+                    "3\ubd84\uae30",
+                    "4\ubd84\uae30",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "\uc81c 1/4\ubd84\uae30",
+                    "\uc81c 2/4\ubd84\uae30",
+                    "\uc81c 3/4\ubd84\uae30",
+                    "\uc81c 4/4\ubd84\uae30",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "\ubd88\uad50\ub825" },
+            { "calendarname.gregorian",
+                "\ud0dc\uc591\ub825" },
+            { "calendarname.gregory",
+                "\ud0dc\uc591\ub825" },
+            { "calendarname.islamic",
+                "\uc774\uc2ac\ub78c\ub825" },
+            { "calendarname.islamic-civil",
+                "\uc774\uc2ac\ub78c \uc0c1\uc6a9\ub825" },
+            { "calendarname.islamicc",
+                "\uc774\uc2ac\ub78c \uc0c1\uc6a9\ub825" },
+            { "calendarname.japanese",
+                "\uc77c\ubcf8\ub825" },
+            { "calendarname.roc",
+                "\ub300\ub9cc\ub825" },
+            { "field.dayperiod",
+                "\uc624\uc804/\uc624\ud6c4" },
+            { "field.era",
+                "\uc5f0\ud638" },
+            { "field.hour",
+                "\uc2dc" },
+            { "field.minute",
+                "\ubd84" },
+            { "field.month",
+                "\uc6d4" },
+            { "field.second",
+                "\ucd08" },
+            { "field.week",
+                "\uc8fc" },
+            { "field.weekday",
+                "\uc694\uc77c" },
+            { "field.year",
+                "\ub144" },
+            { "field.zone",
+                "\uc2dc\uac04\ub300" },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "G y\ub144 M\uc6d4 d\uc77c EEEE",
+                    "G y\ub144 M\uc6d4 d\uc77c",
+                    "G y. M. d",
+                    "G y. M. d",
+                }
+            },
+            { "java.time.buddhist.short.Eras",
+                new String[] {
+                    "BC",
+                    "\ubd88\uae30",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "G y\ub144 M\uc6d4 d\uc77c EEEE",
+                    "G y\ub144 M\uc6d4 d\uc77c",
+                    "G y. M. d",
+                    "G y. M. d",
+                }
+            },
+            { "java.time.japanese.long.Eras",
+                new String[] {
+                    "\uc11c\uae30",
+                    "\uba54\uc774\uc9c0",
+                    "\ub2e4\uc774\uc1fc",
+                    "\uc1fc\uc640",
+                    "\ud5e4\uc774\uc138\uc774",
+                }
+            },
+            { "java.time.japanese.short.Eras",
+                new String[] {
+                    "\uc11c\uae30",
+                    "\uba54\uc774\uc9c0",
+                    "\ub2e4\uc774\uc1fc",
+                    "\uc1fc\uc640",
+                    "\ud5e4\uc774\uc138\uc774",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "\uc11c\ub825\uae30\uc6d0\uc804",
+                    "\uc11c\ub825\uae30\uc6d0",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "G y\ub144 M\uc6d4 d\uc77c EEEE",
+                    "G y\ub144 M\uc6d4 d\uc77c",
+                    "G y. M. d",
+                    "G y. M. d",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\uae30\uc6d0\uc804",
+                    "\uc11c\uae30",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "GGGG y\ub144 M\uc6d4 d\uc77c EEEE",
+                    "GGGG y\ub144 M\uc6d4 d\uc77c",
+                    "GGGG y. M. d",
+                    "GGGG y. M. d",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "\uc911\ud654\ubbfc\uad6d\uc804",
+                    "\uc911\ud654\ubbfc\uad6d",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "\uc911\ud654\ubbfc\uad6d\uc804",
+                    "\uc911\ud654\ubbfc\uad6d",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/lt/FormatData_lt.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/lt/FormatData_lt.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.lt;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_lt extends ListResourceBundle {
+public class FormatData_lt extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -135,6 +135,40 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "standalone.MonthAbbreviations",
+                new String[] {
+                    "Saus.",
+                    "Vas.",
+                    "Kov.",
+                    "Bal.",
+                    "Geg.",
+                    "Bir.",
+                    "Liep.",
+                    "Rugp.",
+                    "Rugs.",
+                    "Spal.",
+                    "Lapkr.",
+                    "Gruod.",
+                    "",
+                }
+            },
+            { "MonthNarrows",
+                new String[] {
+                    "S",
+                    "V",
+                    "K",
+                    "B",
+                    "G",
+                    "B",
+                    "L",
+                    "R",
+                    "R",
+                    "S",
+                    "L",
+                    "G",
+                    "",
+                }
+            },
             { "standalone.MonthNarrows",
                 new String[] {
                     "S",
@@ -163,6 +197,17 @@
                     "\u0160e\u0161tadienis" // Saturday
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "sekmadienis",
+                    "pirmadienis",
+                    "antradienis",
+                    "tre\u010diadienis",
+                    "ketvirtadienis",
+                    "penktadienis",
+                    "\u0161e\u0161tadienis",
+                }
+            },
             { "DayAbbreviations",
                 new String[] {
                     "Sk", // abb Sunday
@@ -174,6 +219,17 @@
                     "\u0160t" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "Sk",
+                    "Pr",
+                    "An",
+                    "Tr",
+                    "Kt",
+                    "Pn",
+                    "\u0160t",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "S",
@@ -202,6 +258,12 @@
                     "po.Kr."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "pr. Kr.",
+                    "po Kr.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
@@ -239,32 +301,6 @@
                 }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "y G, MMMM d, EEEE",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "GGGGG yyyy-MM-dd",
-                }
-            },
-            { "calendarname.islamic-civil", "Pilietinis islamo kalendorius" },
-            { "calendarname.islamicc", "Pilietinis islamo kalendorius" },
-            { "calendarname.islamic", "Islamo kalendorius" },
-            { "calendarname.japanese", "Japon\u0173 kalendorius" },
-            { "calendarname.gregorian", "Grigaliaus kalendorius" },
-            { "calendarname.gregory", "Grigaliaus kalendorius" },
-            { "calendarname.roc", "Kinijos Respublikos kalendorius" },
-            { "calendarname.buddhist", "Budist\u0173 kalendorius" },
-            { "field.era", "era" },
-            { "field.year", "metai" },
-            { "field.month", "m\u0117nuo" },
-            { "field.week", "savait\u0117" },
-            { "field.weekday", "savait\u0117s diena" },
-            { "field.dayperiod", "dienos metas" },
-            { "field.hour", "valanda" },
-            { "field.minute", "minut\u0117" },
-            { "field.second", "sekund\u0117" },
-            { "field.zone", "laiko juosta" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/lt/FormatData_lt_LT.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/lt/FormatData_lt_LT.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.lt;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_lt_LT extends ListResourceBundle {
+public class FormatData_lt_LT extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/lt/JavaTimeSupplementary_lt.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.lt;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_lt extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "I k.",
+                    "II k.",
+                    "III k.",
+                    "IV ketv.",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "I ketvirtis",
+                    "II ketvirtis",
+                    "III ketvirtis",
+                    "IV ketvirtis",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "I",
+                    "II",
+                    "3",
+                    "IV",
+                }
+            },
+            { "calendarname.buddhist",
+                "Budist\u0173 kalendorius" },
+            { "calendarname.gregorian",
+                "Grigaliaus kalendorius" },
+            { "calendarname.gregory",
+                "Grigaliaus kalendorius" },
+            { "calendarname.islamic",
+                "Islamo kalendorius" },
+            { "calendarname.islamic-civil",
+                "Pilietinis islamo kalendorius" },
+            { "calendarname.islamicc",
+                "Pilietinis islamo kalendorius" },
+            { "calendarname.japanese",
+                "Japon\u0173 kalendorius" },
+            { "calendarname.roc",
+                "Kinijos Respublikos kalendorius" },
+            { "field.dayperiod",
+                "dienos metas" },
+            { "field.era",
+                "era" },
+            { "field.hour",
+                "valanda" },
+            { "field.minute",
+                "minut\u0117" },
+            { "field.month",
+                "m\u0117nuo" },
+            { "field.second",
+                "sekund\u0117" },
+            { "field.week",
+                "savait\u0117" },
+            { "field.weekday",
+                "savait\u0117s diena" },
+            { "field.year",
+                "metai" },
+            { "field.zone",
+                "laiko juosta" },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "y G, MMMM d, EEEE",
+                    "G y MMMM d",
+                    "G y MMM d",
+                    "GGGGG yyyy-MM-dd",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "prie\u0161 Krist\u0173",
+                    "po Kristaus",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "pr.Kr.",
+                    "po.Kr.",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/lv/FormatData_lv.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/lv/FormatData_lv.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.lv;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_lv extends ListResourceBundle {
+public class FormatData_lv extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -135,6 +135,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "J",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "sv\u0113tdiena", // Sunday
@@ -211,41 +228,6 @@
                 }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "islamic.MonthNames",
-                new String[] {
-                    "muharams",
-                    "safars",
-                    "1. rab\u012b",
-                    "2. rab\u012b",
-                    "1. d\u017eum\u0101d\u0101",
-                    "2. d\u017eum\u0101d\u0101",
-                    "rad\u017eabs",
-                    "\u0161abans",
-                    "ramad\u0101ns",
-                    "\u0161auvals",
-                    "du al-kid\u0101",
-                    "du al-hid\u017e\u0101",
-                    "",
-                }
-            },
-            { "calendarname.islamic-civil", "isl\u0101ma pilso\u0146u kalend\u0101rs" },
-            { "calendarname.islamicc", "isl\u0101ma pilso\u0146u kalend\u0101rs" },
-            { "calendarname.islamic", "isl\u0101ma kalend\u0101rs" },
-            { "calendarname.japanese", "jap\u0101\u0146u kalend\u0101rs" },
-            { "calendarname.gregorian", "Gregora kalend\u0101rs" },
-            { "calendarname.gregory", "Gregora kalend\u0101rs" },
-            { "calendarname.roc", "\u0136\u012bnas Republikas kalend\u0101rs" },
-            { "calendarname.buddhist", "budistu kalend\u0101rs" },
-            { "field.era", "\u0113ra" },
-            { "field.year", "Gads" },
-            { "field.month", "M\u0113nesis" },
-            { "field.week", "Ned\u0113\u013ca" },
-            { "field.weekday", "Ned\u0113\u013cas diena" },
-            { "field.dayperiod", "Dayperiod" },
-            { "field.hour", "Stundas" },
-            { "field.minute", "Min\u016btes" },
-            { "field.second", "Sekundes" },
-            { "field.zone", "Josla" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/lv/FormatData_lv_LV.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/lv/FormatData_lv_LV.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.lv;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_lv_LV extends ListResourceBundle {
+public class FormatData_lv_LV extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/lv/JavaTimeSupplementary_lv.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.lv;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_lv extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "C1",
+                    "C2",
+                    "C3",
+                    "C4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1. ceturksnis",
+                    "2. ceturksnis",
+                    "3. ceturksnis",
+                    "4. ceturksnis",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1.",
+                    "2.",
+                    "3.",
+                    "4.",
+                }
+            },
+            { "calendarname.buddhist",
+                "budistu kalend\u0101rs" },
+            { "calendarname.gregorian",
+                "Gregora kalend\u0101rs" },
+            { "calendarname.gregory",
+                "Gregora kalend\u0101rs" },
+            { "calendarname.islamic",
+                "isl\u0101ma kalend\u0101rs" },
+            { "calendarname.islamic-civil",
+                "isl\u0101ma pilso\u0146u kalend\u0101rs" },
+            { "calendarname.islamicc",
+                "isl\u0101ma pilso\u0146u kalend\u0101rs" },
+            { "calendarname.japanese",
+                "jap\u0101\u0146u kalend\u0101rs" },
+            { "calendarname.roc",
+                "\u0136\u012bnas Republikas kalend\u0101rs" },
+            { "field.dayperiod",
+                "Dayperiod" },
+            { "field.era",
+                "\u0113ra" },
+            { "field.hour",
+                "Stundas" },
+            { "field.minute",
+                "Min\u016btes" },
+            { "field.month",
+                "M\u0113nesis" },
+            { "field.second",
+                "Sekundes" },
+            { "field.week",
+                "Ned\u0113\u013ca" },
+            { "field.weekday",
+                "Ned\u0113\u013cas diena" },
+            { "field.year",
+                "Gads" },
+            { "field.zone",
+                "Josla" },
+            { "islamic.MonthNames",
+                new String[] {
+                    "muharams",
+                    "safars",
+                    "1. rab\u012b",
+                    "2. rab\u012b",
+                    "1. d\u017eum\u0101d\u0101",
+                    "2. d\u017eum\u0101d\u0101",
+                    "rad\u017eabs",
+                    "\u0161abans",
+                    "ramad\u0101ns",
+                    "\u0161auvals",
+                    "du al-kid\u0101",
+                    "du al-hid\u017e\u0101",
+                    "",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "pirms m\u016bsu \u0113ras",
+                    "m\u016bsu \u0113r\u0101",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "pm\u0113",
+                    "m\u0113",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/mk/FormatData_mk.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/mk/FormatData_mk.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.mk;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_mk extends ListResourceBundle {
+public class FormatData_mk extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -118,6 +118,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "\u0458",
+                    "\u0444",
+                    "\u043c",
+                    "\u0430",
+                    "\u043c",
+                    "\u0458",
+                    "\u0458",
+                    "\u0430",
+                    "\u0441",
+                    "\u043e",
+                    "\u043d",
+                    "\u0434",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "\u043d\u0435\u0434\u0435\u043b\u0430", // Sunday
@@ -194,24 +211,6 @@
                 }
             },
             { "DateTimePatternChars", "GuMtkHmsSEDFwWahKzZ" },
-            { "calendarname.islamic-civil", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0433\u0440\u0430\u0453\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.islamicc", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0433\u0440\u0430\u0453\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.roc", "\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u043d\u0430 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u041a\u0438\u043d\u0430" },
-            { "calendarname.islamic", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.buddhist", "\u0411\u0443\u0434\u0438\u0441\u0442\u0438\u0447\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.japanese", "\u0408\u0430\u043f\u043e\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.gregorian", "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.gregory", "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "field.era", "\u0415\u0440\u0430" },
-            { "field.year", "\u0433\u043e\u0434\u0438\u043d\u0430" },
-            { "field.month", "\u041c\u0435\u0441\u0435\u0446" },
-            { "field.week", "\u041d\u0435\u0434\u0435\u043b\u0430" },
-            { "field.weekday", "\u0414\u0435\u043d \u0432\u043e \u043d\u0435\u0434\u0435\u043b\u0430\u0442\u0430" },
-            { "field.dayperiod", "\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435/\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435" },
-            { "field.hour", "\u0427\u0430\u0441" },
-            { "field.minute", "\u041c\u0438\u043d\u0443\u0442\u0430" },
-            { "field.second", "\u0421\u0435\u043a\u0443\u043d\u0434\u0430" },
-            { "field.zone", "\u0437\u043e\u043d\u0430" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/mk/FormatData_mk_MK.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/mk/FormatData_mk_MK.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.mk;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_mk_MK extends ListResourceBundle {
+public class FormatData_mk_MK extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/mk/JavaTimeSupplementary_mk.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.mk;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_mk extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "Q1",
+                    "Q2",
+                    "Q3",
+                    "Q4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "\u043f\u0440\u0432\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
+                    "\u0432\u0442\u043e\u0440\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
+                    "\u0442\u0440\u0435\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
+                    "\u0447\u0435\u0442\u0432\u0440\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
+                }
+            },
+            { "calendarname.buddhist",
+                "\u0411\u0443\u0434\u0438\u0441\u0442\u0438\u0447\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.gregorian",
+                "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.gregory",
+                "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.islamic",
+                "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.islamic-civil",
+                "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0433\u0440\u0430\u0453\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.islamicc",
+                "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0433\u0440\u0430\u0453\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.japanese",
+                "\u0408\u0430\u043f\u043e\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.roc",
+                "\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u043d\u0430 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u041a\u0438\u043d\u0430" },
+            { "field.dayperiod",
+                "\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435/\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435" },
+            { "field.era",
+                "\u0415\u0440\u0430" },
+            { "field.hour",
+                "\u0427\u0430\u0441" },
+            { "field.minute",
+                "\u041c\u0438\u043d\u0443\u0442\u0430" },
+            { "field.month",
+                "\u041c\u0435\u0441\u0435\u0446" },
+            { "field.second",
+                "\u0421\u0435\u043a\u0443\u043d\u0434\u0430" },
+            { "field.week",
+                "\u041d\u0435\u0434\u0435\u043b\u0430" },
+            { "field.weekday",
+                "\u0414\u0435\u043d \u0432\u043e \u043d\u0435\u0434\u0435\u043b\u0430\u0442\u0430" },
+            { "field.year",
+                "\u0433\u043e\u0434\u0438\u043d\u0430" },
+            { "field.zone",
+                "\u0437\u043e\u043d\u0430" },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\u043f\u0440.\u043d.\u0435.",
+                    "\u0430\u0435.",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/ms/FormatData_ms.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ms/FormatData_ms.java	Wed Apr 17 21:48:04 2013 -0700
@@ -40,9 +40,9 @@
 
 package sun.text.resources.ms;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ms extends ListResourceBundle {
+public class FormatData_ms extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "MonthNames",
@@ -79,6 +79,40 @@
                     "",
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "J",
+                    "O",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "J",
+                    "O",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "standalone.MonthNarrows",
                 new String[] {
                     "J",
@@ -189,71 +223,6 @@
                     "{1} {0}",
                 }
             },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "dd/MM/y G",
-                    "d/MM/y G",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "dd/MM/y G",
-                    "d/MM/y G",
-                }
-            },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "dd/MM/y G",
-                    "d/MM/y G",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "dd/MM/y GGGG",
-                    "d/MM/y GGGG",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "dd/MM/y G",
-                    "d/MM/y G",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "dd/MM/y GGGG",
-                    "d/MM/y GGGG",
-                }
-            },
-            { "calendarname.islamic-civil", "Kalendar Sivil Islam" },
-            { "calendarname.islamicc", "Kalendar Sivil Islam" },
-            { "calendarname.islamic", "Kalendar Islam" },
-            { "calendarname.buddhist", "Kalendar Buddha" },
-            { "calendarname.japanese", "Kalendar Jepun" },
-            { "calendarname.roc", "Kalendar Minguo" },
-            { "calendarname.gregorian", "Kalendar Gregory" },
-            { "calendarname.gregory", "Kalendar Gregory" },
-            { "field.year", "Tahun" },
-            { "field.month", "Bulan" },
-            { "field.week", "Minggu" },
-            { "field.weekday", "Hari dalam Minggu" },
-            { "field.dayperiod", "PG/PTG" },
-            { "field.hour", "Jam" },
-            { "field.minute", "Minit" },
-            { "field.second", "Kedua" },
-            { "field.zone", "Zon Waktu" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/ms/FormatData_ms_MY.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ms/FormatData_ms_MY.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.ms;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ms_MY extends ListResourceBundle {
+public class FormatData_ms_MY extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "NumberPatterns",
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/ms/JavaTimeSupplementary_ms.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ms;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_ms extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "Suku 1",
+                    "Suku Ke-2",
+                    "Suku Ke-3",
+                    "Suku Ke-4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "Suku pertama",
+                    "Suku Ke-2",
+                    "Suku Ke-3",
+                    "Suku Ke-4",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "Kalendar Buddha" },
+            { "calendarname.gregorian",
+                "Kalendar Gregory" },
+            { "calendarname.gregory",
+                "Kalendar Gregory" },
+            { "calendarname.islamic",
+                "Kalendar Islam" },
+            { "calendarname.islamic-civil",
+                "Kalendar Sivil Islam" },
+            { "calendarname.islamicc",
+                "Kalendar Sivil Islam" },
+            { "calendarname.japanese",
+                "Kalendar Jepun" },
+            { "calendarname.roc",
+                "Kalendar Minguo" },
+            { "field.dayperiod",
+                "PG/PTG" },
+            { "field.hour",
+                "Jam" },
+            { "field.minute",
+                "Minit" },
+            { "field.month",
+                "Bulan" },
+            { "field.second",
+                "Kedua" },
+            { "field.week",
+                "Minggu" },
+            { "field.weekday",
+                "Hari dalam Minggu" },
+            { "field.year",
+                "Tahun" },
+            { "field.zone",
+                "Zon Waktu" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y GGGG",
+                    "d MMMM y GGGG",
+                    "dd/MM/y GGGG",
+                    "d/MM/y GGGG",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y G",
+                    "d MMMM y G",
+                    "dd/MM/y G",
+                    "d/MM/y G",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y G",
+                    "d MMMM y G",
+                    "dd/MM/y G",
+                    "d/MM/y G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y G",
+                    "d MMMM y G",
+                    "dd/MM/y G",
+                    "d/MM/y G",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y G",
+                    "d MMMM y G",
+                    "dd/MM/y G",
+                    "d/MM/y G",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "BCE",
+                    "CE",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y GGGG",
+                    "d MMMM y GGGG",
+                    "dd/MM/y GGGG",
+                    "d/MM/y GGGG",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/mt/FormatData_mt.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/mt/FormatData_mt.java	Wed Apr 17 21:48:04 2013 -0700
@@ -40,9 +40,9 @@
 
 package sun.text.resources.mt;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_mt extends ListResourceBundle {
+public class FormatData_mt extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "MonthNames",
@@ -79,6 +79,23 @@
                     "",
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "\u0120",
+                    "L",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "Il-\u0126add",
@@ -167,22 +184,6 @@
                     "{1} {0}",
                 }
             },
-            { "calendarname.islamic-civil", "Kalendarju Islamiku-\u010aivili" },
-            { "calendarname.islamicc", "Kalendarju Islamiku-\u010aivili" },
-            { "calendarname.islamic", "Kalendarju Islamiku" },
-            { "calendarname.buddhist", "Kalendarju Buddist" },
-            { "calendarname.japanese", "Kalendarju \u0120appuni\u017c" },
-            { "calendarname.gregorian", "Kalendarju Gregorjan" },
-            { "calendarname.gregory", "Kalendarju Gregorjan" },
-            { "field.era", "Epoka" },
-            { "field.year", "Sena" },
-            { "field.month", "Xahar" },
-            { "field.week", "\u0120img\u0127a" },
-            { "field.weekday", "Jum tal-\u0120img\u0127a" },
-            { "field.hour", "Sieg\u0127a" },
-            { "field.minute", "Minuta" },
-            { "field.second", "Sekonda" },
-            { "field.zone", "\u017bona" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/mt/FormatData_mt_MT.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/mt/FormatData_mt_MT.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.mt;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_mt_MT extends ListResourceBundle {
+public class FormatData_mt_MT extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "NumberPatterns",
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/mt/JavaTimeSupplementary_mt.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  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.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.mt;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_mt extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "K1",
+                    "K2",
+                    "K3",
+                    "K4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "K1",
+                    "K2",
+                    "K3",
+                    "K4",
+                }
+            },
+            { "calendarname.buddhist",
+                "Kalendarju Buddist" },
+            { "calendarname.gregorian",
+                "Kalendarju Gregorjan" },
+            { "calendarname.gregory",
+                "Kalendarju Gregorjan" },
+            { "calendarname.islamic",
+                "Kalendarju Islamiku" },
+            { "calendarname.islamic-civil",
+                "Kalendarju Islamiku-\u010aivili" },
+            { "calendarname.islamicc",
+                "Kalendarju Islamiku-\u010aivili" },
+            { "calendarname.japanese",
+                "Kalendarju \u0120appuni\u017c" },
+            { "field.era",
+                "Epoka" },
+            { "field.hour",
+                "Sieg\u0127a" },
+            { "field.minute",
+                "Minuta" },
+            { "field.month",
+                "Xahar" },
+            { "field.second",
+                "Sekonda" },
+            { "field.week",
+                "\u0120img\u0127a" },
+            { "field.weekday",
+                "Jum tal-\u0120img\u0127a" },
+            { "field.year",
+                "Sena" },
+            { "field.zone",
+                "\u017bona" },
+            { "java.time.long.Eras",
+                new String[] {
+                    "Qabel Kristu",
+                    "Wara Kristu",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "QK",
+                    "WK",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/nl/FormatData_nl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/nl/FormatData_nl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.nl;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_nl extends ListResourceBundle {
+public class FormatData_nl extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -118,6 +118,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "J",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "zondag", // Sunday
@@ -194,111 +211,6 @@
                 }
             },
             { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd-MM-yy G",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd-MM-yy GGGGG",
-                }
-            },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd-MM-yy GGGGG",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "dd-MM-yy G",
-                }
-            },
-            { "islamic.MonthNames",
-                new String[] {
-                    "Moeharram",
-                    "Safar",
-                    "Rabi\u02bba al awal",
-                    "Rabi\u02bba al thani",
-                    "Joemad\u02bbal awal",
-                    "Joemad\u02bbal thani",
-                    "Rajab",
-                    "Sja\u02bbaban",
-                    "Ramadan",
-                    "Sjawal",
-                    "Doe al ka\u02bbaba",
-                    "Doe al hizja",
-                    "",
-                }
-            },
-            { "islamic.MonthAbbreviations",
-                new String[] {
-                    "Moeh.",
-                    "Saf.",
-                    "Rab. I",
-                    "Rab. II",
-                    "Joem. I",
-                    "Joem. II",
-                    "Raj.",
-                    "Sja.",
-                    "Ram.",
-                    "Sjaw.",
-                    "Doe al k.",
-                    "Doe al h.",
-                    "",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "Sa\u02bbna Hizjria",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd-MM-yy G",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "dd-MM-yy GGGG",
-                }
-            },
-            { "calendarname.islamic-civil", "Islamitische kalender (cyclisch)" },
-            { "calendarname.islamicc", "Islamitische kalender (cyclisch)" },
-            { "calendarname.roc", "Kalender van de Chinese Republiek" },
-            { "calendarname.islamic", "Islamitische kalender" },
-            { "calendarname.buddhist", "Boeddhistische kalender" },
-            { "calendarname.japanese", "Japanse kalender" },
-            { "calendarname.gregorian", "Gregoriaanse kalender" },
-            { "calendarname.gregory", "Gregoriaanse kalender" },
-            { "field.era", "Tijdperk" },
-            { "field.year", "Jaar" },
-            { "field.month", "Maand" },
-            { "field.weekday", "Dag van de week" },
-            { "field.dayperiod", "AM/PM" },
-            { "field.hour", "Uur" },
-            { "field.minute", "Minuut" },
-            { "field.second", "Seconde" },
-            { "field.zone", "Zone" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/nl/FormatData_nl_BE.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/nl/FormatData_nl_BE.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.nl;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_nl_BE extends ListResourceBundle {
+public class FormatData_nl_BE extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/nl/FormatData_nl_NL.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/nl/FormatData_nl_NL.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.nl;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_nl_NL extends ListResourceBundle {
+public class FormatData_nl_NL extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/nl/JavaTimeSupplementary_nl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,240 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.nl;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_nl extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "K1",
+                    "K2",
+                    "K3",
+                    "K4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1e kwartaal",
+                    "2e kwartaal",
+                    "3e kwartaal",
+                    "4e kwartaal",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "Boeddhistische kalender" },
+            { "calendarname.gregorian",
+                "Gregoriaanse kalender" },
+            { "calendarname.gregory",
+                "Gregoriaanse kalender" },
+            { "calendarname.islamic",
+                "Islamitische kalender" },
+            { "calendarname.islamic-civil",
+                "Islamitische kalender (cyclisch)" },
+            { "calendarname.islamicc",
+                "Islamitische kalender (cyclisch)" },
+            { "calendarname.japanese",
+                "Japanse kalender" },
+            { "calendarname.roc",
+                "Kalender van de Chinese Republiek" },
+            { "field.dayperiod",
+                "AM/PM" },
+            { "field.era",
+                "Tijdperk" },
+            { "field.hour",
+                "Uur" },
+            { "field.minute",
+                "Minuut" },
+            { "field.month",
+                "Maand" },
+            { "field.second",
+                "Seconde" },
+            { "field.week",
+                "week" },
+            { "field.weekday",
+                "Dag van de week" },
+            { "field.year",
+                "Jaar" },
+            { "field.zone",
+                "Zone" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y GGGG",
+                    "d MMMM y GGGG",
+                    "d MMM y GGGG",
+                    "dd-MM-yy GGGG",
+                }
+            },
+            { "islamic.Eras",
+                new String[] {
+                    "",
+                    "Sa\u02bbna Hizjria",
+                }
+            },
+            { "islamic.MonthAbbreviations",
+                new String[] {
+                    "Moeh.",
+                    "Saf.",
+                    "Rab. I",
+                    "Rab. II",
+                    "Joem. I",
+                    "Joem. II",
+                    "Raj.",
+                    "Sja.",
+                    "Ram.",
+                    "Sjaw.",
+                    "Doe al k.",
+                    "Doe al h.",
+                    "",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "Moeharram",
+                    "Safar",
+                    "Rabi\u02bba al awal",
+                    "Rabi\u02bba al thani",
+                    "Joemad\u02bbal awal",
+                    "Joemad\u02bbal thani",
+                    "Rajab",
+                    "Sja\u02bbaban",
+                    "Ramadan",
+                    "Sjawal",
+                    "Doe al ka\u02bbaba",
+                    "Doe al hizja",
+                    "",
+                }
+            },
+            { "islamic.short.Eras",
+                new String[] {
+                    "",
+                    "Sa\u02bbna Hizjria",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM y G",
+                    "dd-MM-yy G",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM y G",
+                    "dd-MM-yy G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM y G",
+                    "dd-MM-yy GGGGG",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "Voor Christus",
+                    "na Christus",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM y G",
+                    "dd-MM-yy GGGGG",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "v. Chr.",
+                    "n. Chr.",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y GGGG",
+                    "d MMMM y GGGG",
+                    "d MMM y GGGG",
+                    "dd-MM-yy G",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/no/FormatData_no.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/no/FormatData_no.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.no;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_no extends ListResourceBundle {
+public class FormatData_no extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -65,6 +65,23 @@
                     "" // month 13 if applicable
                 }
             },
+            { "standalone.MonthNames",
+                new String[] {
+                    "januar",
+                    "februar",
+                    "mars",
+                    "april",
+                    "mai",
+                    "juni",
+                    "juli",
+                    "august",
+                    "september",
+                    "oktober",
+                    "november",
+                    "desember",
+                    "",
+                }
+            },
             { "MonthAbbreviations",
                 new String[] {
                     "jan", // abb january
@@ -82,6 +99,57 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "standalone.MonthAbbreviations",
+                new String[] {
+                    "jan",
+                    "feb",
+                    "mar",
+                    "apr",
+                    "mai",
+                    "jun",
+                    "jul",
+                    "aug",
+                    "sep",
+                    "okt",
+                    "nov",
+                    "des",
+                    "",
+                }
+            },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "J",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
+            { "standalone.MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "J",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "s\u00f8ndag", // Sunday
@@ -93,6 +161,17 @@
                     "l\u00f8rdag" // Saturday
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "s\u00f8ndag",
+                    "mandag",
+                    "tirsdag",
+                    "onsdag",
+                    "torsdag",
+                    "fredag",
+                    "l\u00f8rdag",
+                }
+            },
             { "DayAbbreviations",
                 new String[] {
                     "s\u00f8", // abb Sunday
@@ -104,6 +183,39 @@
                     "l\u00f8" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "s\u00f8.",
+                    "ma.",
+                    "ti.",
+                    "on.",
+                    "to.",
+                    "fr.",
+                    "l\u00f8.",
+                }
+            },
+            { "DayNarrows",
+                new String[] {
+                    "S",
+                    "M",
+                    "T",
+                    "O",
+                    "T",
+                    "F",
+                    "L",
+                }
+            },
+            { "standalone.DayNarrows",
+                new String[] {
+                    "S",
+                    "M",
+                    "T",
+                    "O",
+                    "T",
+                    "F",
+                    "L",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal separator
--- a/src/share/classes/sun/text/resources/no/FormatData_no_NO.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/no/FormatData_no_NO.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.no;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_no_NO extends ListResourceBundle {
+public class FormatData_no_NO extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/no/FormatData_no_NO_NY.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/no/FormatData_no_NO_NY.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.no;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_no_NO_NY extends ListResourceBundle {
+public class FormatData_no_NO_NY extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/no/JavaTimeSupplementary_no.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.no;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_no extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "K1",
+                    "K2",
+                    "K3",
+                    "K4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1. kvartal",
+                    "2. kvartal",
+                    "3. kvartal",
+                    "4. kvartal",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "buddhistisk kalender" },
+            { "calendarname.gregorian",
+                "gregoriansk kalender" },
+            { "calendarname.gregory",
+                "gregoriansk kalender" },
+            { "calendarname.islamic",
+                "islamsk kalender" },
+            { "calendarname.islamic-civil",
+                "islamsk sivil kalender" },
+            { "calendarname.islamicc",
+                "islamsk sivil kalender" },
+            { "calendarname.japanese",
+                "japansk kalender" },
+            { "calendarname.roc",
+                "kalender for Republikken Kina" },
+            { "field.dayperiod",
+                "AM/PM" },
+            { "field.era",
+                "tidsalder" },
+            { "field.hour",
+                "time" },
+            { "field.minute",
+                "minutt" },
+            { "field.month",
+                "m\u00e5ned" },
+            { "field.second",
+                "sekund" },
+            { "field.week",
+                "uke" },
+            { "field.weekday",
+                "ukedag" },
+            { "field.year",
+                "\u00e5r" },
+            { "field.zone",
+                "sone" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y GGGG",
+                    "d. MMMM y GGGG",
+                    "d. MMM y GGGG",
+                    "d.M y GGGG",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y G",
+                    "d. MMMM y G",
+                    "d. MMM y G",
+                    "d.M yyyy",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y G",
+                    "d. MMMM y G",
+                    "d. MMM y G",
+                    "d.M y G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y G",
+                    "d. MMMM y G",
+                    "d. MMM y G",
+                    "d.M y G",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "f.Kr.",
+                    "e.Kr.",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y G",
+                    "d. MMMM y G",
+                    "d. MMM y G",
+                    "d.M y G",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "f.Kr.",
+                    "e.Kr.",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE d. MMMM y GGGG",
+                    "d. MMMM y GGGG",
+                    "d. MMM y GGGG",
+                    "d.M y GGGG",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/pl/FormatData_pl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/pl/FormatData_pl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.pl;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_pl extends ListResourceBundle {
+public class FormatData_pl extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -135,6 +135,57 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "standalone.MonthAbbreviations",
+                new String[] {
+                    "sty",
+                    "lut",
+                    "mar",
+                    "kwi",
+                    "maj",
+                    "cze",
+                    "lip",
+                    "sie",
+                    "wrz",
+                    "pa\u017a",
+                    "lis",
+                    "gru",
+                    "",
+                }
+            },
+            { "MonthNarrows",
+                new String[] {
+                    "s",
+                    "l",
+                    "m",
+                    "k",
+                    "m",
+                    "c",
+                    "l",
+                    "s",
+                    "w",
+                    "p",
+                    "l",
+                    "g",
+                    "",
+                }
+            },
+            { "standalone.MonthNarrows",
+                new String[] {
+                    "s",
+                    "l",
+                    "m",
+                    "k",
+                    "m",
+                    "c",
+                    "l",
+                    "s",
+                    "w",
+                    "p",
+                    "l",
+                    "g",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "niedziela", // Sunday
@@ -146,6 +197,17 @@
                     "sobota" // Saturday
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "niedziela",
+                    "poniedzia\u0142ek",
+                    "wtorek",
+                    "\u015broda",
+                    "czwartek",
+                    "pi\u0105tek",
+                    "sobota",
+                }
+            },
             { "DayAbbreviations",
                 new String[] {
                     "N", // abb Sunday
@@ -157,6 +219,17 @@
                     "So" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "niedz.",
+                    "pon.",
+                    "wt.",
+                    "\u015br.",
+                    "czw.",
+                    "pt.",
+                    "sob.",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "N",
@@ -168,6 +241,17 @@
                     "S",
                 }
             },
+            { "standalone.DayNarrows",
+                new String[] {
+                    "N",
+                    "P",
+                    "W",
+                    "\u015a",
+                    "C",
+                    "P",
+                    "S",
+                }
+            },
             { "Eras",
                 new String[] { // era strings
                     "p.n.e.",
@@ -211,71 +295,6 @@
                 }
             },
             { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, G y MMMM dd",
-                    "G y MMMM d",
-                    "d MMM y G",
-                    "dd.MM.yyyy G",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM, y G",
-                    "d MMMM, y G",
-                    "d MMM y G",
-                    "dd.MM.yyyy G",
-                }
-            },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM, y G",
-                    "d MMMM, y G",
-                    "d MMM y G",
-                    "dd.MM.yyyy G",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM, y GGGG",
-                    "d MMMM, y GGGG",
-                    "d MMM y GGGG",
-                    "dd.MM.yyyy GGGG",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM, y G",
-                    "d MMMM, y G",
-                    "d MMM y G",
-                    "dd.MM.yyyy G",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM, y GGGG",
-                    "d MMMM, y GGGG",
-                    "d MMM y GGGG",
-                    "dd.MM.yyyy GGGG",
-                }
-            },
-            { "calendarname.islamic-civil", "kalendarz islamski (metoda obliczeniowa)" },
-            { "calendarname.islamicc", "kalendarz islamski (metoda obliczeniowa)" },
-            { "calendarname.islamic", "kalendarz islamski (metoda wzrokowa)" },
-            { "calendarname.japanese", "kalendarz japo\u0144ski" },
-            { "calendarname.gregorian", "kalendarz gregoria\u0144ski" },
-            { "calendarname.gregory", "kalendarz gregoria\u0144ski" },
-            { "calendarname.roc", "kalendarz Republiki Chi\u0144skiej" },
-            { "calendarname.buddhist", "kalendarz buddyjski" },
-            { "field.era", "Era" },
-            { "field.year", "Rok" },
-            { "field.month", "Miesi\u0105c" },
-            { "field.week", "Tydzie\u0144" },
-            { "field.weekday", "Dzie\u0144 tygodnia" },
-            { "field.hour", "Godzina" },
-            { "field.minute", "Minuta" },
-            { "field.second", "Sekunda" },
-            { "field.zone", "Strefa" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/pl/FormatData_pl_PL.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/pl/FormatData_pl_PL.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.pl;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_pl_PL extends ListResourceBundle {
+public class FormatData_pl_PL extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/pl/JavaTimeSupplementary_pl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,257 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.pl;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_pl extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "K1",
+                    "K2",
+                    "K3",
+                    "K4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "I kwarta\u0142",
+                    "II kwarta\u0142",
+                    "III kwarta\u0142",
+                    "IV kwarta\u0142",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "kalendarz buddyjski" },
+            { "calendarname.gregorian",
+                "kalendarz gregoria\u0144ski" },
+            { "calendarname.gregory",
+                "kalendarz gregoria\u0144ski" },
+            { "calendarname.islamic",
+                "kalendarz islamski (metoda wzrokowa)" },
+            { "calendarname.islamic-civil",
+                "kalendarz islamski (metoda obliczeniowa)" },
+            { "calendarname.islamicc",
+                "kalendarz islamski (metoda obliczeniowa)" },
+            { "calendarname.japanese",
+                "kalendarz japo\u0144ski" },
+            { "calendarname.roc",
+                "kalendarz Republiki Chi\u0144skiej" },
+            { "field.dayperiod",
+                "Dayperiod" },
+            { "field.era",
+                "Era" },
+            { "field.hour",
+                "Godzina" },
+            { "field.minute",
+                "Minuta" },
+            { "field.month",
+                "Miesi\u0105c" },
+            { "field.second",
+                "Sekunda" },
+            { "field.week",
+                "Tydzie\u0144" },
+            { "field.weekday",
+                "Dzie\u0144 tygodnia" },
+            { "field.year",
+                "Rok" },
+            { "field.zone",
+                "Strefa" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, y GGGG",
+                    "d MMMM, y GGGG",
+                    "d MMM y GGGG",
+                    "dd.MM.yyyy GGGG",
+                }
+            },
+            { "islamic.MonthAbbreviations",
+                new String[] {
+                    "Muh.",
+                    "Saf.",
+                    "Rab. I",
+                    "Rab. II",
+                    "D\u017cu. I",
+                    "D\u017cu. II",
+                    "Ra.",
+                    "Sza.",
+                    "Ram.",
+                    "Szaw.",
+                    "Zu al-k.",
+                    "Zu al-h.",
+                    "",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "Muharram",
+                    "Safar",
+                    "Rabi I",
+                    "Rabi II",
+                    "D\u017cumada I",
+                    "D\u017cumada II",
+                    "Rad\u017cab",
+                    "Szaban",
+                    "Ramadan",
+                    "Szawwal",
+                    "Zu al-kada",
+                    "Zu al-hid\u017cd\u017ca",
+                    "",
+                }
+            },
+            { "islamic.MonthNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                    "5",
+                    "6",
+                    "7",
+                    "8",
+                    "9",
+                    "10",
+                    "11",
+                    "12",
+                    "",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, y G",
+                    "d MMMM, y G",
+                    "d MMM y G",
+                    "dd.MM.yyyy G",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, y G",
+                    "d MMMM, y G",
+                    "d MMM y G",
+                    "dd.MM.yyyy G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, y G",
+                    "d MMMM, y G",
+                    "d MMM y G",
+                    "dd.MM.yyyy G",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "p.n.e.",
+                    "n.e.",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, y G",
+                    "d MMMM, y G",
+                    "d MMM y G",
+                    "dd.MM.yyyy G",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "p.n.e.",
+                    "n.e.",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, y GGGG",
+                    "d MMMM, y GGGG",
+                    "d MMM y GGGG",
+                    "dd.MM.yyyy GGGG",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "Przed ROC",
+                    "ROC",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "Przed ROC",
+                    "ROC",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/pt/FormatData_pt.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/pt/FormatData_pt.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.pt;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_pt extends ListResourceBundle {
+public class FormatData_pt extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -118,6 +118,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "J",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "Domingo", // Sunday
@@ -151,6 +168,18 @@
                     "S",
                 }
             },
+            { "long.Eras",
+                new String[] {
+                    "Antes de Cristo",
+                    "Ano do Senhor",
+                }
+            },
+            { "Eras",
+                new String[] {
+                    "a.C.",
+                    "d.C.",
+                }
+            },
             { "NumberElements",
                 new String[] {
                     ",", // decimal al separator
@@ -188,64 +217,6 @@
                 }
             },
             { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, G y MMMM dd",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "d/M/yy",
-                }
-            },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y G",
-                    "d 'de' MMMM 'de' y G",
-                    "dd/MM/yyyy G",
-                    "d/M/yyyy",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y GGGG",
-                    "d 'de' MMMM 'de' y GGGG",
-                    "dd/MM/yyyy GGGG",
-                    "d/M/yyyy",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y G",
-                    "d 'de' MMMM 'de' y G",
-                    "dd/MM/yyyy G",
-                    "d/M/yyyy",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y GGGG",
-                    "d 'de' MMMM 'de' y GGGG",
-                    "dd/MM/yyyy GGGG",
-                    "d/M/yyyy",
-                }
-            },
-            { "calendarname.islamic-civil", "Calend\u00e1rio Civil Isl\u00e2mico" },
-            { "calendarname.islamicc", "Calend\u00e1rio Civil Isl\u00e2mico" },
-            { "calendarname.islamic", "Calend\u00e1rio Isl\u00e2mico" },
-            { "calendarname.japanese", "Calend\u00e1rio Japon\u00eas" },
-            { "calendarname.gregorian", "Calend\u00e1rio Gregoriano" },
-            { "calendarname.gregory", "Calend\u00e1rio Gregoriano" },
-            { "calendarname.roc", "Calend\u00e1rio da Rep\u00fablica da China" },
-            { "calendarname.buddhist", "Calend\u00e1rio Budista" },
-            { "field.era", "Era" },
-            { "field.year", "Ano" },
-            { "field.month", "M\u00eas" },
-            { "field.week", "Semana" },
-            { "field.weekday", "Dia da semana" },
-            { "field.dayperiod", "Per\u00edodo do dia" },
-            { "field.hour", "Hora" },
-            { "field.minute", "Minuto" },
-            { "field.second", "Segundo" },
-            { "field.zone", "Fuso" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/pt/FormatData_pt_BR.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/pt/FormatData_pt_BR.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.pt;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_pt_BR extends ListResourceBundle {
+public class FormatData_pt_BR extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/pt/FormatData_pt_PT.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/pt/FormatData_pt_PT.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.pt;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_pt_PT extends ListResourceBundle {
+public class FormatData_pt_PT extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/pt/JavaTimeSupplementary_pt.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,206 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.pt;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_pt extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "T1",
+                    "T2",
+                    "T3",
+                    "T4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1\u00ba trimestre",
+                    "2\u00ba trimestre",
+                    "3\u00ba trimestre",
+                    "4\u00ba trimestre",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "Calend\u00e1rio Budista" },
+            { "calendarname.gregorian",
+                "Calend\u00e1rio Gregoriano" },
+            { "calendarname.gregory",
+                "Calend\u00e1rio Gregoriano" },
+            { "calendarname.islamic",
+                "Calend\u00e1rio Isl\u00e2mico" },
+            { "calendarname.islamic-civil",
+                "Calend\u00e1rio Civil Isl\u00e2mico" },
+            { "calendarname.islamicc",
+                "Calend\u00e1rio Civil Isl\u00e2mico" },
+            { "calendarname.japanese",
+                "Calend\u00e1rio Japon\u00eas" },
+            { "calendarname.roc",
+                "Calend\u00e1rio da Rep\u00fablica da China" },
+            { "field.dayperiod",
+                "Per\u00edodo do dia" },
+            { "field.era",
+                "Era" },
+            { "field.hour",
+                "Hora" },
+            { "field.minute",
+                "Minuto" },
+            { "field.month",
+                "M\u00eas" },
+            { "field.second",
+                "Segundo" },
+            { "field.week",
+                "Semana" },
+            { "field.weekday",
+                "Dia da semana" },
+            { "field.year",
+                "Ano" },
+            { "field.zone",
+                "Fuso" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y GGGG",
+                    "d 'de' MMMM 'de' y GGGG",
+                    "dd/MM/yyyy GGGG",
+                    "d/M/yyyy",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y G",
+                    "d 'de' MMMM 'de' y G",
+                    "dd/MM/yyyy G",
+                    "d/M/yyyy",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y G",
+                    "d 'de' MMMM 'de' y G",
+                    "dd/MM/yyyy G",
+                    "d/M/yyyy",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y G",
+                    "d 'de' MMMM 'de' y G",
+                    "d MMM y G",
+                    "d/M/yy",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "Antes de Cristo",
+                    "Ano do Senhor",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y G",
+                    "d 'de' MMMM 'de' y G",
+                    "dd/MM/yyyy G",
+                    "d/M/yyyy",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "a.C.",
+                    "d.C.",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y GGGG",
+                    "d 'de' MMMM 'de' y GGGG",
+                    "dd/MM/yyyy GGGG",
+                    "d/M/yyyy",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "Antes de R.O.C.",
+                    "R.O.C.",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "Antes de R.O.C.",
+                    "R.O.C.",
+                }
+            },
+        };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/pt/JavaTimeSupplementary_pt_PT.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  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.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.pt;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_pt_PT extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterNames",
+                new String[] {
+                    "1.\u00ba trimestre",
+                    "2.\u00ba trimestre",
+                    "3.\u00ba trimestre",
+                    "4.\u00ba trimestre",
+                }
+            },
+            { "calendarname.islamic-civil",
+                "Calend\u00e1rio Isl\u00e2mico/Civil" },
+            { "calendarname.islamicc",
+                "Calend\u00e1rio Isl\u00e2mico/Civil" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y GGGG",
+                    "d 'de' MMMM 'de' y GGGG",
+                    "dd/MM/yyyy GGGG",
+                    "d/M/y GGGG",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y G",
+                    "d 'de' MMMM 'de' y G",
+                    "dd/MM/yyyy G",
+                    "d/M/y G",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y G",
+                    "d 'de' MMMM 'de' y G",
+                    "dd/MM/yyyy G",
+                    "d/M/y G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y G",
+                    "d 'de' MMMM 'de' y G",
+                    "dd/MM/yyyy G",
+                    "d/M/y G",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y G",
+                    "d 'de' MMMM 'de' y G",
+                    "dd/MM/yyyy G",
+                    "d/M/y G",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE, d 'de' MMMM 'de' y GGGG",
+                    "d 'de' MMMM 'de' y GGGG",
+                    "dd/MM/yyyy GGGG",
+                    "d/M/y GGGG",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/ro/FormatData_ro.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ro/FormatData_ro.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.ro;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ro extends ListResourceBundle {
+public class FormatData_ro extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -101,6 +101,23 @@
                     "" // month 13 if applicable
                 }
             },
+            { "standalone.MonthNames",
+                new String[] {
+                    "ianuarie",
+                    "februarie",
+                    "martie",
+                    "aprilie",
+                    "mai",
+                    "iunie",
+                    "iulie",
+                    "august",
+                    "septembrie",
+                    "octombrie",
+                    "noiembrie",
+                    "decembrie",
+                    "",
+                }
+            },
             { "MonthAbbreviations",
                 new String[] {
                     "Ian", // abb january
@@ -118,6 +135,40 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "standalone.MonthAbbreviations",
+                new String[] {
+                    "ian.",
+                    "feb.",
+                    "mar.",
+                    "apr.",
+                    "mai",
+                    "iun.",
+                    "iul.",
+                    "aug.",
+                    "sept.",
+                    "oct.",
+                    "nov.",
+                    "dec.",
+                    "",
+                }
+            },
+            { "MonthNarrows",
+                new String[] {
+                    "I",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "I",
+                    "I",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "standalone.MonthNarrows",
                 new String[] {
                     "I",
@@ -146,6 +197,17 @@
                     "s\u00e2mb\u0103t\u0103" // Saturday
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "duminic\u0103",
+                    "luni",
+                    "mar\u021bi",
+                    "miercuri",
+                    "joi",
+                    "vineri",
+                    "s\u00e2mb\u0103t\u0103",
+                }
+            },
             { "DayAbbreviations",
                 new String[] {
                     "D", // abb Sunday
@@ -157,18 +219,28 @@
                     "S" // abb Saturday
                 }
             },
-            // commented out DayNarrows because most names are contributed.
-//          { "DayNarrows",
-//              new String[] {
-//                  "D",
-//                  "",
-//                  "",
-//                  "",
-//                  "",
-//                  "",
-//                  "",
-//              }
-//          },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "Du",
+                    "Lu",
+                    "Ma",
+                    "Mi",
+                    "Jo",
+                    "Vi",
+                    "S\u00e2",
+                }
+            },
+            { "DayNarrows",
+                new String[] {
+                    "D",
+                    "L",
+                    "M",
+                    "M",
+                    "J",
+                    "V",
+                    "S",
+                }
+            },
             { "standalone.DayNarrows",
                 new String[] {
                     "D",
@@ -223,32 +295,6 @@
                 }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, G y MMMM dd",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d/M/yyyy",
-                }
-            },
-            { "calendarname.islamic-civil", "calendar islamic civil" },
-            { "calendarname.islamicc", "calendar islamic civil" },
-            { "calendarname.roc", "calendar al Republicii Chineze" },
-            { "calendarname.islamic", "calendar islamic" },
-            { "calendarname.buddhist", "calendar budist" },
-            { "calendarname.japanese", "calendar japonez" },
-            { "calendarname.gregorian", "calendar gregorian" },
-            { "calendarname.gregory", "calendar gregorian" },
-            { "field.era", "er\u0103" },
-            { "field.year", "an" },
-            { "field.month", "lun\u0103" },
-            { "field.week", "s\u0103pt\u0103m\u00e2n\u0103" },
-            { "field.weekday", "zi a s\u0103pt\u0103m\u00e2nii" },
-            { "field.dayperiod", "perioada zilei" },
-            { "field.hour", "or\u0103" },
-            { "field.minute", "minut" },
-            { "field.second", "secund\u0103" },
-            { "field.zone", "zon\u0103" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/ro/FormatData_ro_RO.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ro/FormatData_ro_RO.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.ro;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ro_RO extends ListResourceBundle {
+public class FormatData_ro_RO extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/ro/JavaTimeSupplementary_ro.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ro;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_ro extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "trim. I",
+                    "trim. II",
+                    "trim. III",
+                    "trim. IV",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "trimestrul I",
+                    "trimestrul al II-lea",
+                    "trimestrul al III-lea",
+                    "trimestrul al IV-lea",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "T4",
+                }
+            },
+            { "calendarname.buddhist",
+                "calendar budist" },
+            { "calendarname.gregorian",
+                "calendar gregorian" },
+            { "calendarname.gregory",
+                "calendar gregorian" },
+            { "calendarname.islamic",
+                "calendar islamic" },
+            { "calendarname.islamic-civil",
+                "calendar islamic civil" },
+            { "calendarname.islamicc",
+                "calendar islamic civil" },
+            { "calendarname.japanese",
+                "calendar japonez" },
+            { "calendarname.roc",
+                "calendar al Republicii Chineze" },
+            { "field.dayperiod",
+                "perioada zilei" },
+            { "field.era",
+                "er\u0103" },
+            { "field.hour",
+                "or\u0103" },
+            { "field.minute",
+                "minut" },
+            { "field.month",
+                "lun\u0103" },
+            { "field.second",
+                "secund\u0103" },
+            { "field.week",
+                "s\u0103pt\u0103m\u00e2n\u0103" },
+            { "field.weekday",
+                "zi a s\u0103pt\u0103m\u00e2nii" },
+            { "field.year",
+                "an" },
+            { "field.zone",
+                "zon\u0103" },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, y G",
+                    "d MMMM y G",
+                    "d MMM y G",
+                    "d/M/yyyy",
+                }
+            },
+            { "java.time.buddhist.long.Eras",
+                new String[] {
+                    "BC",
+                    "era budist\u0103",
+                }
+            },
+            { "java.time.buddhist.short.Eras",
+                new String[] {
+                    "BC",
+                    "e.b.",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "\u00eenainte de Hristos",
+                    "dup\u0103 Hristos",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "d.C.",
+                    "\u00ee.d.C.",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/ru/FormatData_ru.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ru/FormatData_ru.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.ru;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ru extends ListResourceBundle {
+public class FormatData_ru extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -152,6 +152,40 @@
                     "", // month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "\u042f",
+                    "\u0424",
+                    "\u041c",
+                    "\u0410",
+                    "\u041c",
+                    "\u0418",
+                    "\u0418",
+                    "\u0410",
+                    "\u0421",
+                    "\u041e",
+                    "\u041d",
+                    "\u0414",
+                    "",
+                }
+            },
+            { "standalone.MonthNarrows",
+                new String[] {
+                    "\u042f",
+                    "\u0424",
+                    "\u041c",
+                    "\u0410",
+                    "\u041c",
+                    "\u0418",
+                    "\u0418",
+                    "\u0410",
+                    "\u0421",
+                    "\u041e",
+                    "\u041d",
+                    "\u0414",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435", // Sunday
@@ -163,6 +197,17 @@
                     "\u0441\u0443\u0431\u0431\u043e\u0442\u0430" // Saturday
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "\u0412\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435",
+                    "\u041f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a",
+                    "\u0412\u0442\u043e\u0440\u043d\u0438\u043a",
+                    "\u0421\u0440\u0435\u0434\u0430",
+                    "\u0427\u0435\u0442\u0432\u0435\u0440\u0433",
+                    "\u041f\u044f\u0442\u043d\u0438\u0446\u0430",
+                    "\u0421\u0443\u0431\u0431\u043e\u0442\u0430",
+                }
+            },
             { "DayAbbreviations",
                 new String[] {
                     "\u0412\u0441", // abb Sunday
@@ -174,6 +219,17 @@
                     "\u0421\u0431" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "\u0412\u0441",
+                    "\u041f\u043d",
+                    "\u0412\u0442",
+                    "\u0421\u0440",
+                    "\u0427\u0442",
+                    "\u041f\u0442",
+                    "\u0421\u0431",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "\u0412",
@@ -239,88 +295,6 @@
                 }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y\u00a0'\u0433'. G",
-                    "d MMMM y\u00a0'\u0433'. G",
-                    "dd.MM.yyyy G",
-                    "dd.MM.yy G",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y\u00a0'\u0433'. G",
-                    "d MMMM y\u00a0'\u0433'. G",
-                    "dd.MM.yyyy G",
-                    "dd.MM.yy G",
-                }
-            },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y\u00a0'\u0433'. G",
-                    "d MMMM y\u00a0'\u0433'. G",
-                    "dd.MM.yyyy G",
-                    "dd.MM.yy G",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y\u00a0'\u0433'. GGGG",
-                    "d MMMM y\u00a0'\u0433'. GGGG",
-                    "dd.MM.yyyy GGGG",
-                    "dd.MM.yy GGGG",
-                }
-            },
-            { "islamic.MonthNames",
-                new String[] {
-                    "\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c",
-                    "\u0421\u0430\u0444\u0430\u0440",
-                    "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c",
-                    "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440",
-                    "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c",
-                    "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440",
-                    "\u0420\u0430\u0434\u0436\u0430\u0431",
-                    "\u0428\u0430\u0430\u0431\u0430\u043d",
-                    "\u0420\u0430\u043c\u0430\u0434\u0430\u043d",
-                    "\u0428\u0430\u0432\u0432\u0430\u043b\u044c",
-                    "\u0417\u0443\u043b\u044c-\u041a\u0430\u0430\u0434\u0430",
-                    "\u0417\u0443\u043b\u044c-\u0425\u0438\u0434\u0436\u0436\u0430",
-                    "",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y\u00a0'\u0433'. G",
-                    "d MMMM y\u00a0'\u0433'. G",
-                    "dd.MM.yyyy G",
-                    "dd.MM.yy G",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y\u00a0'\u0433'. GGGG",
-                    "d MMMM y\u00a0'\u0433'. GGGG",
-                    "dd.MM.yyyy GGGG",
-                    "dd.MM.yy GGGG",
-                }
-            },
-            { "calendarname.islamic-civil", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
-            { "calendarname.islamicc", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
-            { "calendarname.islamic", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
-            { "calendarname.japanese", "\u042f\u043f\u043e\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
-            { "calendarname.gregorian", "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
-            { "calendarname.gregory", "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
-            { "calendarname.roc", "\u041a\u0438\u0442\u0430\u0439\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
-            { "calendarname.buddhist", "\u0411\u0443\u0434\u0434\u0438\u0439\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
-            { "field.era", "\u042d\u0440\u0430" },
-            { "field.year", "\u0413\u043e\u0434" },
-            { "field.month", "\u041c\u0435\u0441\u044f\u0446" },
-            { "field.week", "\u041d\u0435\u0434\u0435\u043b\u044f" },
-            { "field.weekday", "\u0414\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438" },
-            { "field.hour", "\u0427\u0430\u0441" },
-            { "field.minute", "\u041c\u0438\u043d\u0443\u0442\u0430" },
-            { "field.second", "\u0421\u0435\u043a\u0443\u043d\u0434\u0430" },
-            { "field.zone", "\u0427\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/ru/FormatData_ru_RU.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/ru/FormatData_ru_RU.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.ru;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_ru_RU extends ListResourceBundle {
+public class FormatData_ru_RU extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/ru/JavaTimeSupplementary_ru.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,263 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ru;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_ru extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "1-\u0439 \u043a\u0432.",
+                    "2-\u0439 \u043a\u0432.",
+                    "3-\u0439 \u043a\u0432.",
+                    "4-\u0439 \u043a\u0432.",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+                    "2-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+                    "3-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+                    "4-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "\u0411\u0443\u0434\u0434\u0438\u0439\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
+            { "calendarname.gregorian",
+                "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
+            { "calendarname.gregory",
+                "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
+            { "calendarname.islamic",
+                "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
+            { "calendarname.islamic-civil",
+                "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
+            { "calendarname.islamicc",
+                "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
+            { "calendarname.japanese",
+                "\u042f\u043f\u043e\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
+            { "calendarname.roc",
+                "\u041a\u0438\u0442\u0430\u0439\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
+            { "field.dayperiod",
+                "\u0414\u041f/\u041f\u041f" },
+            { "field.era",
+                "\u042d\u0440\u0430" },
+            { "field.hour",
+                "\u0427\u0430\u0441" },
+            { "field.minute",
+                "\u041c\u0438\u043d\u0443\u0442\u0430" },
+            { "field.month",
+                "\u041c\u0435\u0441\u044f\u0446" },
+            { "field.second",
+                "\u0421\u0435\u043a\u0443\u043d\u0434\u0430" },
+            { "field.week",
+                "\u041d\u0435\u0434\u0435\u043b\u044f" },
+            { "field.weekday",
+                "\u0414\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438" },
+            { "field.year",
+                "\u0413\u043e\u0434" },
+            { "field.zone",
+                "\u0427\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y\u00a0'\u0433'. GGGG",
+                    "d MMMM y\u00a0'\u0433'. GGGG",
+                    "dd.MM.yyyy GGGG",
+                    "dd.MM.yy GGGG",
+                }
+            },
+            { "islamic.MonthAbbreviations",
+                new String[] {
+                    "\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c",
+                    "\u0421\u0430\u0444\u0430\u0440",
+                    "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c",
+                    "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440",
+                    "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c",
+                    "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440",
+                    "\u0420\u0430\u0434\u0436\u0430\u0431",
+                    "\u0428\u0430\u0430\u0431\u0430\u043d",
+                    "\u0420\u0430\u043c\u0430\u0434\u0430\u043d",
+                    "\u0428\u0430\u0432\u0432\u0430\u043b\u044c",
+                    "\u0417\u0443\u043b\u044c-\u041a\u0430\u0430\u0434\u0430",
+                    "\u0417\u0443\u043b\u044c-\u0425\u0438\u0434\u0436\u0436\u0430",
+                    "",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c",
+                    "\u0421\u0430\u0444\u0430\u0440",
+                    "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c",
+                    "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440",
+                    "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c",
+                    "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440",
+                    "\u0420\u0430\u0434\u0436\u0430\u0431",
+                    "\u0428\u0430\u0430\u0431\u0430\u043d",
+                    "\u0420\u0430\u043c\u0430\u0434\u0430\u043d",
+                    "\u0428\u0430\u0432\u0432\u0430\u043b\u044c",
+                    "\u0417\u0443\u043b\u044c-\u041a\u0430\u0430\u0434\u0430",
+                    "\u0417\u0443\u043b\u044c-\u0425\u0438\u0434\u0436\u0436\u0430",
+                    "",
+                }
+            },
+            { "islamic.MonthNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                    "5",
+                    "6",
+                    "7",
+                    "8",
+                    "9",
+                    "10",
+                    "11",
+                    "12",
+                    "",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y\u00a0'\u0433'. G",
+                    "d MMMM y\u00a0'\u0433'. G",
+                    "dd.MM.yyyy G",
+                    "dd.MM.yy G",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y\u00a0'\u0433'. G",
+                    "d MMMM y\u00a0'\u0433'. G",
+                    "dd.MM.yyyy G",
+                    "dd.MM.yy G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y\u00a0'\u0433'. G",
+                    "d MMMM y\u00a0'\u0433'. G",
+                    "dd.MM.yyyy G",
+                    "dd.MM.yy G",
+                }
+            },
+            { "java.time.japanese.long.Eras",
+                new String[] {
+                    "\u043d.\u044d.",
+                    "\u042d\u043f\u043e\u0445\u0430 \u041c\u044d\u0439\u0434\u0437\u0438",
+                    "\u042d\u043f\u043e\u0445\u0430 \u0422\u0430\u0439\u0441\u044c\u043e",
+                    "\u0421\u044c\u043e\u0432\u0430",
+                    "\u042d\u043f\u043e\u0445\u0430 \u0425\u044d\u0439\u0441\u044d\u0439",
+                }
+            },
+            { "java.time.japanese.short.Eras",
+                new String[] {
+                    "\u043d.\u044d.",
+                    "\u042d\u043f\u043e\u0445\u0430 \u041c\u044d\u0439\u0434\u0437\u0438",
+                    "\u042d\u043f\u043e\u0445\u0430 \u0422\u0430\u0439\u0441\u044c\u043e",
+                    "\u0421\u044c\u043e\u0432\u0430",
+                    "\u042d\u043f\u043e\u0445\u0430 \u0425\u044d\u0439\u0441\u044d\u0439",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "\u0434\u043e \u043d.\u044d.",
+                    "\u043d.\u044d.",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y\u00a0'\u0433'. G",
+                    "d MMMM y\u00a0'\u0433'. G",
+                    "dd.MM.yyyy G",
+                    "dd.MM.yy G",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\u0434\u043e \u043d.\u044d.",
+                    "\u043d.\u044d.",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM y\u00a0'\u0433'. GGGG",
+                    "d MMMM y\u00a0'\u0433'. GGGG",
+                    "dd.MM.yyyy GGGG",
+                    "dd.MM.yy GGGG",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/sk/FormatData_sk.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/sk/FormatData_sk.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.sk;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_sk extends ListResourceBundle {
+public class FormatData_sk extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -152,6 +152,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "j",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "Nede\u013ea", // Sunday
@@ -163,6 +180,17 @@
                     "Sobota" // Saturday
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "nede\u013ea",
+                    "pondelok",
+                    "utorok",
+                    "streda",
+                    "\u0161tvrtok",
+                    "piatok",
+                    "sobota",
+                }
+            },
             { "DayAbbreviations",
                 new String[] {
                     "Ne", // abb Sunday
@@ -174,6 +202,17 @@
                     "So" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "ne",
+                    "po",
+                    "ut",
+                    "st",
+                    "\u0161t",
+                    "pi",
+                    "so",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "N",
@@ -185,6 +224,17 @@
                     "S",
                 }
             },
+            { "standalone.DayNarrows",
+                new String[] {
+                    "N",
+                    "P",
+                    "U",
+                    "S",
+                    "\u0160",
+                    "P",
+                    "S",
+                }
+            },
             { "Eras",
                 new String[] { // era strings
                     "pred n.l.",
@@ -228,23 +278,6 @@
                 }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "calendarname.islamic-civil", "Islamsk\u00fd ob\u010diansky kalend\u00e1r" },
-            { "calendarname.islamicc", "Islamsk\u00fd ob\u010diansky kalend\u00e1r" },
-            { "calendarname.islamic", "Islamsk\u00fd kalend\u00e1r" },
-            { "calendarname.buddhist", "Buddhistick\u00fd kalend\u00e1r" },
-            { "calendarname.japanese", "Japonsk\u00fd kalend\u00e1r" },
-            { "calendarname.gregorian", "Gregori\u00e1nsky kalend\u00e1r" },
-            { "calendarname.gregory", "Gregori\u00e1nsky kalend\u00e1r" },
-            { "field.era", "\u00c9ra" },
-            { "field.year", "Rok" },
-            { "field.month", "Mesiac" },
-            { "field.week", "T\u00fd\u017ede\u0148" },
-            { "field.weekday", "De\u0148 v t\u00fd\u017edni" },
-            { "field.dayperiod", "\u010cas\u0165 d\u0148a" },
-            { "field.hour", "Hodina" },
-            { "field.minute", "Min\u00fata" },
-            { "field.second", "Sekunda" },
-            { "field.zone", "P\u00e1smo" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/sk/FormatData_sk_SK.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/sk/FormatData_sk_SK.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.sk;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_sk_SK extends ListResourceBundle {
+public class FormatData_sk_SK extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/sk/JavaTimeSupplementary_sk.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.sk;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_sk extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "Q1",
+                    "Q2",
+                    "Q3",
+                    "Q4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1. \u0161tvr\u0165rok",
+                    "2. \u0161tvr\u0165rok",
+                    "3. \u0161tvr\u0165rok",
+                    "4. \u0161tvr\u0165rok",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "Buddhistick\u00fd kalend\u00e1r" },
+            { "calendarname.gregorian",
+                "Gregori\u00e1nsky kalend\u00e1r" },
+            { "calendarname.gregory",
+                "Gregori\u00e1nsky kalend\u00e1r" },
+            { "calendarname.islamic",
+                "Islamsk\u00fd kalend\u00e1r" },
+            { "calendarname.islamic-civil",
+                "Islamsk\u00fd ob\u010diansky kalend\u00e1r" },
+            { "calendarname.islamicc",
+                "Islamsk\u00fd ob\u010diansky kalend\u00e1r" },
+            { "calendarname.japanese",
+                "Japonsk\u00fd kalend\u00e1r" },
+            { "calendarname.roc",
+                "Kalend\u00e1r \u010c\u00ednskej republiky" },
+            { "field.dayperiod",
+                "\u010cas\u0165 d\u0148a" },
+            { "field.era",
+                "\u00c9ra" },
+            { "field.hour",
+                "Hodina" },
+            { "field.minute",
+                "Min\u00fata" },
+            { "field.month",
+                "Mesiac" },
+            { "field.second",
+                "Sekunda" },
+            { "field.week",
+                "T\u00fd\u017ede\u0148" },
+            { "field.weekday",
+                "De\u0148 v t\u00fd\u017edni" },
+            { "field.year",
+                "Rok" },
+            { "field.zone",
+                "P\u00e1smo" },
+            { "java.time.short.Eras",
+                new String[] {
+                    "pred n.l.",
+                    "n.l.",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/sl/FormatData_sl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/sl/FormatData_sl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.sl;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_sl extends ListResourceBundle {
+public class FormatData_sl extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -135,6 +135,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "j",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "Nedelja", // Sunday
@@ -157,6 +174,17 @@
                     "Sob" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "ned",
+                    "pon",
+                    "tor",
+                    "sre",
+                    "\u010det",
+                    "pet",
+                    "sob",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "n",
@@ -211,24 +239,6 @@
                 }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "calendarname.islamic-civil", "islamski civilni koledar" },
-            { "calendarname.islamicc", "islamski civilni koledar" },
-            { "calendarname.roc", "kitajski dr\u017eavni koledar" },
-            { "calendarname.islamic", "islamski koledar" },
-            { "calendarname.buddhist", "budisti\u010dni koledar" },
-            { "calendarname.japanese", "japonski koledar" },
-            { "calendarname.gregorian", "gregorijanski koledar" },
-            { "calendarname.gregory", "gregorijanski koledar" },
-            { "field.era", "Doba" },
-            { "field.year", "Leto" },
-            { "field.month", "Mesec" },
-            { "field.week", "Teden" },
-            { "field.weekday", "Dan v tednu" },
-            { "field.dayperiod", "\u010cas dneva" },
-            { "field.hour", "Ura" },
-            { "field.minute", "Minuta" },
-            { "field.second", "Sekunda" },
-            { "field.zone", "Obmo\u010dje" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/sl/FormatData_sl_SI.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/sl/FormatData_sl_SI.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.sl;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_sl_SI extends ListResourceBundle {
+public class FormatData_sl_SI extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/sl/JavaTimeSupplementary_sl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.sl;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_sl extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "Q1",
+                    "Q2",
+                    "Q3",
+                    "Q4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1. \u010detrtletje",
+                    "2. \u010detrtletje",
+                    "3. \u010detrtletje",
+                    "4. \u010detrtletje",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "budisti\u010dni koledar" },
+            { "calendarname.gregorian",
+                "gregorijanski koledar" },
+            { "calendarname.gregory",
+                "gregorijanski koledar" },
+            { "calendarname.islamic",
+                "islamski koledar" },
+            { "calendarname.islamic-civil",
+                "islamski civilni koledar" },
+            { "calendarname.islamicc",
+                "islamski civilni koledar" },
+            { "calendarname.japanese",
+                "japonski koledar" },
+            { "calendarname.roc",
+                "kitajski dr\u017eavni koledar" },
+            { "field.dayperiod",
+                "\u010cas dneva" },
+            { "field.era",
+                "Doba" },
+            { "field.hour",
+                "Ura" },
+            { "field.minute",
+                "Minuta" },
+            { "field.month",
+                "Mesec" },
+            { "field.second",
+                "Sekunda" },
+            { "field.week",
+                "Teden" },
+            { "field.weekday",
+                "Dan v tednu" },
+            { "field.year",
+                "Leto" },
+            { "field.zone",
+                "Obmo\u010dje" },
+            { "java.time.long.Eras",
+                new String[] {
+                    "pred na\u0161im \u0161tetjem",
+                    "na\u0161e \u0161tetje",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "pr.n.\u0161.",
+                    "po Kr.",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/sq/FormatData_sq.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/sq/FormatData_sq.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.sq;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_sq extends ListResourceBundle {
+public class FormatData_sq extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -82,6 +82,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "S",
+                    "M",
+                    "P",
+                    "M",
+                    "Q",
+                    "K",
+                    "G",
+                    "S",
+                    "T",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "e diel", // Sunday
--- a/src/share/classes/sun/text/resources/sq/FormatData_sq_AL.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/sq/FormatData_sq_AL.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.sq;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_sq_AL extends ListResourceBundle {
+public class FormatData_sq_AL extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/sq/JavaTimeSupplementary_sq.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.sq;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_sq extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "java.time.short.Eras",
+                new String[] {
+                    "p.e.r.",
+                    "n.e.r.",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/sr/FormatData_sr.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/sr/FormatData_sr.java	Wed Apr 17 21:48:04 2013 -0700
@@ -40,9 +40,9 @@
 
 package sun.text.resources.sr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_sr extends ListResourceBundle {
+public class FormatData_sr extends ParallelListResourceBundle {
     @Override
     protected final Object[][] getContents() {
         final String[] rocEras = {
@@ -84,6 +84,40 @@
                     "",
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "\u0458",
+                    "\u0444",
+                    "\u043c",
+                    "\u0430",
+                    "\u043c",
+                    "\u0458",
+                    "\u0458",
+                    "\u0430",
+                    "\u0441",
+                    "\u043e",
+                    "\u043d",
+                    "\u0434",
+                    "",
+                }
+            },
+            { "MonthNarrows",
+                new String[] {
+                    "\u0458",
+                    "\u0444",
+                    "\u043c",
+                    "\u0430",
+                    "\u043c",
+                    "\u0458",
+                    "\u0458",
+                    "\u0430",
+                    "\u0441",
+                    "\u043e",
+                    "\u043d",
+                    "\u0434",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "\u043d\u0435\u0434\u0435\u0459\u0430",
@@ -179,57 +213,6 @@
                 }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, MMMM d, y G",
-                    "MMMM d, y G",
-                    "MMM d, y G",
-                    "M/d/yy G",
-                }
-            },
-            { "roc.Eras", rocEras },
-            { "roc.short.Eras", rocEras },
-            { "islamic.MonthNames",
-                new String[] {
-                    "\u041c\u0443\u0440\u0430\u0445\u0430\u043c",
-                    "\u0421\u0430\u0444\u0430\u0440",
-                    "\u0420\u0430\u0431\u0438\u02bb I",
-                    "\u0420\u0430\u0431\u0438\u02bb II",
-                    "\u0408\u0443\u043c\u0430\u0434\u0430 I",
-                    "\u0408\u0443\u043c\u0430\u0434\u0430 II",
-                    "\u0420\u0430\u0452\u0430\u0431",
-                    "\u0428\u0430\u02bb\u0431\u0430\u043d",
-                    "\u0420\u0430\u043c\u0430\u0434\u0430\u043d",
-                    "\u0428\u0430\u0432\u0430\u043b",
-                    "\u0414\u0443\u02bb\u043b-\u041a\u0438\u02bb\u0434\u0430",
-                    "\u0414\u0443\u02bb\u043b-\u0445\u0438\u0452\u0430",
-                    "",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "\u0410\u0425",
-                }
-            },
-            { "calendarname.islamic-civil", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u043d\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.islamicc", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u043d\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.islamic", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.japanese", "\u0408\u0430\u043f\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.gregorian", "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.gregory", "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.roc", "\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0435 \u041a\u0438\u043d\u0435" },
-            { "calendarname.buddhist", "\u0411\u0443\u0434\u0438\u0441\u0442\u0438\u0447\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "field.era", "\u0435\u0440\u0430" },
-            { "field.year", "\u0433\u043e\u0434\u0438\u043d\u0430" },
-            { "field.month", "\u043c\u0435\u0441\u0435\u0446" },
-            { "field.week", "\u043d\u0435\u0434\u0435\u0459\u0430" },
-            { "field.weekday", "\u0434\u0430\u043d \u0443 \u043d\u0435\u0434\u0435\u0459\u0438" },
-            { "field.dayperiod", "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435/\u043f\u043e\u043f\u043e\u0434\u043d\u0435" },
-            { "field.hour", "\u0447\u0430\u0441" },
-            { "field.minute", "\u043c\u0438\u043d\u0443\u0442" },
-            { "field.second", "\u0441\u0435\u043a\u0443\u043d\u0434" },
-            { "field.zone", "\u0437\u043e\u043d\u0430" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/sr/FormatData_sr_BA.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/sr/FormatData_sr_BA.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.sr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_sr_BA extends ListResourceBundle {
+public class FormatData_sr_BA extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "MonthNames",
--- a/src/share/classes/sun/text/resources/sr/FormatData_sr_CS.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/sr/FormatData_sr_CS.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.sr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_sr_CS extends ListResourceBundle {
+public class FormatData_sr_CS extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
         };
--- a/src/share/classes/sun/text/resources/sr/FormatData_sr_Latn.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/sr/FormatData_sr_Latn.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -61,12 +61,11 @@
  * written authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
 package sun.text.resources.sr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_sr_Latn extends ListResourceBundle {
+public class FormatData_sr_Latn extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "MonthNames",
@@ -103,6 +102,23 @@
                     "",
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "j",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "nedelja",
@@ -125,6 +141,17 @@
                     "sub",
                 }
             },
+            { "DayNarrows",
+                new String[] {
+                    "n",
+                    "p",
+                    "u",
+                    "s",
+                    "\u010d",
+                    "p",
+                    "s",
+                }
+            },
             { "Eras",
                 new String[] {
                     "p. n. e.",
--- a/src/share/classes/sun/text/resources/sr/FormatData_sr_Latn_ME.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/sr/FormatData_sr_Latn_ME.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -61,12 +61,11 @@
  * written authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
 package sun.text.resources.sr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_sr_Latn_ME extends ListResourceBundle {
+public class FormatData_sr_Latn_ME extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "TimePatterns",
--- a/src/share/classes/sun/text/resources/sr/FormatData_sr_ME.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/sr/FormatData_sr_ME.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.sr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_sr_ME extends ListResourceBundle {
+public class FormatData_sr_ME extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
         };
--- a/src/share/classes/sun/text/resources/sr/FormatData_sr_RS.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/sr/FormatData_sr_RS.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.sr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_sr_RS extends ListResourceBundle {
+public class FormatData_sr_RS extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
         };
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/sr/JavaTimeSupplementary_sr.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,219 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.sr;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_sr extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "\u041a1",
+                    "\u041a2",
+                    "\u041a3",
+                    "\u041a4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "\u041f\u0440\u0432\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
+                    "\u0414\u0440\u0443\u0433\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
+                    "\u0422\u0440\u0435\u045b\u0435 \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
+                    "\u0427\u0435\u0442\u0432\u0440\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1.",
+                    "2.",
+                    "3.",
+                    "4.",
+                }
+            },
+            { "calendarname.buddhist",
+                "\u0411\u0443\u0434\u0438\u0441\u0442\u0438\u0447\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.gregorian",
+                "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.gregory",
+                "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.islamic",
+                "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.islamic-civil",
+                "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u043d\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.islamicc",
+                "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u043d\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.japanese",
+                "\u0408\u0430\u043f\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.roc",
+                "\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0435 \u041a\u0438\u043d\u0435" },
+            { "field.dayperiod",
+                "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435/\u043f\u043e\u043f\u043e\u0434\u043d\u0435" },
+            { "field.era",
+                "\u0435\u0440\u0430" },
+            { "field.hour",
+                "\u0447\u0430\u0441" },
+            { "field.minute",
+                "\u043c\u0438\u043d\u0443\u0442" },
+            { "field.month",
+                "\u043c\u0435\u0441\u0435\u0446" },
+            { "field.second",
+                "\u0441\u0435\u043a\u0443\u043d\u0434" },
+            { "field.week",
+                "\u043d\u0435\u0434\u0435\u0459\u0430" },
+            { "field.weekday",
+                "\u0434\u0430\u043d \u0443 \u043d\u0435\u0434\u0435\u0459\u0438" },
+            { "field.year",
+                "\u0433\u043e\u0434\u0438\u043d\u0430" },
+            { "field.zone",
+                "\u0437\u043e\u043d\u0430" },
+            { "islamic.Eras",
+                new String[] {
+                    "",
+                    "\u0410\u0425",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "\u041c\u0443\u0440\u0430\u0445\u0430\u043c",
+                    "\u0421\u0430\u0444\u0430\u0440",
+                    "\u0420\u0430\u0431\u0438\u02bb I",
+                    "\u0420\u0430\u0431\u0438\u02bb II",
+                    "\u0408\u0443\u043c\u0430\u0434\u0430 I",
+                    "\u0408\u0443\u043c\u0430\u0434\u0430 II",
+                    "\u0420\u0430\u0452\u0430\u0431",
+                    "\u0428\u0430\u02bb\u0431\u0430\u043d",
+                    "\u0420\u0430\u043c\u0430\u0434\u0430\u043d",
+                    "\u0428\u0430\u0432\u0430\u043b",
+                    "\u0414\u0443\u02bb\u043b-\u041a\u0438\u02bb\u0434\u0430",
+                    "\u0414\u0443\u02bb\u043b-\u0445\u0438\u0452\u0430",
+                    "",
+                }
+            },
+            { "islamic.short.Eras",
+                new String[] {
+                    "",
+                    "\u0410\u0425",
+                }
+            },
+            { "java.time.buddhist.short.Eras",
+                new String[] {
+                    "BC",
+                    "\u0411\u0415",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE, MMMM d, y G",
+                    "MMMM d, y G",
+                    "MMM d, y G",
+                    "M/d/yy G",
+                }
+            },
+            { "java.time.japanese.long.Eras",
+                new String[] {
+                    "\u043d. \u0435.",
+                    "\u041c\u0435\u0438\u0452\u0438",
+                    "\u0422\u0430\u0438\u0448\u043e",
+                    "\u0428\u043e\u0432\u0430",
+                    "\u0425\u0430\u0438\u0441\u0435\u0438",
+                }
+            },
+            { "java.time.japanese.short.Eras",
+                new String[] {
+                    "\u043d. \u0435.",
+                    "\u041c\u0435\u0438\u0452\u0438",
+                    "\u0422\u0430\u0438\u0448\u043e",
+                    "\u0428\u043e\u0432\u0430",
+                    "\u0425\u0430\u0438\u0441\u0435\u0438",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "\u041f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435",
+                    "\u041d\u043e\u0432\u0435 \u0435\u0440\u0435",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\u043f. \u043d. \u0435.",
+                    "\u043d. \u0435",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "\u041f\u0440\u0435 \u0420\u041a",
+                    "\u0420\u041a",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "\u041f\u0440\u0435 \u0420\u041a",
+                    "\u0420\u041a",
+                }
+            },
+        };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/sr/JavaTimeSupplementary_sr_Latn.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.sr;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_sr_Latn extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "Q1",
+                    "Q2",
+                    "Q3",
+                    "Q4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1. kvartal",
+                    "2. kvartal",
+                    "3. kvartal",
+                    "4. kvartal",
+                }
+            },
+            { "calendarname.buddhist",
+                "Budisti\u010dki kalendar" },
+            { "calendarname.gregorian",
+                "Gregorijanski kalendar" },
+            { "calendarname.gregory",
+                "Gregorijanski kalendar" },
+            { "calendarname.islamic",
+                "Islamski kalendar" },
+            { "calendarname.islamic-civil",
+                "Islamski civilni kalendar" },
+            { "calendarname.islamicc",
+                "Islamski civilni kalendar" },
+            { "calendarname.japanese",
+                "Japanski kalendar" },
+            { "calendarname.roc",
+                "Kalendar Republike Kine" },
+            { "field.dayperiod",
+                "pre podne/ popodne" },
+            { "field.era",
+                "era" },
+            { "field.hour",
+                "\u010das" },
+            { "field.minute",
+                "minut" },
+            { "field.month",
+                "mesec" },
+            { "field.second",
+                "sekund" },
+            { "field.week",
+                "nedelja" },
+            { "field.weekday",
+                "dan u nedelji" },
+            { "field.year",
+                "godina" },
+            { "field.zone",
+                "zona" },
+            { "java.time.long.Eras",
+                new String[] {
+                    "Pre nove ere",
+                    "Nove ere",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "p. n. e.",
+                    "n. e",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "Pre RK",
+                    "RK",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "Pre RK",
+                    "RK",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/sv/FormatData_sv.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/sv/FormatData_sv.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.sv;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_sv extends ListResourceBundle {
+public class FormatData_sv extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     @Override
     protected final Object[][] getContents() {
@@ -106,6 +106,23 @@
                     "" // month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "J",
+                    "F",
+                    "M",
+                    "A",
+                    "M",
+                    "J",
+                    "J",
+                    "A",
+                    "S",
+                    "O",
+                    "N",
+                    "D",
+                    "",
+                }
+            },
             { "MonthAbbreviations",
                 new String[] {
                     "jan", // abb january
@@ -123,6 +140,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "standalone.MonthAbbreviations",
+                new String[] {
+                    "jan",
+                    "feb",
+                    "mar",
+                    "apr",
+                    "maj",
+                    "jun",
+                    "jul",
+                    "aug",
+                    "sep",
+                    "okt",
+                    "nov",
+                    "dec",
+                    "",
+                }
+            },
             { "standalone.MonthNarrows",
                 new String[] {
                     "J",
@@ -162,6 +196,17 @@
                     "l\u00f6" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "s\u00f6n",
+                    "m\u00e5n",
+                    "tis",
+                    "ons",
+                    "tor",
+                    "fre",
+                    "l\u00f6r",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "S",
@@ -173,6 +218,17 @@
                     "L",
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "s\u00f6ndag",
+                    "m\u00e5ndag",
+                    "tisdag",
+                    "onsdag",
+                    "torsdag",
+                    "fredag",
+                    "l\u00f6rdag",
+                }
+            },
             { "standalone.DayNarrows",
                 new String[] {
                     "S",
@@ -184,6 +240,18 @@
                     "L",
                 }
             },
+            { "Eras",
+                new String[] {
+                    "f\u00f6re Kristus",
+                    "efter Kristus",
+                }
+            },
+            { "short.Eras",
+                new String[] {
+                    "f.Kr.",
+                    "e.Kr.",
+                }
+            },
             { "narrow.Eras",
                 new String[] {
                     "f.Kr.",
@@ -239,74 +307,6 @@
                 }
             },
             { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "G yyyy-MM-dd",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "G y-MM-dd",
-                }
-            },
-            { "roc.Eras", rocEras },
-            { "roc.short.Eras", rocEras },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "G y-MM-dd",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "GGGG y-MM-dd",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "G y-MM-dd",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "GGGG y-MM-dd",
-                }
-            },
-            { "calendarname.islamic-civil", "islamisk civil kalender" },
-            { "calendarname.islamicc", "islamisk civil kalender" },
-            { "calendarname.islamic", "islamisk kalender" },
-            { "calendarname.japanese", "japansk kalender" },
-            { "calendarname.gregorian", "gregoriansk kalender" },
-            { "calendarname.gregory", "gregoriansk kalender" },
-            { "calendarname.roc", "kinesiska republikens kalender" },
-            { "calendarname.buddhist", "buddistisk kalender" },
-            { "field.era", "era" },
-            { "field.year", "\u00e5r" },
-            { "field.month", "m\u00e5nad" },
-            { "field.week", "vecka" },
-            { "field.weekday", "veckodag" },
-            { "field.dayperiod", "fm/em" },
-            { "field.hour", "timme" },
-            { "field.minute", "minut" },
-            { "field.second", "sekund" },
-            { "field.zone", "tidszon" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/sv/FormatData_sv_SE.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/sv/FormatData_sv_SE.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.sv;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_sv_SE extends ListResourceBundle {
+public class FormatData_sv_SE extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/sv/JavaTimeSupplementary_sv.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,215 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.sv;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_sv extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "K1",
+                    "K2",
+                    "K3",
+                    "K4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1:a kvartalet",
+                    "2:a kvartalet",
+                    "3:e kvartalet",
+                    "4:e kvartalet",
+                }
+            },
+            { "calendarname.buddhist",
+                "buddistisk kalender" },
+            { "calendarname.gregorian",
+                "gregoriansk kalender" },
+            { "calendarname.gregory",
+                "gregoriansk kalender" },
+            { "calendarname.islamic",
+                "islamisk kalender" },
+            { "calendarname.islamic-civil",
+                "islamisk civil kalender" },
+            { "calendarname.islamicc",
+                "islamisk civil kalender" },
+            { "calendarname.japanese",
+                "japansk kalender" },
+            { "calendarname.roc",
+                "kinesiska republikens kalender" },
+            { "field.dayperiod",
+                "fm/em" },
+            { "field.era",
+                "era" },
+            { "field.hour",
+                "timme" },
+            { "field.minute",
+                "minut" },
+            { "field.month",
+                "m\u00e5nad" },
+            { "field.second",
+                "sekund" },
+            { "field.week",
+                "vecka" },
+            { "field.weekday",
+                "veckodag" },
+            { "field.year",
+                "\u00e5r" },
+            { "field.zone",
+                "tidszon" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y GGGG",
+                    "d MMMM y GGGG",
+                    "d MMM y GGGG",
+                    "GGGG y-MM-dd",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "muharram",
+                    "safar",
+                    "rabi\u2019 al-awwal",
+                    "rabi\u2019 al-akhir",
+                    "jumada-l-ula",
+                    "jumada-l-akhira",
+                    "rajab",
+                    "sha\u2019ban",
+                    "ramadan",
+                    "shawwal",
+                    "dhu-l-ga\u2019da",
+                    "dhu-l-hijja",
+                    "",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM y G",
+                    "G yyyy-MM-dd",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM y G",
+                    "G y-MM-dd",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM y G",
+                    "G y-MM-dd",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "f\u00f6re Kristus",
+                    "efter Kristus",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y G",
+                    "d MMMM y G",
+                    "d MMM y G",
+                    "G y-MM-dd",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "f\u00f6re Kristus",
+                    "efter Kristus",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE d MMMM y GGGG",
+                    "d MMMM y GGGG",
+                    "d MMM y GGGG",
+                    "GGGG y-MM-dd",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "f\u00f6re R.K.",
+                    "R.K.",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "f\u00f6re R.K.",
+                    "R.K.",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/th/FormatData_th.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/th/FormatData_th.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.th;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_th extends ListResourceBundle {
+public class FormatData_th extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         String[] timePatterns = new String[] {
@@ -135,6 +135,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "\u0e21.\u0e04.",
+                    "\u0e01.\u0e1e.",
+                    "\u0e21\u0e35.\u0e04.",
+                    "\u0e40\u0e21.\u0e22.",
+                    "\u0e1e.\u0e04.",
+                    "\u0e21\u0e34.\u0e22",
+                    "\u0e01.\u0e04.",
+                    "\u0e2a.\u0e04.",
+                    "\u0e01.\u0e22.",
+                    "\u0e15.\u0e04.",
+                    "\u0e1e.\u0e22.",
+                    "\u0e18.\u0e04.",
+                    "",
+                }
+            },
             { "standalone.MonthNarrows",
                 new String[] {
                     "\u0e21.\u0e04.",
@@ -209,23 +226,39 @@
                     "\u0e04.\u0e28."
                 }
             },
+            { "short.Eras",
+                new String[] {
+                    "\u0e01\u0e48\u0e2d\u0e19 \u0e04.\u0e28.",
+                    "\u0e04.\u0e28.",
+                }
+            },
             { "narrow.Eras",
                 new String[] {
                     "\u0e01\u0e48\u0e2d\u0e19 \u0e04.\u0e28.",
                     "\u0e04.\u0e28.",
                 }
             },
+            { "japanese.Eras",
+                new String[] {
+                    "\u0e04.\u0e28.",
+                    "\u0e40\u0e21\u0e08\u0e34",
+                    "\u0e17\u0e30\u0e2d\u0e34\u0e42\u0e0a",
+                    "\u0e42\u0e0a\u0e27\u0e30",
+                    "\u0e40\u0e2e\u0e40\u0e0b",
+                }
+            },
+            { "japanese.short.Eras",
+                new String[] {
+                    "\u0e04.\u0e28.",
+                    "\u0e21",
+                    "\u0e17",
+                    "\u0e0a",
+                    "\u0e2e",
+                }
+            },
             { "buddhist.TimePatterns",
                 timePatterns
             },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE\u0e17\u0e35\u0e48 d MMMM G y",
-                    "d MMMM y",
-                    "d MMM y",
-                    "d/M/yyyy",
-                }
-            },
             { "buddhist.DatePatterns",
                 datePatterns
             },
@@ -242,77 +275,6 @@
                 dateTimePatterns
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE\u0e17\u0e35\u0e48 d MMMM \u0e1b\u0e35G\u0e17\u0e35\u0e48 y",
-                    "d MMMM \u0e1b\u0e35G y",
-                    "d MMM G y",
-                    "d/M/yy",
-                }
-            },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE\u0e17\u0e35\u0e48 d MMMM \u0e1b\u0e35G\u0e17\u0e35\u0e48 y",
-                    "d MMMM \u0e1b\u0e35G y",
-                    "d MMM G y",
-                    "d/M/yy",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE\u0e17\u0e35\u0e48 d MMMM \u0e1b\u0e35GGGG\u0e17\u0e35\u0e48 y",
-                    "d MMMM \u0e1b\u0e35GGGG y",
-                    "d MMM GGGG y",
-                    "d/M/yy",
-                }
-            },
-            { "islamic.MonthNames",
-                new String[] {
-                    "\u0e21\u0e38\u0e2e\u0e30\u0e23\u0e4c\u0e23\u0e2d\u0e21",
-                    "\u0e0b\u0e2d\u0e1f\u0e32\u0e23\u0e4c",
-                    "\u0e23\u0e2d\u0e1a\u0e35 I",
-                    "\u0e23\u0e2d\u0e1a\u0e35 II",
-                    "\u0e08\u0e38\u0e21\u0e32\u0e14\u0e32 I",
-                    "\u0e08\u0e38\u0e21\u0e32\u0e14\u0e32 II",
-                    "\u0e23\u0e2d\u0e08\u0e31\u0e1a",
-                    "\u0e0a\u0e30\u0e2d\u0e30\u0e1a\u0e32\u0e19",
-                    "\u0e23\u0e2d\u0e21\u0e30\u0e14\u0e2d\u0e19",
-                    "\u0e40\u0e0a\u0e32\u0e27\u0e31\u0e25",
-                    "\u0e14\u0e2e\u0e38\u0e38\u0e2d\u0e31\u0e25\u0e01\u0e34\u0e14\u0e30\u0e2b\u0e4c",
-                    "\u0e14\u0e2e\u0e38\u0e2d\u0e31\u0e25\u0e2e\u0e34\u0e08\u0e08\u0e30\u0e2b\u0e4c",
-                    "",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "\u0e2e\u0e34\u0e08\u0e40\u0e23\u0e32\u0e30\u0e2b\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "\u0e2e.\u0e28.",
-                }
-            },
-            { "calendarname.islamic-civil", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21\u0e0b\u0e35\u0e27\u0e34\u0e25" },
-            { "calendarname.islamicc", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21\u0e0b\u0e35\u0e27\u0e34\u0e25" },
-            { "calendarname.islamic", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21" },
-            { "calendarname.japanese", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e0d\u0e35\u0e48\u0e1b\u0e38\u0e48\u0e19" },
-            { "calendarname.gregorian", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e40\u0e01\u0e23\u0e01\u0e2d\u0e40\u0e23\u0e35\u0e22\u0e19" },
-            { "calendarname.gregory", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e40\u0e01\u0e23\u0e01\u0e2d\u0e40\u0e23\u0e35\u0e22\u0e19" },
-            { "calendarname.roc", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19" },
-            { "calendarname.buddhist", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e1e\u0e38\u0e17\u0e18" },
-            { "field.era", "\u0e2a\u0e21\u0e31\u0e22" },
-            { "field.year", "\u0e1b\u0e35" },
-            { "field.month", "\u0e40\u0e14\u0e37\u0e2d\u0e19" },
-            { "field.week", "\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c" },
-            { "field.weekday", "\u0e27\u0e31\u0e19\u0e43\u0e19\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c" },
-            { "field.dayperiod", "\u0e0a\u0e48\u0e27\u0e07\u0e27\u0e31\u0e19" },
-            { "field.hour", "\u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07" },
-            { "field.minute", "\u0e19\u0e32\u0e17\u0e35" },
-            { "field.second", "\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35" },
-            { "field.zone", "\u0e40\u0e02\u0e15" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/th/FormatData_th_TH.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/th/FormatData_th_TH.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.th;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_th_TH extends ListResourceBundle {
+public class FormatData_th_TH extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/th/JavaTimeSupplementary_th.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,243 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.th;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_th extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "Q1",
+                    "Q2",
+                    "Q3",
+                    "Q4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1",
+                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2",
+                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3",
+                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e1e\u0e38\u0e17\u0e18" },
+            { "calendarname.gregorian",
+                "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e40\u0e01\u0e23\u0e01\u0e2d\u0e40\u0e23\u0e35\u0e22\u0e19" },
+            { "calendarname.gregory",
+                "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e40\u0e01\u0e23\u0e01\u0e2d\u0e40\u0e23\u0e35\u0e22\u0e19" },
+            { "calendarname.islamic",
+                "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21" },
+            { "calendarname.islamic-civil",
+                "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21\u0e0b\u0e35\u0e27\u0e34\u0e25" },
+            { "calendarname.islamicc",
+                "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21\u0e0b\u0e35\u0e27\u0e34\u0e25" },
+            { "calendarname.japanese",
+                "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e0d\u0e35\u0e48\u0e1b\u0e38\u0e48\u0e19" },
+            { "calendarname.roc",
+                "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19" },
+            { "field.dayperiod",
+                "\u0e0a\u0e48\u0e27\u0e07\u0e27\u0e31\u0e19" },
+            { "field.era",
+                "\u0e2a\u0e21\u0e31\u0e22" },
+            { "field.hour",
+                "\u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07" },
+            { "field.minute",
+                "\u0e19\u0e32\u0e17\u0e35" },
+            { "field.month",
+                "\u0e40\u0e14\u0e37\u0e2d\u0e19" },
+            { "field.second",
+                "\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35" },
+            { "field.week",
+                "\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c" },
+            { "field.weekday",
+                "\u0e27\u0e31\u0e19\u0e43\u0e19\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c" },
+            { "field.year",
+                "\u0e1b\u0e35" },
+            { "field.zone",
+                "\u0e40\u0e02\u0e15" },
+            { "islamic.Eras",
+                new String[] {
+                    "",
+                    "\u0e2e.\u0e28.",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "\u0e21\u0e38\u0e2e\u0e30\u0e23\u0e4c\u0e23\u0e2d\u0e21",
+                    "\u0e0b\u0e2d\u0e1f\u0e32\u0e23\u0e4c",
+                    "\u0e23\u0e2d\u0e1a\u0e35 I",
+                    "\u0e23\u0e2d\u0e1a\u0e35 II",
+                    "\u0e08\u0e38\u0e21\u0e32\u0e14\u0e32 I",
+                    "\u0e08\u0e38\u0e21\u0e32\u0e14\u0e32 II",
+                    "\u0e23\u0e2d\u0e08\u0e31\u0e1a",
+                    "\u0e0a\u0e30\u0e2d\u0e30\u0e1a\u0e32\u0e19",
+                    "\u0e23\u0e2d\u0e21\u0e30\u0e14\u0e2d\u0e19",
+                    "\u0e40\u0e0a\u0e32\u0e27\u0e31\u0e25",
+                    "\u0e14\u0e2e\u0e38\u0e38\u0e2d\u0e31\u0e25\u0e01\u0e34\u0e14\u0e30\u0e2b\u0e4c",
+                    "\u0e14\u0e2e\u0e38\u0e2d\u0e31\u0e25\u0e2e\u0e34\u0e08\u0e08\u0e30\u0e2b\u0e4c",
+                    "",
+                }
+            },
+            { "islamic.long.Eras",
+                new String[] {
+                    "",
+                    "\u0e2e\u0e34\u0e08\u0e40\u0e23\u0e32\u0e30\u0e2b\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a",
+                }
+            },
+            { "islamic.short.Eras",
+                new String[] {
+                    "",
+                    "\u0e2e.\u0e28.",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE\u0e17\u0e35\u0e48 d MMMM G y",
+                    "d MMMM y",
+                    "d MMM y",
+                    "d/M/yyyy",
+                }
+            },
+            { "java.time.buddhist.long.Eras",
+                new String[] {
+                    "BC",
+                    "\u0e1e\u0e38\u0e17\u0e18\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a",
+                }
+            },
+            { "java.time.buddhist.short.Eras",
+                new String[] {
+                    "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e01\u0e32\u0e25\u0e17\u0e35\u0e48",
+                    "\u0e1e.\u0e28.",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE\u0e17\u0e35\u0e48 d MMMM \u0e1b\u0e35G\u0e17\u0e35\u0e48 y",
+                    "d MMMM \u0e1b\u0e35G y",
+                    "d MMM G y",
+                    "d/M/yy",
+                }
+            },
+            { "java.time.japanese.long.Eras",
+                new String[] {
+                    "\u0e04.\u0e28.",
+                    "\u0e40\u0e21\u0e08\u0e34",
+                    "\u0e17\u0e30\u0e2d\u0e34\u0e42\u0e0a",
+                    "\u0e42\u0e0a\u0e27\u0e30",
+                    "\u0e40\u0e2e\u0e40\u0e0b",
+                }
+            },
+            { "java.time.japanese.short.Eras",
+                new String[] {
+                    "\u0e04.\u0e28.",
+                    "\u0e40\u0e21\u0e08\u0e34",
+                    "\u0e17\u0e30\u0e2d\u0e34\u0e42\u0e0a",
+                    "\u0e42\u0e0a\u0e27\u0e30",
+                    "\u0e40\u0e2e\u0e40\u0e0b",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a",
+                    "\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE\u0e17\u0e35\u0e48 d MMMM \u0e1b\u0e35G\u0e17\u0e35\u0e48 y",
+                    "d MMMM \u0e1b\u0e35G y",
+                    "d MMM G y",
+                    "d/M/yy",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e01\u0e32\u0e25\u0e17\u0e35\u0e48",
+                    "\u0e04.\u0e28.",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE\u0e17\u0e35\u0e48 d MMMM \u0e1b\u0e35GGGG\u0e17\u0e35\u0e48 y",
+                    "d MMMM \u0e1b\u0e35GGGG y",
+                    "d MMM GGGG y",
+                    "d/M/yy",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/tr/FormatData_tr.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/tr/FormatData_tr.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.tr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_tr extends ListResourceBundle {
+public class FormatData_tr extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -101,6 +101,23 @@
                     "" // month 13 if applicable
                 }
             },
+            { "standalone.MonthNames",
+                new String[] {
+                    "Ocak",
+                    "\u015eubat",
+                    "Mart",
+                    "Nisan",
+                    "May\u0131s",
+                    "Haziran",
+                    "Temmuz",
+                    "A\u011fustos",
+                    "Eyl\u00fcl",
+                    "Ekim",
+                    "Kas\u0131m",
+                    "Aral\u0131k",
+                    "",
+                }
+            },
             { "MonthAbbreviations",
                 new String[] {
                     "Oca", // abb january
@@ -118,6 +135,40 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "standalone.MonthAbbreviations",
+                new String[] {
+                    "Oca",
+                    "\u015eub",
+                    "Mar",
+                    "Nis",
+                    "May",
+                    "Haz",
+                    "Tem",
+                    "A\u011fu",
+                    "Eyl",
+                    "Eki",
+                    "Kas",
+                    "Ara",
+                    "",
+                }
+            },
+            { "MonthNarrows",
+                new String[] {
+                    "O",
+                    "\u015e",
+                    "M",
+                    "N",
+                    "M",
+                    "H",
+                    "T",
+                    "A",
+                    "E",
+                    "E",
+                    "K",
+                    "A",
+                    "",
+                }
+            },
             { "standalone.MonthNarrows",
                 new String[] {
                     "O",
@@ -146,6 +197,17 @@
                     "Cumartesi" // Saturday
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "Pazar",
+                    "Pazartesi",
+                    "Sal\u0131",
+                    "\u00c7ar\u015famba",
+                    "Per\u015fembe",
+                    "Cuma",
+                    "Cumartesi",
+                }
+            },
             { "DayAbbreviations",
                 new String[] {
                     "Paz", // abb Sunday
@@ -157,6 +219,17 @@
                     "Cmt" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "Paz",
+                    "Pzt",
+                    "Sal",
+                    "\u00c7ar",
+                    "Per",
+                    "Cum",
+                    "Cmt",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "P",
@@ -168,6 +241,29 @@
                     "C",
                 }
             },
+            { "standalone.DayNarrows",
+                new String[] {
+                    "P",
+                    "P",
+                    "S",
+                    "\u00c7",
+                    "P",
+                    "C",
+                    "C",
+                }
+            },
+            { "long.Eras",
+                new String[] {
+                    "Milattan \u00d6nce",
+                    "Milattan Sonra",
+                }
+            },
+            { "Eras",
+                new String[] {
+                    "M\u00d6",
+                    "MS",
+                }
+            },
             { "NumberPatterns",
                 new String[] {
                     "#,##0.###;-#,##0.###", // decimal pattern
@@ -212,89 +308,6 @@
                 }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "dd MMMM y G EEEE",
-                    "dd MMMM y G",
-                    "dd MMM y G",
-                    "dd.MM.yyyy G",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "dd MMMM y G EEEE",
-                    "dd MMMM y G",
-                    "dd MMM y G",
-                    "dd.MM.yyyy G",
-                }
-            },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "dd MMMM y G EEEE",
-                    "dd MMMM y G",
-                    "dd MMM y G",
-                    "dd.MM.yyyy G",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "dd MMMM y GGGG EEEE",
-                    "dd MMMM y GGGG",
-                    "dd MMM y GGGG",
-                    "dd.MM.yyyy GGGG",
-                }
-            },
-            { "islamic.MonthNames",
-                new String[] {
-                    "Muharrem",
-                    "Safer",
-                    "Rebi\u00fclevvel",
-                    "Rebi\u00fclahir",
-                    "Cemaziyelevvel",
-                    "Cemaziyelahir",
-                    "Recep",
-                    "\u015eaban",
-                    "Ramazan",
-                    "\u015eevval",
-                    "Zilkade",
-                    "Zilhicce",
-                    "",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "dd MMMM y G EEEE",
-                    "dd MMMM y G",
-                    "dd MMM y G",
-                    "dd.MM.yyyy G",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "dd MMMM y GGGG EEEE",
-                    "dd MMMM y GGGG",
-                    "dd MMM y GGGG",
-                    "dd.MM.yyyy GGGG",
-                }
-            },
-            { "calendarname.islamic-civil", "Arap Takvimi" },
-            { "calendarname.islamicc", "Arap Takvimi" },
-            { "calendarname.islamic", "Hicri Takvim" },
-            { "calendarname.japanese", "Japon Takvimi" },
-            { "calendarname.gregorian", "Miladi Takvim" },
-            { "calendarname.gregory", "Miladi Takvim" },
-            { "calendarname.roc", "\u00c7in Cumhuriyeti Takvimi" },
-            { "calendarname.buddhist", "Budist Takvimi" },
-            { "field.era", "Miladi D\u00f6nem" },
-            { "field.year", "Y\u0131l" },
-            { "field.month", "Ay" },
-            { "field.week", "Hafta" },
-            { "field.weekday", "Haftan\u0131n G\u00fcn\u00fc" },
-            { "field.dayperiod", "AM/PM" },
-            { "field.hour", "Saat" },
-            { "field.minute", "Dakika" },
-            { "field.second", "Saniye" },
-            { "field.zone", "Saat Dilimi" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/tr/FormatData_tr_TR.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/tr/FormatData_tr_TR.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.tr;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_tr_TR extends ListResourceBundle {
+public class FormatData_tr_TR extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/tr/JavaTimeSupplementary_tr.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,211 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.tr;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_tr extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "\u00c71",
+                    "\u00c72",
+                    "\u00c73",
+                    "\u00c74",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "1. \u00e7eyrek",
+                    "2. \u00e7eyrek",
+                    "3. \u00e7eyrek",
+                    "4. \u00e7eyrek",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "Budist Takvimi" },
+            { "calendarname.gregorian",
+                "Miladi Takvim" },
+            { "calendarname.gregory",
+                "Miladi Takvim" },
+            { "calendarname.islamic",
+                "Hicri Takvim" },
+            { "calendarname.islamic-civil",
+                "Arap Takvimi" },
+            { "calendarname.islamicc",
+                "Arap Takvimi" },
+            { "calendarname.japanese",
+                "Japon Takvimi" },
+            { "calendarname.roc",
+                "\u00c7in Cumhuriyeti Takvimi" },
+            { "field.dayperiod",
+                "AM/PM" },
+            { "field.era",
+                "Miladi D\u00f6nem" },
+            { "field.hour",
+                "Saat" },
+            { "field.minute",
+                "Dakika" },
+            { "field.month",
+                "Ay" },
+            { "field.second",
+                "Saniye" },
+            { "field.week",
+                "Hafta" },
+            { "field.weekday",
+                "Haftan\u0131n G\u00fcn\u00fc" },
+            { "field.year",
+                "Y\u0131l" },
+            { "field.zone",
+                "Saat Dilimi" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "dd MMMM y GGGG EEEE",
+                    "dd MMMM y GGGG",
+                    "dd MMM y GGGG",
+                    "dd.MM.yyyy GGGG",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "Muharrem",
+                    "Safer",
+                    "Rebi\u00fclevvel",
+                    "Rebi\u00fclahir",
+                    "Cemaziyelevvel",
+                    "Cemaziyelahir",
+                    "Recep",
+                    "\u015eaban",
+                    "Ramazan",
+                    "\u015eevval",
+                    "Zilkade",
+                    "Zilhicce",
+                    "",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "dd MMMM y G EEEE",
+                    "dd MMMM y G",
+                    "dd MMM y G",
+                    "dd.MM.yyyy G",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "dd MMMM y G EEEE",
+                    "dd MMMM y G",
+                    "dd MMM y G",
+                    "dd.MM.yyyy G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "dd MMMM y G EEEE",
+                    "dd MMMM y G",
+                    "dd MMM y G",
+                    "dd.MM.yyyy G",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "Milattan \u00d6nce",
+                    "Milattan Sonra",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "dd MMMM y G EEEE",
+                    "dd MMMM y G",
+                    "dd MMM y G",
+                    "dd.MM.yyyy G",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "M\u00d6",
+                    "MS",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "dd MMMM y GGGG EEEE",
+                    "dd MMMM y GGGG",
+                    "dd MMM y GGGG",
+                    "dd.MM.yyyy GGGG",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/uk/FormatData_uk.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/uk/FormatData_uk.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.uk;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_uk extends ListResourceBundle {
+public class FormatData_uk extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -152,6 +152,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "\u0421",
+                    "\u041b",
+                    "\u0411",
+                    "\u041a",
+                    "\u0422",
+                    "\u0427",
+                    "\u041b",
+                    "\u0421",
+                    "\u0412",
+                    "\u0416",
+                    "\u041b",
+                    "\u0413",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "\u043d\u0435\u0434\u0456\u043b\u044f", // Sunday
@@ -228,41 +245,6 @@
                 }
             },
             { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
-            { "islamic.MonthNames",
-                new String[] {
-                    "\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c",
-                    "\u0421\u0430\u0444\u0430\u0440",
-                    "\u0420\u0430\u0431\u0456 I",
-                    "\u0420\u0430\u0431\u0456 II",
-                    "\u0414\u0436\u0443\u043c\u0430\u0434\u0430 I",
-                    "\u0414\u0436\u0443\u043c\u0430\u0434\u0430 II",
-                    "\u0420\u0430\u0434\u0436\u0430\u0431",
-                    "\u0428\u0430\u0430\u0431\u0430\u043d",
-                    "\u0420\u0430\u043c\u0430\u0434\u0430\u043d",
-                    "\u0414\u0430\u0432\u0432\u0430\u043b",
-                    "\u0417\u0443-\u043b\u044c-\u043a\u0430\u0430\u0434\u0430",
-                    "\u0417\u0443-\u043b\u044c-\u0445\u0456\u0434\u0436\u0430",
-                    "",
-                }
-            },
-            { "calendarname.islamic-civil", "\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u0441\u0432\u0456\u0442\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.islamicc", "\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u0441\u0432\u0456\u0442\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.islamic", "\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.japanese", "\u042f\u043f\u043e\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.gregorian", "\u0413\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.gregory", "\u0413\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "calendarname.roc", "\u041a\u0438\u0442\u0430\u0439\u0441\u044c\u043a\u0438\u0439 \u0433\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439" },
-            { "calendarname.buddhist", "\u0411\u0443\u0434\u0434\u0456\u0439\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
-            { "field.era", "\u0415\u0440\u0430" },
-            { "field.year", "\u0420\u0456\u043a" },
-            { "field.month", "\u041c\u0456\u0441\u044f\u0446\u044c" },
-            { "field.week", "\u0422\u0438\u0436\u0434\u0435\u043d\u044c" },
-            { "field.weekday", "\u0414\u0435\u043d\u044c \u0442\u0438\u0436\u043d\u044f" },
-            { "field.dayperiod", "\u0427\u0430\u0441\u0442\u0438\u043d\u0430 \u0434\u043e\u0431\u0438" },
-            { "field.hour", "\u0413\u043e\u0434\u0438\u043d\u0430" },
-            { "field.minute", "\u0425\u0432\u0438\u043b\u0438\u043d\u0430" },
-            { "field.second", "\u0421\u0435\u043a\u0443\u043d\u0434\u0430" },
-            { "field.zone", "\u0417\u043e\u043d\u0430" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/uk/FormatData_uk_UA.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/uk/FormatData_uk_UA.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.uk;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_uk_UA extends ListResourceBundle {
+public class FormatData_uk_UA extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/uk/JavaTimeSupplementary_uk.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.uk;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_uk extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "I \u043a\u0432.",
+                    "II \u043a\u0432.",
+                    "III \u043a\u0432.",
+                    "IV \u043a\u0432.",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "I \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+                    "II \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+                    "III \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+                    "IV \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "\u0411\u0443\u0434\u0434\u0456\u0439\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.gregorian",
+                "\u0413\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.gregory",
+                "\u0413\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.islamic",
+                "\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.islamic-civil",
+                "\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u0441\u0432\u0456\u0442\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.islamicc",
+                "\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u0441\u0432\u0456\u0442\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.japanese",
+                "\u042f\u043f\u043e\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
+            { "calendarname.roc",
+                "\u041a\u0438\u0442\u0430\u0439\u0441\u044c\u043a\u0438\u0439 \u0433\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439" },
+            { "field.dayperiod",
+                "\u0427\u0430\u0441\u0442\u0438\u043d\u0430 \u0434\u043e\u0431\u0438" },
+            { "field.era",
+                "\u0415\u0440\u0430" },
+            { "field.hour",
+                "\u0413\u043e\u0434\u0438\u043d\u0430" },
+            { "field.minute",
+                "\u0425\u0432\u0438\u043b\u0438\u043d\u0430" },
+            { "field.month",
+                "\u041c\u0456\u0441\u044f\u0446\u044c" },
+            { "field.second",
+                "\u0421\u0435\u043a\u0443\u043d\u0434\u0430" },
+            { "field.week",
+                "\u0422\u0438\u0436\u0434\u0435\u043d\u044c" },
+            { "field.weekday",
+                "\u0414\u0435\u043d\u044c \u0442\u0438\u0436\u043d\u044f" },
+            { "field.year",
+                "\u0420\u0456\u043a" },
+            { "field.zone",
+                "\u0417\u043e\u043d\u0430" },
+            { "islamic.MonthNames",
+                new String[] {
+                    "\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c",
+                    "\u0421\u0430\u0444\u0430\u0440",
+                    "\u0420\u0430\u0431\u0456 I",
+                    "\u0420\u0430\u0431\u0456 II",
+                    "\u0414\u0436\u0443\u043c\u0430\u0434\u0430 I",
+                    "\u0414\u0436\u0443\u043c\u0430\u0434\u0430 II",
+                    "\u0420\u0430\u0434\u0436\u0430\u0431",
+                    "\u0428\u0430\u0430\u0431\u0430\u043d",
+                    "\u0420\u0430\u043c\u0430\u0434\u0430\u043d",
+                    "\u0414\u0430\u0432\u0432\u0430\u043b",
+                    "\u0417\u0443-\u043b\u044c-\u043a\u0430\u0430\u0434\u0430",
+                    "\u0417\u0443-\u043b\u044c-\u0445\u0456\u0434\u0436\u0430",
+                    "",
+                }
+            },
+            { "java.time.long.Eras",
+                new String[] {
+                    "\u0434\u043e \u043d\u0430\u0448\u043e\u0457 \u0435\u0440\u0438",
+                    "\u043d\u0430\u0448\u043e\u0457 \u0435\u0440\u0438",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\u0434\u043e \u043d.\u0435.",
+                    "\u043f\u0456\u0441\u043b\u044f \u043d.\u0435.",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/vi/FormatData_vi.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/vi/FormatData_vi.java	Wed Apr 17 21:48:04 2013 -0700
@@ -78,11 +78,11 @@
 
 package sun.text.resources.vi;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_vi extends ListResourceBundle {
+public class FormatData_vi extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
@@ -120,6 +120,23 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "MonthNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                    "5",
+                    "6",
+                    "7",
+                    "8",
+                    "9",
+                    "10",
+                    "11",
+                    "12",
+                    "",
+                }
+            },
             { "DayNames",
                 new String[] {
                     "Ch\u1ee7 nh\u1eadt", // Sunday
@@ -153,6 +170,17 @@
                     "T7",
                 }
             },
+            { "standalone.DayNarrows",
+                new String[] {
+                    "CN",
+                    "T2",
+                    "T3",
+                    "T4",
+                    "T5",
+                    "T6",
+                    "T7",
+                }
+            },
             { "AmPmMarkers",
                 new String[] {
                     "SA", // am marker
@@ -201,72 +229,6 @@
                     "{0} {1}" // date-time pattern
                 }
             },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G",
-                    "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G",
-                    "dd-MM-yyyy G",
-                    "dd/MM/yyyy G",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G",
-                    "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G",
-                    "dd-MM-y G",
-                    "dd/MM/y G",
-                }
-            },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G",
-                    "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G",
-                    "dd-MM-y G",
-                    "dd/MM/y G",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y GGGG",
-                    "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y GGGG",
-                    "dd-MM-y GGGG",
-                    "dd/MM/y GGGG",
-                }
-            },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G",
-                    "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G",
-                    "dd-MM-y G",
-                    "dd/MM/y G",
-                }
-            },
-            { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y GGGG",
-                    "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y GGGG",
-                    "dd-MM-y GGGG",
-                    "dd/MM/y GGGG",
-                }
-            },
-            { "calendarname.islamic-civil", "L\u1ecbch Islamic-Civil" },
-            { "calendarname.islamicc", "L\u1ecbch Islamic-Civil" },
-            { "calendarname.islamic", "L\u1ecbch Islamic" },
-            { "calendarname.buddhist", "L\u1ecbch Ph\u1eadt Gi\u00e1o" },
-            { "calendarname.japanese", "L\u1ecbch Nh\u1eadt B\u1ea3n" },
-            { "calendarname.roc", "L\u1ecbch Trung Hoa D\u00e2n Qu\u1ed1c" },
-            { "calendarname.gregorian", "L\u1ecbch Gregory" },
-            { "calendarname.gregory", "L\u1ecbch Gregory" },
-            { "field.era", "Th\u1eddi \u0111\u1ea1i" },
-            { "field.year", "N\u0103m" },
-            { "field.month", "Th\u00e1ng" },
-            { "field.week", "Tu\u1ea7n" },
-            { "field.weekday", "Ng\u00e0y trong tu\u1ea7n" },
-            { "field.dayperiod", "SA/CH" },
-            { "field.hour", "Gi\u1edd" },
-            { "field.minute", "Ph\u00fat" },
-            { "field.second", "Gi\u00e2y" },
-            { "field.zone", "M\u00fai gi\u1edd" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/vi/FormatData_vi_VN.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/vi/FormatData_vi_VN.java	Wed Apr 17 21:48:04 2013 -0700
@@ -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
@@ -42,11 +42,11 @@
 
 package sun.text.resources.vi;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_vi_VN extends ListResourceBundle {
+public class FormatData_vi_VN extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/vi/JavaTimeSupplementary_vi.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.vi;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_vi extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "Q1",
+                    "Q2",
+                    "Q3",
+                    "Q4",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "Qu\u00fd 1",
+                    "Qu\u00fd 2",
+                    "Qu\u00fd 3",
+                    "Qu\u00fd 4",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "L\u1ecbch Ph\u1eadt Gi\u00e1o" },
+            { "calendarname.gregorian",
+                "L\u1ecbch Gregory" },
+            { "calendarname.gregory",
+                "L\u1ecbch Gregory" },
+            { "calendarname.islamic",
+                "L\u1ecbch Islamic" },
+            { "calendarname.islamic-civil",
+                "L\u1ecbch Islamic-Civil" },
+            { "calendarname.islamicc",
+                "L\u1ecbch Islamic-Civil" },
+            { "calendarname.japanese",
+                "L\u1ecbch Nh\u1eadt B\u1ea3n" },
+            { "calendarname.roc",
+                "L\u1ecbch Trung Hoa D\u00e2n Qu\u1ed1c" },
+            { "field.dayperiod",
+                "SA/CH" },
+            { "field.era",
+                "Th\u1eddi \u0111\u1ea1i" },
+            { "field.hour",
+                "Gi\u1edd" },
+            { "field.minute",
+                "Ph\u00fat" },
+            { "field.month",
+                "Th\u00e1ng" },
+            { "field.second",
+                "Gi\u00e2y" },
+            { "field.week",
+                "Tu\u1ea7n" },
+            { "field.weekday",
+                "Ng\u00e0y trong tu\u1ea7n" },
+            { "field.year",
+                "N\u0103m" },
+            { "field.zone",
+                "M\u00fai gi\u1edd" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y GGGG",
+                    "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y GGGG",
+                    "dd-MM-y GGGG",
+                    "dd/MM/y GGGG",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G",
+                    "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G",
+                    "dd-MM-yyyy G",
+                    "dd/MM/yyyy G",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G",
+                    "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G",
+                    "dd-MM-y G",
+                    "dd/MM/y G",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G",
+                    "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G",
+                    "dd-MM-y G",
+                    "dd/MM/y G",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G",
+                    "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G",
+                    "dd-MM-y G",
+                    "dd/MM/y G",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "tr. CN",
+                    "sau CN",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y GGGG",
+                    "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y GGGG",
+                    "dd-MM-y GGGG",
+                    "dd/MM/y GGGG",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "Tr\u01b0\u1edbc R.O.C",
+                    "",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "Tr\u01b0\u1edbc R.O.C",
+                    "",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/text/resources/zh/FormatData_zh.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/zh/FormatData_zh.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.zh;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_zh extends ListResourceBundle {
+public class FormatData_zh extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     @Override
     protected final Object[][] getContents() {
@@ -106,6 +106,23 @@
                     "" // month 13 if applicable
                 }
             },
+            { "standalone.MonthNames",
+                new String[] {
+                    "\u4e00\u6708",
+                    "\u4e8c\u6708",
+                    "\u4e09\u6708",
+                    "\u56db\u6708",
+                    "\u4e94\u6708",
+                    "\u516d\u6708",
+                    "\u4e03\u6708",
+                    "\u516b\u6708",
+                    "\u4e5d\u6708",
+                    "\u5341\u6708",
+                    "\u5341\u4e00\u6708",
+                    "\u5341\u4e8c\u6708",
+                    "",
+                }
+            },
             { "MonthAbbreviations",
                 new String[] {
                     "\u4e00\u6708", // abb january
@@ -123,6 +140,40 @@
                     "" // abb month 13 if applicable
                 }
             },
+            { "standalone.MonthAbbreviations",
+                new String[] {
+                    "\u4e00\u6708",
+                    "\u4e8c\u6708",
+                    "\u4e09\u6708",
+                    "\u56db\u6708",
+                    "\u4e94\u6708",
+                    "\u516d\u6708",
+                    "\u4e03\u6708",
+                    "\u516b\u6708",
+                    "\u4e5d\u6708",
+                    "\u5341\u6708",
+                    "\u5341\u4e00\u6708",
+                    "\u5341\u4e8c\u6708",
+                    "",
+                }
+            },
+            { "MonthNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                    "5",
+                    "6",
+                    "7",
+                    "8",
+                    "9",
+                    "10",
+                    "11",
+                    "12",
+                    "",
+                }
+            },
             { "standalone.MonthNarrows",
                 new String[] {
                     "1\u6708",
@@ -151,6 +202,17 @@
                     "\u661f\u671f\u516d" // Saturday
                 }
             },
+            { "standalone.DayNames",
+                new String[] {
+                    "\u661f\u671f\u65e5",
+                    "\u661f\u671f\u4e00",
+                    "\u661f\u671f\u4e8c",
+                    "\u661f\u671f\u4e09",
+                    "\u661f\u671f\u56db",
+                    "\u661f\u671f\u4e94",
+                    "\u661f\u671f\u516d",
+                }
+            },
             { "DayAbbreviations",
                 new String[] {
                     "\u661f\u671f\u65e5", // abb Sunday
@@ -162,6 +224,17 @@
                     "\u661f\u671f\u516d" // abb Saturday
                 }
             },
+            { "standalone.DayAbbreviations",
+                new String[] {
+                    "\u5468\u65e5",
+                    "\u5468\u4e00",
+                    "\u5468\u4e8c",
+                    "\u5468\u4e09",
+                    "\u5468\u56db",
+                    "\u5468\u4e94",
+                    "\u5468\u516d",
+                }
+            },
             { "DayNarrows",
                 new String[] {
                     "\u65e5",
@@ -173,6 +246,17 @@
                     "\u516d",
                 }
             },
+            { "standalone.DayNarrows",
+                new String[] {
+                    "\u65e5",
+                    "\u4e00",
+                    "\u4e8c",
+                    "\u4e09",
+                    "\u56db",
+                    "\u4e94",
+                    "\u516d",
+                }
+            },
             { "AmPmMarkers",
                 new String[] {
                     "\u4e0a\u5348", // am marker
@@ -185,6 +269,21 @@
                     "\u516c\u5143"
                 }
             },
+            { "buddhist.Eras",
+                new String[] {
+                    "BC",
+                    "\u4f5b\u5386",
+                }
+            },
+            { "japanese.Eras",
+                new String[] {
+                    "\u516c\u5143",
+                    "\u660e\u6cbb",
+                    "\u5927\u6b63",
+                    "\u662d\u548c",
+                    "\u5e73\u6210",
+                }
+            },
             { "TimePatterns",
                 new String[] {
                     "ahh'\u65f6'mm'\u5206'ss'\u79d2' z", // full time pattern
@@ -206,49 +305,15 @@
                     "{1} {0}" // date-time pattern
                 }
             },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "Gy\u5e74M\u6708d\u65e5EEEE",
-                    "Gy\u5e74M\u6708d\u65e5",
-                    "Gyyyy-M-d",
-                    "Gy-M-d",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "Gy\u5e74M\u6708d\u65e5EEEE",
-                    "Gy\u5e74M\u6708d\u65e5",
-                    "Gy\u5e74M\u6708d\u65e5",
-                    "Gyy-MM-dd",
-                }
-            },
-            { "roc.Eras", rocEras },
-            { "roc.short.Eras", rocEras },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "Gy\u5e74M\u6708d\u65e5EEEE",
-                    "Gy\u5e74M\u6708d\u65e5",
-                    "Gy-M-d",
-                    "Gy-M-d",
-                }
-            },
-            { "roc.DatePatterns",
+            { "buddhist.DatePatterns",
                 new String[] {
                     "GGGGy\u5e74M\u6708d\u65e5EEEE",
                     "GGGGy\u5e74M\u6708d\u65e5",
-                    "GGGGy-M-d",
+                    "GGGGyyyy-M-d",
                     "GGGGy-M-d",
                 }
             },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "Gy\u5e74M\u6708d\u65e5EEEE",
-                    "Gy\u5e74M\u6708d\u65e5",
-                    "Gy\u5e74M\u6708d\u65e5",
-                    "Gyy-MM-dd",
-                }
-            },
-            { "islamic.DatePatterns",
+            { "japanese.DatePatterns",
                 new String[] {
                     "GGGGy\u5e74M\u6708d\u65e5EEEE",
                     "GGGGy\u5e74M\u6708d\u65e5",
@@ -256,24 +321,6 @@
                     "GGGGyy-MM-dd",
                 }
             },
-            { "calendarname.islamic-civil", "\u4f0a\u65af\u5170\u5e0c\u5409\u6765\u5386" },
-            { "calendarname.islamicc", "\u4f0a\u65af\u5170\u5e0c\u5409\u6765\u5386" },
-            { "calendarname.islamic", "\u4f0a\u65af\u5170\u65e5\u5386" },
-            { "calendarname.japanese", "\u65e5\u672c\u65e5\u5386" },
-            { "calendarname.gregorian", "\u516c\u5386" },
-            { "calendarname.gregory", "\u516c\u5386" },
-            { "calendarname.roc", "\u6c11\u56fd\u65e5\u5386" },
-            { "calendarname.buddhist", "\u4f5b\u6559\u65e5\u5386" },
-            { "field.era", "\u65f6\u671f" },
-            { "field.year", "\u5e74" },
-            { "field.month", "\u6708" },
-            { "field.week", "\u5468" },
-            { "field.weekday", "\u5468\u5929" },
-            { "field.dayperiod", "\u4e0a\u5348/\u4e0b\u5348" },
-            { "field.hour", "\u5c0f\u65f6" },
-            { "field.minute", "\u5206\u949f" },
-            { "field.second", "\u79d2\u949f" },
-            { "field.zone", "\u533a\u57df" },
         };
     }
 }
--- a/src/share/classes/sun/text/resources/zh/FormatData_zh_CN.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/zh/FormatData_zh_CN.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,11 @@
 
 package sun.text.resources.zh;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_zh_CN extends ListResourceBundle {
+public class FormatData_zh_CN extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     protected final Object[][] getContents() {
         return new Object[][] {
--- a/src/share/classes/sun/text/resources/zh/FormatData_zh_HK.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/zh/FormatData_zh_HK.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,13 +40,13 @@
 
 package sun.text.resources.zh;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 import java.util.Locale;
 import java.util.ResourceBundle;
 import sun.util.locale.provider.LocaleProviderAdapter;
 import sun.util.locale.provider.ResourceBundleBasedAdapter;
 
-public class FormatData_zh_HK extends ListResourceBundle {
+public class FormatData_zh_HK extends ParallelListResourceBundle {
 
     // reparent to zh_TW for traditional Chinese names
     public FormatData_zh_HK() {
@@ -56,7 +56,7 @@
     }
 
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     @Override
     protected final Object[][] getContents() {
--- a/src/share/classes/sun/text/resources/zh/FormatData_zh_SG.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/zh/FormatData_zh_SG.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,26 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
  */
 
 /*
@@ -38,13 +59,11 @@
  * authorization of the copyright holder.
  */
 
-// Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
-
 package sun.text.resources.zh;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_zh_SG extends ListResourceBundle {
+public class FormatData_zh_SG extends ParallelListResourceBundle {
     protected final Object[][] getContents() {
         return new Object[][] {
             { "DayAbbreviations",
--- a/src/share/classes/sun/text/resources/zh/FormatData_zh_TW.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/text/resources/zh/FormatData_zh_TW.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,11 +76,11 @@
 
 package sun.text.resources.zh;
 
-import java.util.ListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 
-public class FormatData_zh_TW extends ListResourceBundle {
+public class FormatData_zh_TW extends ParallelListResourceBundle {
     /**
-     * Overrides ListResourceBundle
+     * Overrides ParallelListResourceBundle
      */
     @Override
     protected final Object[][] getContents() {
@@ -95,6 +95,40 @@
                     "\u897f\u5143"
                 }
             },
+            { "standalone.MonthAbbreviations",
+                new String[] {
+                    "1\u6708",
+                    "2\u6708",
+                    "3\u6708",
+                    "4\u6708",
+                    "5\u6708",
+                    "6\u6708",
+                    "7\u6708",
+                    "8\u6708",
+                    "9\u6708",
+                    "10\u6708",
+                    "11\u6708",
+                    "12\u6708",
+                    "",
+                }
+            },
+            { "MonthNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                    "5",
+                    "6",
+                    "7",
+                    "8",
+                    "9",
+                    "10",
+                    "11",
+                    "12",
+                    "",
+                }
+            },
             { "NumberPatterns",
                 new String[] {
                     "#,##0.###;-#,##0.###", // decimal pattern
@@ -123,34 +157,7 @@
                     "{1} {0}" // date-time pattern
                 }
             },
-            { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
-            { "cldr.buddhist.DatePatterns",
-                new String[] {
-                    "Gy\u5e74M\u6708d\u65e5EEEE",
-                    "Gy\u5e74M\u6708d\u65e5",
-                    "Gy/M/d",
-                    "Gy/M/d",
-                }
-            },
-            { "cldr.japanese.DatePatterns",
-                new String[] {
-                    "Gy\u5e74M\u6708d\u65e5EEEE",
-                    "Gy\u5e74M\u6708d\u65e5",
-                    "Gy/M/d",
-                    "Gy/M/d",
-                }
-            },
-            { "roc.Eras", rocEras },
-            { "roc.short.Eras", rocEras },
-            { "cldr.roc.DatePatterns",
-                new String[] {
-                    "Gy\u5e74M\u6708d\u65e5EEEE",
-                    "Gy\u5e74M\u6708d\u65e5",
-                    "Gy/M/d",
-                    "Gy/M/d",
-                }
-            },
-            { "roc.DatePatterns",
+            { "buddhist.DatePatterns",
                 new String[] {
                     "GGGGy\u5e74M\u6708d\u65e5EEEE",
                     "GGGGy\u5e74M\u6708d\u65e5",
@@ -158,15 +165,7 @@
                     "GGGGy/M/d",
                 }
             },
-            { "cldr.islamic.DatePatterns",
-                new String[] {
-                    "Gy\u5e74M\u6708d\u65e5EEEE",
-                    "Gy\u5e74M\u6708d\u65e5",
-                    "Gy/M/d",
-                    "Gy/M/d",
-                }
-            },
-            { "islamic.DatePatterns",
+            { "japanese.DatePatterns",
                 new String[] {
                     "GGGGy\u5e74M\u6708d\u65e5EEEE",
                     "GGGGy\u5e74M\u6708d\u65e5",
@@ -174,23 +173,7 @@
                     "GGGGy/M/d",
                 }
             },
-            { "calendarname.islamic-civil", "\u4f0a\u65af\u862d\u57ce\u5e02\u66c6\u6cd5" },
-            { "calendarname.islamicc", "\u4f0a\u65af\u862d\u57ce\u5e02\u66c6\u6cd5" },
-            { "calendarname.islamic", "\u4f0a\u65af\u862d\u66c6\u6cd5" },
-            { "calendarname.japanese", "\u65e5\u672c\u66c6\u6cd5" },
-            { "calendarname.gregorian", "\u516c\u66c6" },
-            { "calendarname.gregory", "\u516c\u66c6" },
-            { "calendarname.roc", "\u6c11\u570b\u66c6" },
-            { "calendarname.buddhist", "\u4f5b\u6559\u66c6\u6cd5" },
-            { "field.era", "\u5e74\u4ee3" },
-            { "field.year", "\u5e74" },
-            { "field.month", "\u6708" },
-            { "field.week", "\u9031" },
-            { "field.weekday", "\u9031\u5929" },
-            { "field.dayperiod", "\u4e0a\u5348/\u4e0b\u5348" },
-            { "field.hour", "\u5c0f\u6642" },
-            { "field.minute", "\u5206\u9418" },
-            { "field.second", "\u79d2" },
+            { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
         };
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/zh/JavaTimeSupplementary_zh.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,236 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.zh;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_zh extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                new String[] {
+                    "1\u5b63",
+                    "2\u5b63",
+                    "3\u5b63",
+                    "4\u5b63",
+                }
+            },
+            { "QuarterNames",
+                new String[] {
+                    "\u7b2c1\u5b63\u5ea6",
+                    "\u7b2c2\u5b63\u5ea6",
+                    "\u7b2c3\u5b63\u5ea6",
+                    "\u7b2c4\u5b63\u5ea6",
+                }
+            },
+            { "QuarterNarrows",
+                new String[] {
+                    "1",
+                    "2",
+                    "3",
+                    "4",
+                }
+            },
+            { "calendarname.buddhist",
+                "\u4f5b\u6559\u65e5\u5386" },
+            { "calendarname.gregorian",
+                "\u516c\u5386" },
+            { "calendarname.gregory",
+                "\u516c\u5386" },
+            { "calendarname.islamic",
+                "\u4f0a\u65af\u5170\u65e5\u5386" },
+            { "calendarname.islamic-civil",
+                "\u4f0a\u65af\u5170\u5e0c\u5409\u6765\u5386" },
+            { "calendarname.islamicc",
+                "\u4f0a\u65af\u5170\u5e0c\u5409\u6765\u5386" },
+            { "calendarname.japanese",
+                "\u65e5\u672c\u65e5\u5386" },
+            { "calendarname.roc",
+                "\u6c11\u56fd\u65e5\u5386" },
+            { "field.dayperiod",
+                "\u4e0a\u5348/\u4e0b\u5348" },
+            { "field.era",
+                "\u65f6\u671f" },
+            { "field.hour",
+                "\u5c0f\u65f6" },
+            { "field.minute",
+                "\u5206\u949f" },
+            { "field.month",
+                "\u6708" },
+            { "field.second",
+                "\u79d2\u949f" },
+            { "field.week",
+                "\u5468" },
+            { "field.weekday",
+                "\u5468\u5929" },
+            { "field.year",
+                "\u5e74" },
+            { "field.zone",
+                "\u533a\u57df" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "GGGGy\u5e74M\u6708d\u65e5EEEE",
+                    "GGGGy\u5e74M\u6708d\u65e5",
+                    "GGGGy\u5e74M\u6708d\u65e5",
+                    "GGGGyy-MM-dd",
+                }
+            },
+            { "islamic.Eras",
+                new String[] {
+                    "",
+                    "\u56de\u5386",
+                }
+            },
+            { "islamic.short.Eras",
+                new String[] {
+                    "",
+                    "\u56de\u5386",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "Gy\u5e74M\u6708d\u65e5EEEE",
+                    "Gy\u5e74M\u6708d\u65e5",
+                    "Gyyyy-M-d",
+                    "Gy-M-d",
+                }
+            },
+            { "java.time.buddhist.short.Eras",
+                new String[] {
+                    "BC",
+                    "\u4f5b\u5386",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "Gy\u5e74M\u6708d\u65e5EEEE",
+                    "Gy\u5e74M\u6708d\u65e5",
+                    "Gy\u5e74M\u6708d\u65e5",
+                    "Gyy-MM-dd",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "Gy\u5e74M\u6708d\u65e5EEEE",
+                    "Gy\u5e74M\u6708d\u65e5",
+                    "Gy\u5e74M\u6708d\u65e5",
+                    "Gyy-MM-dd",
+                }
+            },
+            { "java.time.japanese.long.Eras",
+                new String[] {
+                    "\u516c\u5143",
+                    "\u660e\u6cbb",
+                    "\u5927\u6b63",
+                    "\u662d\u548c",
+                    "\u5e73\u6210",
+                }
+            },
+            { "java.time.japanese.short.Eras",
+                new String[] {
+                    "\u516c\u5143",
+                    "\u660e\u6cbb",
+                    "\u5927\u6b63",
+                    "\u662d\u548c",
+                    "\u5e73\u6210",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "Gy\u5e74M\u6708d\u65e5EEEE",
+                    "Gy\u5e74M\u6708d\u65e5",
+                    "Gy-M-d",
+                    "Gy-M-d",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\u516c\u5143\u524d",
+                    "\u516c\u5143",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "GGGGy\u5e74M\u6708d\u65e5EEEE",
+                    "GGGGy\u5e74M\u6708d\u65e5",
+                    "GGGGy-M-d",
+                    "GGGGy-M-d",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "\u6c11\u56fd\u524d",
+                    "\u6c11\u56fd",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "\u6c11\u56fd\u524d",
+                    "\u6c11\u56fd",
+                }
+            },
+        };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/text/resources/zh/JavaTimeSupplementary_zh_TW.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do so,
+ * provided that (a) the above copyright notice(s) and this permission notice
+ * appear with all copies of the Data Files or Software, (b) both the above
+ * copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall not
+ * be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written authorization
+ * of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.zh;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_zh_TW extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        return new Object[][] {
+            { "QuarterNames",
+                new String[] {
+                    "\u7b2c1\u5b63",
+                    "\u7b2c2\u5b63",
+                    "\u7b2c3\u5b63",
+                    "\u7b2c4\u5b63",
+                }
+            },
+            { "calendarname.buddhist",
+                "\u4f5b\u6559\u66c6\u6cd5" },
+            { "calendarname.gregorian",
+                "\u516c\u66c6" },
+            { "calendarname.gregory",
+                "\u516c\u66c6" },
+            { "calendarname.islamic",
+                "\u4f0a\u65af\u862d\u66c6\u6cd5" },
+            { "calendarname.islamic-civil",
+                "\u4f0a\u65af\u862d\u57ce\u5e02\u66c6\u6cd5" },
+            { "calendarname.islamicc",
+                "\u4f0a\u65af\u862d\u57ce\u5e02\u66c6\u6cd5" },
+            { "calendarname.japanese",
+                "\u65e5\u672c\u66c6\u6cd5" },
+            { "calendarname.roc",
+                "\u6c11\u570b\u66c6" },
+            { "field.dayperiod",
+                "\u4e0a\u5348/\u4e0b\u5348" },
+            { "field.era",
+                "\u5e74\u4ee3" },
+            { "field.hour",
+                "\u5c0f\u6642" },
+            { "field.minute",
+                "\u5206\u9418" },
+            { "field.month",
+                "\u6708" },
+            { "field.second",
+                "\u79d2" },
+            { "field.week",
+                "\u9031" },
+            { "field.weekday",
+                "\u9031\u5929" },
+            { "field.year",
+                "\u5e74" },
+            { "field.zone",
+                "\u6642\u5340" },
+            { "islamic.DatePatterns",
+                new String[] {
+                    "GGGGy\u5e74M\u6708d\u65e5EEEE",
+                    "GGGGy\u5e74M\u6708d\u65e5",
+                    "GGGGy/M/d",
+                    "GGGGy/M/d",
+                }
+            },
+            { "islamic.MonthNames",
+                new String[] {
+                    "\u7a46\u54c8\u862d\u59c6\u6708",
+                    "\u8272\u6cd5\u723e\u6708",
+                    "\u8cf4\u6bd4\u6708 I",
+                    "\u8cf4\u6bd4\u6708 II",
+                    "\u4e3b\u99ac\u9054\u6708 I",
+                    "\u4e3b\u99ac\u9054\u6708 II",
+                    "\u8cf4\u54f2\u535c\u6708",
+                    "\u820d\u723e\u90a6\u6708",
+                    "\u8cf4\u8cb7\u4e39\u6708",
+                    "\u9583\u74e6\u9b6f\u6708",
+                    "\u90fd\u723e\u5580\u723e\u5fb7\u6708",
+                    "\u90fd\u723e\u9ed1\u54f2\u6708",
+                    "",
+                }
+            },
+            { "java.time.buddhist.DatePatterns",
+                new String[] {
+                    "Gy\u5e74M\u6708d\u65e5EEEE",
+                    "Gy\u5e74M\u6708d\u65e5",
+                    "Gy/M/d",
+                    "Gy/M/d",
+                }
+            },
+            { "java.time.buddhist.short.Eras",
+                new String[] {
+                    "BC",
+                    "\u4f5b\u66c6",
+                }
+            },
+            { "java.time.islamic.DatePatterns",
+                new String[] {
+                    "Gy\u5e74M\u6708d\u65e5EEEE",
+                    "Gy\u5e74M\u6708d\u65e5",
+                    "Gy/M/d",
+                    "Gy/M/d",
+                }
+            },
+            { "java.time.japanese.DatePatterns",
+                new String[] {
+                    "Gy\u5e74M\u6708d\u65e5EEEE",
+                    "Gy\u5e74M\u6708d\u65e5",
+                    "Gy/M/d",
+                    "Gy/M/d",
+                }
+            },
+            { "java.time.japanese.long.Eras",
+                new String[] {
+                    "\u897f\u5143",
+                    "\u660e\u6cbb",
+                    "\u5927\u6b63",
+                    "\u662d\u548c",
+                    "\u5e73\u6210",
+                }
+            },
+            { "java.time.japanese.short.Eras",
+                new String[] {
+                    "\u897f\u5143",
+                    "\u660e\u6cbb",
+                    "\u5927\u6b63",
+                    "\u662d\u548c",
+                    "\u5e73\u6210",
+                }
+            },
+            { "java.time.roc.DatePatterns",
+                new String[] {
+                    "Gy\u5e74M\u6708d\u65e5EEEE",
+                    "Gy\u5e74M\u6708d\u65e5",
+                    "Gy/M/d",
+                    "Gy/M/d",
+                }
+            },
+            { "java.time.short.Eras",
+                new String[] {
+                    "\u897f\u5143\u524d",
+                    "\u897f\u5143",
+                }
+            },
+            { "roc.DatePatterns",
+                new String[] {
+                    "GGGGy\u5e74M\u6708d\u65e5EEEE",
+                    "GGGGy\u5e74M\u6708d\u65e5",
+                    "GGGGy/M/d",
+                    "GGGGy/M/d",
+                }
+            },
+            { "roc.Eras",
+                new String[] {
+                    "\u6c11\u570b\u524d",
+                    "\u6c11\u570b",
+                }
+            },
+            { "roc.short.Eras",
+                new String[] {
+                    "\u6c11\u570b\u524d",
+                    "\u6c11\u570b",
+                }
+            },
+        };
+    }
+}
--- a/src/share/classes/sun/tools/java/BinaryConstantPool.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/tools/java/BinaryConstantPool.java	Wed Apr 17 21:48:04 2013 -0700
@@ -87,6 +87,16 @@
                 cpool[i] = new Integer((in.readUnsignedShort() << 16) | in.readUnsignedShort());
                 break;
 
+              case CONSTANT_METHODHANDLE:
+                cpool[i] = readBytes(in, 3);
+                break;
+              case CONSTANT_METHODTYPE:
+                cpool[i] = readBytes(in, 2);
+                break;
+              case CONSTANT_INVOKEDYNAMIC:
+                cpool[i] = readBytes(in, 4);
+                break;
+
               case 0:
               default:
                 throw new ClassFormatError("invalid constant type: " + (int)types[i]);
@@ -94,6 +104,12 @@
         }
     }
 
+    private byte[] readBytes(DataInputStream in, int cnt) throws IOException {
+        byte[] b = new byte[cnt];
+        in.readFully(b);
+        return b;
+    }
+
     /**
      * get a integer
      */
@@ -160,6 +176,9 @@
             case CONSTANT_FLOAT:
             case CONSTANT_LONG:
             case CONSTANT_DOUBLE:
+            case CONSTANT_METHODHANDLE:
+            case CONSTANT_METHODTYPE:
+            case CONSTANT_INVOKEDYNAMIC:
                 return getValue(n);
 
             case CONSTANT_CLASS:
@@ -312,6 +331,11 @@
                     out.writeShort(value & 0xFFFF);
                     break;
                 }
+                case CONSTANT_METHODHANDLE:
+                case CONSTANT_METHODTYPE:
+                case CONSTANT_INVOKEDYNAMIC:
+                    out.write((byte[])x, 0, ((byte[])x).length);
+                    break;
                 default:
                      throw new ClassFormatError("invalid constant type: "
                                                    + (int)types[i]);
--- a/src/share/classes/sun/tools/java/RuntimeConstants.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/tools/java/RuntimeConstants.java	Wed Apr 17 21:48:04 2013 -0700
@@ -87,6 +87,9 @@
     int CONSTANT_METHOD              = 10;
     int CONSTANT_INTERFACEMETHOD     = 11;
     int CONSTANT_NAMEANDTYPE         = 12;
+    int CONSTANT_METHODHANDLE        = 15;
+    int CONSTANT_METHODTYPE          = 16;
+    int CONSTANT_INVOKEDYNAMIC       = 18;
 
     /* Access and modifier flags */
     int ACC_PUBLIC                   = 0x00000001;
--- a/src/share/classes/sun/tracing/ProviderSkeleton.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/tracing/ProviderSkeleton.java	Wed Apr 17 21:48:04 2013 -0700
@@ -130,8 +130,12 @@
      */
     @SuppressWarnings("unchecked")
     public <T extends Provider> T newProxyInstance() {
-        return (T)Proxy.newProxyInstance(providerType.getClassLoader(),
-               new Class<?>[] { providerType }, this);
+        final InvocationHandler ih = this;
+        return AccessController.doPrivileged(new PrivilegedAction<T>() {
+            public T run() {
+               return (T)Proxy.newProxyInstance(providerType.getClassLoader(),
+                   new Class<?>[] { providerType }, ih);
+            }});
     }
 
     /**
--- a/src/share/classes/sun/util/calendar/ZoneInfo.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/util/calendar/ZoneInfo.java	Wed Apr 17 21:48:04 2013 -0700
@@ -561,8 +561,7 @@
      * @return an array of time zone IDs.
      */
     public static String[] getAvailableIDs() {
-        Set<String> idSet = ZoneInfoFile.getZoneIds();
-        return idSet.toArray(new String[idSet.size()]);
+        return ZoneInfoFile.getZoneIds();
     }
 
     /**
--- a/src/share/classes/sun/util/calendar/ZoneInfoFile.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/util/calendar/ZoneInfoFile.java	Wed Apr 17 21:48:04 2013 -0700
@@ -29,21 +29,13 @@
 import java.io.DataInput;
 import java.io.DataInputStream;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.StreamCorruptedException;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import java.time.DayOfWeek;
 import java.time.LocalDateTime;
-import java.time.LocalTime;
-import java.time.Month;
-import java.time.OffsetDateTime;
 import java.time.ZoneOffset;
-import java.time.zone.ZoneRules;
-import java.time.zone.ZoneOffsetTransition;
-import java.time.zone.ZoneOffsetTransitionRule;
-import java.time.zone.ZoneOffsetTransitionRule.TimeDefinition;
-
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Calendar;
@@ -58,7 +50,7 @@
 import java.util.SimpleTimeZone;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.zip.CRC32;
-import java.util.zip.ZipFile;
+import sun.security.action.GetPropertyAction;
 
 /**
  * Loads TZDB time-zone rules for j.u.TimeZone
@@ -72,8 +64,13 @@
      *
      * @return a set of time zone IDs.
      */
-    public static Set<String> getZoneIds() {
-        return zones.keySet();
+    public static String[] getZoneIds() {
+        String[] ids = Arrays.copyOf(regions, regions.length + oldMappings.length);
+        int i = regions.length;
+        for (int j = 0; j < oldMappings.length; j++) {
+            ids[i++] = oldMappings[j][0];
+        }
+        return ids;
     }
 
     /**
@@ -86,8 +83,8 @@
      */
     public static String[] getZoneIds(int rawOffset) {
         List<String> ids = new ArrayList<>();
-        for (String id : zones.keySet()) {
-            ZoneInfo zi = getZoneInfo0(id);
+        for (String id : getZoneIds()) {
+            ZoneInfo zi = getZoneInfo(id);
             if (zi.getRawOffset() == rawOffset) {
                 ids.add(id);
             }
@@ -102,15 +99,40 @@
     }
 
     public static ZoneInfo getZoneInfo(String zoneId) {
-        if (!zones.containsKey(zoneId)) {
+        if (zoneId == null) {
             return null;
         }
-        // ZoneInfo is mutable, return the copy
+        ZoneInfo zi = getZoneInfo0(zoneId);
+        if (zi != null) {
+            zi = (ZoneInfo)zi.clone();
+            zi.setID(zoneId);
+        }
+        return zi;
+    }
 
-        ZoneInfo zi = getZoneInfo0(zoneId);
-        zi = (ZoneInfo)zi.clone();
-        zi.setID(zoneId);
-        return zi;
+    private static ZoneInfo getZoneInfo0(String zoneId) {
+        try {
+            ZoneInfo zi = zones.get(zoneId);
+            if (zi != null) {
+                return zi;
+            }
+            String zid = zoneId;
+            if (aliases.containsKey(zoneId)) {
+                zid = aliases.get(zoneId);
+            }
+            int index = Arrays.binarySearch(regions, zid);
+            if (index < 0) {
+                return null;
+            }
+            byte[] bytes = ruleArray[indices[index]];
+            DataInputStream dis = new DataInputStream(new ByteArrayInputStream(bytes));
+            zi = getZoneInfo(dis, zid);
+            zones.put(zoneId, zi);
+            return zi;
+        } catch (Exception ex) {
+            throw new RuntimeException("Invalid binary time-zone data: TZDB:" +
+                zoneId + ", version: " + versionId, ex);
+        }
     }
 
     /**
@@ -120,7 +142,7 @@
      * @return an unmodified alias mapping
      */
     public static Map<String, String> getAliasMap() {
-        return aliases;
+        return Collections.unmodifiableMap(aliases);
     }
 
     /**
@@ -143,23 +165,11 @@
     public static ZoneInfo getCustomTimeZone(String originalId, int gmtOffset) {
         String id = toCustomID(gmtOffset);
         return new ZoneInfo(id, gmtOffset);
-/*
-        ZoneInfo zi = getFromCache(id);
-        if (zi == null) {
-            zi = new ZoneInfo(id, gmtOffset);
-            zi = addToCache(id, zi);
-            if (!id.equals(originalId)) {
-                zi = addToCache(originalId, zi);
-            }
-        }
-        return (ZoneInfo) zi.clone();
-*/
     }
 
     public static String toCustomID(int gmtOffset) {
         char sign;
         int offset = gmtOffset / 60000;
-
         if (offset >= 0) {
             sign = '+';
         } else {
@@ -181,49 +191,59 @@
         return new String(buf);
     }
 
-
     ///////////////////////////////////////////////////////////
-
-    private static ZoneInfo getZoneInfo0(String zoneId) {
-        try {
-
-            Object obj = zones.get(zoneId);
-            if (obj instanceof byte[]) {
-                byte[] bytes = (byte[]) obj;
-                DataInputStream dis = new DataInputStream(new ByteArrayInputStream(bytes));
-                obj = getZoneInfo(dis, zoneId);
-                zones.put(zoneId, obj);
-            }
-            return (ZoneInfo)obj;
-        } catch (Exception ex) {
-            throw new RuntimeException("Invalid binary time-zone data: TZDB:" +
-                zoneId + ", version: " + versionId, ex);
-        }
-    }
-
     private ZoneInfoFile() {
     }
 
     private static String versionId;
-    private final static Map<String, Object> zones = new ConcurrentHashMap<>();
+    private final static Map<String, ZoneInfo> zones = new ConcurrentHashMap<>();
     private static Map<String, String> aliases = new HashMap<>();
 
+    private static byte[][] ruleArray;
+    private static String[] regions;
+    private static int[] indices;
+
     // Flag for supporting JDK backward compatible IDs, such as "EST".
     private static final boolean USE_OLDMAPPING;
 
+    private static String[][] oldMappings = new String[][] {
+        { "ACT", "Australia/Darwin" },
+        { "AET", "Australia/Sydney" },
+        { "AGT", "America/Argentina/Buenos_Aires" },
+        { "ART", "Africa/Cairo" },
+        { "AST", "America/Anchorage" },
+        { "BET", "America/Sao_Paulo" },
+        { "BST", "Asia/Dhaka" },
+        { "CAT", "Africa/Harare" },
+        { "CNT", "America/St_Johns" },
+        { "CST", "America/Chicago" },
+        { "CTT", "Asia/Shanghai" },
+        { "EAT", "Africa/Addis_Ababa" },
+        { "ECT", "Europe/Paris" },
+        { "IET", "America/Indiana/Indianapolis" },
+        { "IST", "Asia/Kolkata" },
+        { "JST", "Asia/Tokyo" },
+        { "MIT", "Pacific/Apia" },
+        { "NET", "Asia/Yerevan" },
+        { "NST", "Pacific/Auckland" },
+        { "PLT", "Asia/Karachi" },
+        { "PNT", "America/Phoenix" },
+        { "PRT", "America/Puerto_Rico" },
+        { "PST", "America/Los_Angeles" },
+        { "SST", "Pacific/Guadalcanal" },
+        { "VST", "Asia/Ho_Chi_Minh" },
+    };
+
     static {
         String oldmapping = AccessController.doPrivileged(
-            new sun.security.action.GetPropertyAction("sun.timezone.ids.oldmapping", "false")).toLowerCase(Locale.ROOT);
+            new GetPropertyAction("sun.timezone.ids.oldmapping", "false")).toLowerCase(Locale.ROOT);
         USE_OLDMAPPING = (oldmapping.equals("yes") || oldmapping.equals("true"));
         AccessController.doPrivileged(new PrivilegedAction<Object>() {
             public Object run() {
                 try {
-
                     String libDir = System.getProperty("java.home") + File.separator + "lib";
-                    File tzdbJar = new File(libDir, "tzdb.jar");
-                    try (ZipFile zf = new ZipFile(tzdbJar);
-                        DataInputStream dis = new DataInputStream(
-                            zf.getInputStream(zf.getEntry("TZDB.dat")))) {
+                    try (DataInputStream dis = new DataInputStream(
+                             new FileInputStream(new File(libDir, "tzdb.dat")))) {
                         load(dis);
                     }
                 } catch (Exception x) {
@@ -234,56 +254,14 @@
         });
     }
 
-    // Must be invoked after loading in all data
     private static void addOldMapping() {
-        String[][] oldMappings = new String[][] {
-            { "ACT", "Australia/Darwin" },
-            { "AET", "Australia/Sydney" },
-            { "AGT", "America/Argentina/Buenos_Aires" },
-            { "ART", "Africa/Cairo" },
-            { "AST", "America/Anchorage" },
-            { "BET", "America/Sao_Paulo" },
-            { "BST", "Asia/Dhaka" },
-            { "CAT", "Africa/Harare" },
-            { "CNT", "America/St_Johns" },
-            { "CST", "America/Chicago" },
-            { "CTT", "Asia/Shanghai" },
-            { "EAT", "Africa/Addis_Ababa" },
-            { "ECT", "Europe/Paris" },
-            { "IET", "America/Indiana/Indianapolis" },
-            { "IST", "Asia/Kolkata" },
-            { "JST", "Asia/Tokyo" },
-            { "MIT", "Pacific/Apia" },
-            { "NET", "Asia/Yerevan" },
-            { "NST", "Pacific/Auckland" },
-            { "PLT", "Asia/Karachi" },
-            { "PNT", "America/Phoenix" },
-            { "PRT", "America/Puerto_Rico" },
-            { "PST", "America/Los_Angeles" },
-            { "SST", "Pacific/Guadalcanal" },
-            { "VST", "Asia/Ho_Chi_Minh" },
-        };
         for (String[] alias : oldMappings) {
-            String k = alias[0];
-            String v = alias[1];
-            if (zones.containsKey(v)) {  // make sure we do have the data
-                aliases.put(k, v);
-                zones.put(k, zones.get(v));
-            }
+            aliases.put(alias[0], alias[1]);
         }
         if (USE_OLDMAPPING) {
-            if (zones.containsKey("America/New_York")) {
-                aliases.put("EST", "America/New_York");
-                zones.put("EST", zones.get("America/New_York"));
-            }
-            if (zones.containsKey("America/Denver")) {
-                aliases.put("MST", "America/Denver");
-                zones.put("MST", zones.get("America/Denver"));
-            }
-            if (zones.containsKey("Pacific/Honolulu")) {
-                aliases.put("HST", "Pacific/Honolulu");
-                zones.put("HST", zones.get("Pacific/Honolulu"));
-            }
+            aliases.put("EST", "America/New_York");
+            aliases.put("MST", "America/Denver");
+            aliases.put("HST", "Pacific/Honolulu");
         }
     }
 
@@ -316,7 +294,7 @@
         }
         // rules
         int ruleCount = dis.readShort();
-        Object[] ruleArray = new Object[ruleCount];
+        ruleArray = new byte[ruleCount][];
         for (int i = 0; i < ruleCount; i++) {
             byte[] bytes = new byte[dis.readShort()];
             dis.readFully(bytes);
@@ -325,11 +303,11 @@
         // link version-region-rules, only keep the last version, if more than one
         for (int i = 0; i < versionCount; i++) {
             regionCount = dis.readShort();
-            zones.clear();
+            regions = new String[regionCount];
+            indices = new int[regionCount];
             for (int j = 0; j < regionCount; j++) {
-                String region = regionArray[dis.readShort()];
-                Object rule = ruleArray[dis.readShort() & 0xffff];
-                zones.put(region, rule);
+                regions[j] = regionArray[dis.readShort()];
+                indices[j] = dis.readShort();
             }
         }
         // remove the following ids from the map, they
@@ -346,7 +324,6 @@
         }
         // old us time-zone names
         addOldMapping();
-        aliases = Collections.unmodifiableMap(aliases);
     }
 
     /////////////////////////Ser/////////////////////////////////
@@ -374,7 +351,7 @@
         int ruleSize = in.readByte();
         ZoneOffsetTransitionRule[] rules = new ZoneOffsetTransitionRule[ruleSize];
         for (int i = 0; i < ruleSize; i++) {
-            rules[i] = readZOTRule(in);
+            rules[i] = new ZoneOffsetTransitionRule(in);
         }
         return getZoneInfo(zoneId, stdTrans, stdOffsets, savTrans, savOffsets, rules);
     }
@@ -396,31 +373,19 @@
         }
     }
 
-    static ZoneOffsetTransitionRule readZOTRule(DataInput in) throws IOException {
-        int data = in.readInt();
-        Month month = Month.of(data >>> 28);
-        int dom = ((data & (63 << 22)) >>> 22) - 32;
-        int dowByte = (data & (7 << 19)) >>> 19;
-        DayOfWeek dow = dowByte == 0 ? null : DayOfWeek.of(dowByte);
-        int timeByte = (data & (31 << 14)) >>> 14;
-        TimeDefinition defn = TimeDefinition.values()[(data & (3 << 12)) >>> 12];
-        int stdByte = (data & (255 << 4)) >>> 4;
-        int beforeByte = (data & (3 << 2)) >>> 2;
-        int afterByte = (data & 3);
-        LocalTime time = (timeByte == 31 ? LocalTime.ofSecondOfDay(in.readInt()) : LocalTime.of(timeByte % 24, 0));
-        ZoneOffset std = (stdByte == 255 ? ZoneOffset.ofTotalSeconds(in.readInt()) : ZoneOffset.ofTotalSeconds((stdByte - 128) * 900));
-        ZoneOffset before = (beforeByte == 3 ? ZoneOffset.ofTotalSeconds(in.readInt()) : ZoneOffset.ofTotalSeconds(std.getTotalSeconds() + beforeByte * 1800));
-        ZoneOffset after = (afterByte == 3 ? ZoneOffset.ofTotalSeconds(in.readInt()) : ZoneOffset.ofTotalSeconds(std.getTotalSeconds() + afterByte * 1800));
-        return ZoneOffsetTransitionRule.of(month, dom, dow, time, timeByte == 24, defn, std, before, after);
-    }
-
     /////////////////////////ZoneRules --> ZoneInfo/////////////////////////////////
 
     // ZoneInfo starts with UTC1900
     private static final long UTC1900 = -2208988800L;
+
     // ZoneInfo ends with   UTC2037
-    private static final long UTC2037 =
-        LocalDateTime.of(2038, 1, 1, 0, 0, 0).toEpochSecond(ZoneOffset.UTC) - 1;
+    // LocalDateTime.of(2038, 1, 1, 0, 0, 0).toEpochSecond(ZoneOffset.UTC) - 1;
+    private static final long UTC2037 = 2145916799L;
+
+    // ZoneInfo has an ending entry for 2037, this need to be offset by
+    // a "rawOffset"
+    // LocalDateTime.of(2037, 1, 1, 0, 0, 0).toEpochSecond(ZoneOffset.UTC));
+    private static final long LDT2037 = 2114380800L;
 
     /* Get a ZoneInfo instance.
      *
@@ -460,15 +425,12 @@
                                        // offsets.length > 16 (4-bit index limit)
             // last year in trans table
             // It should not matter to use before or after offset for year
-            int lastyear = LocalDateTime.ofEpochSecond(
-                savingsInstantTransitions[savingsInstantTransitions.length - 1], 0,
-                ZoneOffset.ofTotalSeconds(wallOffsets[savingsInstantTransitions.length - 1])).getYear();
-            // int lastyear = savingsLocalTransitions[savingsLocalTransitions.length - 1].getYear();
-
+            int lastyear = getYear(savingsInstantTransitions[savingsInstantTransitions.length - 1],
+                                   wallOffsets[savingsInstantTransitions.length - 1]);
             int i = 0, k = 1;
             while (i < savingsInstantTransitions.length &&
                    savingsInstantTransitions[i] < UTC1900) {
-                 i++;     // skip any date before UTC1900
+                i++;     // skip any date before UTC1900
             }
             if (i < savingsInstantTransitions.length) {
                 // javazic writes the last GMT offset into index 0!
@@ -478,26 +440,27 @@
                 }
                 // ZoneInfo has a beginning entry for 1900.
                 // Only add it if this is not the only one in table
-                nOffsets = addTrans(transitions, nTrans++, offsets, nOffsets,
+                nOffsets = addTrans(transitions, nTrans++,
+                                    offsets, nOffsets,
                                     UTC1900,
                                     wallOffsets[i],
                                     getStandardOffset(standardTransitions, standardOffsets, UTC1900));
             }
+
             for (; i < savingsInstantTransitions.length; i++) {
-                //if (savingsLocalTransitions[i * 2].getYear() > LASTYEAR) {
-                if (savingsInstantTransitions[i] > UTC2037) {
+                long trans = savingsInstantTransitions[i];
+                if (trans > UTC2037) {
                     // no trans beyond LASTYEAR
                     lastyear = LASTYEAR;
                     break;
                 }
-                long trans = savingsInstantTransitions[i];
                 while (k < standardTransitions.length) {
                     // some standard offset transitions don't exist in
                     // savingInstantTrans, if the offset "change" doesn't
                     // really change the "effectiveWallOffset". For example
                     // the 1999/2000 pair in Zone Arg/Buenos_Aires, in which
                     // the daylightsaving "happened" but it actually does
-                    //  not result in the timezone switch. ZoneInfo however
+                    // not result in the timezone switch. ZoneInfo however
                     // needs them in its transitions table
                     long trans_s = standardTransitions[k];
                     if (trans_s >= UTC1900) {
@@ -514,6 +477,7 @@
                                                 trans_s,
                                                 wallOffsets[i],
                                                 standardOffsets[k+1]);
+
                         }
                     }
                     k++;
@@ -528,6 +492,7 @@
                                     trans,
                                     wallOffsets[i + 1],
                                     getStandardOffset(standardTransitions, standardOffsets, trans));
+
             }
             // append any leftover standard trans
             while (k < standardTransitions.length) {
@@ -546,38 +511,35 @@
                 // fill the gap between the last trans until LASTYEAR
                 while (lastyear++ < LASTYEAR) {
                     for (ZoneOffsetTransitionRule zotr : lastRules) {
-                        ZoneOffsetTransition zot = zotr.createTransition(lastyear);
-                        //long trans = zot.getDateTimeBefore().toEpochSecond();
-                        long trans = zot.toEpochSecond();
+                        long trans = zotr.getTransitionEpochSecond(lastyear);
                         if (nOffsets + 2 >= offsets.length) {
                             offsets = Arrays.copyOf(offsets, offsets.length + 100);
                         }
                         if (nTrans + 1 >= transitions.length) {
                             transitions = Arrays.copyOf(transitions, transitions.length + 100);
                         }
-                        nOffsets = addTrans(transitions, nTrans++, offsets, nOffsets,
+                        nOffsets = addTrans(transitions, nTrans++,
+                                            offsets, nOffsets,
                                             trans,
-                                            zot.getOffsetAfter().getTotalSeconds(),
-                                            getStandardOffset(standardTransitions, standardOffsets, trans));
+                                            zotr.offsetAfter,
+                                            zotr.standardOffset);
                     }
                 }
                 ZoneOffsetTransitionRule startRule =  lastRules[lastRules.length - 2];
                 ZoneOffsetTransitionRule endRule =  lastRules[lastRules.length - 1];
                 params = new int[10];
-                if (startRule.getOffsetBefore().compareTo(startRule.getOffsetAfter()) < 0 &&
-                    endRule.getOffsetBefore().compareTo(endRule.getOffsetAfter()) > 0) {
+                if (startRule.offsetAfter - startRule.offsetBefore < 0 &&
+                    endRule.offsetAfter - endRule.offsetBefore > 0) {
                     ZoneOffsetTransitionRule tmp;
                     tmp = startRule;
                     startRule = endRule;
                     endRule = tmp;
                 }
-                params[0] = startRule.getMonth().getValue() - 1;
-                // params[1] = startRule.getDayOfMonthIndicator();
-                // params[2] = toCalendarDOW[startRule.getDayOfWeek().getValue()];
-                int       dom = startRule.getDayOfMonthIndicator();
-                DayOfWeek dow = startRule.getDayOfWeek();
-                if (dow == null) {
-                    params[1] = startRule.getDayOfMonthIndicator();
+                params[0] = startRule.month - 1;
+                int dom = startRule.dom;
+                int dow = startRule.dow;
+                if (dow == -1) {
+                    params[1] = dom;
                     params[2] = 0;
                 } else {
                     // ZoneRulesBuilder adjusts < 0 case (-1, for last, don't have
@@ -590,41 +552,38 @@
                     // "last", it works for now.
                     if (dom < 0 || dom >= 24) {
                         params[1] = -1;
-                        params[2] = toCalendarDOW[dow.getValue()];
+                        params[2] = toCalendarDOW[dow];
                     } else {
                         params[1] = dom;
                         // To specify a day of week on or after an exact day of month,
                         // set the month to an exact month value, day-of-month to the
                         // day on or after which the rule is applied, and day-of-week
                         // to a negative Calendar.DAY_OF_WEEK DAY_OF_WEEK field value.
-                        params[2] = -toCalendarDOW[dow.getValue()];
+                        params[2] = -toCalendarDOW[dow];
                     }
                 }
-                params[3] = startRule.getLocalTime().toSecondOfDay() * 1000;
-                params[4] = toSTZTime[startRule.getTimeDefinition().ordinal()];
-
-                params[5] = endRule.getMonth().getValue() - 1;
-                // params[6] = endRule.getDayOfMonthIndicator();
-                // params[7] = toCalendarDOW[endRule.getDayOfWeek().getValue()];
-                dom = endRule.getDayOfMonthIndicator();
-                dow = endRule.getDayOfWeek();
-                if (dow == null) {
+                params[3] = startRule.secondOfDay * 1000;
+                params[4] = toSTZTime[startRule.timeDefinition];
+                params[5] = endRule.month - 1;
+                dom = endRule.dom;
+                dow = endRule.dow;
+                if (dow == -1) {
                     params[6] = dom;
                     params[7] = 0;
                 } else {
                     // hacking: see comment above
                     if (dom < 0 || dom >= 24) {
                         params[6] = -1;
-                        params[7] = toCalendarDOW[dow.getValue()];
+                        params[7] = toCalendarDOW[dow];
                     } else {
                         params[6] = dom;
-                        params[7] = -toCalendarDOW[dow.getValue()];
+                        params[7] = -toCalendarDOW[dow];
                     }
                 }
-                params[8] = endRule.getLocalTime().toSecondOfDay() * 1000;
-                params[9] = toSTZTime[endRule.getTimeDefinition().ordinal()];
-                dstSavings = (startRule.getOffsetAfter().getTotalSeconds()
-                             - startRule.getOffsetBefore().getTotalSeconds()) * 1000;
+                params[8] = endRule.secondOfDay * 1000;
+                params[9] = toSTZTime[endRule.timeDefinition];
+                dstSavings = (startRule.offsetAfter - startRule.offsetBefore) * 1000;
+
                 // Note: known mismatching -> Asia/Amman
                 // ZoneInfo :      startDayOfWeek=5     <= Thursday
                 //                 startTime=86400000   <= 24 hours
@@ -638,14 +597,17 @@
             } else if (nTrans > 0) {  // only do this if there is something in table already
                 if (lastyear < LASTYEAR) {
                     // ZoneInfo has an ending entry for 2037
-                    long trans = OffsetDateTime.of(LASTYEAR, Month.JANUARY.getValue(), 1, 0, 0, 0, 0,
-                                                   ZoneOffset.ofTotalSeconds(rawOffset/1000))
-                                               .toEpochSecond();
+                    //long trans = OffsetDateTime.of(LASTYEAR, 1, 1, 0, 0, 0, 0,
+                    //                               ZoneOffset.ofTotalSeconds(rawOffset/1000))
+                    //                           .toEpochSecond();
+                    long trans = LDT2037 - rawOffset/1000;
+
                     int offsetIndex = indexOf(offsets, 0, nOffsets, rawOffset/1000);
                     if (offsetIndex == nOffsets)
                         nOffsets++;
                     transitions[nTrans++] = (trans * 1000) << TRANSITION_NSHIFT |
                                        (offsetIndex & OFFSET_MASK);
+
                 } else if (savingsInstantTransitions.length > 2) {
                     // Workaround: create the params based on the last pair for
                     // zones like Israel and Iran which have trans defined
@@ -670,40 +632,28 @@
                     long endTrans =  savingsInstantTransitions[m - 1];
                     int endOffset = wallOffsets[m - 1 + 1];
                     int endStd = getStandardOffset(standardTransitions, standardOffsets, endTrans);
-
                     if (startOffset > startStd && endOffset == endStd) {
-                        /*
-                        m = savingsLocalTransitions.length;
-                        LocalDateTime startLDT = savingsLocalTransitions[m -4];  //gap
-                        LocalDateTime endLDT = savingsLocalTransitions[m - 1];   //over
-                         */
                         // last - 1 trans
                         m = savingsInstantTransitions.length - 2;
                         ZoneOffset before = ZoneOffset.ofTotalSeconds(wallOffsets[m]);
                         ZoneOffset after = ZoneOffset.ofTotalSeconds(wallOffsets[m + 1]);
-                        ZoneOffsetTransition trans = ZoneOffsetTransition.of(
-                            LocalDateTime.ofEpochSecond(savingsInstantTransitions[m], 0, before),
-                            before,
-                            after);
+                        LocalDateTime ldt = LocalDateTime.ofEpochSecond(savingsInstantTransitions[m], 0, before);
                         LocalDateTime startLDT;
-                        if (trans.isGap()) {
-                            startLDT = trans.getDateTimeBefore();
+                        if (after.getTotalSeconds() > before.getTotalSeconds()) {  // isGap()
+                            startLDT = ldt;
                         } else {
-                            startLDT = trans.getDateTimeAfter();
+                            startLDT = ldt.plusSeconds(wallOffsets[m + 1] - wallOffsets[m]);
                         }
                         // last trans
                         m = savingsInstantTransitions.length - 1;
                         before = ZoneOffset.ofTotalSeconds(wallOffsets[m]);
                         after = ZoneOffset.ofTotalSeconds(wallOffsets[m + 1]);
-                        trans = ZoneOffsetTransition.of(
-                            LocalDateTime.ofEpochSecond(savingsInstantTransitions[m], 0, before),
-                            before,
-                            after);
+                        ldt = LocalDateTime.ofEpochSecond(savingsInstantTransitions[m], 0, before);
                         LocalDateTime endLDT;
-                        if (trans.isGap()) {
-                            endLDT = trans.getDateTimeAfter();
+                        if (after.getTotalSeconds() > before.getTotalSeconds()) {  // isGap()
+                            endLDT = ldt.plusSeconds(wallOffsets[m + 1] - wallOffsets[m]);
                         } else {
-                            endLDT = trans.getDateTimeBefore();
+                            endLDT = ldt;
                         }
                         params = new int[10];
                         params[0] = startLDT.getMonthValue() - 1;
@@ -722,14 +672,14 @@
             }
             if (transitions != null && transitions.length != nTrans) {
                 if (nTrans == 0) {
-                   transitions = null;
+                    transitions = null;
                 } else {
                     transitions = Arrays.copyOf(transitions, nTrans);
                 }
             }
             if (offsets != null && offsets.length != nOffsets) {
                 if (nOffsets == 0) {
-                   offsets = null;
+                    offsets = null;
                 } else {
                     offsets = Arrays.copyOf(offsets, nOffsets);
                 }
@@ -762,15 +712,59 @@
     private static int getStandardOffset(long[] standardTransitions,
                                          int[] standardOffsets,
                                          long epochSec) {
-        int index  = Arrays.binarySearch(standardTransitions, epochSec);
-        if (index < 0) {
-            // switch negative insert position to start of matched range
-            index = -index - 2;
+        // The size of stdOffsets is [0..9], with most are
+        // [1..4] entries , simple loop search is faster
+        //
+        // int index  = Arrays.binarySearch(standardTransitions, epochSec);
+        // if (index < 0) {
+        //    // switch negative insert position to start of matched range
+        //    index = -index - 2;
+        // }
+        // return standardOffsets[index + 1];
+        int index = 0;
+        for (; index < standardTransitions.length; index++) {
+            if (epochSec < standardTransitions[index]) {
+                break;
+            }
         }
-        return standardOffsets[index + 1];
+        return standardOffsets[index];
     }
 
-    private static int toCalendarDOW[] = new int[] {
+    static final int SECONDS_PER_DAY = 86400;
+    static final int DAYS_PER_CYCLE = 146097;
+    static final long DAYS_0000_TO_1970 = (DAYS_PER_CYCLE * 5L) - (30L * 365L + 7L);
+
+    private static int getYear(long epochSecond, int offset) {
+        long second = epochSecond + offset;  // overflow caught later
+        long epochDay = Math.floorDiv(second, SECONDS_PER_DAY);
+        long zeroDay = epochDay + DAYS_0000_TO_1970;
+        // find the march-based year
+        zeroDay -= 60;  // adjust to 0000-03-01 so leap day is at end of four year cycle
+        long adjust = 0;
+        if (zeroDay < 0) {
+            // adjust negative years to positive for calculation
+            long adjustCycles = (zeroDay + 1) / DAYS_PER_CYCLE - 1;
+            adjust = adjustCycles * 400;
+            zeroDay += -adjustCycles * DAYS_PER_CYCLE;
+        }
+        long yearEst = (400 * zeroDay + 591) / DAYS_PER_CYCLE;
+        long doyEst = zeroDay - (365 * yearEst + yearEst / 4 - yearEst / 100 + yearEst / 400);
+        if (doyEst < 0) {
+            // fix estimate
+            yearEst--;
+            doyEst = zeroDay - (365 * yearEst + yearEst / 4 - yearEst / 100 + yearEst / 400);
+        }
+        yearEst += adjust;  // reset any negative year
+        int marchDoy0 = (int) doyEst;
+        // convert march-based values back to january-based
+        int marchMonth0 = (marchDoy0 * 5 + 2) / 153;
+        int month = (marchMonth0 + 2) % 12 + 1;
+        int dom = marchDoy0 - (marchMonth0 * 306 + 5) / 10 + 1;
+        yearEst += marchMonth0 / 10;
+        return (int)yearEst;
+    }
+
+    private static final int toCalendarDOW[] = new int[] {
         -1,
         Calendar.MONDAY,
         Calendar.TUESDAY,
@@ -781,7 +775,7 @@
         Calendar.SUNDAY
     };
 
-    private static int toSTZTime[] = new int[] {
+    private static final int toSTZTime[] = new int[] {
         SimpleTimeZone.UTC_TIME,
         SimpleTimeZone.WALL_TIME,
         SimpleTimeZone.STANDARD_TIME,
@@ -823,28 +817,152 @@
         return nOffsets;
     }
 
-    /////////////////////////////////////////////////////////////
     // ZoneInfo checksum, copy/pasted from javazic
     private static class Checksum extends CRC32 {
         public void update(int val) {
             byte[] b = new byte[4];
-            b[0] = (byte)((val >>> 24) & 0xff);
-            b[1] = (byte)((val >>> 16) & 0xff);
-            b[2] = (byte)((val >>> 8) & 0xff);
-            b[3] = (byte)(val & 0xff);
+            b[0] = (byte)(val >>> 24);
+            b[1] = (byte)(val >>> 16);
+            b[2] = (byte)(val >>> 8);
+            b[3] = (byte)(val);
             update(b);
         }
         void update(long val) {
             byte[] b = new byte[8];
-            b[0] = (byte)((val >>> 56) & 0xff);
-            b[1] = (byte)((val >>> 48) & 0xff);
-            b[2] = (byte)((val >>> 40) & 0xff);
-            b[3] = (byte)((val >>> 32) & 0xff);
-            b[4] = (byte)((val >>> 24) & 0xff);
-            b[5] = (byte)((val >>> 16) & 0xff);
-            b[6] = (byte)((val >>> 8) & 0xff);
-            b[7] = (byte)(val & 0xff);
+            b[0] = (byte)(val >>> 56);
+            b[1] = (byte)(val >>> 48);
+            b[2] = (byte)(val >>> 40);
+            b[3] = (byte)(val >>> 32);
+            b[4] = (byte)(val >>> 24);
+            b[5] = (byte)(val >>> 16);
+            b[6] = (byte)(val >>> 8);
+            b[7] = (byte)(val);
             update(b);
         }
     }
+
+    // A simple/raw version of j.t.ZoneOffsetTransitionRule
+    private static class ZoneOffsetTransitionRule {
+        private final int month;
+        private final byte dom;
+        private final int dow;
+        private final int secondOfDay;
+        private final boolean timeEndOfDay;
+        private final int timeDefinition;
+        private final int standardOffset;
+        private final int offsetBefore;
+        private final int offsetAfter;
+
+        ZoneOffsetTransitionRule(DataInput in) throws IOException {
+            int data = in.readInt();
+            int dowByte = (data & (7 << 19)) >>> 19;
+            int timeByte = (data & (31 << 14)) >>> 14;
+            int stdByte = (data & (255 << 4)) >>> 4;
+            int beforeByte = (data & (3 << 2)) >>> 2;
+            int afterByte = (data & 3);
+
+            this.month = data >>> 28;
+            this.dom = (byte)(((data & (63 << 22)) >>> 22) - 32);
+            this.dow = dowByte == 0 ? -1 : dowByte;
+            this.secondOfDay = timeByte == 31 ? in.readInt() : timeByte * 3600;
+            this.timeEndOfDay = timeByte == 24;
+            this.timeDefinition = (data & (3 << 12)) >>> 12;
+
+            this.standardOffset = stdByte == 255 ? in.readInt() : (stdByte - 128) * 900;
+            this.offsetBefore = beforeByte == 3 ? in.readInt() : standardOffset + beforeByte * 1800;
+            this.offsetAfter = afterByte == 3 ? in.readInt() : standardOffset + afterByte * 1800;
+        }
+
+        long getTransitionEpochSecond(int year) {
+            long epochDay = 0;
+            if (dom < 0) {
+                epochDay = toEpochDay(year, month, lengthOfMonth(year, month) + 1 + dom);
+                if (dow != -1) {
+                    epochDay = previousOrSame(epochDay, dow);
+                }
+            } else {
+                epochDay = toEpochDay(year, month, dom);
+                if (dow != -1) {
+                    epochDay = nextOrSame(epochDay, dow);
+                }
+            }
+            if (timeEndOfDay) {
+                epochDay += 1;
+            }
+            int difference = 0;
+            switch (timeDefinition) {
+                case 0:    // UTC
+                    difference = 0;
+                    break;
+                case 1:    // WALL
+                    difference = -offsetBefore;
+                    break;
+                case 2:    //STANDARD
+                    difference = -standardOffset;
+                    break;
+            }
+            return epochDay * 86400 + secondOfDay + difference;
+        }
+
+        static final boolean isLeapYear(int year) {
+            return ((year & 3) == 0) && ((year % 100) != 0 || (year % 400) == 0);
+        }
+
+        static final int lengthOfMonth(int year, int month) {
+            switch (month) {
+                case 2:        //FEBRUARY:
+                    return isLeapYear(year)? 29 : 28;
+                case 4:        //APRIL:
+                case 6:        //JUNE:
+                case 9:        //SEPTEMBER:
+                case 11:       //NOVEMBER:
+                    return 30;
+                default:
+                    return 31;
+            }
+        }
+
+        static final long toEpochDay(int year, int month, int day) {
+            long y = year;
+            long m = month;
+            long total = 0;
+            total += 365 * y;
+            if (y >= 0) {
+                total += (y + 3) / 4 - (y + 99) / 100 + (y + 399) / 400;
+            } else {
+                total -= y / -4 - y / -100 + y / -400;
+            }
+            total += ((367 * m - 362) / 12);
+            total += day - 1;
+            if (m > 2) {
+                total--;
+                if (!isLeapYear(year)) {
+                    total--;
+                }
+            }
+            return total - DAYS_0000_TO_1970;
+        }
+
+        static final long previousOrSame(long epochDay, int dayOfWeek) {
+            return adjust(epochDay, dayOfWeek, 1);
+        }
+
+        static final long nextOrSame(long epochDay, int dayOfWeek) {
+           return adjust(epochDay, dayOfWeek, 0);
+        }
+
+        static final long adjust(long epochDay, int dow, int relative) {
+            int calDow = (int)Math.floorMod(epochDay + 3, 7L) + 1;
+            if (relative < 2 && calDow == dow) {
+                return epochDay;
+            }
+            if ((relative & 1) == 0) {
+                int daysDiff = calDow - dow;
+                return epochDay + (daysDiff >= 0 ? 7 - daysDiff : -daysDiff);
+            } else {
+                int daysDiff = dow - calDow;
+                return epochDay - (daysDiff >= 0 ? 7 - daysDiff : -daysDiff);
+            }
+        }
+    }
 }
--- a/src/share/classes/sun/util/locale/provider/CalendarDataUtility.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/util/locale/provider/CalendarDataUtility.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -69,7 +69,7 @@
                                        field, value, style, false);
     }
 
-    public static String retrieveCldrFieldValueName(String id, int field, int value, int style, Locale locale) {
+    public static String retrieveJavaTimeFieldValueName(String id, int field, int value, int style, Locale locale) {
         LocaleServiceProviderPool pool =
                 LocaleServiceProviderPool.getPool(CalendarNameProvider.class);
         String name;
@@ -89,7 +89,7 @@
                                        normalizeCalendarType(id), field, style, false);
     }
 
-    public static Map<String, Integer> retrieveCldrFieldValueNames(String id, int field, int style, Locale locale) {
+    public static Map<String, Integer> retrieveJavaTimeFieldValueNames(String id, int field, int style, Locale locale) {
         LocaleServiceProviderPool pool =
             LocaleServiceProviderPool.getPool(CalendarNameProvider.class);
         Map<String, Integer> map;
@@ -133,14 +133,14 @@
             int field = (int) params[0];
             int value = (int) params[1];
             int style = (int) params[2];
-            boolean cldr = (boolean) params[3];
+            boolean javatime = (boolean) params[3];
 
-            // If cldr is true, resources from CLDR have precedence over JRE
+            // If javatime is true, resources from CLDR have precedence over JRE
             // native resources.
-            if (cldr && calendarNameProvider instanceof CalendarNameProviderImpl) {
+            if (javatime && calendarNameProvider instanceof CalendarNameProviderImpl) {
                 String name;
                 name = ((CalendarNameProviderImpl)calendarNameProvider)
-                        .getCldrDisplayName(requestID, field, value, style, locale);
+                        .getJavaTimeDisplayName(requestID, field, value, style, locale);
                 return name;
             }
             return calendarNameProvider.getDisplayName(requestID, field, value, style, locale);
@@ -165,14 +165,14 @@
             assert params.length == 3;
             int field = (int) params[0];
             int style = (int) params[1];
-            boolean cldr = (boolean) params[2];
+            boolean javatime = (boolean) params[2];
 
-            // If cldr is true, resources from CLDR have precedence over JRE
+            // If javatime is true, resources from CLDR have precedence over JRE
             // native resources.
-            if (cldr && calendarNameProvider instanceof CalendarNameProviderImpl) {
+            if (javatime && calendarNameProvider instanceof CalendarNameProviderImpl) {
                 Map<String, Integer> map;
                 map = ((CalendarNameProviderImpl)calendarNameProvider)
-                        .getCldrDisplayNames(requestID, field, style, locale);
+                        .getJavaTimeDisplayNames(requestID, field, style, locale);
                 return map;
             }
             return calendarNameProvider.getDisplayNames(requestID, field, style, locale);
--- a/src/share/classes/sun/util/locale/provider/CalendarNameProviderImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/util/locale/provider/CalendarNameProviderImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -53,15 +53,16 @@
         return getDisplayNameImpl(calendarType, field, value, style, locale, false);
     }
 
-    public String getCldrDisplayName(String calendarType, int field, int value, int style, Locale locale) {
+    public String getJavaTimeDisplayName(String calendarType, int field, int value, int style, Locale locale) {
         return getDisplayNameImpl(calendarType, field, value, style, locale, true);
     }
 
-    public String getDisplayNameImpl(String calendarType, int field, int value, int style, Locale locale, boolean cldr) {
+    public String getDisplayNameImpl(String calendarType, int field, int value, int style, Locale locale, boolean javatime) {
         String name = null;
-        String key = getResourceKey(calendarType, field, style, cldr);
+        String key = getResourceKey(calendarType, field, style, javatime);
         if (key != null) {
-            String[] strings = LocaleProviderAdapter.forType(type).getLocaleResources(locale).getCalendarNames(key);
+            LocaleResources lr = LocaleProviderAdapter.forType(type).getLocaleResources(locale);
+            String[] strings = javatime ? lr.getJavaTimeNames(key) : lr.getCalendarNames(key);
             if (strings != null && strings.length > 0) {
                 if (field == DAY_OF_WEEK || field == YEAR) {
                     --value;
@@ -104,18 +105,19 @@
     }
 
     // NOTE: This method should be used ONLY BY JSR 310 classes.
-    public Map<String, Integer> getCldrDisplayNames(String calendarType, int field, int style, Locale locale) {
+    public Map<String, Integer> getJavaTimeDisplayNames(String calendarType, int field, int style, Locale locale) {
         Map<String, Integer> names;
         names = getDisplayNamesImpl(calendarType, field, style, locale, true);
         return names.isEmpty() ? null : names;
     }
 
     private Map<String, Integer> getDisplayNamesImpl(String calendarType, int field,
-                                                     int style, Locale locale, boolean cldr) {
-        String key = getResourceKey(calendarType, field, style, cldr);
+                                                     int style, Locale locale, boolean javatime) {
+        String key = getResourceKey(calendarType, field, style, javatime);
         Map<String, Integer> map = new TreeMap<>(LengthBasedComparator.INSTANCE);
         if (key != null) {
-            String[] strings = LocaleProviderAdapter.forType(type).getLocaleResources(locale).getCalendarNames(key);
+            LocaleResources lr = LocaleProviderAdapter.forType(type).getLocaleResources(locale);
+            String[] strings = javatime ? lr.getJavaTimeNames(key) : lr.getCalendarNames(key);
             if (strings != null) {
                 if (!hasDuplicates(strings)) {
                     if (field == YEAR) {
@@ -220,7 +222,7 @@
         return false;
     }
 
-    private String getResourceKey(String type, int field, int style, boolean cldr) {
+    private String getResourceKey(String type, int field, int style, boolean javatime) {
         int baseStyle = getBaseStyle(style);
         boolean isStandalone = (style != baseStyle);
 
@@ -229,9 +231,9 @@
         }
         boolean isNarrow = (baseStyle == NARROW_FORMAT);
         StringBuilder key = new StringBuilder();
-        // If cldr is true, use prefix "cldr.".
-        if (cldr) {
-            key.append("cldr.");
+        // If javatime is true, use prefix "java.time.".
+        if (javatime) {
+            key.append("java.time.");
         }
         switch (field) {
         case ERA:
@@ -245,7 +247,7 @@
                 // due to historical reasons. (JRE DateFormatSymbols.getEras returns
                 // abbreviations while other getShort*() return abbreviations.)
                 if (this.type == LocaleProviderAdapter.Type.JRE) {
-                    if (cldr) {
+                    if (javatime) {
                         if (baseStyle == LONG) {
                             key.append("long.");
                         }
@@ -253,7 +255,7 @@
                     if (baseStyle == SHORT) {
                         key.append("short.");
                     }
-                } else { // CLDR
+                } else { // this.type == LocaleProviderAdapter.Type.CLDR
                     if (baseStyle == LONG) {
                         key.append("long.");
                     }
--- a/src/share/classes/sun/util/locale/provider/LocaleResources.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/util/locale/provider/LocaleResources.java	Wed Apr 17 21:48:04 2013 -0700
@@ -54,6 +54,7 @@
 import sun.util.calendar.ZoneInfo;
 import sun.util.resources.LocaleData;
 import sun.util.resources.OpenListResourceBundle;
+import sun.util.resources.ParallelListResourceBundle;
 import sun.util.resources.TimeZoneNamesBundle;
 
 /**
@@ -331,6 +332,25 @@
         return names;
     }
 
+    String[] getJavaTimeNames(String key) {
+        String[] names = null;
+        String cacheKey = CALENDAR_NAMES + key;
+
+        removeEmptyReferences();
+        ResourceReference data = cache.get(cacheKey);
+
+        if (data == null || ((names = (String[]) data.get()) == null)) {
+            ResourceBundle rb = getJavaTimeFormatData();
+            if (rb.containsKey(key)) {
+                names = rb.getStringArray(key);
+                cache.put(cacheKey,
+                          new ResourceReference(cacheKey, (Object) names, referenceQueue));
+            }
+        }
+
+        return names;
+    }
+
     public String getDateTimePattern(int timeStyle, int dateStyle, Calendar cal) {
         if (cal == null) {
             cal = Calendar.getInstance(locale);
@@ -347,10 +367,10 @@
      * @param calType   the calendar type for the pattern
      * @return the pattern string
      */
-    public String getCldrDateTimePattern(int timeStyle, int dateStyle, String calType) {
+    public String getJavaTimeDateTimePattern(int timeStyle, int dateStyle, String calType) {
         calType = CalendarDataUtility.normalizeCalendarType(calType);
         String pattern;
-        pattern = getDateTimePattern("cldr.", timeStyle, dateStyle, calType);
+        pattern = getDateTimePattern("java.time.", timeStyle, dateStyle, calType);
         if (pattern == null) {
             pattern = getDateTimePattern(null, timeStyle, dateStyle, calType);
         }
@@ -430,8 +450,12 @@
      * The FormatData should be used only for accessing extra
      * resources required by JSR 310.
      */
-    public ResourceBundle getFormatData() {
-        return localeData.getDateFormatData(locale);
+    public ResourceBundle getJavaTimeFormatData() {
+        ResourceBundle rb = localeData.getDateFormatData(locale);
+        if (rb instanceof ParallelListResourceBundle) {
+            localeData.setSupplementary((ParallelListResourceBundle) rb);
+        }
+        return rb;
     }
 
     private String getDateTimePattern(String prefix, String key, int styleIndex, String calendarType) {
@@ -451,7 +475,7 @@
         Object value = NULLOBJECT;
 
         if (data == null || ((value = data.get()) == null)) {
-            ResourceBundle r = localeData.getDateFormatData(locale);
+            ResourceBundle r = (prefix != null) ? getJavaTimeFormatData() : localeData.getDateFormatData(locale);
             if (r.containsKey(resourceKey)) {
                 value = r.getStringArray(resourceKey);
             } else {
--- a/src/share/classes/sun/util/resources/LocaleData.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/util/resources/LocaleData.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,9 +42,11 @@
 
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
+import java.util.MissingResourceException;
 import java.util.ResourceBundle;
 import sun.util.locale.provider.LocaleDataMetaInfo;
 import sun.util.locale.provider.LocaleProviderAdapter;
@@ -122,6 +124,30 @@
         return getBundle(type.getTextResourcesPackage() + ".FormatData", locale);
     }
 
+    public void setSupplementary(ParallelListResourceBundle formatData) {
+        if (!formatData.areParallelContentsComplete()) {
+            String suppName = type.getTextResourcesPackage() + ".JavaTimeSupplementary";
+            setSupplementary(suppName, formatData);
+        }
+    }
+
+    private boolean setSupplementary(String suppName, ParallelListResourceBundle formatData) {
+        ParallelListResourceBundle parent = (ParallelListResourceBundle) formatData.getParent();
+        boolean resetKeySet = false;
+        if (parent != null) {
+            resetKeySet = setSupplementary(suppName, parent);
+        }
+        OpenListResourceBundle supp = getSupplementary(suppName, formatData.getLocale());
+        formatData.setParallelContents(supp);
+        resetKeySet |= supp != null;
+        // If any parents or this bundle has parallel data, reset keyset to create
+        // a new keyset with the data.
+        if (resetKeySet) {
+            formatData.resetKeySet();
+        }
+        return resetKeySet;
+    }
+
     /**
      * Gets a number format data resource bundle, using privileges
      * to allow accessing a sun.* package.
@@ -132,22 +158,37 @@
 
     public static ResourceBundle getBundle(final String baseName, final Locale locale) {
         return AccessController.doPrivileged(new PrivilegedAction<ResourceBundle>() {
-                @Override
-                public ResourceBundle run() {
-                    return ResourceBundle.
-                        getBundle(baseName, locale,
-                                  LocaleDataResourceBundleControl.getRBControlInstance());
-                }
-            });
+            @Override
+            public ResourceBundle run() {
+                return ResourceBundle
+                        .getBundle(baseName, locale, LocaleDataResourceBundleControl.INSTANCE);
+            }
+        });
+    }
+
+    private static OpenListResourceBundle getSupplementary(final String baseName, final Locale locale) {
+        return AccessController.doPrivileged(new PrivilegedAction<OpenListResourceBundle>() {
+           @Override
+           public OpenListResourceBundle run() {
+               OpenListResourceBundle rb = null;
+               try {
+                   rb = (OpenListResourceBundle) ResourceBundle.getBundle(baseName,
+                           locale, SupplementaryResourceBundleControl.INSTANCE);
+
+               } catch (MissingResourceException e) {
+                   // return null if no supplementary is available
+               }
+               return rb;
+           }
+        });
     }
 
     private static class LocaleDataResourceBundleControl extends ResourceBundle.Control {
         /* Singlton instance of ResourceBundle.Control. */
-        private static LocaleDataResourceBundleControl rbControlInstance =
+        private static final LocaleDataResourceBundleControl INSTANCE =
             new LocaleDataResourceBundleControl();
 
-        public static LocaleDataResourceBundleControl getRBControlInstance() {
-            return rbControlInstance;
+        private LocaleDataResourceBundleControl() {
         }
 
         /*
@@ -243,6 +284,25 @@
             }
             return super.toBundleName(newBaseName, locale);
         }
+    }
 
+    private static class SupplementaryResourceBundleControl extends LocaleDataResourceBundleControl {
+        private static final SupplementaryResourceBundleControl INSTANCE =
+                new SupplementaryResourceBundleControl();
+
+        private SupplementaryResourceBundleControl() {
+        }
+
+        @Override
+        public List<Locale> getCandidateLocales(String baseName, Locale locale) {
+            // Specifiy only the given locale
+            return Arrays.asList(locale);
+        }
+
+        @Override
+        public long getTimeToLive(String baseName, Locale locale) {
+            assert baseName.contains("JavaTimeSupplementary");
+            return TTL_DONT_CACHE;
+        }
     }
 }
--- a/src/share/classes/sun/util/resources/OpenListResourceBundle.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/classes/sun/util/resources/OpenListResourceBundle.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -68,7 +68,7 @@
 
     // Implements java.util.ResourceBundle.handleGetObject; inherits javadoc specification.
     @Override
-    public Object handleGetObject(String key) {
+    protected Object handleGetObject(String key) {
         if (key == null) {
             throw new NullPointerException();
         }
@@ -82,18 +82,18 @@
      */
     @Override
     public Enumeration<String> getKeys() {
-        ResourceBundle parent = this.parent;
-        return new ResourceBundleEnumeration(handleGetKeys(),
-                (parent != null) ? parent.getKeys() : null);
-    }
+        ResourceBundle parentBundle = this.parent;
+        return new ResourceBundleEnumeration(handleKeySet(),
+                (parentBundle != null) ? parentBundle.getKeys() : null);
+     }
 
     /**
      * Returns a set of keys provided in this resource bundle,
      * including no parents.
      */
-    public Set<String> handleGetKeys() {
+    @Override
+    protected Set<String> handleKeySet() {
         loadLookupTablesIfNecessary();
-
         return lookup.keySet();
     }
 
@@ -103,7 +103,7 @@
             return keyset;
         }
         Set<String> ks = createSet();
-        ks.addAll(handleGetKeys());
+        ks.addAll(handleKeySet());
         if (parent != null) {
             ks.addAll(parent.keySet());
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/sun/util/resources/ParallelListResourceBundle.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,259 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.util.resources;
+
+import java.util.AbstractSet;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+import java.util.ResourceBundle;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.atomic.AtomicMarkableReference;
+
+/**
+ * ParallelListResourceBundle is another variant of ListResourceBundle
+ * supporting "parallel" contents provided by another resource bundle
+ * (OpenListResourceBundle). Parallel contents, if any, are added into this
+ * bundle on demand.
+ *
+ * @author Masayoshi Okutsu
+ */
+public abstract class ParallelListResourceBundle extends ResourceBundle {
+    private volatile ConcurrentMap<String, Object> lookup;
+    private volatile Set<String> keyset;
+    private final AtomicMarkableReference<Object[][]> parallelContents
+            = new AtomicMarkableReference<>(null, false);
+
+    /**
+     * Sole constructor.  (For invocation by subclass constructors, typically
+     * implicit.)
+     */
+    protected ParallelListResourceBundle() {
+    }
+
+    /**
+     * Returns an array in which each item is a pair of objects in an
+     * Object array. The first element of each pair is the key, which
+     * must be a String, and the second element is the value
+     * associated with that key. See the class description for
+     * details.
+     *
+     * @return an array of an Object array representing a key-value pair.
+     */
+    protected abstract Object[][] getContents();
+
+    /**
+     * Returns the parent of this resource bundle or null if there's no parent.
+     *
+     * @return the parent or null if no parent
+     */
+    ResourceBundle getParent() {
+        return parent;
+    }
+
+    /**
+     * Sets the parallel contents to the data given by rb. If rb is null, this
+     * bundle will be marked as `complete'.
+     *
+     * @param rb an OpenResourceBundle for parallel contents, or null indicating
+     * there are no parallel contents for this bundle
+     */
+    public void setParallelContents(OpenListResourceBundle rb) {
+        if (rb == null) {
+            parallelContents.compareAndSet(null, null, false, true);
+        } else {
+            parallelContents.compareAndSet(null, rb.getContents(), false, false);
+        }
+    }
+
+    /**
+     * Returns true if any parallel contents have been set or if this bundle is
+     * marked as complete.
+     *
+     * @return true if any parallel contents have been processed
+     */
+    boolean areParallelContentsComplete() {
+        // Quick check for `complete'
+        if (parallelContents.isMarked()) {
+            return true;
+        }
+        boolean[] done = new boolean[1];
+        Object[][] data = parallelContents.get(done);
+        return data != null || done[0];
+    }
+
+    @Override
+    protected Object handleGetObject(String key) {
+        if (key == null) {
+            throw new NullPointerException();
+        }
+
+        loadLookupTablesIfNecessary();
+        return lookup.get(key);
+    }
+
+    @Override
+    public Enumeration<String> getKeys() {
+        return Collections.enumeration(keySet());
+    }
+
+    @Override
+    public boolean containsKey(String key) {
+        return keySet().contains(key);
+    }
+
+    @Override
+    protected Set<String> handleKeySet() {
+        loadLookupTablesIfNecessary();
+        return lookup.keySet();
+    }
+
+    @Override
+    @SuppressWarnings("UnusedAssignment")
+    public Set<String> keySet() {
+        Set<String> ks;
+        while ((ks = keyset) == null) {
+            ks = new KeySet(handleKeySet(), parent);
+            synchronized (this) {
+                if (keyset == null) {
+                    keyset = ks;
+                }
+            }
+        }
+        return ks;
+    }
+
+    /**
+     * Discards any cached keyset value. This method is called from
+     * LocaleData for re-creating a KeySet.
+     */
+    synchronized void resetKeySet() {
+        keyset = null;
+    }
+
+    /**
+     * Loads the lookup table if they haven't been loaded already.
+     */
+    void loadLookupTablesIfNecessary() {
+        ConcurrentMap<String, Object> map = lookup;
+        if (map == null) {
+            map = new ConcurrentHashMap<>();
+            for (Object[] item : getContents()) {
+                map.put((String) item[0], item[1]);
+            }
+        }
+
+        // If there's any parallel contents data, merge the data into map.
+        Object[][] data = parallelContents.getReference();
+        if (data != null) {
+            for (Object[] item : data) {
+                map.putIfAbsent((String) item[0], item[1]);
+            }
+            parallelContents.set(null, true);
+        }
+        if (lookup == null) {
+            synchronized (this) {
+                if (lookup == null) {
+                    lookup = map;
+                }
+            }
+        }
+    }
+
+    /**
+     * This class implements the Set interface for
+     * ParallelListResourceBundle methods.
+     */
+    private static class KeySet extends AbstractSet<String> {
+        private final Set<String> set;
+        private final ResourceBundle parent;
+
+        private KeySet(Set<String> set, ResourceBundle parent) {
+            this.set = set;
+            this.parent = parent;
+        }
+
+        @Override
+        public boolean contains(Object o) {
+            if (set.contains(o)) {
+                return true;
+            }
+            return (parent != null) ? parent.containsKey((String) o) : false;
+        }
+
+        @Override
+        public Iterator<String> iterator() {
+            if (parent == null) {
+                return set.iterator();
+            }
+            return new Iterator<String>() {
+                private Iterator<String> itr = set.iterator();
+                private boolean usingParent;
+
+                @Override
+                public boolean hasNext() {
+                    if (itr.hasNext()) {
+                        return true;
+                    }
+                    if (!usingParent) {
+                        Set<String> nextset = new HashSet<>(parent.keySet());
+                        nextset.removeAll(set);
+                        itr = nextset.iterator();
+                        usingParent = true;
+                    }
+                    return itr.hasNext();
+                }
+
+                @Override
+                public String next() {
+                    if (hasNext()) {
+                        return itr.next();
+                    }
+                    throw new NoSuchElementException();
+                }
+
+                @Override
+                public void remove() {
+                    throw new UnsupportedOperationException();
+                }
+            };
+        }
+
+        @Override
+        public int size() {
+            if (parent == null) {
+                return set.size();
+            }
+            Set<String> allset = new HashSet<>(set);
+            allset.addAll(parent.keySet());
+            return allset.size();
+        }
+    }
+}
--- a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java	Wed Apr 17 21:48:04 2013 -0700
@@ -466,7 +466,10 @@
             if (eSrc.type == Entry.NEW || eSrc.type == Entry.FILECH)
             {
                 u.type = eSrc.type;    // make it the same type
-                if (!deletesrc) {      // if it's not "rename", just take the data
+                if (deletesrc) {       // if it's a "rename", take the data
+                    u.bytes = eSrc.bytes;
+                    u.file = eSrc.file;
+                } else {               // if it's not "rename", copy the data
                     if (eSrc.bytes != null)
                         u.bytes = Arrays.copyOf(eSrc.bytes, eSrc.bytes.length);
                     else if (eSrc.file != null) {
@@ -1118,7 +1121,7 @@
             if (old != null) {
                 removeFromTree(old);
             }
-            if (e.type == Entry.NEW || e.type == Entry.FILECH) {
+            if (e.type == Entry.NEW || e.type == Entry.FILECH || e.type == Entry.COPY) {
                 IndexNode parent = inodes.get(LOOKUPKEY.as(getParent(e.name)));
                 e.sibling = parent.child;
                 parent.child = e;
@@ -2326,12 +2329,12 @@
     private void removeFromTree(IndexNode inode) {
         IndexNode parent = inodes.get(LOOKUPKEY.as(getParent(inode.name)));
         IndexNode child = parent.child;
-        if (child == inode) {
+        if (child.equals(inode)) {
             parent.child = child.sibling;
         } else {
             IndexNode last = child;
             while ((child = child.sibling) != null) {
-                if (child == inode) {
+                if (child.equals(inode)) {
                     last.sibling = child.sibling;
                     break;
                 } else {
--- a/src/share/javavm/export/jvm.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/javavm/export/jvm.h	Wed Apr 17 21:48:04 2013 -0700
@@ -350,16 +350,21 @@
 /*
  * java.lang.Class and java.lang.ClassLoader
  */
+
+#define JVM_DEPTH -1
+
 /*
- * Returns the class in which the code invoking the native method
- * belongs.
+ * Returns the immediate caller class of the native method invoking
+ * JVM_GetCallerClass.  The Method.invoke and other frames due to
+ * reflection machinery are skipped.
  *
- * Note that in JDK 1.1, native methods did not create a frame.
- * In 1.2, they do. Therefore native methods like Class.forName
- * can no longer look at the current frame for the caller class.
+ * The depth parameter must be -1 (JVM_DEPTH). The caller is expected
+ * to be marked with sun.reflect.CallerSensitive.  The JVM will throw
+ * an error if it is not marked propertly.
  */
 JNIEXPORT jclass JNICALL
-JVM_GetCallerClass(JNIEnv *env, int n);
+JVM_GetCallerClass(JNIEnv *env, int depth);
+
 
 /*
  * Find primitive classes
--- a/src/share/lib/calendars.properties	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/lib/calendars.properties	Wed Apr 17 21:48:04 2013 -0700
@@ -52,3 +52,9 @@
 calendar.thai-buddhist.year-boundary: \
 	day1=4-1,since=-79302585600000; \
 	day1=1-1,since=-915148800000
+
+#
+# Hijrah calendars
+#
+calendar.hijrah.Hijrah-umalqura: hijrah-config-umalqura.properties
+calendar.hijrah.Hijrah-umalqura.type: islamic-umalqura
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/lib/hijrah-config-umalqura.properties	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,58 @@
+#
+# hijrah-config-umalqura.properties
+#
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+# This properties file defines a Hijrah calendar variant.
+#
+# Fields:
+#
+#       <version> ::= 'version' '=' <version string>
+#            <id> ::= 'id' '=' <id string>
+#          <type> ::= 'type' '=' <type string>
+#     <iso-start> ::= 'iso-start' '=' <start date in the ISO calendar>
+#          <year> ::= <yyyy> '=' <nn nn nn nn nn nn nn nn nn nn nn nn>
+#
+# version ... (Required)
+#
+# id ... (Required)
+#    Identifies the Java Chronology
+#
+# type ... (Required)
+#    Identifies the type of calendar in the standard calendar ID scheme
+# iso-start ... (Required)
+#    Specifies the corresponding ISO date to the first Hijrah day
+#    in the defined range of dates
+#
+# year ... (Required)
+#    Number of days for each month of a Hijrah year
+#    * Each line defines a year. The years must be in the chronological
+#      order and no gap is allowed.
+#    * Each line is in the form indicated above. <yyyy> is a Hijrah year and
+#      nn is the number of days for a month listed in the order of the months.
+#    * Each year must have 12 months.
+#    * Each month should be 29 or 30 days long.
+#    * There must be one or more space characters between the months.
+#
+
+# indicates the version of this definition
+version=1.8.0_1
+
+# Java chronology ID
+id=Hijrah-umalqura
+
+# Standard calendar type specification
+type=islamic-umalqura
+
+# defines the corresponding ISO date to the earliest Hijrah date
+iso-start=2010-12-07
+
+#
+# the data section; defines the dates with the number of days for each month
+#
+# Placeholder data until full Umm alQura data can be validated
+1432=29 30 30 30 29 30 29 30 29 30 29 29
+1433=30 29 30 30 29 30 30 29 30 29 30 29
+1434=29 30 29 30 29 30 30 29 30 30 29 29
+1435=30 29 30 29 30 29 30 29 30 30 29 30
--- a/src/share/lib/security/java.security-linux	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/lib/security/java.security-linux	Wed Apr 17 21:48:04 2013 -0700
@@ -76,26 +76,57 @@
 security.provider.9=sun.security.smartcardio.SunPCSC
 
 #
-# Select the source of seed data for SecureRandom. By default an
-# attempt is made to use the entropy gathering device specified by
-# the securerandom.source property. If an exception occurs when
-# accessing the URL then the traditional system/thread activity
-# algorithm is used.
+# Sun Provider SecureRandom seed source.
+#
+# Select the primary source of seed data for the "SHA1PRNG" and
+# "NativePRNG" SecureRandom implementations in the "Sun" provider.
+# (Other SecureRandom implementations might also use this property.)
+#
+# On Unix-like systems (for example, Solaris/Linux/MacOS), the
+# "NativePRNG" and "SHA1PRNG" implementations obtains seed data from
+# special device files such as file:/dev/random.
 #
-# On Solaris and Linux systems, if file:/dev/urandom is specified and it
-# exists, a special SecureRandom implementation is activated by default.
-# This "NativePRNG" reads random bytes directly from /dev/urandom.
+# On Windows systems, specifying the URLs "file:/dev/random" or
+# "file:/dev/urandom" will enable the native Microsoft CryptoAPI seeding
+# mechanism for SHA1PRNG.
+#
+# By default, an attempt is made to use the entropy gathering device
+# specified by the "securerandom.source" Security property.  If an
+# exception occurs while accessing the specified URL:
+#
+#     SHA1PRNG:
+#         the traditional system/thread activity algorithm will be used.
+#
+#     NativePRNG:
+#         a default value of /dev/random will be used.  If neither
+#         are available, the implementation will be disabled.
+#         "file" is the only currently supported protocol type.
 #
-# On Windows systems, the URLs file:/dev/random and file:/dev/urandom
-# enables use of the Microsoft CryptoAPI seed functionality.
+# The entropy gathering device can also be specified with the System
+# property "java.security.egd". For example:
+#
+#   % java -Djava.security.egd=file:/dev/random MainClass
 #
-securerandom.source=file:/dev/urandom
+# Specifying this System property will override the
+# "securerandom.source" Security property.
+#
+# In addition, if "file:/dev/random" or "file:/dev/urandom" is
+# specified, the "NativePRNG" implementation will be more preferred than
+# SHA1PRNG in the Sun provider.
 #
-# The entropy gathering device is described as a URL and can also
-# be specified with the system property "java.security.egd". For example,
-#   -Djava.security.egd=file:/dev/urandom
-# Specifying this system property will override the securerandom.source
-# setting.
+securerandom.source=file:/dev/random
+
+#
+# A list of known strong SecureRandom implementations.
+#
+# To help guide applications in selecting a suitable strong
+# java.security.SecureRandom implementation, Java distributions should
+# indicate a list of known strong implementations using the property.
+#
+# This is a comma-separated list of algorithm and/or algorithm:provider
+# entries.
+#
+securerandom.strongAlgorithms=NativePRNGBlocking:SUN
 
 #
 # Class to instantiate as the javax.security.auth.login.Configuration
@@ -146,22 +177,35 @@
 # corresponding RuntimePermission ("accessClassInPackage."+package) has
 # been granted.
 package.access=sun.,\
-               com.sun.xml.internal.bind.,\
-               com.sun.xml.internal.org.jvnet.staxex.,\
-               com.sun.xml.internal.ws.,\
+               com.sun.xml.internal.,\
                com.sun.imageio.,\
                com.sun.istack.internal.,\
                com.sun.jmx.,\
                com.sun.proxy.,\
-               com.sun.org.apache.xerces.internal.utils.,\
+               com.sun.org.apache.bcel.internal.,\
+               com.sun.org.apache.regexp.internal.,\
+               com.sun.org.apache.xerces.internal.,\
+               com.sun.org.apache.xpath.internal.,\
+               com.sun.org.apache.xalan.internal.extensions.,\
+               com.sun.org.apache.xalan.internal.lib.,\
+               com.sun.org.apache.xalan.internal.res.,\
+               com.sun.org.apache.xalan.internal.templates.,\
                com.sun.org.apache.xalan.internal.utils.,\
-               com.sun.org.glassfish.external.,\
-               com.sun.org.glassfish.gmbal.,\
+               com.sun.org.apache.xalan.internal.xslt.,\
+               com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
+               com.sun.org.apache.xalan.internal.xsltc.compiler.,\
+               com.sun.org.apache.xalan.internal.xsltc.trax.,\
+               com.sun.org.apache.xalan.internal.xsltc.util.,\
+               com.sun.org.apache.xml.internal.res.,\
+               com.sun.org.apache.xml.internal.serializer.utils.,\
+               com.sun.org.apache.xml.internal.utils.,\
+               com.sun.org.glassfish.,\
                com.oracle.xmlns.internal.,\
                com.oracle.webservices.internal.,\
-	       jdk.internal.,\
-	       jdk.nashorn.internal.,\
-	       jdk.nashorn.tools.
+               jdk.internal.,\
+               jdk.nashorn.internal.,\
+               jdk.nashorn.tools.
+
 
 #
 # List of comma-separated packages that start with or equal this string
@@ -174,22 +218,35 @@
 # checkPackageDefinition.
 #
 package.definition=sun.,\
-                   com.sun.xml.internal.bind.,\
-                   com.sun.xml.internal.org.jvnet.staxex.,\
-                   com.sun.xml.internal.ws.,\
+                   com.sun.xml.internal.,\
                    com.sun.imageio.,\
                    com.sun.istack.internal.,\
                    com.sun.jmx.,\
                    com.sun.proxy.,\
-                   com.sun.org.apache.xerces.internal.utils.,\
+                   com.sun.org.apache.bcel.internal.,\
+                   com.sun.org.apache.regexp.internal.,\
+                   com.sun.org.apache.xerces.internal.,\
+                   com.sun.org.apache.xpath.internal.,\
+                   com.sun.org.apache.xalan.internal.extensions.,\
+                   com.sun.org.apache.xalan.internal.lib.,\
+                   com.sun.org.apache.xalan.internal.res.,\
+                   com.sun.org.apache.xalan.internal.templates.,\
                    com.sun.org.apache.xalan.internal.utils.,\
-                   com.sun.org.glassfish.external.,\
-                   com.sun.org.glassfish.gmbal.,\
+                   com.sun.org.apache.xalan.internal.xslt.,\
+                   com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
+                   com.sun.org.apache.xalan.internal.xsltc.compiler.,\
+                   com.sun.org.apache.xalan.internal.xsltc.trax.,\
+                   com.sun.org.apache.xalan.internal.xsltc.util.,\
+                   com.sun.org.apache.xml.internal.res.,\
+                   com.sun.org.apache.xml.internal.serializer.utils.,\
+                   com.sun.org.apache.xml.internal.utils.,\
+                   com.sun.org.glassfish.,\
                    com.oracle.xmlns.internal.,\
                    com.oracle.webservices.internal.,\
-		   jdk.internal.,\
-		   jdk.nashorn.internal.,\
-		   jdk.nashorn.tools.
+                   jdk.internal.,\
+                   jdk.nashorn.internal.,\
+                   jdk.nashorn.tools.
+
 
 #
 # Determines whether this properties file can be appended to
--- a/src/share/lib/security/java.security-macosx	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/lib/security/java.security-macosx	Wed Apr 17 21:48:04 2013 -0700
@@ -77,26 +77,57 @@
 security.provider.10=apple.security.AppleProvider
 
 #
-# Select the source of seed data for SecureRandom. By default an
-# attempt is made to use the entropy gathering device specified by
-# the securerandom.source property. If an exception occurs when
-# accessing the URL then the traditional system/thread activity
-# algorithm is used.
+# Sun Provider SecureRandom seed source.
+#
+# Select the primary source of seed data for the "SHA1PRNG" and
+# "NativePRNG" SecureRandom implementations in the "Sun" provider.
+# (Other SecureRandom implementations might also use this property.)
+#
+# On Unix-like systems (for example, Solaris/Linux/MacOS), the
+# "NativePRNG" and "SHA1PRNG" implementations obtains seed data from
+# special device files such as file:/dev/random.
 #
-# On Solaris and Linux systems, if file:/dev/urandom is specified and it
-# exists, a special SecureRandom implementation is activated by default.
-# This "NativePRNG" reads random bytes directly from /dev/urandom.
+# On Windows systems, specifying the URLs "file:/dev/random" or
+# "file:/dev/urandom" will enable the native Microsoft CryptoAPI seeding
+# mechanism for SHA1PRNG.
+#
+# By default, an attempt is made to use the entropy gathering device
+# specified by the "securerandom.source" Security property.  If an
+# exception occurs while accessing the specified URL:
+#
+#     SHA1PRNG:
+#         the traditional system/thread activity algorithm will be used.
+#
+#     NativePRNG:
+#         a default value of /dev/random will be used.  If neither
+#         are available, the implementation will be disabled.
+#         "file" is the only currently supported protocol type.
 #
-# On Windows systems, the URLs file:/dev/random and file:/dev/urandom
-# enables use of the Microsoft CryptoAPI seed functionality.
+# The entropy gathering device can also be specified with the System
+# property "java.security.egd". For example:
+#
+#   % java -Djava.security.egd=file:/dev/random MainClass
 #
-securerandom.source=file:/dev/urandom
+# Specifying this System property will override the
+# "securerandom.source" Security property.
+#
+# In addition, if "file:/dev/random" or "file:/dev/urandom" is
+# specified, the "NativePRNG" implementation will be more preferred than
+# SHA1PRNG in the Sun provider.
 #
-# The entropy gathering device is described as a URL and can also
-# be specified with the system property "java.security.egd". For example,
-#   -Djava.security.egd=file:/dev/urandom
-# Specifying this system property will override the securerandom.source
-# setting.
+securerandom.source=file:/dev/random
+
+#
+# A list of known strong SecureRandom implementations.
+#
+# To help guide applications in selecting a suitable strong
+# java.security.SecureRandom implementation, Java distributions should
+# indicate a list of known strong implementations using the property.
+#
+# This is a comma-separated list of algorithm and/or algorithm:provider
+# entries.
+#
+securerandom.strongAlgorithms=NativePRNGBlocking:SUN
 
 #
 # Class to instantiate as the javax.security.auth.login.Configuration
@@ -147,22 +178,34 @@
 # corresponding RuntimePermission ("accessClassInPackage."+package) has
 # been granted.
 package.access=sun.,\
-               com.sun.xml.internal.bind.,\
-               com.sun.xml.internal.org.jvnet.staxex.,\
-               com.sun.xml.internal.ws.,\
+               com.sun.xml.internal.,\
                com.sun.imageio.,\
                com.sun.istack.internal.,\
                com.sun.jmx.,\
                com.sun.proxy.,\
-               com.sun.org.apache.xerces.internal.utils.,\
+               com.sun.org.apache.bcel.internal.,\
+               com.sun.org.apache.regexp.internal.,\
+               com.sun.org.apache.xerces.internal.,\
+               com.sun.org.apache.xpath.internal.,\
+               com.sun.org.apache.xalan.internal.extensions.,\
+               com.sun.org.apache.xalan.internal.lib.,\
+               com.sun.org.apache.xalan.internal.res.,\
+               com.sun.org.apache.xalan.internal.templates.,\
                com.sun.org.apache.xalan.internal.utils.,\
-               com.sun.org.glassfish.external.,\
-               com.sun.org.glassfish.gmbal.,\
+               com.sun.org.apache.xalan.internal.xslt.,\
+               com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
+               com.sun.org.apache.xalan.internal.xsltc.compiler.,\
+               com.sun.org.apache.xalan.internal.xsltc.trax.,\
+               com.sun.org.apache.xalan.internal.xsltc.util.,\
+               com.sun.org.apache.xml.internal.res.,\
+               com.sun.org.apache.xml.internal.serializer.utils.,\
+               com.sun.org.apache.xml.internal.utils.,\
+               com.sun.org.glassfish.,\
                com.oracle.xmlns.internal.,\
                com.oracle.webservices.internal.,\
-	       jdk.internal.,\
-	       jdk.nashorn.internal.,\
-	       jdk.nashorn.tools.,\
+               jdk.internal.,\
+               jdk.nashorn.internal.,\
+               jdk.nashorn.tools.,\
                apple.
 
 #
@@ -176,22 +219,34 @@
 # checkPackageDefinition.
 #
 package.definition=sun.,\
-                   com.sun.xml.internal.bind.,\
-                   com.sun.xml.internal.org.jvnet.staxex.,\
-                   com.sun.xml.internal.ws.,\
+                   com.sun.xml.internal.,\
                    com.sun.imageio.,\
                    com.sun.istack.internal.,\
                    com.sun.jmx.,\
                    com.sun.proxy.,\
-                   com.sun.org.apache.xerces.internal.utils.,\
+                   com.sun.org.apache.bcel.internal.,\
+                   com.sun.org.apache.regexp.internal.,\
+                   com.sun.org.apache.xerces.internal.,\
+                   com.sun.org.apache.xpath.internal.,\
+                   com.sun.org.apache.xalan.internal.extensions.,\
+                   com.sun.org.apache.xalan.internal.lib.,\
+                   com.sun.org.apache.xalan.internal.res.,\
+                   com.sun.org.apache.xalan.internal.templates.,\
                    com.sun.org.apache.xalan.internal.utils.,\
-                   com.sun.org.glassfish.external.,\
-                   com.sun.org.glassfish.gmbal.,\
+                   com.sun.org.apache.xalan.internal.xslt.,\
+                   com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
+                   com.sun.org.apache.xalan.internal.xsltc.compiler.,\
+                   com.sun.org.apache.xalan.internal.xsltc.trax.,\
+                   com.sun.org.apache.xalan.internal.xsltc.util.,\
+                   com.sun.org.apache.xml.internal.res.,\
+                   com.sun.org.apache.xml.internal.serializer.utils.,\
+                   com.sun.org.apache.xml.internal.utils.,\
+                   com.sun.org.glassfish.,\
                    com.oracle.xmlns.internal.,\
                    com.oracle.webservices.internal.,\
-		   jdk.internal.,\
-		   jdk.nashorn.internal.,\
-		   jdk.nashorn.tools.,\
+                   jdk.internal.,\
+                   jdk.nashorn.internal.,\
+                   jdk.nashorn.tools.,\
                    apple.
 
 #
--- a/src/share/lib/security/java.security-solaris	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/lib/security/java.security-solaris	Wed Apr 17 21:48:04 2013 -0700
@@ -78,26 +78,57 @@
 security.provider.11=sun.security.smartcardio.SunPCSC
 
 #
-# Select the source of seed data for SecureRandom. By default an
-# attempt is made to use the entropy gathering device specified by
-# the securerandom.source property. If an exception occurs when
-# accessing the URL then the traditional system/thread activity
-# algorithm is used.
+# Sun Provider SecureRandom seed source.
+#
+# Select the primary source of seed data for the "SHA1PRNG" and
+# "NativePRNG" SecureRandom implementations in the "Sun" provider.
+# (Other SecureRandom implementations might also use this property.)
+#
+# On Unix-like systems (for example, Solaris/Linux/MacOS), the
+# "NativePRNG" and "SHA1PRNG" implementations obtains seed data from
+# special device files such as file:/dev/random.
 #
-# On Solaris and Linux systems, if file:/dev/urandom is specified and it
-# exists, a special SecureRandom implementation is activated by default.
-# This "NativePRNG" reads random bytes directly from /dev/urandom.
+# On Windows systems, specifying the URLs "file:/dev/random" or
+# "file:/dev/urandom" will enable the native Microsoft CryptoAPI seeding
+# mechanism for SHA1PRNG.
+#
+# By default, an attempt is made to use the entropy gathering device
+# specified by the "securerandom.source" Security property.  If an
+# exception occurs while accessing the specified URL:
+#
+#     SHA1PRNG:
+#         the traditional system/thread activity algorithm will be used.
+#
+#     NativePRNG:
+#         a default value of /dev/random will be used.  If neither
+#         are available, the implementation will be disabled.
+#         "file" is the only currently supported protocol type.
 #
-# On Windows systems, the URLs file:/dev/random and file:/dev/urandom
-# enables use of the Microsoft CryptoAPI seed functionality.
+# The entropy gathering device can also be specified with the System
+# property "java.security.egd". For example:
+#
+#   % java -Djava.security.egd=file:/dev/random MainClass
 #
-securerandom.source=file:/dev/urandom
+# Specifying this System property will override the
+# "securerandom.source" Security property.
+#
+# In addition, if "file:/dev/random" or "file:/dev/urandom" is
+# specified, the "NativePRNG" implementation will be more preferred than
+# SHA1PRNG in the Sun provider.
 #
-# The entropy gathering device is described as a URL and can also
-# be specified with the system property "java.security.egd". For example,
-#   -Djava.security.egd=file:/dev/urandom
-# Specifying this system property will override the securerandom.source
-# setting.
+securerandom.source=file:/dev/random
+
+#
+# A list of known strong SecureRandom implementations.
+#
+# To help guide applications in selecting a suitable strong
+# java.security.SecureRandom implementation, Java distributions should
+# indicate a list of known strong implementations using the property.
+#
+# This is a comma-separated list of algorithm and/or algorithm:provider
+# entries.
+#
+securerandom.strongAlgorithms=NativePRNGBlocking:SUN
 
 #
 # Class to instantiate as the javax.security.auth.login.Configuration
@@ -148,22 +179,34 @@
 # corresponding RuntimePermission ("accessClassInPackage."+package) has
 # been granted.
 package.access=sun.,\
-               com.sun.xml.internal.bind.,\
-               com.sun.xml.internal.org.jvnet.staxex.,\
-               com.sun.xml.internal.ws.,\
+               com.sun.xml.internal.,\
                com.sun.imageio.,\
                com.sun.istack.internal.,\
                com.sun.jmx.,\
                com.sun.proxy.,\
-               com.sun.org.apache.xerces.internal.utils.,\
+               com.sun.org.apache.bcel.internal.,\
+               com.sun.org.apache.regexp.internal.,\
+               com.sun.org.apache.xerces.internal.,\
+               com.sun.org.apache.xpath.internal.,\
+               com.sun.org.apache.xalan.internal.extensions.,\
+               com.sun.org.apache.xalan.internal.lib.,\
+               com.sun.org.apache.xalan.internal.res.,\
+               com.sun.org.apache.xalan.internal.templates.,\
                com.sun.org.apache.xalan.internal.utils.,\
-               com.sun.org.glassfish.external.,\
-               com.sun.org.glassfish.gmbal.,\
+               com.sun.org.apache.xalan.internal.xslt.,\
+               com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
+               com.sun.org.apache.xalan.internal.xsltc.compiler.,\
+               com.sun.org.apache.xalan.internal.xsltc.trax.,\
+               com.sun.org.apache.xalan.internal.xsltc.util.,\
+               com.sun.org.apache.xml.internal.res.,\
+               com.sun.org.apache.xml.internal.serializer.utils.,\
+               com.sun.org.apache.xml.internal.utils.,\
+               com.sun.org.glassfish.,\
                com.oracle.xmlns.internal.,\
                com.oracle.webservices.internal.,\
-	       jdk.internal.,\
-	       jdk.nashorn.internal.,\
-	       jdk.nashorn.tools.
+               jdk.internal.,\
+               jdk.nashorn.internal.,\
+               jdk.nashorn.tools.
 
 #
 # List of comma-separated packages that start with or equal this string
@@ -176,22 +219,34 @@
 # checkPackageDefinition.
 #
 package.definition=sun.,\
-                   com.sun.xml.internal.bind.,\
-                   com.sun.xml.internal.org.jvnet.staxex.,\
-                   com.sun.xml.internal.ws.,\
+                   com.sun.xml.internal.,\
                    com.sun.imageio.,\
                    com.sun.istack.internal.,\
                    com.sun.jmx.,\
                    com.sun.proxy.,\
-                   com.sun.org.apache.xerces.internal.utils.,\
+                   com.sun.org.apache.bcel.internal.,\
+                   com.sun.org.apache.regexp.internal.,\
+                   com.sun.org.apache.xerces.internal.,\
+                   com.sun.org.apache.xpath.internal.,\
+                   com.sun.org.apache.xalan.internal.extensions.,\
+                   com.sun.org.apache.xalan.internal.lib.,\
+                   com.sun.org.apache.xalan.internal.res.,\
+                   com.sun.org.apache.xalan.internal.templates.,\
                    com.sun.org.apache.xalan.internal.utils.,\
-                   com.sun.org.glassfish.external.,\
-                   com.sun.org.glassfish.gmbal.,\
+                   com.sun.org.apache.xalan.internal.xslt.,\
+                   com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
+                   com.sun.org.apache.xalan.internal.xsltc.compiler.,\
+                   com.sun.org.apache.xalan.internal.xsltc.trax.,\
+                   com.sun.org.apache.xalan.internal.xsltc.util.,\
+                   com.sun.org.apache.xml.internal.res.,\
+                   com.sun.org.apache.xml.internal.serializer.utils.,\
+                   com.sun.org.apache.xml.internal.utils.,\
+                   com.sun.org.glassfish.,\
                    com.oracle.xmlns.internal.,\
                    com.oracle.webservices.internal.,\
-		   jdk.internal.,\
-		   jdk.nashorn.internal.,\
-		   jdk.nashorn.tools.
+                   jdk.internal.,\
+                   jdk.nashorn.internal.,\
+                   jdk.nashorn.tools.
 
 #
 # Determines whether this properties file can be appended to
@@ -429,4 +484,4 @@
 #
 # Example:
 #   jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048
-i
+
--- a/src/share/lib/security/java.security-windows	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/lib/security/java.security-windows	Wed Apr 17 21:48:04 2013 -0700
@@ -77,26 +77,57 @@
 security.provider.10=sun.security.mscapi.SunMSCAPI
 
 #
-# Select the source of seed data for SecureRandom. By default an
-# attempt is made to use the entropy gathering device specified by
-# the securerandom.source property. If an exception occurs when
-# accessing the URL then the traditional system/thread activity
-# algorithm is used.
+# Sun Provider SecureRandom seed source.
+#
+# Select the primary source of seed data for the "SHA1PRNG" and
+# "NativePRNG" SecureRandom implementations in the "Sun" provider.
+# (Other SecureRandom implementations might also use this property.)
+#
+# On Unix-like systems (for example, Solaris/Linux/MacOS), the
+# "NativePRNG" and "SHA1PRNG" implementations obtains seed data from
+# special device files such as file:/dev/random.
 #
-# On Solaris and Linux systems, if file:/dev/urandom is specified and it
-# exists, a special SecureRandom implementation is activated by default.
-# This "NativePRNG" reads random bytes directly from /dev/urandom.
+# On Windows systems, specifying the URLs "file:/dev/random" or
+# "file:/dev/urandom" will enable the native Microsoft CryptoAPI seeding
+# mechanism for SHA1PRNG.
+#
+# By default, an attempt is made to use the entropy gathering device
+# specified by the "securerandom.source" Security property.  If an
+# exception occurs while accessing the specified URL:
+#
+#     SHA1PRNG:
+#         the traditional system/thread activity algorithm will be used.
+#
+#     NativePRNG:
+#         a default value of /dev/random will be used.  If neither
+#         are available, the implementation will be disabled.
+#         "file" is the only currently supported protocol type.
 #
-# On Windows systems, the URLs file:/dev/random and file:/dev/urandom
-# enables use of the Microsoft CryptoAPI seed functionality.
+# The entropy gathering device can also be specified with the System
+# property "java.security.egd". For example:
+#
+#   % java -Djava.security.egd=file:/dev/random MainClass
 #
-securerandom.source=file:/dev/urandom
+# Specifying this System property will override the
+# "securerandom.source" Security property.
+#
+# In addition, if "file:/dev/random" or "file:/dev/urandom" is
+# specified, the "NativePRNG" implementation will be more preferred than
+# SHA1PRNG in the Sun provider.
 #
-# The entropy gathering device is described as a URL and can also
-# be specified with the system property "java.security.egd". For example,
-#   -Djava.security.egd=file:/dev/urandom
-# Specifying this system property will override the securerandom.source
-# setting.
+securerandom.source=file:/dev/random
+
+#
+# A list of known strong SecureRandom implementations.
+#
+# To help guide applications in selecting a suitable strong
+# java.security.SecureRandom implementation, Java distributions should
+# indicate a list of known strong implementations using the property.
+#
+# This is a comma-separated list of algorithm and/or algorithm:provider
+# entries.
+#
+securerandom.strongAlgorithms=Windows-PRNG:SunMSCAPI
 
 #
 # Class to instantiate as the javax.security.auth.login.Configuration
@@ -147,22 +178,35 @@
 # corresponding RuntimePermission ("accessClassInPackage."+package) has
 # been granted.
 package.access=sun.,\
-               com.sun.xml.internal.bind.,\
-               com.sun.xml.internal.org.jvnet.staxex.,\
-               com.sun.xml.internal.ws.,\
+               com.sun.xml.internal.,\
                com.sun.imageio.,\
                com.sun.istack.internal.,\
                com.sun.jmx.,\
                com.sun.proxy.,\
-               com.sun.org.apache.xerces.internal.utils.,\
+               com.sun.org.apache.bcel.internal.,\
+               com.sun.org.apache.regexp.internal.,\
+               com.sun.org.apache.xerces.internal.,\
+               com.sun.org.apache.xpath.internal.,\
+               com.sun.org.apache.xalan.internal.extensions.,\
+               com.sun.org.apache.xalan.internal.lib.,\
+               com.sun.org.apache.xalan.internal.res.,\
+               com.sun.org.apache.xalan.internal.templates.,\
                com.sun.org.apache.xalan.internal.utils.,\
-               com.sun.org.glassfish.external.,\
-               com.sun.org.glassfish.gmbal.,\
+               com.sun.org.apache.xalan.internal.xslt.,\
+               com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
+               com.sun.org.apache.xalan.internal.xsltc.compiler.,\
+               com.sun.org.apache.xalan.internal.xsltc.trax.,\
+               com.sun.org.apache.xalan.internal.xsltc.util.,\
+               com.sun.org.apache.xml.internal.res.,\
+               com.sun.org.apache.xml.internal.serializer.utils.,\
+               com.sun.org.apache.xml.internal.utils.,\
+               com.sun.org.glassfish.,\
                com.oracle.xmlns.internal.,\
                com.oracle.webservices.internal.,\
-	       jdk.internal.,\
-	       jdk.nashorn.internal.,\
-	       jdk.nashorn.tools.
+               jdk.internal.,\
+               jdk.nashorn.internal.,\
+               jdk.nashorn.tools.,\
+               com.sun.java.accessibility.
 
 #
 # List of comma-separated packages that start with or equal this string
@@ -175,22 +219,35 @@
 # checkPackageDefinition.
 #
 package.definition=sun.,\
-                   com.sun.xml.internal.bind.,\
-                   com.sun.xml.internal.org.jvnet.staxex.,\
-                   com.sun.xml.internal.ws.,\
+                   com.sun.xml.internal.,\
                    com.sun.imageio.,\
                    com.sun.istack.internal.,\
                    com.sun.jmx.,\
                    com.sun.proxy.,\
-                   com.sun.org.apache.xerces.internal.utils.,\
+                   com.sun.org.apache.bcel.internal.,\
+                   com.sun.org.apache.regexp.internal.,\
+                   com.sun.org.apache.xerces.internal.,\
+                   com.sun.org.apache.xpath.internal.,\
+                   com.sun.org.apache.xalan.internal.extensions.,\
+                   com.sun.org.apache.xalan.internal.lib.,\
+                   com.sun.org.apache.xalan.internal.res.,\
+                   com.sun.org.apache.xalan.internal.templates.,\
                    com.sun.org.apache.xalan.internal.utils.,\
-                   com.sun.org.glassfish.external.,\
-                   com.sun.org.glassfish.gmbal.,\
+                   com.sun.org.apache.xalan.internal.xslt.,\
+                   com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
+                   com.sun.org.apache.xalan.internal.xsltc.compiler.,\
+                   com.sun.org.apache.xalan.internal.xsltc.trax.,\
+                   com.sun.org.apache.xalan.internal.xsltc.util.,\
+                   com.sun.org.apache.xml.internal.res.,\
+                   com.sun.org.apache.xml.internal.serializer.utils.,\
+                   com.sun.org.apache.xml.internal.utils.,\
+                   com.sun.org.glassfish.,\
                    com.oracle.xmlns.internal.,\
                    com.oracle.webservices.internal.,\
-		   jdk.internal.,\
-		   jdk.nashorn.internal.,\
-		   jdk.nashorn.tools.
+                   jdk.internal.,\
+                   jdk.nashorn.internal.,\
+                   jdk.nashorn.tools.,\
+                   com.sun.java.accessibility.
 
 #
 # Determines whether this properties file can be appended to
--- a/src/share/native/java/lang/ClassLoader.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/java/lang/ClassLoader.c	Wed Apr 17 21:48:04 2013 -0700
@@ -492,24 +492,6 @@
     (*env)->ReleaseStringUTFChars(env, name, cname);
     return res;
 }
-
-JNIEXPORT jobject JNICALL
-Java_java_lang_ClassLoader_getCaller(JNIEnv *env, jclass cls, jint index)
-{
-    jobjectArray jcallerStack;
-    int len;
-
-    jcallerStack = JVM_GetClassContext(env);
-    if ((*env)->ExceptionCheck(env)) {
-        return NULL;
-    }
-    len = (*env)->GetArrayLength(env, jcallerStack);
-    if (index < len) {
-        return (*env)->GetObjectArrayElement(env, jcallerStack, index);
-    }
-    return NULL;
-}
-
 /*
  * Class:     java_lang_ClassLoader_NativeLibrary
  * Method:    findBuiltinLib
--- a/src/share/native/java/lang/ResourceBundle.c	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1997, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "jni.h"
-#include "jvm.h"
-
-#include "java_util_ResourceBundle.h"
-
-JNIEXPORT jobjectArray JNICALL
-Java_java_util_ResourceBundle_getClassContext(JNIEnv *env, jobject this)
-{
-    return JVM_GetClassContext(env);
-}
--- a/src/share/native/java/lang/SecurityManager.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/java/lang/SecurityManager.c	Wed Apr 17 21:48:04 2013 -0700
@@ -29,7 +29,6 @@
 
 #include "java_lang_SecurityManager.h"
 #include "java_lang_ClassLoader.h"
-#include "java_util_ResourceBundle.h"
 
 /*
  * Make sure a security manager instance is initialized.
--- a/src/share/native/java/net/InetAddress.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/java/net/InetAddress.c	Wed Apr 17 21:48:04 2013 -0700
@@ -33,8 +33,11 @@
  */
 
 jclass ia_class;
-jfieldID ia_addressID;
-jfieldID ia_familyID;
+jclass iac_class;
+jfieldID ia_holderID;
+jfieldID iac_addressID;
+jfieldID iac_familyID;
+jfieldID iac_hostNameID;
 jfieldID ia_preferIPv6AddressID;
 
 /*
@@ -48,10 +51,18 @@
     CHECK_NULL(c);
     ia_class = (*env)->NewGlobalRef(env, c);
     CHECK_NULL(ia_class);
-    ia_addressID = (*env)->GetFieldID(env, ia_class, "address", "I");
-    CHECK_NULL(ia_addressID);
-    ia_familyID = (*env)->GetFieldID(env, ia_class, "family", "I");
-    CHECK_NULL(ia_familyID);
+    c = (*env)->FindClass(env,"java/net/InetAddress$InetAddressHolder");
+    CHECK_NULL(c);
+    iac_class = (*env)->NewGlobalRef(env, c);
+    ia_holderID = (*env)->GetFieldID(env, ia_class, "holder", "Ljava/net/InetAddress$InetAddressHolder;");
+    CHECK_NULL(ia_holderID);
     ia_preferIPv6AddressID = (*env)->GetStaticFieldID(env, ia_class, "preferIPv6Address", "Z");
     CHECK_NULL(ia_preferIPv6AddressID);
+
+    iac_addressID = (*env)->GetFieldID(env, iac_class, "address", "I");
+    CHECK_NULL(iac_addressID);
+    iac_familyID = (*env)->GetFieldID(env, iac_class, "family", "I");
+    CHECK_NULL(iac_familyID);
+    iac_hostNameID = (*env)->GetFieldID(env, iac_class, "hostName", "Ljava/lang/String;");
+    CHECK_NULL(iac_hostNameID);
 }
--- a/src/share/native/java/net/net_util.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/java/net/net_util.c	Wed Apr 17 21:48:04 2013 -0700
@@ -84,6 +84,58 @@
     }
 }
 
+/* The address, and family fields used to be in InetAddress
+ * but are now in an implementation object. So, there is an extra
+ * level of indirection to access them now.
+ */
+
+extern jclass iac_class;
+extern jfieldID ia_holderID;
+extern jfieldID iac_addressID;
+extern jfieldID iac_familyID;
+
+void setInetAddress_addr(JNIEnv *env, jobject iaObj, int address) {
+    jobject holder;
+    init(env);
+    holder = (*env)->GetObjectField(env, iaObj, ia_holderID);
+    (*env)->SetIntField(env, holder, iac_addressID, address);
+}
+
+void setInetAddress_family(JNIEnv *env, jobject iaObj, int family) {
+    jobject holder;
+    init(env);
+    holder = (*env)->GetObjectField(env, iaObj, ia_holderID);
+    (*env)->SetIntField(env, holder, iac_familyID, family);
+}
+
+void setInetAddress_hostName(JNIEnv *env, jobject iaObj, jobject host) {
+    jobject holder;
+    init(env);
+    holder = (*env)->GetObjectField(env, iaObj, ia_holderID);
+    (*env)->SetObjectField(env, holder, iac_hostNameID, host);
+}
+
+int getInetAddress_addr(JNIEnv *env, jobject iaObj) {
+    jobject holder;
+    init(env);
+    holder = (*env)->GetObjectField(env, iaObj, ia_holderID);
+    return (*env)->GetIntField(env, holder, iac_addressID);
+}
+
+int getInetAddress_family(JNIEnv *env, jobject iaObj) {
+    jobject holder;
+    init(env);
+    holder = (*env)->GetObjectField(env, iaObj, ia_holderID);
+    return (*env)->GetIntField(env, holder, iac_familyID);
+}
+
+jobject getInetAddress_hostName(JNIEnv *env, jobject iaObj) {
+    jobject holder;
+    init(env);
+    holder = (*env)->GetObjectField(env, iaObj, ia_holderID);
+    return (*env)->GetObjectField(env, holder, iac_hostNameID);
+}
+
 JNIEXPORT jobject JNICALL
 NET_SockaddrToInetAddress(JNIEnv *env, struct sockaddr *him, int *port) {
     jobject iaObj;
@@ -110,8 +162,8 @@
             iaObj = (*env)->NewObject(env, inet4Cls, ia4_ctrID);
             CHECK_NULL_RETURN(iaObj, NULL);
             address = NET_IPv4MappedToIPv4(caddr);
-            (*env)->SetIntField(env, iaObj, ia_addressID, address);
-            (*env)->SetIntField(env, iaObj, ia_familyID, IPv4);
+            setInetAddress_addr(env, iaObj, address);
+            setInetAddress_family(env, iaObj, IPv4);
         } else {
             static jclass inet6Cls = 0;
             jint scope;
@@ -131,7 +183,7 @@
 
             (*env)->SetObjectField(env, iaObj, ia6_ipaddressID, ipaddress);
 
-            (*env)->SetIntField(env, iaObj, ia_familyID, IPv6);
+            setInetAddress_family(env, iaObj, IPv6);
             scope = getScopeID(him);
             (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope);
             if (scope > 0)
@@ -153,9 +205,8 @@
             }
             iaObj = (*env)->NewObject(env, inet4Cls, ia4_ctrID);
             CHECK_NULL_RETURN(iaObj, NULL);
-            (*env)->SetIntField(env, iaObj, ia_familyID, IPv4);
-            (*env)->SetIntField(env, iaObj, ia_addressID,
-                                ntohl(him4->sin_addr.s_addr));
+            setInetAddress_family(env, iaObj, IPv4);
+            setInetAddress_addr(env, iaObj, ntohl(him4->sin_addr.s_addr));
             *port = ntohs(him4->sin_port);
         }
     return iaObj;
@@ -167,8 +218,7 @@
     jint family = AF_INET;
 
 #ifdef AF_INET6
-    family = (*env)->GetIntField(env, iaObj, ia_familyID) == IPv4?
-        AF_INET : AF_INET6;
+    family = getInetAddress_family(env, iaObj) == IPv4? AF_INET : AF_INET6;
     if (him->sa_family == AF_INET6) {
 #ifdef WIN32
         struct SOCKADDR_IN6 *him6 = (struct SOCKADDR_IN6 *)him;
@@ -183,7 +233,7 @@
                 return JNI_FALSE;
             }
             addrNew = NET_IPv4MappedToIPv4(caddrNew);
-            addrCur = (*env)->GetIntField(env, iaObj, ia_addressID);
+            addrCur = getInetAddress_addr(env, iaObj);
             if (addrNew == addrCur) {
                 return JNI_TRUE;
             } else {
@@ -215,7 +265,7 @@
                 return JNI_FALSE;
             }
             addrNew = ntohl(him4->sin_addr.s_addr);
-            addrCur = (*env)->GetIntField(env, iaObj, ia_addressID);
+            addrCur = getInetAddress_addr(env, iaObj);
             if (addrNew == addrCur) {
                 return JNI_TRUE;
             } else {
--- a/src/share/native/java/net/net_util.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/java/net/net_util.h	Wed Apr 17 21:48:04 2013 -0700
@@ -53,10 +53,18 @@
  * i.e. psi_timeoutID is PlainSocketImpl's timeout field's ID.
  */
 extern jclass ia_class;
-extern jfieldID ia_addressID;
-extern jfieldID ia_familyID;
+extern jfieldID iac_addressID;
+extern jfieldID iac_familyID;
+extern jfieldID iac_hostNameID;
 extern jfieldID ia_preferIPv6AddressID;
 
+extern void setInetAddress_addr(JNIEnv *env, jobject iaObj, int address);
+extern void setInetAddress_family(JNIEnv *env, jobject iaObj, int family);
+extern void setInetAddress_hostName(JNIEnv *env, jobject iaObj, jobject h);
+extern int getInetAddress_addr(JNIEnv *env, jobject iaObj);
+extern int getInetAddress_family(JNIEnv *env, jobject iaObj);
+extern jobject getInetAddress_hostName(JNIEnv *env, jobject iaObj);
+
 extern jclass ia4_class;
 extern jmethodID ia4_ctrID;
 
--- a/src/share/native/sun/awt/image/awt_ImageRep.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/awt/image/awt_ImageRep.c	Wed Apr 17 21:48:04 2013 -0700
@@ -45,6 +45,53 @@
 #  define TRUE 1
 #endif
 
+#define CHECK_STRIDE(yy, hh, ss)                            \
+    if ((ss) != 0) {                                        \
+        int limit = 0x7fffffff / ((ss) > 0 ? (ss) : -(ss)); \
+        if (limit < (yy) || limit < ((yy) + (hh) - 1)) {    \
+            /* integer oveflow */                           \
+            return JNI_FALSE;                               \
+        }                                                   \
+    }                                                       \
+
+#define CHECK_SRC()                                      \
+    do {                                                 \
+        int pixeloffset;                                 \
+        if (off < 0 || off >= srcDataLength) {           \
+            return JNI_FALSE;                            \
+        }                                                \
+        CHECK_STRIDE(0, h, scansize);                    \
+                                                         \
+        /* check scansize */                             \
+        pixeloffset = scansize * (h - 1);                \
+        if ((w - 1) > (0x7fffffff - pixeloffset)) {      \
+            return JNI_FALSE;                            \
+        }                                                \
+        pixeloffset += (w - 1);                          \
+                                                         \
+        if (off > (0x7fffffff - pixeloffset)) {          \
+            return JNI_FALSE;                            \
+        }                                                \
+    } while (0)                                          \
+
+#define CHECK_DST(xx, yy)                                \
+    do {                                                 \
+        int soffset = (yy) * sStride;                    \
+        int poffset = (xx) * pixelStride;                \
+        if (poffset > (0x7fffffff - soffset)) {          \
+            return JNI_FALSE;                            \
+        }                                                \
+        poffset += soffset;                              \
+        if (dstDataOff > (0x7fffffff - poffset)) {       \
+            return JNI_FALSE;                            \
+        }                                                \
+        poffset += dstDataOff;                           \
+                                                         \
+        if (poffset < 0 || poffset >= dstDataLength) {   \
+            return JNI_FALSE;                            \
+        }                                                \
+    } while (0)                                          \
+
 static jfieldID s_JnumSrcLUTID;
 static jfieldID s_JsrcLUTtransIndexID;
 
@@ -58,7 +105,7 @@
 /*
  * This routine is used to draw ICM pixels into a default color model
  */
-JNIEXPORT void JNICALL
+JNIEXPORT jboolean JNICALL
 Java_sun_awt_image_ImageRepresentation_setICMpixels(JNIEnv *env, jclass cls,
                                                     jint x, jint y, jint w,
                                                     jint h, jintArray jlut,
@@ -67,7 +114,10 @@
                                                     jobject jict)
 {
     unsigned char *srcData = NULL;
+    jint srcDataLength;
     int *dstData;
+    jint dstDataLength;
+    jint dstDataOff;
     int *dstP, *dstyP;
     unsigned char *srcyP, *srcP;
     int *srcLUT = NULL;
@@ -80,12 +130,20 @@
 
     if (JNU_IsNull(env, jlut)) {
         JNU_ThrowNullPointerException(env, "NullPointerException");
-        return;
+        return JNI_FALSE;
     }
 
     if (JNU_IsNull(env, jpix)) {
         JNU_ThrowNullPointerException(env, "NullPointerException");
-        return;
+        return JNI_FALSE;
+    }
+
+    if (x < 0 || w < 1 || (0x7fffffff - x) < w) {
+        return JNI_FALSE;
+    }
+
+    if (y < 0 || h < 1 || (0x7fffffff - y) < h) {
+        return JNI_FALSE;
     }
 
     sStride = (*env)->GetIntField(env, jict, g_ICRscanstrID);
@@ -93,10 +151,47 @@
     joffs = (*env)->GetObjectField(env, jict, g_ICRdataOffsetsID);
     jdata = (*env)->GetObjectField(env, jict, g_ICRdataID);
 
+    if (JNU_IsNull(env, jdata)) {
+        /* no destination buffer */
+        return JNI_FALSE;
+    }
+
+    if (JNU_IsNull(env, joffs) || (*env)->GetArrayLength(env, joffs) < 1) {
+        /* invalid data offstes in raster */
+        return JNI_FALSE;
+    }
+
+    srcDataLength = (*env)->GetArrayLength(env, jpix);
+    dstDataLength = (*env)->GetArrayLength(env, jdata);
+
+    cOffs = (int *) (*env)->GetPrimitiveArrayCritical(env, joffs, NULL);
+    if (cOffs == NULL) {
+        JNU_ThrowNullPointerException(env, "Null channel offset array");
+        return JNI_FALSE;
+    }
+
+    dstDataOff = cOffs[0];
+
+    /* the offset array is not needed anymore and can be released */
+    (*env)->ReleasePrimitiveArrayCritical(env, joffs, cOffs, JNI_ABORT);
+    joffs = NULL;
+    cOffs = NULL;
+
+    /* do basic validation: make sure that offsets for
+    * first pixel and for last pixel are safe to calculate and use */
+    CHECK_STRIDE(y, h, sStride);
+    CHECK_STRIDE(x, w, pixelStride);
+
+    CHECK_DST(x, y);
+    CHECK_DST(x + w -1, y + h - 1);
+
+    /* check source array */
+    CHECK_SRC();
+
     srcLUT = (int *) (*env)->GetPrimitiveArrayCritical(env, jlut, NULL);
     if (srcLUT == NULL) {
         JNU_ThrowNullPointerException(env, "Null IndexColorModel LUT");
-        return;
+        return JNI_FALSE;
     }
 
     srcData = (unsigned char *) (*env)->GetPrimitiveArrayCritical(env, jpix,
@@ -104,27 +199,18 @@
     if (srcData == NULL) {
         (*env)->ReleasePrimitiveArrayCritical(env, jlut, srcLUT, JNI_ABORT);
         JNU_ThrowNullPointerException(env, "Null data array");
-        return;
-    }
-
-    cOffs = (int *) (*env)->GetPrimitiveArrayCritical(env, joffs, NULL);
-    if (cOffs == NULL) {
-        (*env)->ReleasePrimitiveArrayCritical(env, jlut, srcLUT, JNI_ABORT);
-        (*env)->ReleasePrimitiveArrayCritical(env, jpix, srcData, JNI_ABORT);
-        JNU_ThrowNullPointerException(env, "Null channel offset array");
-        return;
+        return JNI_FALSE;
     }
 
     dstData = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, NULL);
     if (dstData == NULL) {
         (*env)->ReleasePrimitiveArrayCritical(env, jlut, srcLUT, JNI_ABORT);
         (*env)->ReleasePrimitiveArrayCritical(env, jpix, srcData, JNI_ABORT);
-        (*env)->ReleasePrimitiveArrayCritical(env, joffs, cOffs, JNI_ABORT);
         JNU_ThrowNullPointerException(env, "Null tile data array");
-        return;
+        return JNI_FALSE;
     }
 
-    dstyP = dstData + cOffs[0] + y*sStride + x*pixelStride;
+    dstyP = dstData + dstDataOff + y*sStride + x*pixelStride;
     srcyP = srcData + off;
     for (yIdx = 0; yIdx < h; yIdx++, srcyP += scansize, dstyP+=sStride) {
         srcP = srcyP;
@@ -137,12 +223,12 @@
     /* Release the locked arrays */
     (*env)->ReleasePrimitiveArrayCritical(env, jlut, srcLUT,  JNI_ABORT);
     (*env)->ReleasePrimitiveArrayCritical(env, jpix, srcData, JNI_ABORT);
-    (*env)->ReleasePrimitiveArrayCritical(env, joffs, cOffs, JNI_ABORT);
     (*env)->ReleasePrimitiveArrayCritical(env, jdata, dstData, JNI_ABORT);
 
+    return JNI_TRUE;
 }
 
-JNIEXPORT jint JNICALL
+JNIEXPORT jboolean JNICALL
 Java_sun_awt_image_ImageRepresentation_setDiffICM(JNIEnv *env, jclass cls,
                                                   jint x, jint y, jint w,
                                                   jint h, jintArray jlut,
@@ -150,7 +236,7 @@
                                                   jobject jicm,
                                                   jbyteArray jpix, jint off,
                                                   jint scansize,
-                                                  jobject jbct, jint chanOff)
+                                                  jobject jbct, jint dstDataOff)
 {
     unsigned int *srcLUT = NULL;
     unsigned int *newLUT = NULL;
@@ -159,6 +245,8 @@
     int mapSize;
     jobject jdata = NULL;
     jobject jnewlut = NULL;
+    jint srcDataLength;
+    jint dstDataLength;
     unsigned char *srcData;
     unsigned char *dstData;
     unsigned char *dataP;
@@ -174,14 +262,23 @@
 
     if (JNU_IsNull(env, jlut)) {
         JNU_ThrowNullPointerException(env, "NullPointerException");
-        return 0;
+        return JNI_FALSE;
     }
 
     if (JNU_IsNull(env, jpix)) {
         JNU_ThrowNullPointerException(env, "NullPointerException");
-        return 0;
+        return JNI_FALSE;
+    }
+
+    if (x < 0 || w < 1 || (0x7fffffff - x) < w) {
+        return JNI_FALSE;
     }
 
+    if (y < 0 || h < 1 || (0x7fffffff - y) < h) {
+        return JNI_FALSE;
+    }
+
+
     sStride = (*env)->GetIntField(env, jbct, g_BCRscanstrID);
     pixelStride =(*env)->GetIntField(env, jbct, g_BCRpixstrID);
     jdata = (*env)->GetObjectField(env, jbct, g_BCRdataID);
@@ -193,13 +290,31 @@
            of byte data type, so we have to convert the image data
            to default representation.
         */
-        return 0;
+        return JNI_FALSE;
+    }
+
+    if (JNU_IsNull(env, jdata)) {
+        /* no destination buffer */
+        return JNI_FALSE;
     }
+
+    srcDataLength = (*env)->GetArrayLength(env, jpix);
+    dstDataLength = (*env)->GetArrayLength(env, jdata);
+
+    CHECK_STRIDE(y, h, sStride);
+    CHECK_STRIDE(x, w, pixelStride);
+
+    CHECK_DST(x, y);
+    CHECK_DST(x + w -1, y + h - 1);
+
+    /* check source array */
+    CHECK_SRC();
+
     srcLUT = (unsigned int *) (*env)->GetPrimitiveArrayCritical(env, jlut,
                                                                 NULL);
     if (srcLUT == NULL) {
         /* out of memory error already thrown */
-        return 0;
+        return JNI_FALSE;
     }
 
     newLUT = (unsigned int *) (*env)->GetPrimitiveArrayCritical(env, jnewlut,
@@ -208,7 +323,7 @@
         (*env)->ReleasePrimitiveArrayCritical(env, jlut, srcLUT,
                                               JNI_ABORT);
         /* out of memory error already thrown */
-        return 0;
+        return JNI_FALSE;
     }
 
     newNumLut = numLut;
@@ -219,7 +334,7 @@
         (*env)->ReleasePrimitiveArrayCritical(env, jlut, srcLUT,
                                               JNI_ABORT);
         (*env)->ReleasePrimitiveArrayCritical(env, jnewlut, newLUT, JNI_ABORT);
-        return 0;
+        return JNI_FALSE;
     }
 
     /* Don't need these any more */
@@ -239,7 +354,7 @@
                                                                   NULL);
     if (srcData == NULL) {
         /* out of memory error already thrown */
-        return 0;
+        return JNI_FALSE;
     }
 
     dstData = (unsigned char *) (*env)->GetPrimitiveArrayCritical(env, jdata,
@@ -247,10 +362,10 @@
     if (dstData == NULL) {
         (*env)->ReleasePrimitiveArrayCritical(env, jpix, srcData, JNI_ABORT);
         /* out of memory error already thrown */
-        return 0;
+        return JNI_FALSE;
     }
 
-    ydataP = dstData + chanOff + y*sStride + x*pixelStride;
+    ydataP = dstData + dstDataOff + y*sStride + x*pixelStride;
     ypixP  = srcData + off;
 
     for (i=0; i < h; i++) {
@@ -268,7 +383,7 @@
     (*env)->ReleasePrimitiveArrayCritical(env, jpix, srcData, JNI_ABORT);
     (*env)->ReleasePrimitiveArrayCritical(env, jdata, dstData, JNI_ABORT);
 
-    return 1;
+    return JNI_TRUE;
 }
 
 static int compareLUTs(unsigned int *lut1, int numLut1, int transIdx,
--- a/src/share/native/sun/awt/image/awt_parseImage.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/awt/image/awt_parseImage.c	Wed Apr 17 21:48:04 2013 -0700
@@ -34,6 +34,7 @@
 #include "java_awt_color_ColorSpace.h"
 #include "awt_Mlib.h"
 #include "safe_alloc.h"
+#include "safe_math.h"
 
 static int setHints(JNIEnv *env, BufImageS_t *imageP);
 
--- a/src/share/native/sun/awt/image/jpeg/imageioJPEG.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/awt/image/jpeg/imageioJPEG.c	Wed Apr 17 21:48:04 2013 -0700
@@ -57,8 +57,8 @@
 #define MAX(a,b)        ((a) > (b) ? (a) : (b))
 
 /* Cached Java method ids */
-static jmethodID ImageInputStream_readID;
-static jmethodID ImageInputStream_skipBytesID;
+static jmethodID JPEGImageReader_readInputDataID;
+static jmethodID JPEGImageReader_skipInputBytesID;
 static jmethodID JPEGImageReader_warningOccurredID;
 static jmethodID JPEGImageReader_warningWithMessageID;
 static jmethodID JPEGImageReader_setImageDataID;
@@ -66,7 +66,7 @@
 static jmethodID JPEGImageReader_pushBackID;
 static jmethodID JPEGImageReader_passStartedID;
 static jmethodID JPEGImageReader_passCompleteID;
-static jmethodID ImageOutputStream_writeID;
+static jmethodID JPEGImageWriter_writeOutputDataID;
 static jmethodID JPEGImageWriter_warningOccurredID;
 static jmethodID JPEGImageWriter_warningWithMessageID;
 static jmethodID JPEGImageWriter_writeMetadataID;
@@ -923,7 +923,7 @@
     RELEASE_ARRAYS(env, data, src->next_input_byte);
     ret = (*env)->CallIntMethod(env,
                                 sb->stream,
-                                ImageInputStream_readID,
+                                JPEGImageReader_readInputDataID,
                                 sb->hstreamBuffer, 0,
                                 sb->bufferLength);
     if ((*env)->ExceptionOccurred(env)
@@ -1013,7 +1013,7 @@
     }
 
     ret = (*env)->CallIntMethod(env, sb->stream,
-                                ImageInputStream_readID,
+                                JPEGImageReader_readInputDataID,
                                 sb->hstreamBuffer,
                                 offset, buflen);
     if ((*env)->ExceptionOccurred(env)
@@ -1107,7 +1107,7 @@
     RELEASE_ARRAYS(env, data, src->next_input_byte);
     ret = (*env)->CallLongMethod(env,
                                  sb->stream,
-                                 ImageInputStream_skipBytesID,
+                                 JPEGImageReader_skipInputBytesID,
                                  (jlong) num_bytes);
     if ((*env)->ExceptionOccurred(env)
         || !GET_ARRAYS(env, data, &(src->next_input_byte))) {
@@ -1382,13 +1382,13 @@
      jclass qTableClass,
      jclass huffClass) {
 
-    ImageInputStream_readID = (*env)->GetMethodID(env,
-                                                  ImageInputStreamClass,
-                                                  "read",
+    JPEGImageReader_readInputDataID = (*env)->GetMethodID(env,
+                                                  cls,
+                                                  "readInputData",
                                                   "([BII)I");
-    ImageInputStream_skipBytesID = (*env)->GetMethodID(env,
-                                                       ImageInputStreamClass,
-                                                       "skipBytes",
+    JPEGImageReader_skipInputBytesID = (*env)->GetMethodID(env,
+                                                       cls,
+                                                       "skipInputBytes",
                                                        "(J)J");
     JPEGImageReader_warningOccurredID = (*env)->GetMethodID(env,
                                                             cls,
@@ -1531,8 +1531,7 @@
 Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setSource
     (JNIEnv *env,
      jobject this,
-     jlong ptr,
-     jobject source) {
+     jlong ptr) {
 
     imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
     j_common_ptr cinfo;
@@ -1546,7 +1545,7 @@
 
     cinfo = data->jpegObj;
 
-    imageio_set_stream(env, cinfo, data, source);
+    imageio_set_stream(env, cinfo, data, this);
 
     imageio_init_source((j_decompress_ptr) cinfo);
 }
@@ -2291,7 +2290,7 @@
 
     (*env)->CallVoidMethod(env,
                            sb->stream,
-                           ImageOutputStream_writeID,
+                           JPEGImageWriter_writeOutputDataID,
                            sb->hstreamBuffer,
                            0,
                            sb->bufferLength);
@@ -2328,7 +2327,7 @@
 
         (*env)->CallVoidMethod(env,
                                sb->stream,
-                               ImageOutputStream_writeID,
+                               JPEGImageWriter_writeOutputDataID,
                                sb->hstreamBuffer,
                                0,
                                datacount);
@@ -2366,13 +2365,12 @@
 Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initWriterIDs
     (JNIEnv *env,
      jclass cls,
-     jclass IOSClass,
      jclass qTableClass,
      jclass huffClass) {
 
-    ImageOutputStream_writeID = (*env)->GetMethodID(env,
-                                                    IOSClass,
-                                                    "write",
+    JPEGImageWriter_writeOutputDataID = (*env)->GetMethodID(env,
+                                                    cls,
+                                                    "writeOutputData",
                                                     "([BII)V");
 
     JPEGImageWriter_warningOccurredID = (*env)->GetMethodID(env,
@@ -2496,8 +2494,7 @@
 Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_setDest
     (JNIEnv *env,
      jobject this,
-     jlong ptr,
-     jobject destination) {
+     jlong ptr) {
 
     imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
     j_compress_ptr cinfo;
@@ -2511,7 +2508,7 @@
 
     cinfo = (j_compress_ptr) data->jpegObj;
 
-    imageio_set_stream(env, data->jpegObj, data, destination);
+    imageio_set_stream(env, data->jpegObj, data, this);
 
 
     // Don't call the init method, as that depends on pinned arrays
--- a/src/share/native/sun/awt/medialib/awt_ImagingLib.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/awt/medialib/awt_ImagingLib.c	Wed Apr 17 21:48:04 2013 -0700
@@ -42,6 +42,7 @@
 #include "awt_Mlib.h"
 #include "gdefs.h"
 #include "safe_alloc.h"
+#include "safe_math.h"
 
 /***************************************************************************
  *                               Definitions                               *
@@ -1993,13 +1994,23 @@
     unsigned char *dP = dataP;
 #define NUM_LINES    10
     int numLines = NUM_LINES;
-    int nbytes = rasterP->width*4*NUM_LINES;
+    /* it is safe to calculate the scan length, because width has been verified
+     * on creation of the mlib image
+     */
+    int scanLength = rasterP->width * 4;
+
+    int nbytes = 0;
+    if (!SAFE_TO_MULT(numLines, scanLength)) {
+        return -1;
+    }
+
+    nbytes = numLines * scanLength;
 
     for (y=0; y < rasterP->height; y+=numLines) {
         /* getData, one scanline at a time */
         if (y+numLines > rasterP->height) {
             numLines = rasterP->height - y;
-            nbytes = rasterP->width*4*numLines;
+            nbytes = numLines * scanLength;
         }
         jpixels = (*env)->CallObjectMethod(env, imageP->jimage,
                                            g_BImgGetRGBMID, 0, y,
@@ -2129,8 +2140,14 @@
     if (cvtToDefault) {
         int status = 0;
         *mlibImagePP = (*sMlibSysFns.createFP)(MLIB_BYTE, 4, width, height);
+        if (*mlibImagePP == NULL) {
+            return -1;
+        }
         cDataP  = (unsigned char *) mlib_ImageGetData(*mlibImagePP);
-        /* Make sure the image is cleared */
+        /* Make sure the image is cleared.
+         * NB: the image dimension is already verified, so we can
+         * safely calculate the length of the buffer.
+         */
         memset(cDataP, 0, width*height*4);
 
         if (!isSrc) {
@@ -2380,6 +2397,9 @@
     case sun_awt_image_IntegerComponentRaster_TYPE_BYTE_PACKED_SAMPLES:
         *mlibImagePP = (*sMlibSysFns.createFP)(MLIB_BYTE, rasterP->numBands,
                                         width, height);
+        if (*mlibImagePP == NULL) {
+            return -1;
+        }
         if (!isSrc) return 0;
         cDataP  = (unsigned char *) mlib_ImageGetData(*mlibImagePP);
         return expandPackedBCR(env, rasterP, -1, cDataP);
@@ -2388,6 +2408,9 @@
         if (rasterP->sppsm.maxBitSize <= 8) {
             *mlibImagePP = (*sMlibSysFns.createFP)(MLIB_BYTE, rasterP->numBands,
                                             width, height);
+            if (*mlibImagePP == NULL) {
+                return -1;
+            }
             if (!isSrc) return 0;
             cDataP  = (unsigned char *) mlib_ImageGetData(*mlibImagePP);
             return expandPackedSCR(env, rasterP, -1, cDataP);
@@ -2397,6 +2420,9 @@
         if (rasterP->sppsm.maxBitSize <= 8) {
             *mlibImagePP = (*sMlibSysFns.createFP)(MLIB_BYTE, rasterP->numBands,
                                             width, height);
+            if (*mlibImagePP == NULL) {
+                return -1;
+            }
             if (!isSrc) return 0;
             cDataP  = (unsigned char *) mlib_ImageGetData(*mlibImagePP);
             return expandPackedICR(env, rasterP, -1, cDataP);
--- a/src/share/native/sun/awt/medialib/mlib_ImageCreate.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/awt/medialib/mlib_ImageCreate.c	Wed Apr 17 21:48:04 2013 -0700
@@ -120,6 +120,7 @@
 #include "mlib_image.h"
 #include "mlib_ImageRowTable.h"
 #include "mlib_ImageCreate.h"
+#include "safe_math.h"
 
 /***************************************************************/
 mlib_image* mlib_ImageSet(mlib_image *image,
@@ -247,28 +248,50 @@
     return NULL;
   };
 
+  if (!SAFE_TO_MULT(width, channels)) {
+    return NULL;
+  }
+
+  wb = width * channels;
+
   switch (type) {
     case MLIB_DOUBLE:
-      wb = width * channels * 8;
+      if (!SAFE_TO_MULT(wb, 8)) {
+        return NULL;
+      }
+      wb *= 8;
       break;
     case MLIB_FLOAT:
     case MLIB_INT:
-      wb = width * channels * 4;
+      if (!SAFE_TO_MULT(wb, 4)) {
+        return NULL;
+      }
+      wb *= 4;
       break;
     case MLIB_USHORT:
     case MLIB_SHORT:
-      wb = width * channels * 2;
+      if (!SAFE_TO_MULT(wb, 4)) {
+        return NULL;
+      }
+      wb *= 2;
       break;
     case MLIB_BYTE:
-      wb = width * channels;
+      // wb is ready
       break;
     case MLIB_BIT:
-      wb = (width * channels + 7) / 8;
+      if (!SAFE_TO_ADD(7, wb)) {
+        return NULL;
+      }
+      wb = (wb + 7) / 8;
       break;
     default:
       return NULL;
   }
 
+  if (!SAFE_TO_MULT(wb, height)) {
+      return NULL;
+  }
+
   data = mlib_malloc(wb * height);
   if (data == NULL) {
     return NULL;
--- a/src/share/native/sun/awt/medialib/safe_alloc.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/awt/medialib/safe_alloc.h	Wed Apr 17 21:48:04 2013 -0700
@@ -41,10 +41,4 @@
     (((w) > 0) && ((h) > 0) && ((sz) > 0) &&                               \
      (((0xffffffffu / ((juint)(w))) / ((juint)(h))) > ((juint)(sz))))
 
-#define SAFE_TO_MULT(a, b) \
-    (((a) > 0) && ((b) >= 0) && ((0x7fffffff / (a)) > (b)))
-
-#define SAFE_TO_ADD(a, b) \
-    (((a) >= 0) && ((b) >= 0) && ((0x7fffffff - (a)) > (b)))
-
 #endif // __SAFE_ALLOC_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/awt/medialib/safe_math.h	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#ifndef __SAFE_MATH_H__
+#define __SAFE_MATH_H__
+
+#define SAFE_TO_MULT(a, b) \
+    (((a) > 0) && ((b) >= 0) && ((0x7fffffff / (a)) > (b)))
+
+#define SAFE_TO_ADD(a, b) \
+    (((a) >= 0) && ((b) >= 0) && ((0x7fffffff - (a)) > (b)))
+
+#endif // __SAFE_MATH_H__
--- a/src/share/native/sun/font/FontInstanceAdapter.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/FontInstanceAdapter.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -66,8 +66,21 @@
     yScalePixelsToUnits = upem / yppem;
 };
 
+
 const void *FontInstanceAdapter::getFontTable(LETag tableTag) const
 {
+  size_t ignored = 0;
+  return getFontTable(tableTag, ignored);
+}
+
+static const LETag cacheMap[LAYOUTCACHE_ENTRIES] = {
+  GPOS_TAG, GDEF_TAG, GSUB_TAG, MORT_TAG, MORX_TAG, KERN_TAG
+};
+
+const void *FontInstanceAdapter::getFontTable(LETag tableTag, size_t &length) const
+{
+  length = 0;
+
   if (!layoutTables) { // t1 font
     return 0;
   }
@@ -75,14 +88,19 @@
   // cache in font's pscaler object
   // font disposer will handle for us
 
-  switch(tableTag) {
-  case GSUB_TAG: if (layoutTables->gsub_len != -1) return (void*)layoutTables->gsub; break;
-  case GPOS_TAG: if (layoutTables->gpos_len != -1) return (void*)layoutTables->gpos; break;
-  case GDEF_TAG: if (layoutTables->gdef_len != -1) return (void*)layoutTables->gdef; break;
-  case MORT_TAG: if (layoutTables->mort_len != -1) return (void*)layoutTables->mort; break;
-  case KERN_TAG: if (layoutTables->kern_len != -1) return (void*)layoutTables->kern; break;
-  default:
-   //fprintf(stderr, "unexpected table request from font instance adapter: %x\n", tableTag);
+  int cacheIdx;
+  for (cacheIdx=0;cacheIdx<LAYOUTCACHE_ENTRIES;cacheIdx++) {
+    if (tableTag==cacheMap[cacheIdx]) break;
+  }
+
+  if (cacheIdx<LAYOUTCACHE_ENTRIES) { // if found
+    if (layoutTables->entries[cacheIdx].len != -1) {
+      length = layoutTables->entries[cacheIdx].len;
+      return layoutTables->entries[cacheIdx].ptr;
+    }
+  } else {
+    //fprintf(stderr, "unexpected table request from font instance adapter: %x\n", tableTag);
+    // (don't load any other tables)
     return 0;
   }
 
@@ -96,16 +114,13 @@
     env->GetByteArrayRegion(tableBytes, 0, len, result);
   }
 
-  switch(tableTag) {
-  case GSUB_TAG: layoutTables->gsub = (void*)result; layoutTables->gsub_len = len; break;
-  case GPOS_TAG: layoutTables->gpos = (void*)result; layoutTables->gpos_len = len; break;
-  case GDEF_TAG: layoutTables->gdef = (void*)result; layoutTables->gdef_len = len; break;
-  case MORT_TAG: layoutTables->mort = (void*)result; layoutTables->mort_len = len; break;
-  case KERN_TAG: layoutTables->kern = (void*)result; layoutTables->kern_len = len; break;
-  default: break;
+  if (cacheIdx<LAYOUTCACHE_ENTRIES) { // if cacheable table
+    layoutTables->entries[cacheIdx].len = len;
+    layoutTables->entries[cacheIdx].ptr = (const void*)result;
   }
 
-  return (void*)result;
+  length = len;
+  return (const void*)result;
 };
 
 LEGlyphID FontInstanceAdapter::mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper) const
--- a/src/share/native/sun/font/FontInstanceAdapter.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/FontInstanceAdapter.h	Wed Apr 17 21:48:04 2013 -0700
@@ -86,6 +86,7 @@
     // tables are cached with the native font scaler data
     // only supports gsub, gpos, gdef, mort tables at present
     virtual const void *getFontTable(LETag tableTag) const;
+    virtual const void *getFontTable(LETag tableTag, size_t &len) const;
 
     virtual void *getKernPairs() const {
         return layoutTables->kernPairs;
--- a/src/share/native/sun/font/fontscalerdefs.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/fontscalerdefs.h	Wed Apr 17 21:48:04 2013 -0700
@@ -120,20 +120,19 @@
 #define GPOS_TAG 0x47504F53 /* 'GPOS' */
 #define GDEF_TAG 0x47444546 /* 'GDEF' */
 #define MORT_TAG 0x6D6F7274 /* 'mort' */
+#define MORX_TAG 0x6D6F7278 /* 'morx' */
 #define KERN_TAG 0x6B65726E /* 'kern' */
 
+typedef struct TTLayoutTableCacheEntry {
+  const void* ptr;
+  int   len;
+} TTLayoutTableCacheEntry;
+
+#define LAYOUTCACHE_ENTRIES 6
+
 typedef struct TTLayoutTableCache {
-    void* gsub;
-    void* gpos;
-    void* gdef;
-    void* mort;
-    void* kern;
-    void* kernPairs;
-    int gsub_len;
-    int gpos_len;
-    int gdef_len;
-    int mort_len;
-    int kern_len;
+  TTLayoutTableCacheEntry entries[LAYOUTCACHE_ENTRIES];
+  void* kernPairs;
 } TTLayoutTableCache;
 
 #include "sunfontids.h"
--- a/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -39,19 +39,20 @@
 
 U_NAMESPACE_BEGIN
 
-le_uint32 AlternateSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const
+le_uint32 AlternateSubstitutionSubtable::process(const LEReferenceTo<AlternateSubstitutionSubtable> &base,
+                                       GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const
 {
     // NOTE: For now, we'll just pick the first alternative...
     LEGlyphID glyph = glyphIterator->getCurrGlyphID();
-    le_int32 coverageIndex = getGlyphCoverage(glyph);
+    le_int32 coverageIndex = getGlyphCoverage(base, glyph, success);
 
-    if (coverageIndex >= 0) {
+    if (coverageIndex >= 0 && LE_SUCCESS(success)) {
         le_uint16 altSetCount = SWAPW(alternateSetCount);
 
         if (coverageIndex < altSetCount) {
             Offset alternateSetTableOffset = SWAPW(alternateSetTableOffsetArray[coverageIndex]);
-            const AlternateSetTable *alternateSetTable =
-                (const AlternateSetTable *) ((char *) this + alternateSetTableOffset);
+            const LEReferenceTo<AlternateSetTable> alternateSetTable(base, success,
+                                  (const AlternateSetTable *) ((char *) this + alternateSetTableOffset));
             TTGlyphID alternate = SWAPW(alternateSetTable->alternateArray[0]);
 
             if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, alternate))) {
--- a/src/share/native/sun/font/layout/AlternateSubstSubtables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/AlternateSubstSubtables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -51,13 +51,17 @@
     TTGlyphID alternateArray[ANY_NUMBER];
 };
 
+LE_VAR_ARRAY(AlternateSetTable, alternateArray)
+
 struct AlternateSubstitutionSubtable : GlyphSubstitutionSubtable
 {
     le_uint16 alternateSetCount;
     Offset    alternateSetTableOffsetArray[ANY_NUMBER];
 
-    le_uint32 process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
+    le_uint32 process(const LEReferenceTo<AlternateSubstitutionSubtable> &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter = NULL) const;
 };
 
+LE_VAR_ARRAY(AlternateSubstitutionSubtable, alternateSetTableOffsetArray)
+
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -26,7 +26,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -58,15 +58,18 @@
 
 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ArabicOpenTypeLayoutEngine)
 
-ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-                        le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success)
+ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
+                                                       le_int32 languageCode, le_int32 typoFlags,
+                                                       const LEReferenceTo<GlyphSubstitutionTableHeader> &gsubTable,
+                                                       LEErrorCode &success)
     : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success)
 {
     fFeatureMap = ArabicShaping::getFeatureMap(fFeatureMapCount);
     fFeatureOrder = TRUE;
 }
 
-ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
+                                                       le_int32 languageCode,
                                                        le_int32 typoFlags, LEErrorCode &success)
     : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success)
 {
@@ -88,8 +91,9 @@
 // Input: characters
 // Output: characters, char indices, tags
 // Returns: output character count
-le_int32 ArabicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
-        LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 ArabicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count,
+                                                         le_int32 max, le_bool rightToLeft, LEUnicode *&outChars,
+                                                         LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
@@ -137,32 +141,30 @@
         return;
     }
 
-    if (fGPOSTable != NULL) {
+    if (!fGPOSTable.isEmpty()) {
         OpenTypeLayoutEngine::adjustGlyphPositions(chars, offset, count, reverse, glyphStorage, success);
-    } else if (fGDEFTable != NULL) {
-        GDEFMarkFilter filter(fGDEFTable);
-
+    } else if (!fGDEFTable.isEmpty()) {
+        GDEFMarkFilter filter(fGDEFTable, success);
         adjustMarkGlyphs(glyphStorage, &filter, success);
     } else {
-        GlyphDefinitionTableHeader *gdefTable = (GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable;
-        GDEFMarkFilter filter(gdefTable);
+        LEReferenceTo<GlyphDefinitionTableHeader> gdefTable(CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen);
+        GDEFMarkFilter filter(gdefTable, success);
 
         adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success);
     }
 }
 
 UnicodeArabicOpenTypeLayoutEngine::UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success)
-    : ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success)
+  : ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags | LE_CHAR_FILTER_FEATURE_FLAG, success)
 {
     fGSUBTable = (const GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable;
     fGDEFTable = (const GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable;
-
-    fSubstitutionFilter = new CharSubstitutionFilter(fontInstance);
+    /* OpenTypeLayoutEngine will allocate a substitution filter */
 }
 
 UnicodeArabicOpenTypeLayoutEngine::~UnicodeArabicOpenTypeLayoutEngine()
 {
-    delete fSubstitutionFilter;
+    /* OpenTypeLayoutEngine will cleanup the substitution filter */
 }
 
 // "glyphs", "indices" -> glyphs, indices
@@ -233,7 +235,7 @@
         return;
     }
 
-    GDEFMarkFilter filter(fGDEFTable);
+    GDEFMarkFilter filter(fGDEFTable, success);
 
     adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success);
 }
--- a/src/share/native/sun/font/layout/ArabicLayoutEngine.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ArabicLayoutEngine.h	Wed Apr 17 21:48:04 2013 -0700
@@ -75,7 +75,7 @@
      * @internal
      */
     ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-                            le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success);
+                            le_int32 typoFlags, const LEReferenceTo<GlyphSubstitutionTableHeader> &gsubTable, LEErrorCode &success);
 
     /**
      * This constructor is used when the font requires a "canned" GSUB table which can't be known
--- a/src/share/native/sun/font/layout/ArabicShaping.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ArabicShaping.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -58,14 +58,16 @@
 */
 ArabicShaping::ShapeType ArabicShaping::getShapeType(LEUnicode c)
 {
-    const ClassDefinitionTable *joiningTypes = (const ClassDefinitionTable *) ArabicShaping::shapingTypeTable;
-    le_int32 joiningType = joiningTypes->getGlyphClass(c);
+  LEErrorCode success = LE_NO_ERROR;
+  const LEReferenceTo<ClassDefinitionTable> joiningTypes((const ClassDefinitionTable *) ArabicShaping::shapingTypeTable,
+                                                         ArabicShaping::shapingTypeTableLen);
+  le_int32 joiningType = joiningTypes->getGlyphClass(joiningTypes, c, success);
 
-    if (joiningType >= 0 && joiningType < ArabicShaping::JT_COUNT) {
-        return ArabicShaping::shapeTypes[joiningType];
-    }
+  if (joiningType >= 0 && joiningType < ArabicShaping::JT_COUNT && LE_SUCCESS(success)) {
+    return ArabicShaping::shapeTypes[joiningType];
+  }
 
-    return ArabicShaping::ST_NOSHAPE_NONE;
+  return ArabicShaping::ST_NOSHAPE_NONE;
 }
 
 #define isolFeatureTag LE_ISOL_FEATURE_TAG
--- a/src/share/native/sun/font/layout/ArabicShaping.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ArabicShaping.h	Wed Apr 17 21:48:04 2013 -0700
@@ -93,6 +93,8 @@
     static ShapeType getShapeType(LEUnicode c);
 
     static const le_uint8 shapingTypeTable[];
+    static const size_t   shapingTypeTableLen;
+
     static const ShapeType shapeTypes[];
 
     static void adjustTags(le_int32 outIndex, le_int32 shapeOffset, LEGlyphStorage &glyphStorage);
--- a/src/share/native/sun/font/layout/AttachmentPosnSubtables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/AttachmentPosnSubtables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -52,14 +52,14 @@
     Offset    markArrayOffset;
     Offset    baseArrayOffset;
 
-    inline le_int32  getBaseCoverage(LEGlyphID baseGlyphId) const;
+    inline le_int32  getBaseCoverage(const LETableReference &base, LEGlyphID baseGlyphId, LEErrorCode &success) const;
 
     le_uint32 process(GlyphIterator *glyphIterator) const;
 };
 
-inline le_int32 AttachmentPositioningSubtable::getBaseCoverage(LEGlyphID baseGlyphID) const
+inline le_int32 AttachmentPositioningSubtable::getBaseCoverage(const LETableReference &base, LEGlyphID baseGlyphID, LEErrorCode &success) const
 {
-    return getGlyphCoverage(baseCoverageTableOffset, baseGlyphID);
+  return getGlyphCoverage(base, baseCoverageTableOffset, baseGlyphID, success);
 }
 
 U_NAMESPACE_END
--- a/src/share/native/sun/font/layout/CanonData.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/CanonData.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -3641,4 +3641,9 @@
     0x00, 0xE6, 0xD2, 0x42, 0xD2, 0x44, 0x00, 0xE6
 };
 
+
+const size_t CanonShaping::glyphSubstitutionTableLen = sizeof(glyphSubstitutionTable)/sizeof(glyphSubstitutionTable[0]);
+
+const size_t CanonShaping::glyphDefinitionTableLen = sizeof(glyphDefinitionTable)/sizeof(glyphDefinitionTable[0]);
+
 U_NAMESPACE_END
--- a/src/share/native/sun/font/layout/CanonShaping.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/CanonShaping.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -59,15 +59,15 @@
 void CanonShaping::reorderMarks(const LEUnicode *inChars, le_int32 charCount, le_bool rightToLeft,
                                 LEUnicode *outChars, LEGlyphStorage &glyphStorage)
 {
-    const GlyphDefinitionTableHeader *gdefTable = (const GlyphDefinitionTableHeader *) glyphDefinitionTable;
-    const ClassDefinitionTable *classTable = gdefTable->getMarkAttachClassDefinitionTable();
+    LEErrorCode success = LE_NO_ERROR;
+    LEReferenceTo<GlyphDefinitionTableHeader> gdefTable(CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen);
+    LEReferenceTo<ClassDefinitionTable> classTable = gdefTable->getMarkAttachClassDefinitionTable(gdefTable, success);
     le_int32 *combiningClasses = LE_NEW_ARRAY(le_int32, charCount);
     le_int32 *indices = LE_NEW_ARRAY(le_int32, charCount);
-    LEErrorCode status = LE_NO_ERROR;
     le_int32 i;
 
     for (i = 0; i < charCount; i += 1) {
-        combiningClasses[i] = classTable->getGlyphClass((LEGlyphID) inChars[i]);
+      combiningClasses[i] = classTable->getGlyphClass(classTable, (LEGlyphID) inChars[i], success);
         indices[i] = i;
     }
 
@@ -96,7 +96,7 @@
         le_int32 index = indices[i];
 
         outChars[i] = inChars[index];
-        glyphStorage.setCharIndex(out, index, status);
+        glyphStorage.setCharIndex(out, index, success);
     }
 
     LE_DELETE_ARRAY(indices);
--- a/src/share/native/sun/font/layout/CanonShaping.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/CanonShaping.h	Wed Apr 17 21:48:04 2013 -0700
@@ -42,7 +42,9 @@
 {
 public:
     static const le_uint8 glyphSubstitutionTable[];
+    static const size_t   glyphSubstitutionTableLen;
     static const le_uint8 glyphDefinitionTable[];
+    static const size_t   glyphDefinitionTableLen;
 
     static void reorderMarks(const LEUnicode *inChars, le_int32 charCount, le_bool rightToLeft,
                                    LEUnicode *outChars, LEGlyphStorage &glyphStorage);
--- a/src/share/native/sun/font/layout/ClassDefinitionTables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ClassDefinitionTables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -37,24 +37,51 @@
 
 U_NAMESPACE_BEGIN
 
-le_int32 ClassDefinitionTable::getGlyphClass(LEGlyphID glyphID) const
+le_int32 ClassDefinitionTable::getGlyphClass(const LETableReference& base, LEGlyphID glyphID, LEErrorCode &success) const
 {
+  LEReferenceTo<ClassDefinitionTable> thisRef(base, success);
+  if (LE_FAILURE(success)) return 0;
+
+  switch(SWAPW(classFormat)) {
+    case 0:
+        return 0;
+
+    case 1:
+    {
+      const LEReferenceTo<ClassDefFormat1Table> f1Table(thisRef, success);
+      return f1Table->getGlyphClass(f1Table, glyphID, success);
+    }
+
+    case 2:
+    {
+      const LEReferenceTo<ClassDefFormat2Table> f2Table(thisRef, success);
+      return  f2Table->getGlyphClass(f2Table, glyphID, success);
+    }
+
+    default:
+        return 0;
+  }
+}
+
+le_bool ClassDefinitionTable::hasGlyphClass(const LETableReference &base, le_int32 glyphClass, LEErrorCode &success) const
+{
+    LEReferenceTo<ClassDefinitionTable> thisRef(base, success);
+    if (LE_FAILURE(success)) return 0;
+
     switch(SWAPW(classFormat)) {
     case 0:
         return 0;
 
     case 1:
     {
-        const ClassDefFormat1Table *f1Table = (const ClassDefFormat1Table *) this;
-
-        return f1Table->getGlyphClass(glyphID);
+      const LEReferenceTo<ClassDefFormat1Table> f1Table(thisRef, success);
+      return f1Table->hasGlyphClass(f1Table, glyphClass, success);
     }
 
     case 2:
     {
-        const ClassDefFormat2Table *f2Table = (const ClassDefFormat2Table *) this;
-
-        return f2Table->getGlyphClass(glyphID);
+      const LEReferenceTo<ClassDefFormat2Table> f2Table(thisRef, success);
+      return f2Table->hasGlyphClass(f2Table, glyphClass, success);
     }
 
     default:
@@ -62,51 +89,32 @@
     }
 }
 
-le_bool ClassDefinitionTable::hasGlyphClass(le_int32 glyphClass) const
+le_int32 ClassDefFormat1Table::getGlyphClass(const LETableReference& base, LEGlyphID glyphID, LEErrorCode &success) const
 {
-    switch(SWAPW(classFormat)) {
-    case 0:
-        return 0;
-
-    case 1:
-    {
-        const ClassDefFormat1Table *f1Table = (const ClassDefFormat1Table *) this;
-
-        return f1Table->hasGlyphClass(glyphClass);
-    }
+    if(LE_FAILURE(success)) return 0;
 
-    case 2:
-    {
-        const ClassDefFormat2Table *f2Table = (const ClassDefFormat2Table *) this;
-
-        return f2Table->hasGlyphClass(glyphClass);
-    }
-
-    default:
-        return 0;
-    }
-}
-
-le_int32 ClassDefFormat1Table::getGlyphClass(LEGlyphID glyphID) const
-{
+    le_uint16 count = SWAPW(glyphCount);
+    LEReferenceToArrayOf<le_uint16> classValueArrayRef(base, success, &classValueArray[0], count);
     TTGlyphID ttGlyphID  = (TTGlyphID) LE_GET_GLYPH(glyphID);
     TTGlyphID firstGlyph = SWAPW(startGlyph);
-    TTGlyphID lastGlyph  = firstGlyph + SWAPW(glyphCount);
+    TTGlyphID lastGlyph  = firstGlyph + count;
 
-    if (ttGlyphID >= firstGlyph && ttGlyphID < lastGlyph) {
-        return SWAPW(classValueArray[ttGlyphID - firstGlyph]);
+    if (LE_SUCCESS(success) && ttGlyphID >= firstGlyph && ttGlyphID < lastGlyph) {
+      return SWAPW( classValueArrayRef(ttGlyphID - firstGlyph, success) );
     }
 
     return 0;
 }
 
-le_bool ClassDefFormat1Table::hasGlyphClass(le_int32 glyphClass) const
+le_bool ClassDefFormat1Table::hasGlyphClass(const LETableReference &base, le_int32 glyphClass, LEErrorCode &success) const
 {
-    le_uint16 count  = SWAPW(glyphCount);
+    if(LE_FAILURE(success)) return 0;
+    le_uint16 count = SWAPW(glyphCount);
+    LEReferenceToArrayOf<le_uint16> classValueArrayRef(base, success, &classValueArray[0], count);
     int i;
 
-    for (i = 0; i < count; i += 1) {
-        if (SWAPW(classValueArray[i]) == glyphClass) {
+    for (i = 0; LE_SUCCESS(success)&& (i < count); i += 1) {
+      if (SWAPW(classValueArrayRef(i,success)) == glyphClass) {
             return TRUE;
         }
     }
@@ -114,27 +122,31 @@
     return FALSE;
 }
 
-le_int32 ClassDefFormat2Table::getGlyphClass(LEGlyphID glyphID) const
+le_int32 ClassDefFormat2Table::getGlyphClass(const LETableReference& base, LEGlyphID glyphID, LEErrorCode &success) const
 {
+    if(LE_FAILURE(success)) return 0;
     TTGlyphID ttGlyph    = (TTGlyphID) LE_GET_GLYPH(glyphID);
     le_uint16 rangeCount = SWAPW(classRangeCount);
+    LEReferenceToArrayOf<GlyphRangeRecord> classRangeRecordArrayRef(base, success, &classRangeRecordArray[0], rangeCount);
     le_int32  rangeIndex =
-        OpenTypeUtilities::getGlyphRangeIndex(ttGlyph, classRangeRecordArray, rangeCount);
+      OpenTypeUtilities::getGlyphRangeIndex(ttGlyph, classRangeRecordArrayRef, success);
 
-    if (rangeIndex < 0) {
+    if (rangeIndex < 0 || LE_FAILURE(success)) {
         return 0;
     }
 
-    return SWAPW(classRangeRecordArray[rangeIndex].rangeValue);
+    return SWAPW(classRangeRecordArrayRef(rangeIndex, success).rangeValue);
 }
 
-le_bool ClassDefFormat2Table::hasGlyphClass(le_int32 glyphClass) const
+le_bool ClassDefFormat2Table::hasGlyphClass(const LETableReference &base, le_int32 glyphClass, LEErrorCode &success) const
 {
+    if(LE_FAILURE(success)) return 0;
     le_uint16 rangeCount = SWAPW(classRangeCount);
+    LEReferenceToArrayOf<GlyphRangeRecord> classRangeRecordArrayRef(base, success, &classRangeRecordArray[0], rangeCount);
     int i;
 
-    for (i = 0; i < rangeCount; i += 1) {
-        if (SWAPW(classRangeRecordArray[i].rangeValue) == glyphClass) {
+    for (i = 0; i < rangeCount && LE_SUCCESS(success); i += 1) {
+      if (SWAPW(classRangeRecordArrayRef(i,success).rangeValue) == glyphClass) {
             return TRUE;
         }
     }
--- a/src/share/native/sun/font/layout/ClassDefinitionTables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ClassDefinitionTables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -46,8 +46,20 @@
 {
     le_uint16 classFormat;
 
-    le_int32  getGlyphClass(LEGlyphID glyphID) const;
-    le_bool   hasGlyphClass(le_int32 glyphClass) const;
+    le_int32  getGlyphClass(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const;
+    le_bool   hasGlyphClass(const LETableReference &base, le_int32 glyphClass, LEErrorCode &success) const;
+
+  le_int32 getGlyphClass(LEGlyphID glyphID) const {
+    LETableReference base((const le_uint8*)this);
+    LEErrorCode ignored = LE_NO_ERROR;
+    return getGlyphClass(base,glyphID,ignored);
+  }
+
+  le_bool hasGlyphClass(le_int32 glyphClass) const {
+    LETableReference base((const le_uint8*)this);
+    LEErrorCode ignored = LE_NO_ERROR;
+    return hasGlyphClass(base,glyphClass,ignored);
+  }
 };
 
 struct ClassDefFormat1Table : ClassDefinitionTable
@@ -56,9 +68,11 @@
     le_uint16  glyphCount;
     le_uint16  classValueArray[ANY_NUMBER];
 
-    le_int32 getGlyphClass(LEGlyphID glyphID) const;
-    le_bool  hasGlyphClass(le_int32 glyphClass) const;
+    le_int32 getGlyphClass(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const;
+    le_bool  hasGlyphClass(const LETableReference &base, le_int32 glyphClass, LEErrorCode &success) const;
 };
+LE_VAR_ARRAY(ClassDefFormat1Table, classValueArray)
+
 
 struct ClassRangeRecord
 {
@@ -72,9 +86,10 @@
     le_uint16        classRangeCount;
     GlyphRangeRecord classRangeRecordArray[ANY_NUMBER];
 
-    le_int32 getGlyphClass(LEGlyphID glyphID) const;
-    le_bool hasGlyphClass(le_int32 glyphClass) const;
+    le_int32 getGlyphClass(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const;
+    le_bool hasGlyphClass(const LETableReference &base, le_int32 glyphClass, LEErrorCode &success) const;
 };
+LE_VAR_ARRAY(ClassDefFormat2Table, classRangeRecordArray)
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/ContextualGlyphInsertion.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ContextualGlyphInsertion.h	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -49,6 +49,11 @@
 {
 };
 
+struct ContextualGlyphInsertionHeader2 : MorphStateTableHeader2
+{
+    le_uint32 insertionTableOffset;
+};
+
 enum ContextualGlyphInsertionFlags
 {
     cgiSetMark                  = 0x8000,
@@ -61,11 +66,17 @@
     cgiMarkedInsertCountMask    = 0x001F
 };
 
-struct LigatureSubstitutionStateEntry : StateEntry
+struct ContextualGlyphInsertionStateEntry : StateEntry
 {
     ByteOffset currentInsertionListOffset;
     ByteOffset markedInsertionListOffset;
 };
 
+struct ContextualGlyphInsertionStateEntry2 : StateEntry2
+{
+    le_uint16 currentInsertionListIndex;
+    le_uint16 markedInsertionListIndex;
+};
+
 U_NAMESPACE_END
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,139 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "StateTables.h"
+#include "MorphStateTables.h"
+#include "SubtableProcessor2.h"
+#include "StateTableProcessor2.h"
+#include "ContextualGlyphInsertionProc2.h"
+#include "LEGlyphStorage.h"
+#include "LESwaps.h"
+
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ContextualGlyphInsertionProcessor2)
+
+ContextualGlyphInsertionProcessor2::ContextualGlyphInsertionProcessor2(
+         const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
+  : StateTableProcessor2(morphSubtableHeader, success)
+{
+  contextualGlyphHeader = LEReferenceTo<ContextualGlyphInsertionHeader2>(morphSubtableHeader, success);
+  if(LE_FAILURE(success) || !contextualGlyphHeader.isValid()) return;
+  le_uint32 insertionTableOffset = SWAPL(contextualGlyphHeader->insertionTableOffset);
+  insertionTable = LEReferenceToArrayOf<le_uint16>(stHeader, success, insertionTableOffset, LE_UNBOUNDED_ARRAY);
+  entryTable = LEReferenceToArrayOf<ContextualGlyphInsertionStateEntry2>(stHeader, success, entryTableOffset, LE_UNBOUNDED_ARRAY);
+}
+
+ContextualGlyphInsertionProcessor2::~ContextualGlyphInsertionProcessor2()
+{
+}
+
+void ContextualGlyphInsertionProcessor2::beginStateTable()
+{
+    markGlyph = 0;
+}
+
+void ContextualGlyphInsertionProcessor2::doInsertion(LEGlyphStorage &glyphStorage,
+                                                     le_int16 atGlyph,
+                                                     le_int16 &index,
+                                                     le_int16 count,
+                                                     le_bool /* isKashidaLike */,
+                                                     le_bool isBefore,
+                                                     LEErrorCode &success) {
+  LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(atGlyph, count + 1, success);
+
+  if(LE_FAILURE(success) || insertGlyphs==NULL) {
+    return;
+  }
+
+  // Note: Kashida vs Split Vowel seems to only affect selection and highlighting.
+  // We note the flag, but do not layout different.
+  // https://developer.apple.com/fonts/TTRefMan/RM06/Chap6mort.html
+
+  le_int16 targetIndex = 0;
+  if(isBefore) {
+    // insert at beginning
+    insertGlyphs[targetIndex++] = glyphStorage[atGlyph];
+  } else {
+    // insert at end
+    insertGlyphs[count] = glyphStorage[atGlyph];
+  }
+
+  while(count--) {
+    insertGlyphs[targetIndex++] = insertionTable.getObject(index++, success);
+  }
+  glyphStorage.applyInsertions();
+}
+
+le_uint16 ContextualGlyphInsertionProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph,
+                                                                EntryTableIndex2 index, LEErrorCode &success)
+{
+    const ContextualGlyphInsertionStateEntry2 *entry = entryTable.getAlias(index, success);
+
+    if(LE_FAILURE(success)) return 0; // TODO- which state?
+
+    le_uint16 newState = SWAPW(entry->newStateIndex);
+    le_uint16 flags = SWAPW(entry->flags);
+
+    le_int16 markIndex = SWAPW(entry->markedInsertionListIndex);
+    if (markIndex > 0) {
+        le_int16 count = (flags & cgiMarkedInsertCountMask) >> 5;
+        le_bool isKashidaLike = (flags & cgiMarkedIsKashidaLike);
+        le_bool isBefore = (flags & cgiMarkInsertBefore);
+        doInsertion(glyphStorage, markGlyph, markIndex, count, isKashidaLike, isBefore, success);
+    }
+
+    le_int16 currIndex = SWAPW(entry->currentInsertionListIndex);
+    if (currIndex > 0) {
+        le_int16 count = flags & cgiCurrentInsertCountMask;
+        le_bool isKashidaLike = (flags & cgiCurrentIsKashidaLike);
+        le_bool isBefore = (flags & cgiCurrentInsertBefore);
+        doInsertion(glyphStorage, currGlyph, currIndex, count, isKashidaLike, isBefore, success);
+    }
+
+    if (flags & cgiSetMark) {
+        markGlyph = currGlyph;
+    }
+
+    if (!(flags & cgiDontAdvance)) {
+        currGlyph += dir;
+    }
+
+    return newState;
+}
+
+void ContextualGlyphInsertionProcessor2::endStateTable()
+{
+}
+
+U_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.h	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 2013 - All Rights Reserved
+ *
+ */
+
+#ifndef __CONTEXTUALGLYPHINSERTIONPROCESSOR2_H
+#define __CONTEXTUALGLYPHINSERTIONPROCESSOR2_H
+
+/**
+ * \file
+ * \internal
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "StateTableProcessor2.h"
+#include "ContextualGlyphInsertionProc2.h"
+#include "ContextualGlyphInsertion.h"
+
+U_NAMESPACE_BEGIN
+
+class LEGlyphStorage;
+
+class ContextualGlyphInsertionProcessor2 : public StateTableProcessor2
+{
+public:
+    virtual void beginStateTable();
+
+    virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage,
+                                        le_int32 &currGlyph, EntryTableIndex2 index, LEErrorCode &success);
+
+    virtual void endStateTable();
+
+    ContextualGlyphInsertionProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success);
+    virtual ~ContextualGlyphInsertionProcessor2();
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
+private:
+    ContextualGlyphInsertionProcessor2();
+
+    /**
+     * Perform the actual insertion
+     * @param atGlyph index of glyph to insert at
+     * @param index index into the insertionTable (in/out)
+     * @param count number of insertions
+     * @param isKashidaLike Kashida like (vs Split Vowel like). No effect currently.
+     * @param isBefore if true, insert extra glyphs before the marked glyph
+     */
+    void doInsertion(LEGlyphStorage &glyphStorage,
+                              le_int16 atGlyph,
+                              le_int16 &index,
+                              le_int16 count,
+                              le_bool isKashidaLike,
+                              le_bool isBefore,
+                              LEErrorCode &success);
+
+
+protected:
+    le_int32 markGlyph;
+    LEReferenceToArrayOf<le_uint16> insertionTable;
+    LEReferenceToArrayOf<ContextualGlyphInsertionStateEntry2> entryTable;
+    LEReferenceTo<ContextualGlyphInsertionHeader2> contextualGlyphHeader;
+};
+
+U_NAMESPACE_END
+#endif
--- a/src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -43,13 +43,18 @@
 
 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ContextualGlyphSubstitutionProcessor)
 
-ContextualGlyphSubstitutionProcessor::ContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader)
-  : StateTableProcessor(morphSubtableHeader)
+ContextualGlyphSubstitutionProcessor::ContextualGlyphSubstitutionProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success)
+  : StateTableProcessor(morphSubtableHeader, success), entryTable(), contextualGlyphSubstitutionHeader(morphSubtableHeader, success)
 {
-    contextualGlyphSubstitutionHeader = (const ContextualGlyphSubstitutionHeader *) morphSubtableHeader;
-    substitutionTableOffset = SWAPW(contextualGlyphSubstitutionHeader->substitutionTableOffset);
+  contextualGlyphSubstitutionHeader.orphan();
+  substitutionTableOffset = SWAPW(contextualGlyphSubstitutionHeader->substitutionTableOffset);
+
 
-    entryTable = (const ContextualGlyphSubstitutionStateEntry *) ((char *) &stateTableHeader->stHeader + entryTableOffset);
+  entryTable = LEReferenceToArrayOf<ContextualGlyphSubstitutionStateEntry>(stateTableHeader, success,
+                                                                           (const ContextualGlyphSubstitutionStateEntry*)(&stateTableHeader->stHeader),
+                                                                           entryTableOffset, LE_UNBOUNDED_ARRAY);
+  int16Table = LEReferenceToArrayOf<le_int16>(stateTableHeader, success, (const le_int16*)(&stateTableHeader->stHeader),
+                                              0, LE_UNBOUNDED_ARRAY); // rest of the table as le_int16s
 }
 
 ContextualGlyphSubstitutionProcessor::~ContextualGlyphSubstitutionProcessor()
@@ -63,27 +68,26 @@
 
 ByteOffset ContextualGlyphSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index)
 {
-    const ContextualGlyphSubstitutionStateEntry *entry = &entryTable[index];
-    ByteOffset newState = SWAPW(entry->newStateOffset);
-    le_int16 flags = SWAPW(entry->flags);
-    WordOffset markOffset = SWAPW(entry->markOffset);
-    WordOffset currOffset = SWAPW(entry->currOffset);
-
-    if (markOffset != 0) {
-        const le_int16 *table = (const le_int16 *) ((char *) &stateTableHeader->stHeader + markOffset * 2);
-        LEGlyphID mGlyph = glyphStorage[markGlyph];
-        TTGlyphID newGlyph = SWAPW(table[LE_GET_GLYPH(mGlyph)]);
+  LEErrorCode success = LE_NO_ERROR;
+  const ContextualGlyphSubstitutionStateEntry *entry = entryTable.getAlias(index, success);
+  ByteOffset newState = SWAPW(entry->newStateOffset);
+  le_int16 flags = SWAPW(entry->flags);
+  WordOffset markOffset = SWAPW(entry->markOffset);
+  WordOffset currOffset = SWAPW(entry->currOffset);
 
-         glyphStorage[markGlyph] = LE_SET_GLYPH(mGlyph, newGlyph);
-    }
+  if (markOffset != 0 && LE_SUCCESS(success)) {
+    LEGlyphID mGlyph = glyphStorage[markGlyph];
+    TTGlyphID newGlyph = SWAPW(int16Table.getObject(markOffset + LE_GET_GLYPH(mGlyph), success)); // whew.
+
+    glyphStorage[markGlyph] = LE_SET_GLYPH(mGlyph, newGlyph);
+  }
 
-    if (currOffset != 0) {
-        const le_int16 *table = (const le_int16 *) ((char *) &stateTableHeader->stHeader + currOffset * 2);
-        LEGlyphID thisGlyph = glyphStorage[currGlyph];
-        TTGlyphID newGlyph = SWAPW(table[LE_GET_GLYPH(thisGlyph)]);
+  if (currOffset != 0) {
+    LEGlyphID thisGlyph = glyphStorage[currGlyph];
+    TTGlyphID newGlyph = SWAPW(int16Table.getObject(currOffset + LE_GET_GLYPH(thisGlyph), success)); // whew.
 
-        glyphStorage[currGlyph] = LE_SET_GLYPH(thisGlyph, newGlyph);
-    }
+    glyphStorage[currGlyph] = LE_SET_GLYPH(thisGlyph, newGlyph);
+  }
 
     if (flags & cgsSetMark) {
         markGlyph = currGlyph;
--- a/src/share/native/sun/font/layout/ContextualGlyphSubstProc.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ContextualGlyphSubstProc.h	Wed Apr 17 21:48:04 2013 -0700
@@ -56,7 +56,7 @@
 
     virtual void endStateTable();
 
-    ContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader);
+    ContextualGlyphSubstitutionProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success);
     virtual ~ContextualGlyphSubstitutionProcessor();
 
     /**
@@ -78,11 +78,11 @@
 
 protected:
     ByteOffset substitutionTableOffset;
-    const ContextualGlyphSubstitutionStateEntry *entryTable;
-
+    LEReferenceToArrayOf<ContextualGlyphSubstitutionStateEntry> entryTable;
+    LEReferenceToArrayOf<le_int16> int16Table;
     le_int32 markGlyph;
 
-    const ContextualGlyphSubstitutionHeader *contextualGlyphSubstitutionHeader;
+    LEReferenceTo<ContextualGlyphSubstitutionHeader> contextualGlyphSubstitutionHeader;
 
 };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,170 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "StateTables.h"
+#include "MorphStateTables.h"
+#include "SubtableProcessor2.h"
+#include "StateTableProcessor2.h"
+#include "ContextualGlyphSubstProc2.h"
+#include "LEGlyphStorage.h"
+#include "LESwaps.h"
+
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ContextualGlyphSubstitutionProcessor2)
+
+ContextualGlyphSubstitutionProcessor2::ContextualGlyphSubstitutionProcessor2(
+                                  const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
+  : StateTableProcessor2(morphSubtableHeader, success), contextualGlyphHeader(morphSubtableHeader, success)
+{
+    if(LE_FAILURE(success)) return;
+    le_uint32 perGlyphTableOffset = SWAPL(contextualGlyphHeader->perGlyphTableOffset);
+    perGlyphTable = LEReferenceToArrayOf<le_uint32> (stHeader, success, perGlyphTableOffset, LE_UNBOUNDED_ARRAY);
+    entryTable = LEReferenceToArrayOf<ContextualGlyphStateEntry2>(stHeader, success, entryTableOffset, LE_UNBOUNDED_ARRAY);
+}
+
+ContextualGlyphSubstitutionProcessor2::~ContextualGlyphSubstitutionProcessor2()
+{
+}
+
+void ContextualGlyphSubstitutionProcessor2::beginStateTable()
+{
+    markGlyph = 0;
+}
+
+le_uint16 ContextualGlyphSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph,
+    EntryTableIndex2 index, LEErrorCode &success)
+{
+    if(LE_FAILURE(success)) return 0;
+    const ContextualGlyphStateEntry2 *entry = entryTable.getAlias(index, success);
+    if(LE_FAILURE(success)) return 0;
+    le_uint16 newState = SWAPW(entry->newStateIndex);
+    le_uint16 flags = SWAPW(entry->flags);
+    le_int16 markIndex = SWAPW(entry->markIndex);
+    le_int16 currIndex = SWAPW(entry->currIndex);
+
+    if (markIndex != -1) {
+        le_uint32 offset = SWAPL(perGlyphTable(markIndex, success));
+        LEGlyphID mGlyph = glyphStorage[markGlyph];
+        TTGlyphID newGlyph = lookup(offset, mGlyph, success);
+        glyphStorage[markGlyph] = LE_SET_GLYPH(mGlyph, newGlyph);
+    }
+
+    if (currIndex != -1) {
+        le_uint32 offset = SWAPL(perGlyphTable(currIndex, success));
+        LEGlyphID thisGlyph = glyphStorage[currGlyph];
+        TTGlyphID newGlyph = lookup(offset, thisGlyph, success);
+        glyphStorage[currGlyph] = LE_SET_GLYPH(thisGlyph, newGlyph);
+    }
+
+    if (flags & cgsSetMark) {
+        markGlyph = currGlyph;
+    }
+
+    if (!(flags & cgsDontAdvance)) {
+        currGlyph += dir;
+    }
+
+    return newState;
+}
+
+TTGlyphID ContextualGlyphSubstitutionProcessor2::lookup(le_uint32 offset, LEGlyphID gid, LEErrorCode &success)
+{
+    TTGlyphID newGlyph = 0xFFFF;
+    if(LE_FAILURE(success))  return newGlyph;
+    LEReferenceTo<LookupTable> lookupTable(perGlyphTable, success, offset);
+    if(LE_FAILURE(success))  return newGlyph;
+    le_int16 format = SWAPW(lookupTable->format);
+
+    switch (format) {
+        case ltfSimpleArray: {
+#ifdef TEST_FORMAT
+            // Disabled pending for design review
+            LEReferenceTo<SimpleArrayLookupTable> lookupTable0(lookupTable, success);
+            LEReferenceToArrayOf<LookupValue> valueArray(lookupTable0, success, &lookupTable0->valueArray[0], LE_UNBOUNDED_ARRAY);
+            if(LE_FAILURE(success))  return newGlyph;
+            TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid);
+            newGlyph = SWAPW(lookupTable0->valueArray(glyphCode, success));
+#endif
+            break;
+        }
+        case ltfSegmentSingle: {
+#ifdef TEST_FORMAT
+            // Disabled pending for design review
+            LEReferenceTo<SegmentSingleLookupTable> lookupTable2 = (SegmentSingleLookupTable *) lookupTable;
+            const LookupSegment *segment = lookupTable2->lookupSegment(lookupTable2->segments, gid);
+            if (segment != NULL) {
+                newGlyph = SWAPW(segment->value);
+            }
+#endif
+            break;
+        }
+        case ltfSegmentArray: {
+            //printf("Context Lookup Table Format4: specific interpretation needed!\n");
+            break;
+        }
+        case ltfSingleTable:
+        {
+#ifdef TEST_FORMAT
+            // Disabled pending for design review
+            LEReferenceTo<SingleTableLookupTable> lookupTable6 = (SingleTableLookupTable *) lookupTable;
+            const LEReferenceTo<LookupSingle> segment = lookupTable6->lookupSingle(lookupTable6->entries, gid);
+            if (segment != NULL) {
+                newGlyph = SWAPW(segment->value);
+            }
+#endif
+            break;
+        }
+        case ltfTrimmedArray: {
+            LEReferenceTo<TrimmedArrayLookupTable> lookupTable8(lookupTable, success);
+            if (LE_FAILURE(success)) return newGlyph;
+            TTGlyphID firstGlyph = SWAPW(lookupTable8->firstGlyph);
+            TTGlyphID glyphCount = SWAPW(lookupTable8->glyphCount);
+            TTGlyphID lastGlyph  = firstGlyph + glyphCount;
+            TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid);
+            if ((glyphCode >= firstGlyph) && (glyphCode < lastGlyph)) {
+              LEReferenceToArrayOf<LookupValue> valueArray(lookupTable8, success, &lookupTable8->valueArray[0], glyphCount);
+              newGlyph = SWAPW(valueArray(glyphCode - firstGlyph, success));
+            }
+        }
+        default:
+            break;
+    }
+    return newGlyph;
+}
+
+void ContextualGlyphSubstitutionProcessor2::endStateTable()
+{
+}
+
+U_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.h	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#ifndef __CONTEXTUALGLYPHSUBSTITUTIONPROCESSOR2_H
+#define __CONTEXTUALGLYPHSUBSTITUTIONPROCESSOR2_H
+
+/**
+ * \file
+ * \internal
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "StateTableProcessor2.h"
+#include "ContextualGlyphSubstitution.h"
+
+U_NAMESPACE_BEGIN
+
+class LEGlyphStorage;
+
+class ContextualGlyphSubstitutionProcessor2 : public StateTableProcessor2
+{
+public:
+    virtual void beginStateTable();
+
+    virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index, LEErrorCode &success);
+
+    virtual void endStateTable();
+
+    ContextualGlyphSubstitutionProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success);
+    virtual ~ContextualGlyphSubstitutionProcessor2();
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
+private:
+    ContextualGlyphSubstitutionProcessor2();
+    TTGlyphID lookup(le_uint32 offset, LEGlyphID gid, LEErrorCode &success);
+
+protected:
+    LEReferenceToArrayOf<le_uint32>           perGlyphTable;
+    LEReferenceToArrayOf<ContextualGlyphStateEntry2> entryTable;
+
+    le_int16 perGlyphTableFormat;
+    le_int32 markGlyph;
+
+    LEReferenceTo<ContextualGlyphHeader2> contextualGlyphHeader;
+
+};
+
+U_NAMESPACE_END
+#endif
--- a/src/share/native/sun/font/layout/ContextualGlyphSubstitution.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ContextualGlyphSubstitution.h	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -49,6 +49,11 @@
     ByteOffset  substitutionTableOffset;
 };
 
+struct ContextualGlyphHeader2 : MorphStateTableHeader2
+{
+    le_uint32  perGlyphTableOffset; // no more substitution tables
+};
+
 enum ContextualGlyphSubstitutionFlags
 {
     cgsSetMark      = 0x8000,
@@ -62,5 +67,11 @@
     WordOffset currOffset;
 };
 
+struct ContextualGlyphStateEntry2 : StateEntry2
+{
+    le_uint16 markIndex;
+    le_uint16 currIndex;
+};
+
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -217,7 +217,7 @@
     }
 
     LEGlyphID glyph = glyphIterator->getCurrGlyphID();
-    le_int32 coverageIndex = getGlyphCoverage(glyph);
+    le_int32 coverageIndex = getGlyphCoverage(lookupProcessor->getReference(), glyph, success);
 
     if (coverageIndex >= 0) {
         le_uint16 srSetCount = SWAPW(subRuleSetCount);
@@ -266,7 +266,7 @@
     }
 
     LEGlyphID glyph = glyphIterator->getCurrGlyphID();
-    le_int32 coverageIndex = getGlyphCoverage(glyph);
+    le_int32 coverageIndex = getGlyphCoverage(lookupProcessor->getReference(), glyph, success);
 
     if (coverageIndex >= 0) {
         const ClassDefinitionTable *classDefinitionTable =
@@ -394,7 +394,7 @@
     }
 
     LEGlyphID glyph = glyphIterator->getCurrGlyphID();
-    le_int32 coverageIndex = getGlyphCoverage(glyph);
+    le_int32 coverageIndex = getGlyphCoverage(lookupProcessor->getReference(), glyph, success);
 
     if (coverageIndex >= 0) {
         le_uint16 srSetCount = SWAPW(chainSubRuleSetCount);
@@ -465,7 +465,7 @@
     }
 
     LEGlyphID glyph = glyphIterator->getCurrGlyphID();
-    le_int32 coverageIndex = getGlyphCoverage(glyph);
+    le_int32 coverageIndex = getGlyphCoverage(lookupProcessor->getReference(), glyph, success);
 
     if (coverageIndex >= 0) {
         const ClassDefinitionTable *backtrackClassDefinitionTable =
--- a/src/share/native/sun/font/layout/ContextualSubstSubtables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ContextualSubstSubtables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -43,6 +43,7 @@
 #include "GlyphSubstitutionTables.h"
 #include "GlyphIterator.h"
 #include "LookupProcessor.h"
+#include "LETableReference.h"
 
 U_NAMESPACE_BEGIN
 
@@ -88,6 +89,8 @@
 
     le_uint32  process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const;
 };
+LE_VAR_ARRAY(ContextualSubstitutionFormat1Subtable, subRuleSetTableOffsetArray)
+
 
 struct SubRuleSetTable
 {
@@ -95,6 +98,7 @@
     Offset  subRuleTableOffsetArray[ANY_NUMBER];
 
 };
+LE_VAR_ARRAY(SubRuleSetTable, subRuleTableOffsetArray)
 
 // NOTE: Multiple variable size arrays!!
 struct SubRuleTable
@@ -104,6 +108,7 @@
     TTGlyphID inputGlyphArray[ANY_NUMBER];
   //SubstitutionLookupRecord substLookupRecordArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(SubRuleTable, inputGlyphArray)
 
 struct ContextualSubstitutionFormat2Subtable : ContextualSubstitutionSubtable
 {
@@ -113,12 +118,16 @@
 
     le_uint32  process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const;
 };
+LE_VAR_ARRAY(ContextualSubstitutionFormat2Subtable, subClassSetTableOffsetArray)
+
 
 struct SubClassSetTable
 {
     le_uint16  subClassRuleCount;
     Offset  subClassRuleTableOffsetArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(SubClassSetTable, subClassRuleTableOffsetArray)
+
 
 // NOTE: Multiple variable size arrays!!
 struct SubClassRuleTable
@@ -128,6 +137,8 @@
     le_uint16  classArray[ANY_NUMBER];
   //SubstitutionLookupRecord substLookupRecordArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(SubClassRuleTable, classArray)
+
 
 // NOTE: This isn't a subclass of GlyphSubstitutionSubtable 'cause
 // it has an array of coverage tables instead of a single coverage table...
@@ -143,6 +154,7 @@
 
     le_uint32  process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const;
 };
+LE_VAR_ARRAY(ContextualSubstitutionFormat3Subtable, coverageTableOffsetArray)
 
 struct ChainingContextualSubstitutionSubtable : ContextualSubstitutionBase
 {
@@ -156,6 +168,8 @@
 
     le_uint32  process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const;
 };
+LE_VAR_ARRAY(ChainingContextualSubstitutionFormat1Subtable, chainSubRuleSetTableOffsetArray)
+
 
 struct ChainSubRuleSetTable
 {
@@ -163,6 +177,7 @@
     Offset  chainSubRuleTableOffsetArray[ANY_NUMBER];
 
 };
+LE_VAR_ARRAY(ChainSubRuleSetTable, chainSubRuleTableOffsetArray)
 
 // NOTE: Multiple variable size arrays!!
 struct ChainSubRuleTable
@@ -176,6 +191,7 @@
   //le_uint16  substCount;
   //SubstitutionLookupRecord substLookupRecordArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(ChainSubRuleTable, backtrackGlyphArray)
 
 struct ChainingContextualSubstitutionFormat2Subtable : ChainingContextualSubstitutionSubtable
 {
@@ -187,12 +203,15 @@
 
     le_uint32  process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const;
 };
+LE_VAR_ARRAY(ChainingContextualSubstitutionFormat2Subtable, chainSubClassSetTableOffsetArray)
 
 struct ChainSubClassSetTable
 {
     le_uint16  chainSubClassRuleCount;
     Offset  chainSubClassRuleTableOffsetArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(ChainSubClassSetTable, chainSubClassRuleTableOffsetArray)
+
 
 // NOTE: Multiple variable size arrays!!
 struct ChainSubClassRuleTable
@@ -206,6 +225,7 @@
   //le_uint16  substCount;
   //SubstitutionLookupRecord substLookupRecordArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(ChainSubClassRuleTable, backtrackClassArray)
 
 // NOTE: This isn't a subclass of GlyphSubstitutionSubtable 'cause
 // it has arrays of coverage tables instead of a single coverage table...
@@ -225,6 +245,8 @@
 
     le_uint32  process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const;
 };
+LE_VAR_ARRAY(ChainingContextualSubstitutionFormat3Subtable, backtrackCoverageTableOffsetArray)
+
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/CoverageTables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/CoverageTables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -56,6 +56,8 @@
 
     le_int32 getGlyphCoverage(LEGlyphID glyphID) const;
 };
+LE_VAR_ARRAY(CoverageFormat1Table, glyphArray)
+
 
 struct CoverageFormat2Table : CoverageTable
 {
@@ -64,6 +66,7 @@
 
     le_int32 getGlyphCoverage(LEGlyphID glyphID) const;
 };
+LE_VAR_ARRAY(CoverageFormat2Table, rangeRecordArray)
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -39,10 +39,10 @@
 
 U_NAMESPACE_BEGIN
 
-le_uint32 CursiveAttachmentSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
+le_uint32 CursiveAttachmentSubtable::process(const LEReferenceTo<CursiveAttachmentSubtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
 {
     LEGlyphID glyphID       = glyphIterator->getCurrGlyphID();
-    le_int32  coverageIndex = getGlyphCoverage(glyphID);
+    le_int32  coverageIndex = getGlyphCoverage(base, glyphID, success);
     le_uint16 eeCount       = SWAPW(entryExitCount);
 
     if (coverageIndex < 0 || coverageIndex >= eeCount) {
@@ -51,7 +51,7 @@
     }
 
     LEPoint entryAnchor, exitAnchor;
-    Offset entryOffset = SWAPW(entryExitRecords[coverageIndex].entryAnchor);
+    Offset entryOffset = SWAPW(entryExitRecords[coverageIndex].entryAnchor); // TODO
     Offset exitOffset  = SWAPW(entryExitRecords[coverageIndex].exitAnchor);
 
     if (entryOffset != 0) {
--- a/src/share/native/sun/font/layout/CursiveAttachmentSubtables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/CursiveAttachmentSubtables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -57,8 +57,9 @@
     le_uint16 entryExitCount;
     EntryExitRecord entryExitRecords[ANY_NUMBER];
 
-    le_uint32  process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
+    le_uint32  process(const LEReferenceTo<CursiveAttachmentSubtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const;
 };
+LE_VAR_ARRAY(CursiveAttachmentSubtable, entryExitRecords)
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/DeviceTables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/DeviceTables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -57,6 +57,7 @@
     static const le_uint16 fieldSignBits[];
     static const le_uint16 fieldBits[];
 };
+LE_VAR_ARRAY(DeviceTable, deltaValues)
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/ExtensionSubtables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ExtensionSubtables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -47,6 +47,8 @@
 le_uint32 ExtensionSubtable::process(const LookupProcessor *lookupProcessor, le_uint16 lookupType,
                                       GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const
 {
+    const LEReferenceTo<ExtensionSubtable> thisRef(lookupProcessor->getReference(), success); // create a reference to this
+
     if (LE_FAILURE(success)) {
         return 0;
     }
@@ -55,9 +57,11 @@
 
     if (elt != lookupType) {
         le_uint32 extOffset = READ_LONG(extensionOffset);
-        LookupSubtable *subtable = (LookupSubtable *) ((char *) this + extOffset);
+        LEReferenceTo<LookupSubtable> subtable(thisRef, success, extOffset);
 
-        return lookupProcessor->applySubtable(subtable, elt, glyphIterator, fontInstance, success);
+        if(LE_SUCCESS(success)) {
+          return lookupProcessor->applySubtable(subtable, elt, glyphIterator, fontInstance, success);
+        }
     }
 
     return 0;
--- a/src/share/native/sun/font/layout/Features.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/Features.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -38,19 +38,20 @@
 
 U_NAMESPACE_BEGIN
 
-const FeatureTable *FeatureListTable::getFeatureTable(le_uint16 featureIndex, LETag *featureTag) const
+LEReferenceTo<FeatureTable> FeatureListTable::getFeatureTable(const LETableReference &base, le_uint16 featureIndex, LETag *featureTag, LEErrorCode &success) const
 {
-    if (featureIndex >= SWAPW(featureCount)) {
-        return 0;
-    }
+  if (featureIndex >= SWAPW(featureCount) || LE_FAILURE(success)) {
+    return LEReferenceTo<FeatureTable>();
+  }
 
     Offset featureTableOffset = featureRecordArray[featureIndex].featureTableOffset;
 
     *featureTag = SWAPT(featureRecordArray[featureIndex].featureTag);
 
-    return (const FeatureTable *) ((char *) this + SWAPW(featureTableOffset));
+    return LEReferenceTo<FeatureTable>(base, success, SWAPW(featureTableOffset));
 }
 
+#if 0
 /*
  * Note: according to the OpenType Spec. v 1.4, the entries in the Feature
  * List Table are sorted alphabetically by feature tag; however, there seem
@@ -82,5 +83,6 @@
     return 0;
 #endif
 }
+#endif
 
 U_NAMESPACE_END
--- a/src/share/native/sun/font/layout/GDEFMarkFilter.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GDEFMarkFilter.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -36,9 +36,12 @@
 
 U_NAMESPACE_BEGIN
 
-GDEFMarkFilter::GDEFMarkFilter(const GlyphDefinitionTableHeader *gdefTable)
+GDEFMarkFilter::GDEFMarkFilter(const LEReferenceTo<GlyphDefinitionTableHeader> &gdefTable, LEErrorCode &success)
+  : classDefTable(gdefTable->getGlyphClassDefinitionTable(gdefTable, success))
 {
-    classDefTable = gdefTable->getGlyphClassDefinitionTable();
+  if(!classDefTable.isValid()) {
+    success = LE_INTERNAL_ERROR;
+  }
 }
 
 GDEFMarkFilter::~GDEFMarkFilter()
--- a/src/share/native/sun/font/layout/GDEFMarkFilter.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GDEFMarkFilter.h	Wed Apr 17 21:48:04 2013 -0700
@@ -46,13 +46,13 @@
 class GDEFMarkFilter : public UMemory, public LEGlyphFilter
 {
 private:
-    const GlyphClassDefinitionTable *classDefTable;
+    const LEReferenceTo<GlyphClassDefinitionTable> classDefTable;
 
     GDEFMarkFilter(const GDEFMarkFilter &other); // forbid copying of this class
     GDEFMarkFilter &operator=(const GDEFMarkFilter &other); // forbid copying of this class
 
 public:
-    GDEFMarkFilter(const GlyphDefinitionTableHeader *gdefTable);
+    GDEFMarkFilter(const LEReferenceTo<GlyphDefinitionTableHeader> &gdefTable, LEErrorCode &success);
     virtual ~GDEFMarkFilter();
 
     virtual le_bool accept(LEGlyphID glyph) const;
--- a/src/share/native/sun/font/layout/GXLayoutEngine.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GXLayoutEngine.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -41,9 +41,10 @@
 
 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(GXLayoutEngine)
 
-GXLayoutEngine::GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const MorphTableHeader *morphTable, LEErrorCode &success)
+  GXLayoutEngine::GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const LEReferenceTo<MorphTableHeader> &morphTable, LEErrorCode &success)
     : LayoutEngine(fontInstance, scriptCode, languageCode, 0, success), fMorphTable(morphTable)
 {
+  fMorphTable.orphan();
     // nothing else to do?
 }
 
@@ -70,7 +71,7 @@
         return 0;
     }
 
-    fMorphTable->process(glyphStorage);
+    fMorphTable->process(fMorphTable, glyphStorage, success);
 
     return count;
 }
--- a/src/share/native/sun/font/layout/GXLayoutEngine.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GXLayoutEngine.h	Wed Apr 17 21:48:04 2013 -0700
@@ -74,7 +74,7 @@
      *
      * @internal
      */
-    GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const MorphTableHeader *morphTable, LEErrorCode &success);
+    GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const LEReferenceTo<MorphTableHeader> &morphTable, LEErrorCode &success);
 
     /**
      * The destructor, virtual for correct polymorphic invocation.
@@ -104,7 +104,7 @@
      *
      * @internal
      */
-    const MorphTableHeader *fMorphTable;
+    LEReferenceTo<MorphTableHeader> fMorphTable;
 
     /**
      * This method does GX layout using the font's 'mort' table. It converts the
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/GXLayoutEngine2.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,91 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#include "LETypes.h"
+#include "LayoutEngine.h"
+#include "GXLayoutEngine2.h"
+#include "LEGlyphStorage.h"
+#include "MorphTables.h"
+
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(GXLayoutEngine2)
+
+GXLayoutEngine2::GXLayoutEngine2(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const LEReferenceTo<MorphTableHeader2> &morphTable, le_int32 typoFlags, LEErrorCode &success)
+  : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success), fMorphTable(morphTable)
+{
+  // nothing else to do?
+}
+
+GXLayoutEngine2::~GXLayoutEngine2()
+{
+    reset();
+}
+
+// apply 'morx' table
+le_int32 GXLayoutEngine2::computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+{
+    if (LE_FAILURE(success)) {
+        return 0;
+    }
+
+    if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
+        success = LE_ILLEGAL_ARGUMENT_ERROR;
+        return 0;
+    }
+
+    mapCharsToGlyphs(chars, offset, count, rightToLeft, rightToLeft, glyphStorage, success);
+
+    if (LE_FAILURE(success)) {
+        return 0;
+    }
+
+    fMorphTable->process(fMorphTable, glyphStorage, fTypoFlags, success);
+    return count;
+}
+
+// apply positional tables
+void GXLayoutEngine2::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool /*reverse*/,
+                                          LEGlyphStorage &/*glyphStorage*/, LEErrorCode &success)
+{
+    if (LE_FAILURE(success)) {
+        return;
+    }
+
+    if (chars == NULL || offset < 0 || count < 0) {
+        success = LE_ILLEGAL_ARGUMENT_ERROR;
+        return;
+    }
+
+    // FIXME: no positional processing yet...
+}
+
+U_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/GXLayoutEngine2.h	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,149 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#ifndef __GXLAYOUTENGINE2_H
+#define __GXLAYOUTENGINE2_H
+
+#include "LETypes.h"
+#include "LayoutEngine.h"
+
+#include "MorphTables.h"
+
+U_NAMESPACE_BEGIN
+
+class LEFontInstance;
+class LEGlyphStorage;
+
+/**
+ * This class implements layout for QuickDraw GX or Apple Advanced Typograyph (AAT)
+ * fonts. A font is a GX or AAT font if it contains a 'mort' table. See Apple's
+ * TrueType Reference Manual (http://fonts.apple.com/TTRefMan/index.html) for details.
+ * Information about 'mort' tables is in the chapter titled "Font Files."
+ *
+ * @internal
+ */
+class GXLayoutEngine2 : public LayoutEngine
+{
+public:
+    /**
+     * This is the main constructor. It constructs an instance of GXLayoutEngine for
+     * a particular font, script and language. It takes the 'mort' table as a parameter since
+     * LayoutEngine::layoutEngineFactory has to read the 'mort' table to know that it has a
+     * GX font.
+     *
+     * Note: GX and AAT fonts don't contain any script and language specific tables, so
+     * the script and language are ignored.
+     *
+     * @param fontInstance - the font
+     * @param scriptCode - the script
+     * @param langaugeCode - the language
+     * @param morphTable - the 'mort' table
+     * @param success - set to an error code if the operation fails
+     *
+     * @see LayoutEngine::layoutEngineFactory
+     * @see ScriptAndLangaugeTags.h for script and language codes
+     *
+     * @internal
+     */
+    GXLayoutEngine2(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const LEReferenceTo<MorphTableHeader2> &morphTable, le_int32 typoFlags, LEErrorCode &success);
+
+    /**
+     * The destructor, virtual for correct polymorphic invocation.
+     *
+     * @internal
+     */
+    virtual ~GXLayoutEngine2();
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
+protected:
+
+    /**
+     * The address of the 'mort' table
+     *
+     * @internal
+     */
+    const LEReferenceTo<MorphTableHeader2> fMorphTable;
+
+    /**
+     * This method does GX layout using the font's 'mort' table. It converts the
+     * input character codes to glyph indices using mapCharsToGlyphs, and then
+     * applies the 'mort' table.
+     *
+     * Input parameters:
+     * @param chars - the input character context
+     * @param offset - the index of the first character to process
+     * @param count - the number of characters to process
+     * @param max - the number of characters in the input context
+     * @param rightToLeft - <code>TRUE</code> if the text is in a right to left directional run
+     * @param glyphStorage - the glyph storage object. The glyph and char index arrays will be set.
+     *
+     * Output parameters:
+     * @param success - set to an error code if the operation fails
+     *
+     * @return the number of glyphs in the glyph index array
+     *
+     * @internal
+     */
+    virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+        LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
+    /**
+     * This method adjusts the glyph positions using the font's
+     * 'kern', 'trak', 'bsln', 'opbd' and 'just' tables.
+     *
+     * Input parameters:
+     * @param glyphStorage - the object holding the glyph storage. The positions will be updated as needed.
+     *
+     * Output parameters:
+     * @param success - set to an error code if the operation fails
+     *
+     * @internal
+     */
+    virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse,
+                                      LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
+};
+
+U_NAMESPACE_END
+#endif
--- a/src/share/native/sun/font/layout/GlyphDefinitionTables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GlyphDefinitionTables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -36,24 +36,36 @@
 
 U_NAMESPACE_BEGIN
 
-const GlyphClassDefinitionTable *GlyphDefinitionTableHeader::getGlyphClassDefinitionTable() const
+const LEReferenceTo<GlyphClassDefinitionTable>
+GlyphDefinitionTableHeader::getGlyphClassDefinitionTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base,
+                                                         LEErrorCode &success) const
 {
-    return (const GlyphClassDefinitionTable *) ((char *) this + SWAPW(glyphClassDefOffset));
+  if(LE_FAILURE(success)) return LEReferenceTo<GlyphClassDefinitionTable>();
+  return LEReferenceTo<GlyphClassDefinitionTable>(base, success, SWAPW(glyphClassDefOffset));
 }
 
-const AttachmentListTable *GlyphDefinitionTableHeader::getAttachmentListTable() const
+const LEReferenceTo<AttachmentListTable>
+GlyphDefinitionTableHeader::getAttachmentListTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base,
+                                                         LEErrorCode &success) const
 {
-    return (const AttachmentListTable *) ((char *) this + SWAPW(attachListOffset));
+    if(LE_FAILURE(success)) return LEReferenceTo<AttachmentListTable>();
+    return LEReferenceTo<AttachmentListTable>(base, success, SWAPW(attachListOffset));
 }
 
-const LigatureCaretListTable *GlyphDefinitionTableHeader::getLigatureCaretListTable() const
+const LEReferenceTo<LigatureCaretListTable>
+GlyphDefinitionTableHeader::getLigatureCaretListTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base,
+                                                         LEErrorCode &success) const
 {
-    return (const LigatureCaretListTable *) ((char *) this + SWAPW(ligCaretListOffset));
+    if(LE_FAILURE(success)) return LEReferenceTo<LigatureCaretListTable>();
+    return LEReferenceTo<LigatureCaretListTable>(base, success, SWAPW(ligCaretListOffset));
 }
 
-const MarkAttachClassDefinitionTable *GlyphDefinitionTableHeader::getMarkAttachClassDefinitionTable() const
+const LEReferenceTo<MarkAttachClassDefinitionTable>
+GlyphDefinitionTableHeader::getMarkAttachClassDefinitionTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base,
+                                                         LEErrorCode &success) const
 {
-    return (const MarkAttachClassDefinitionTable *) ((char *) this + SWAPW(MarkAttachClassDefOffset));
+    if(LE_FAILURE(success)) return LEReferenceTo<MarkAttachClassDefinitionTable>();
+    return LEReferenceTo<MarkAttachClassDefinitionTable>(base, success, SWAPW(MarkAttachClassDefOffset));
 }
 
 U_NAMESPACE_END
--- a/src/share/native/sun/font/layout/GlyphDefinitionTables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GlyphDefinitionTables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -60,12 +60,14 @@
     le_uint16  glyphCount;
     Offset  attachPointTableOffsetArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(AttachmentListTable, attachPointTableOffsetArray)
 
 struct AttachPointTable
 {
     le_uint16  pointCount;
     le_uint16  pointIndexArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(AttachPointTable, pointIndexArray)
 
 struct LigatureCaretListTable
 {
@@ -73,12 +75,14 @@
     le_uint16  ligGlyphCount;
     Offset  ligGlyphTableOffsetArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(LigatureCaretListTable, ligGlyphTableOffsetArray)
 
 struct LigatureGlyphTable
 {
     le_uint16  caretCount;
     Offset  caretValueTableOffsetArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(LigatureGlyphTable, caretValueTableOffsetArray)
 
 struct CaretValueTable
 {
@@ -111,10 +115,18 @@
     Offset  ligCaretListOffset;
     Offset  MarkAttachClassDefOffset;
 
-    const GlyphClassDefinitionTable *getGlyphClassDefinitionTable() const;
-    const AttachmentListTable *getAttachmentListTable()const ;
-    const LigatureCaretListTable *getLigatureCaretListTable() const;
-    const MarkAttachClassDefinitionTable *getMarkAttachClassDefinitionTable() const;
+    const LEReferenceTo<GlyphClassDefinitionTable>
+    getGlyphClassDefinitionTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base,
+                                 LEErrorCode &success) const;
+    const LEReferenceTo<AttachmentListTable>
+    getAttachmentListTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base,
+                           LEErrorCode &success)const ;
+    const LEReferenceTo<LigatureCaretListTable>
+    getLigatureCaretListTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base,
+                              LEErrorCode &success) const;
+    const LEReferenceTo<MarkAttachClassDefinitionTable>
+    getMarkAttachClassDefinitionTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base,
+                                      LEErrorCode &success) const;
 };
 
 U_NAMESPACE_END
--- a/src/share/native/sun/font/layout/GlyphIterator.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GlyphIterator.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -41,18 +41,21 @@
 U_NAMESPACE_BEGIN
 
 GlyphIterator::GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags,
-                             FeatureMask theFeatureMask, const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader)
+                             FeatureMask theFeatureMask, const LEReferenceTo<GlyphDefinitionTableHeader> &theGlyphDefinitionTableHeader)
   : direction(1), position(-1), nextLimit(-1), prevLimit(-1),
     glyphStorage(theGlyphStorage), glyphPositionAdjustments(theGlyphPositionAdjustments),
     srcIndex(-1), destIndex(-1), lookupFlags(theLookupFlags), featureMask(theFeatureMask), glyphGroup(0),
-    glyphClassDefinitionTable(NULL), markAttachClassDefinitionTable(NULL)
+    glyphClassDefinitionTable(), markAttachClassDefinitionTable()
 
 {
+  LEErrorCode success = LE_NO_ERROR; // TODO
     le_int32 glyphCount = glyphStorage.getGlyphCount();
 
-    if (theGlyphDefinitionTableHeader != NULL) {
-        glyphClassDefinitionTable = theGlyphDefinitionTableHeader->getGlyphClassDefinitionTable();
-        markAttachClassDefinitionTable = theGlyphDefinitionTableHeader->getMarkAttachClassDefinitionTable();
+    if (theGlyphDefinitionTableHeader.isValid()) {
+      glyphClassDefinitionTable = theGlyphDefinitionTableHeader
+        -> getGlyphClassDefinitionTable(theGlyphDefinitionTableHeader, success);
+      markAttachClassDefinitionTable = theGlyphDefinitionTableHeader
+        ->getMarkAttachClassDefinitionTable(theGlyphDefinitionTableHeader, success);
     }
 
     nextLimit = glyphCount;
@@ -380,6 +383,7 @@
 
 le_bool GlyphIterator::filterGlyph(le_uint32 index) const
 {
+    LEErrorCode success = LE_NO_ERROR;
     LEGlyphID glyphID = glyphStorage[index];
     le_int32 glyphClass = gcdNoGlyphClass;
 
@@ -387,8 +391,8 @@
         return TRUE;
     }
 
-    if (glyphClassDefinitionTable != NULL) {
-        glyphClass = glyphClassDefinitionTable->getGlyphClass(glyphID);
+    if (glyphClassDefinitionTable.isValid()) {
+      glyphClass = glyphClassDefinitionTable->getGlyphClass(glyphClassDefinitionTable, glyphID, success);
     }
 
     switch (glyphClass)
@@ -410,8 +414,9 @@
 
         le_uint16 markAttachType = (lookupFlags & lfMarkAttachTypeMask) >> lfMarkAttachTypeShift;
 
-        if ((markAttachType != 0) && (markAttachClassDefinitionTable != NULL)) {
-            return markAttachClassDefinitionTable->getGlyphClass(glyphID) != markAttachType;
+        if ((markAttachType != 0) && (markAttachClassDefinitionTable.isValid())) {
+          return markAttachClassDefinitionTable
+            -> getGlyphClass(markAttachClassDefinitionTable, glyphID, success) != markAttachType;
         }
 
         return FALSE;
@@ -461,6 +466,7 @@
     while (newPosition != nextLimit && delta > 0) {
         do {
             newPosition += direction;
+            //fprintf(stderr,"%s:%d:%s: newPosition = %d, delta = %d\n", __FILE__, __LINE__, __FUNCTION__, newPosition, delta);
         } while (newPosition != nextLimit && filterGlyph(newPosition));
 
         delta -= 1;
@@ -468,6 +474,7 @@
 
     position = newPosition;
 
+    //fprintf(stderr,"%s:%d:%s: exit position = %d, delta = %d\n", __FILE__, __LINE__, __FUNCTION__, position, delta);
     return position != nextLimit;
 }
 
@@ -483,6 +490,7 @@
     while (newPosition != prevLimit && delta > 0) {
         do {
             newPosition -= direction;
+            //fprintf(stderr,"%s:%d:%s: newPosition = %d, delta = %d\n", __FILE__, __LINE__, __FUNCTION__, newPosition, delta);
         } while (newPosition != prevLimit && filterGlyph(newPosition));
 
         delta -= 1;
@@ -490,6 +498,7 @@
 
     position = newPosition;
 
+    //fprintf(stderr,"%s:%d:%s: exit position = %d, delta = %d\n", __FILE__, __LINE__, __FUNCTION__, position, delta);
     return position != prevLimit;
 }
 
--- a/src/share/native/sun/font/layout/GlyphIterator.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GlyphIterator.h	Wed Apr 17 21:48:04 2013 -0700
@@ -49,7 +49,7 @@
 class GlyphIterator : public UMemory {
 public:
     GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags,
-        FeatureMask theFeatureMask, const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader);
+                  FeatureMask theFeatureMask, const LEReferenceTo<GlyphDefinitionTableHeader> &theGlyphDefinitionTableHeader);
 
     GlyphIterator(GlyphIterator &that);
 
@@ -117,8 +117,8 @@
     FeatureMask featureMask;
     le_int32    glyphGroup;
 
-    const GlyphClassDefinitionTable *glyphClassDefinitionTable;
-    const MarkAttachClassDefinitionTable *markAttachClassDefinitionTable;
+    LEReferenceTo<GlyphClassDefinitionTable> glyphClassDefinitionTable;
+    LEReferenceTo<MarkAttachClassDefinitionTable> markAttachClassDefinitionTable;
 
     GlyphIterator &operator=(const GlyphIterator &other); // forbid copying of this class
 };
--- a/src/share/native/sun/font/layout/GlyphLookupTables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GlyphLookupTables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -37,21 +37,22 @@
 
 U_NAMESPACE_BEGIN
 
-le_bool GlyphLookupTableHeader::coversScript(LETag scriptTag) const
+le_bool GlyphLookupTableHeader::coversScript(const LETableReference &base, LETag scriptTag, LEErrorCode &success) const
 {
-    const ScriptListTable *scriptListTable = (const ScriptListTable *) ((char *)this + SWAPW(scriptListOffset));
+  LEReferenceTo<ScriptListTable> scriptListTable(base, success, SWAPW(scriptListOffset));
 
-    return scriptListOffset != 0 && scriptListTable->findScript(scriptTag) != NULL;
+  return (scriptListOffset != 0) && scriptListTable->findScript(scriptListTable, scriptTag, success) .isValid();
 }
 
-le_bool GlyphLookupTableHeader::coversScriptAndLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch) const
+le_bool GlyphLookupTableHeader::coversScriptAndLanguage(const LETableReference &base, LETag scriptTag, LETag languageTag, LEErrorCode &success, le_bool exactMatch) const
 {
-    const ScriptListTable *scriptListTable = (const ScriptListTable *) ((char *)this + SWAPW(scriptListOffset));
-    const LangSysTable    *langSysTable    = scriptListTable->findLanguage(scriptTag, languageTag, exactMatch);
+  LEReferenceTo<ScriptListTable> scriptListTable(base, success, SWAPW(scriptListOffset));
+  LEReferenceTo<LangSysTable> langSysTable = scriptListTable->findLanguage(scriptListTable,
+                                    scriptTag, languageTag, success, exactMatch);
 
     // FIXME: could check featureListOffset, lookupListOffset, and lookup count...
     // Note: don't have to SWAPW langSysTable->featureCount to check for non-zero.
-    return langSysTable != NULL && langSysTable->featureCount != 0;
+  return LE_SUCCESS(success)&&langSysTable.isValid() && langSysTable->featureCount != 0;
 }
 
 U_NAMESPACE_END
--- a/src/share/native/sun/font/layout/GlyphLookupTables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GlyphLookupTables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -49,8 +49,8 @@
     Offset  featureListOffset;
     Offset  lookupListOffset;
 
-    le_bool coversScript(LETag scriptTag) const;
-    le_bool coversScriptAndLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch = FALSE) const;
+  le_bool coversScript(const LETableReference &base, LETag scriptTag, LEErrorCode &success) const;
+  le_bool coversScriptAndLanguage(const LETableReference &base, LETag scriptTag, LETag languageTag, LEErrorCode &success, le_bool exactMatch = FALSE) const;
 };
 
 U_NAMESPACE_END
--- a/src/share/native/sun/font/layout/GlyphPositioningTables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GlyphPositioningTables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -41,16 +41,16 @@
 
 U_NAMESPACE_BEGIN
 
-void GlyphPositioningTableHeader::process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments, le_bool rightToLeft,
+void GlyphPositioningTableHeader::process(const LEReferenceTo<GlyphPositioningTableHeader> &base, LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments, le_bool rightToLeft,
                                           LETag scriptTag, LETag languageTag,
-                                          const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, LEErrorCode &success,
+                                          const LEReferenceTo<GlyphDefinitionTableHeader> &glyphDefinitionTableHeader, LEErrorCode &success,
                                           const LEFontInstance *fontInstance, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const
 {
     if (LE_FAILURE(success)) {
         return;
     }
 
-    GlyphPositioningLookupProcessor processor(this, scriptTag, languageTag, featureMap, featureMapCount, featureOrder, success);
+    GlyphPositioningLookupProcessor processor(base, scriptTag, languageTag, featureMap, featureMapCount, featureOrder, success);
     if (LE_FAILURE(success)) {
         return;
     }
--- a/src/share/native/sun/font/layout/GlyphPositioningTables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GlyphPositioningTables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -40,6 +40,7 @@
 #include "OpenTypeTables.h"
 #include "Lookups.h"
 #include "GlyphLookupTables.h"
+#include "LETableReference.h"
 
 U_NAMESPACE_BEGIN
 
@@ -51,9 +52,9 @@
 
 struct GlyphPositioningTableHeader : public GlyphLookupTableHeader
 {
-    void    process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments,
+  void    process(const LEReferenceTo<GlyphPositioningTableHeader> &base, LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments,
                 le_bool rightToLeft, LETag scriptTag, LETag languageTag,
-                const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, LEErrorCode &success,
+                const LEReferenceTo<GlyphDefinitionTableHeader> &glyphDefinitionTableHeader, LEErrorCode &success,
                 const LEFontInstance *fontInstance, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const;
 };
 
--- a/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -57,7 +57,7 @@
 typedef ChainingContextualSubstitutionSubtable ChainingContextualPositioningSubtable;
 
 GlyphPositioningLookupProcessor::GlyphPositioningLookupProcessor(
-        const GlyphPositioningTableHeader *glyphPositioningTableHeader,
+        const LEReferenceTo<GlyphPositioningTableHeader> &glyphPositioningTableHeader,
         LETag scriptTag,
         LETag languageTag,
         const FeatureMap *featureMap,
@@ -65,7 +65,7 @@
         le_bool featureOrder,
         LEErrorCode& success)
     : LookupProcessor(
-                      (char *) glyphPositioningTableHeader,
+                      glyphPositioningTableHeader,
                       SWAPW(glyphPositioningTableHeader->scriptListOffset),
                       SWAPW(glyphPositioningTableHeader->featureListOffset),
                       SWAPW(glyphPositioningTableHeader->lookupListOffset),
@@ -84,7 +84,7 @@
 {
 }
 
-le_uint32 GlyphPositioningLookupProcessor::applySubtable(const LookupSubtable *lookupSubtable, le_uint16 lookupType,
+le_uint32 GlyphPositioningLookupProcessor::applySubtable(const LEReferenceTo<LookupSubtable> &lookupSubtable, le_uint16 lookupType,
                                                        GlyphIterator *glyphIterator,
                                                        const LEFontInstance *fontInstance,
                                                        LEErrorCode& success) const
@@ -102,55 +102,55 @@
 
     case gpstSingle:
     {
-        const SinglePositioningSubtable *subtable = (const SinglePositioningSubtable *) lookupSubtable;
+      LEReferenceTo<SinglePositioningSubtable> subtable(lookupSubtable, success);
 
-        delta = subtable->process(glyphIterator, fontInstance);
+        delta = subtable->process(subtable, glyphIterator, fontInstance, success);
         break;
     }
 
     case gpstPair:
     {
-        const PairPositioningSubtable *subtable = (const PairPositioningSubtable *) lookupSubtable;
+        LEReferenceTo<PairPositioningSubtable> subtable(lookupSubtable, success);
 
-        delta = subtable->process(glyphIterator, fontInstance);
+        delta = subtable->process(subtable, glyphIterator, fontInstance, success);
         break;
     }
 
     case gpstCursive:
     {
-        const CursiveAttachmentSubtable *subtable = (const CursiveAttachmentSubtable *) lookupSubtable;
+        LEReferenceTo<CursiveAttachmentSubtable> subtable(lookupSubtable, success);
 
-        delta = subtable->process(glyphIterator, fontInstance);
+        delta = subtable->process(subtable, glyphIterator, fontInstance, success);
         break;
     }
 
     case gpstMarkToBase:
     {
-        const MarkToBasePositioningSubtable *subtable = (const MarkToBasePositioningSubtable *) lookupSubtable;
+        LEReferenceTo<MarkToBasePositioningSubtable> subtable(lookupSubtable, success);
 
-        delta = subtable->process(glyphIterator, fontInstance);
+        delta = subtable->process(subtable, glyphIterator, fontInstance, success);
         break;
     }
 
      case gpstMarkToLigature:
     {
-        const MarkToLigaturePositioningSubtable *subtable = (const MarkToLigaturePositioningSubtable *) lookupSubtable;
+        LEReferenceTo<MarkToLigaturePositioningSubtable> subtable(lookupSubtable, success);
 
-        delta = subtable->process(glyphIterator, fontInstance);
+        delta = subtable->process(subtable, glyphIterator, fontInstance, success);
         break;
     }
 
     case gpstMarkToMark:
     {
-        const MarkToMarkPositioningSubtable *subtable = (const MarkToMarkPositioningSubtable *) lookupSubtable;
+        LEReferenceTo<MarkToMarkPositioningSubtable> subtable(lookupSubtable, success);
 
-        delta = subtable->process(glyphIterator, fontInstance);
+        delta = subtable->process(subtable, glyphIterator, fontInstance, success);
         break;
     }
 
    case gpstContext:
     {
-        const ContextualPositioningSubtable *subtable = (const ContextualPositioningSubtable *) lookupSubtable;
+        LEReferenceTo<ContextualPositioningSubtable> subtable(lookupSubtable, success);
 
         delta = subtable->process(this, glyphIterator, fontInstance, success);
         break;
@@ -158,7 +158,7 @@
 
     case gpstChainedContext:
     {
-        const ChainingContextualPositioningSubtable *subtable = (const ChainingContextualPositioningSubtable *) lookupSubtable;
+        LEReferenceTo<ChainingContextualPositioningSubtable> subtable(lookupSubtable, success);
 
         delta = subtable->process(this, glyphIterator, fontInstance, success);
         break;
@@ -166,7 +166,7 @@
 
     case gpstExtension:
     {
-        const ExtensionSubtable *subtable = (const ExtensionSubtable *) lookupSubtable;
+        LEReferenceTo<ExtensionSubtable> subtable(lookupSubtable, success);
 
         delta = subtable->process(this, lookupType, glyphIterator, fontInstance, success);
         break;
--- a/src/share/native/sun/font/layout/GlyphPosnLookupProc.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GlyphPosnLookupProc.h	Wed Apr 17 21:48:04 2013 -0700
@@ -51,7 +51,7 @@
 class GlyphPositioningLookupProcessor : public LookupProcessor
 {
 public:
-    GlyphPositioningLookupProcessor(const GlyphPositioningTableHeader *glyphPositioningTableHeader,
+    GlyphPositioningLookupProcessor(const LEReferenceTo<GlyphPositioningTableHeader> &glyphPositioningTableHeader,
         LETag scriptTag,
         LETag languageTag,
         const FeatureMap *featureMap,
@@ -61,7 +61,7 @@
 
     virtual ~GlyphPositioningLookupProcessor();
 
-    virtual le_uint32 applySubtable(const LookupSubtable *lookupSubtable, le_uint16 lookupType, GlyphIterator *glyphIterator,
+    virtual le_uint32 applySubtable(const LEReferenceTo<LookupSubtable> &lookupSubtable, le_uint16 lookupType, GlyphIterator *glyphIterator,
         const LEFontInstance *fontInstance, LEErrorCode& success) const;
 
 protected:
--- a/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -51,7 +51,7 @@
 U_NAMESPACE_BEGIN
 
 GlyphSubstitutionLookupProcessor::GlyphSubstitutionLookupProcessor(
-        const GlyphSubstitutionTableHeader *glyphSubstitutionTableHeader,
+        const LEReferenceTo<GlyphSubstitutionTableHeader> &glyphSubstitutionTableHeader,
         LETag scriptTag,
         LETag languageTag,
         const LEGlyphFilter *filter,
@@ -60,7 +60,7 @@
         le_bool featureOrder,
         LEErrorCode& success)
     : LookupProcessor(
-                      (char *) glyphSubstitutionTableHeader,
+                      glyphSubstitutionTableHeader,
                       SWAPW(glyphSubstitutionTableHeader->scriptListOffset),
                       SWAPW(glyphSubstitutionTableHeader->featureListOffset),
                       SWAPW(glyphSubstitutionTableHeader->lookupListOffset),
@@ -73,7 +73,7 @@
 {
 }
 
-le_uint32 GlyphSubstitutionLookupProcessor::applySubtable(const LookupSubtable *lookupSubtable, le_uint16 lookupType,
+le_uint32 GlyphSubstitutionLookupProcessor::applySubtable(const LEReferenceTo<LookupSubtable> &lookupSubtable, le_uint16 lookupType,
                                                        GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const
 {
     if (LE_FAILURE(success)) {
@@ -89,39 +89,39 @@
 
     case gsstSingle:
     {
-        const SingleSubstitutionSubtable *subtable = (const SingleSubstitutionSubtable *) lookupSubtable;
+        const LEReferenceTo<SingleSubstitutionSubtable> subtable(lookupSubtable, success);
 
-        delta = subtable->process(glyphIterator, fFilter);
+        delta = subtable->process(subtable, glyphIterator, success, fFilter);
         break;
     }
 
     case gsstMultiple:
     {
-        const MultipleSubstitutionSubtable *subtable = (const MultipleSubstitutionSubtable *) lookupSubtable;
+        const LEReferenceTo<MultipleSubstitutionSubtable> subtable(lookupSubtable, success);
 
-        delta = subtable->process(glyphIterator, success, fFilter);
+        delta = subtable->process(subtable, glyphIterator, success, fFilter);
         break;
     }
 
     case gsstAlternate:
     {
-        const AlternateSubstitutionSubtable *subtable = (const AlternateSubstitutionSubtable *) lookupSubtable;
+        const LEReferenceTo<AlternateSubstitutionSubtable> subtable(lookupSubtable, success);
 
-        delta = subtable->process(glyphIterator, fFilter);
+        delta = subtable->process(subtable, glyphIterator, success, fFilter);
         break;
     }
 
     case gsstLigature:
     {
-        const LigatureSubstitutionSubtable *subtable = (const LigatureSubstitutionSubtable *) lookupSubtable;
+        const LEReferenceTo<LigatureSubstitutionSubtable> subtable(lookupSubtable, success);
 
-        delta = subtable->process(glyphIterator, fFilter);
+        delta = subtable->process(subtable, glyphIterator, success, fFilter);
         break;
     }
 
     case gsstContext:
     {
-        const ContextualSubstitutionSubtable *subtable = (const ContextualSubstitutionSubtable *) lookupSubtable;
+        const LEReferenceTo<ContextualSubstitutionSubtable> subtable(lookupSubtable, success);
 
         delta = subtable->process(this, glyphIterator, fontInstance, success);
         break;
@@ -129,7 +129,7 @@
 
     case gsstChainingContext:
     {
-        const ChainingContextualSubstitutionSubtable *subtable = (const ChainingContextualSubstitutionSubtable *) lookupSubtable;
+        const LEReferenceTo<ChainingContextualSubstitutionSubtable> subtable(lookupSubtable, success);
 
         delta = subtable->process(this, glyphIterator, fontInstance, success);
         break;
@@ -137,7 +137,7 @@
 
     case gsstExtension:
     {
-        const ExtensionSubtable *subtable = (const ExtensionSubtable *) lookupSubtable;
+        const LEReferenceTo<ExtensionSubtable> subtable(lookupSubtable, success);
 
         delta = subtable->process(this, lookupType, glyphIterator, fontInstance, success);
         break;
--- a/src/share/native/sun/font/layout/GlyphSubstLookupProc.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GlyphSubstLookupProc.h	Wed Apr 17 21:48:04 2013 -0700
@@ -52,7 +52,7 @@
 class GlyphSubstitutionLookupProcessor : public LookupProcessor
 {
 public:
-    GlyphSubstitutionLookupProcessor(const GlyphSubstitutionTableHeader *glyphSubstitutionTableHeader,
+    GlyphSubstitutionLookupProcessor(const LEReferenceTo<GlyphSubstitutionTableHeader> &glyphSubstitutionTableHeader,
         LETag scriptTag,
         LETag languageTag,
         const LEGlyphFilter *filter,
@@ -63,7 +63,7 @@
 
     virtual ~GlyphSubstitutionLookupProcessor();
 
-    virtual le_uint32 applySubtable(const LookupSubtable *lookupSubtable, le_uint16 lookupType, GlyphIterator *glyphIterator,
+    virtual le_uint32 applySubtable(const LEReferenceTo<LookupSubtable> &lookupSubtable, le_uint16 lookupType, GlyphIterator *glyphIterator,
         const LEFontInstance *fontInstance, LEErrorCode& success) const;
 
 protected:
--- a/src/share/native/sun/font/layout/GlyphSubstitutionTables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GlyphSubstitutionTables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -42,11 +42,12 @@
 
 U_NAMESPACE_BEGIN
 
-le_int32 GlyphSubstitutionTableHeader::process(LEGlyphStorage &glyphStorage,
+le_int32 GlyphSubstitutionTableHeader::process(const LEReferenceTo<GlyphSubstitutionTableHeader> &base,
+                                               LEGlyphStorage &glyphStorage,
                                                le_bool rightToLeft,
                                                LETag scriptTag,
                                                LETag languageTag,
-                                           const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
+                                               const LEReferenceTo<GlyphDefinitionTableHeader> &glyphDefinitionTableHeader,
                                                const LEGlyphFilter *filter,
                                                const FeatureMap *featureMap,
                                                le_int32 featureMapCount,
@@ -57,7 +58,7 @@
         return 0;
     }
 
-    GlyphSubstitutionLookupProcessor processor(this, scriptTag, languageTag, filter, featureMap, featureMapCount, featureOrder, success);
+    GlyphSubstitutionLookupProcessor processor(base, scriptTag, languageTag, filter, featureMap, featureMapCount, featureOrder, success);
     return processor.process(glyphStorage, NULL, rightToLeft, glyphDefinitionTableHeader, NULL, success);
 }
 
--- a/src/share/native/sun/font/layout/GlyphSubstitutionTables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/GlyphSubstitutionTables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -50,11 +50,12 @@
 
 struct GlyphSubstitutionTableHeader : public GlyphLookupTableHeader
 {
-    le_int32    process(LEGlyphStorage &glyphStorage,
+  le_int32    process(const LEReferenceTo<GlyphSubstitutionTableHeader> &base,
+                      LEGlyphStorage &glyphStorage,
                         le_bool rightToLeft,
                         LETag scriptTag,
                         LETag languageTag,
-                        const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
+                        const LEReferenceTo<GlyphDefinitionTableHeader> &glyphDefinitionTableHeader,
                         const LEGlyphFilter *filter,
                         const FeatureMap *featureMap,
                         le_int32 featureMapCount,
--- a/src/share/native/sun/font/layout/HanLayoutEngine.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/HanLayoutEngine.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -64,7 +64,7 @@
 #define features (loclFeatureMask)
 
 HanOpenTypeLayoutEngine::HanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-                        le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success)
+                                                 le_int32 typoFlags, const LEReferenceTo<GlyphSubstitutionTableHeader> &gsubTable, LEErrorCode &success)
     : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success)
 {
     fFeatureMap      = featureMap;
--- a/src/share/native/sun/font/layout/HanLayoutEngine.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/HanLayoutEngine.h	Wed Apr 17 21:48:04 2013 -0700
@@ -73,7 +73,7 @@
      * @internal
      */
     HanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-                            le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTablem, LEErrorCode &success);
+                            le_int32 typoFlags, const LEReferenceTo<GlyphSubstitutionTableHeader> &gsubTablem, LEErrorCode &success);
 
 
     /**
--- a/src/share/native/sun/font/layout/HangulLayoutEngine.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/HangulLayoutEngine.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -209,7 +209,7 @@
 }
 
 HangulOpenTypeLayoutEngine::HangulOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 /*languageCode*/,
-                                       le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success)
+                                                       le_int32 typoFlags, const LEReferenceTo<GlyphSubstitutionTableHeader> &gsubTable, LEErrorCode &success)
     : OpenTypeLayoutEngine(fontInstance, scriptCode, korLanguageCode, typoFlags, gsubTable, success)
 {
     fFeatureMap = featureMap;
--- a/src/share/native/sun/font/layout/HangulLayoutEngine.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/HangulLayoutEngine.h	Wed Apr 17 21:48:04 2013 -0700
@@ -79,7 +79,7 @@
      * @internal
      */
     HangulOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-                            le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success);
+                               le_int32 typoFlags, const LEReferenceTo<GlyphSubstitutionTableHeader> &gsubTable, LEErrorCode &success);
 
     /**
      * This constructor is used when the font requires a "canned" GSUB table which can't be known
--- a/src/share/native/sun/font/layout/ICUFeatures.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ICUFeatures.h	Wed Apr 17 21:48:04 2013 -0700
@@ -54,16 +54,21 @@
     le_uint16   lookupCount;
     le_uint16   lookupListIndexArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(FeatureTable, lookupListIndexArray)
 
 struct FeatureListTable
 {
     le_uint16           featureCount;
     FeatureRecord       featureRecordArray[ANY_NUMBER];
 
-    const FeatureTable  *getFeatureTable(le_uint16 featureIndex, LETag *featureTag) const;
+  LEReferenceTo<FeatureTable>  getFeatureTable(const LETableReference &base, le_uint16 featureIndex, LETag *featureTag, LEErrorCode &success) const;
 
-    const FeatureTable *getFeatureTable(LETag featureTag) const;
+#if 0
+  const LEReferenceTo<FeatureTable>  getFeatureTable(const LETableReference &base, LETag featureTag, LEErrorCode &success) const;
+#endif
 };
 
+LE_VAR_ARRAY(FeatureListTable, featureRecordArray)
+
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/IndicClassTables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/IndicClassTables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -186,13 +186,15 @@
 };
 
 // FIXME: Should some of the bb's be pb's? (KA, NA, MA, YA, VA, etc. (approx 13))
+// U+C43 and U+C44 are _lm here not _dr.  Similar to the situation with U+CC3 and
+// U+CC4 in Kannada below.
 static const IndicClassTable::CharClass teluCharClasses[] =
 {
     _xx, _mp, _mp, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _iv, _iv, // 0C00 - 0C0F
     _iv, _xx, _iv, _iv, _iv, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, // 0C10 - 0C1F
     _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _bb, // 0C20 - 0C2F
     _bb, _bb, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _xx, _xx, _xx, _xx, _da, _da, // 0C30 - 0C3F
-    _da, _dr, _dr, _dr, _dr, _xx, _a1, _da, _s1, _xx, _da, _da, _da, _vr, _xx, _xx, // 0C40 - 0C4F
+    _da, _dr, _dr, _lm, _lm, _xx, _a1, _da, _s1, _xx, _da, _da, _da, _vr, _xx, _xx, // 0C40 - 0C4F
     _xx, _xx, _xx, _xx, _xx, _da, _m2, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, // 0C50 - 0C5F
     _iv, _iv, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx  // 0C60 - 0C6F
 };
--- a/src/share/native/sun/font/layout/IndicLayoutEngine.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/IndicLayoutEngine.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -50,7 +50,7 @@
 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicOpenTypeLayoutEngine)
 
 IndicOpenTypeLayoutEngine::IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-                    le_int32 typoFlags, le_bool version2, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success)
+                                                     le_int32 typoFlags, le_bool version2, const LEReferenceTo<GlyphSubstitutionTableHeader> &gsubTable, LEErrorCode &success)
     : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success), fMPreFixups(NULL)
 {
         if ( version2 ) {
--- a/src/share/native/sun/font/layout/IndicLayoutEngine.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/IndicLayoutEngine.h	Wed Apr 17 21:48:04 2013 -0700
@@ -81,7 +81,7 @@
      * @internal
      */
     IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-                            le_int32 typoFlags, le_bool version2, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success);
+                            le_int32 typoFlags, le_bool version2, const LEReferenceTo<GlyphSubstitutionTableHeader> &gsubTable, LEErrorCode &success);
 
     /**
      * This constructor is used when the font requires a "canned" GSUB table which can't be known
--- a/src/share/native/sun/font/layout/IndicRearrangement.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/IndicRearrangement.h	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -49,6 +49,10 @@
 {
 };
 
+struct IndicRearrangementSubtableHeader2 : MorphStateTableHeader2
+{
+};
+
 enum IndicRearrangementFlags
 {
     irfMarkFirst    = 0x8000,
@@ -85,6 +89,10 @@
 {
 };
 
+struct IndicRearrangementStateEntry2 : StateEntry2
+{
+};
+
 U_NAMESPACE_END
 #endif
 
--- a/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -43,11 +43,14 @@
 
 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicRearrangementProcessor)
 
-IndicRearrangementProcessor::IndicRearrangementProcessor(const MorphSubtableHeader *morphSubtableHeader)
-  : StateTableProcessor(morphSubtableHeader)
+  IndicRearrangementProcessor::IndicRearrangementProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success)
+  : StateTableProcessor(morphSubtableHeader, success),
+  indicRearrangementSubtableHeader(morphSubtableHeader, success),
+  entryTable(stateTableHeader, success, (const IndicRearrangementStateEntry*)(&stateTableHeader->stHeader),
+             entryTableOffset, LE_UNBOUNDED_ARRAY),
+  int16Table(stateTableHeader, success, (const le_int16*)entryTable.getAlias(), 0, LE_UNBOUNDED_ARRAY)
+
 {
-    indicRearrangementSubtableHeader = (const IndicRearrangementSubtableHeader *) morphSubtableHeader;
-    entryTable = (const IndicRearrangementStateEntry *) ((char *) &stateTableHeader->stHeader + entryTableOffset);
 }
 
 IndicRearrangementProcessor::~IndicRearrangementProcessor()
@@ -62,7 +65,8 @@
 
 ByteOffset IndicRearrangementProcessor::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index)
 {
-    const IndicRearrangementStateEntry *entry = &entryTable[index];
+  LEErrorCode success = LE_NO_ERROR; // todo- make a param?
+  const IndicRearrangementStateEntry *entry = entryTable.getAlias(index,success);
     ByteOffset newState = SWAPW(entry->newStateOffset);
     IndicRearrangementFlags flags = (IndicRearrangementFlags) SWAPW(entry->flags);
 
--- a/src/share/native/sun/font/layout/IndicRearrangementProcessor.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/IndicRearrangementProcessor.h	Wed Apr 17 21:48:04 2013 -0700
@@ -58,7 +58,7 @@
 
     void doRearrangementAction(LEGlyphStorage &glyphStorage, IndicRearrangementVerb verb) const;
 
-    IndicRearrangementProcessor(const MorphSubtableHeader *morphSubtableHeader);
+    IndicRearrangementProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success);
     virtual ~IndicRearrangementProcessor();
 
     /**
@@ -79,8 +79,9 @@
     le_int32 firstGlyph;
     le_int32 lastGlyph;
 
-    const IndicRearrangementStateEntry *entryTable;
-    const IndicRearrangementSubtableHeader *indicRearrangementSubtableHeader;
+    LEReferenceTo<IndicRearrangementSubtableHeader> indicRearrangementSubtableHeader;
+    LEReferenceToArrayOf<IndicRearrangementStateEntry> entryTable;
+    LEReferenceToArrayOf<le_int16> int16Table;
 
 };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/IndicRearrangementProcessor2.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,425 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "StateTables.h"
+#include "MorphStateTables.h"
+#include "SubtableProcessor2.h"
+#include "StateTableProcessor2.h"
+#include "IndicRearrangementProcessor2.h"
+#include "LEGlyphStorage.h"
+#include "LESwaps.h"
+
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicRearrangementProcessor2)
+
+IndicRearrangementProcessor2::IndicRearrangementProcessor2(
+      const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
+  : StateTableProcessor2(morphSubtableHeader, success), indicRearrangementSubtableHeader(morphSubtableHeader, success),
+  entryTable(stHeader, success, entryTableOffset, LE_UNBOUNDED_ARRAY)
+{
+}
+
+IndicRearrangementProcessor2::~IndicRearrangementProcessor2()
+{
+}
+
+void IndicRearrangementProcessor2::beginStateTable()
+{
+    firstGlyph = 0;
+    lastGlyph = 0;
+}
+
+le_uint16 IndicRearrangementProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph,
+                                                          EntryTableIndex2 index, LEErrorCode &success)
+{
+    const IndicRearrangementStateEntry2 *entry = entryTable.getAlias(index, success);
+    if (LE_FAILURE(success)) return 0; // TODO - what to return in bad state?
+    le_uint16 newState = SWAPW(entry->newStateIndex); // index to the new state
+    IndicRearrangementFlags  flags =  (IndicRearrangementFlags) SWAPW(entry->flags);
+
+    if (flags & irfMarkFirst) {
+        firstGlyph = currGlyph;
+    }
+
+    if (flags & irfMarkLast) {
+        lastGlyph = currGlyph;
+    }
+
+    doRearrangementAction(glyphStorage, (IndicRearrangementVerb) (flags & irfVerbMask));
+
+    if (!(flags & irfDontAdvance)) {
+        currGlyph += dir;
+    }
+
+    return newState; // index to new state
+}
+
+void IndicRearrangementProcessor2::endStateTable()
+{
+}
+
+void IndicRearrangementProcessor2::doRearrangementAction(LEGlyphStorage &glyphStorage, IndicRearrangementVerb verb) const
+{
+    LEGlyphID a, b, c, d;
+    le_int32 ia, ib, ic, id, ix, x;
+    LEErrorCode success = LE_NO_ERROR;
+
+    switch(verb)
+    {
+    case irvNoAction:
+        break;
+
+    case irvxA:
+        a = glyphStorage[firstGlyph];
+        ia = glyphStorage.getCharIndex(firstGlyph, success);
+        x = firstGlyph + 1;
+
+        while (x <= lastGlyph) {
+            glyphStorage[x - 1] = glyphStorage[x];
+            ix = glyphStorage.getCharIndex(x, success);
+            glyphStorage.setCharIndex(x - 1, ix, success);
+            x += 1;
+        }
+
+        glyphStorage[lastGlyph] = a;
+        glyphStorage.setCharIndex(lastGlyph, ia, success);
+        break;
+
+    case irvDx:
+        d = glyphStorage[lastGlyph];
+        id = glyphStorage.getCharIndex(lastGlyph, success);
+        x = lastGlyph - 1;
+
+        while (x >= firstGlyph) {
+            glyphStorage[x + 1] = glyphStorage[x];
+            ix = glyphStorage.getCharIndex(x, success);
+            glyphStorage.setCharIndex(x + 1, ix, success);
+            x -= 1;
+        }
+
+        glyphStorage[firstGlyph] = d;
+        glyphStorage.setCharIndex(firstGlyph, id, success);
+        break;
+
+    case irvDxA:
+        a = glyphStorage[firstGlyph];
+        ia = glyphStorage.getCharIndex(firstGlyph, success);
+        id = glyphStorage.getCharIndex(lastGlyph,  success);
+
+        glyphStorage[firstGlyph] = glyphStorage[lastGlyph];
+        glyphStorage[lastGlyph] = a;
+
+        glyphStorage.setCharIndex(firstGlyph, id, success);
+        glyphStorage.setCharIndex(lastGlyph,  ia, success);
+        break;
+
+    case irvxAB:
+        a = glyphStorage[firstGlyph];
+        b = glyphStorage[firstGlyph + 1];
+        ia = glyphStorage.getCharIndex(firstGlyph, success);
+        ib = glyphStorage.getCharIndex(firstGlyph + 1, success);
+        x = firstGlyph + 2;
+
+        while (x <= lastGlyph) {
+            glyphStorage[x - 2] = glyphStorage[x];
+            ix = glyphStorage.getCharIndex(x, success);
+            glyphStorage.setCharIndex(x - 2, ix, success);
+            x += 1;
+        }
+
+        glyphStorage[lastGlyph - 1] = a;
+        glyphStorage[lastGlyph] = b;
+
+        glyphStorage.setCharIndex(lastGlyph - 1, ia, success);
+        glyphStorage.setCharIndex(lastGlyph, ib, success);
+        break;
+
+    case irvxBA:
+        a = glyphStorage[firstGlyph];
+        b = glyphStorage[firstGlyph + 1];
+        ia = glyphStorage.getCharIndex(firstGlyph, success);
+        ib = glyphStorage.getCharIndex(firstGlyph + 1, success);
+        x = firstGlyph + 2;
+
+        while (x <= lastGlyph) {
+            glyphStorage[x - 2] = glyphStorage[x];
+            ix = glyphStorage.getCharIndex(x, success);
+            glyphStorage.setCharIndex(x - 2, ix, success);
+            x += 1;
+        }
+
+        glyphStorage[lastGlyph - 1] = b;
+        glyphStorage[lastGlyph] = a;
+
+        glyphStorage.setCharIndex(lastGlyph - 1, ib, success);
+        glyphStorage.setCharIndex(lastGlyph, ia, success);
+        break;
+
+    case irvCDx:
+        c = glyphStorage[lastGlyph - 1];
+        d = glyphStorage[lastGlyph];
+        ic = glyphStorage.getCharIndex(lastGlyph - 1, success);
+        id = glyphStorage.getCharIndex(lastGlyph, success);
+        x = lastGlyph - 2;
+
+        while (x >= firstGlyph) {
+            glyphStorage[x + 2] = glyphStorage[x];
+            ix = glyphStorage.getCharIndex(x, success);
+            glyphStorage.setCharIndex(x + 2, ix, success);
+            x -= 1;
+        }
+
+        glyphStorage[firstGlyph] = c;
+        glyphStorage[firstGlyph + 1] = d;
+
+        glyphStorage.setCharIndex(firstGlyph, ic, success);
+        glyphStorage.setCharIndex(firstGlyph + 1, id, success);
+        break;
+
+    case irvDCx:
+        c = glyphStorage[lastGlyph - 1];
+        d = glyphStorage[lastGlyph];
+        ic = glyphStorage.getCharIndex(lastGlyph - 1, success);
+        id = glyphStorage.getCharIndex(lastGlyph, success);
+        x = lastGlyph - 2;
+
+        while (x >= firstGlyph) {
+            glyphStorage[x + 2] = glyphStorage[x];
+            ix = glyphStorage.getCharIndex(x, success);
+            glyphStorage.setCharIndex(x + 2, ix, success);
+            x -= 1;
+        }
+
+        glyphStorage[firstGlyph] = d;
+        glyphStorage[firstGlyph + 1] = c;
+
+        glyphStorage.setCharIndex(firstGlyph, id, success);
+        glyphStorage.setCharIndex(firstGlyph + 1, ic, success);
+        break;
+
+    case irvCDxA:
+        a = glyphStorage[firstGlyph];
+        c = glyphStorage[lastGlyph - 1];
+        d = glyphStorage[lastGlyph];
+        ia = glyphStorage.getCharIndex(firstGlyph, success);
+        ic = glyphStorage.getCharIndex(lastGlyph - 1, success);
+        id = glyphStorage.getCharIndex(lastGlyph, success);
+        x = lastGlyph - 2;
+
+        while (x > firstGlyph) {
+            glyphStorage[x + 1] = glyphStorage[x];
+            ix = glyphStorage.getCharIndex(x, success);
+            glyphStorage.setCharIndex(x + 1, ix, success);
+            x -= 1;
+        }
+
+        glyphStorage[firstGlyph] = c;
+        glyphStorage[firstGlyph + 1] = d;
+        glyphStorage[lastGlyph] = a;
+
+        glyphStorage.setCharIndex(firstGlyph, ic, success);
+        glyphStorage.setCharIndex(firstGlyph + 1, id, success);
+        glyphStorage.setCharIndex(lastGlyph, ia, success);
+        break;
+
+    case irvDCxA:
+        a = glyphStorage[firstGlyph];
+        c = glyphStorage[lastGlyph - 1];
+        d = glyphStorage[lastGlyph];
+        ia = glyphStorage.getCharIndex(firstGlyph, success);
+        ic = glyphStorage.getCharIndex(lastGlyph - 1, success);
+        id = glyphStorage.getCharIndex(lastGlyph, success);
+        x = lastGlyph - 2;
+
+        while (x > firstGlyph) {
+            glyphStorage[x + 1] = glyphStorage[x];
+            ix = glyphStorage.getCharIndex(x, success);
+            glyphStorage.setCharIndex(x + 1, ix, success);
+            x -= 1;
+        }
+
+        glyphStorage[firstGlyph] = d;
+        glyphStorage[firstGlyph + 1] = c;
+        glyphStorage[lastGlyph] = a;
+
+        glyphStorage.setCharIndex(firstGlyph, id, success);
+        glyphStorage.setCharIndex(firstGlyph + 1, ic, success);
+        glyphStorage.setCharIndex(lastGlyph, ia, success);
+        break;
+
+    case irvDxAB:
+        a = glyphStorage[firstGlyph];
+        b = glyphStorage[firstGlyph + 1];
+        d = glyphStorage[lastGlyph];
+        ia = glyphStorage.getCharIndex(firstGlyph, success);
+        ib = glyphStorage.getCharIndex(firstGlyph + 1, success);
+        id = glyphStorage.getCharIndex(lastGlyph, success);
+        x = firstGlyph + 2;
+
+        while (x < lastGlyph) {
+            glyphStorage[x - 2] = glyphStorage[x];
+            ix = glyphStorage.getCharIndex(x, success);
+            glyphStorage.setCharIndex(x - 2, ix, success);
+            x += 1;
+        }
+
+        glyphStorage[firstGlyph] = d;
+        glyphStorage[lastGlyph - 1] = a;
+        glyphStorage[lastGlyph] = b;
+
+        glyphStorage.setCharIndex(firstGlyph, id, success);
+        glyphStorage.setCharIndex(lastGlyph - 1, ia, success);
+        glyphStorage.setCharIndex(lastGlyph, ib, success);
+        break;
+
+    case irvDxBA:
+        a = glyphStorage[firstGlyph];
+        b = glyphStorage[firstGlyph + 1];
+        d = glyphStorage[lastGlyph];
+        ia = glyphStorage.getCharIndex(firstGlyph, success);
+        ib = glyphStorage.getCharIndex(firstGlyph + 1, success);
+        id = glyphStorage.getCharIndex(lastGlyph, success);
+        x = firstGlyph + 2;
+
+        while (x < lastGlyph) {
+            glyphStorage[x - 2] = glyphStorage[x];
+            ix = glyphStorage.getCharIndex(x, success);
+            glyphStorage.setCharIndex(x - 2, ix, success);
+            x += 1;
+        }
+
+        glyphStorage[firstGlyph] = d;
+        glyphStorage[lastGlyph - 1] = b;
+        glyphStorage[lastGlyph] = a;
+
+        glyphStorage.setCharIndex(firstGlyph, id, success);
+        glyphStorage.setCharIndex(lastGlyph - 1, ib, success);
+        glyphStorage.setCharIndex(lastGlyph, ia, success);
+        break;
+
+    case irvCDxAB:
+        a = glyphStorage[firstGlyph];
+        b = glyphStorage[firstGlyph + 1];
+
+        glyphStorage[firstGlyph] = glyphStorage[lastGlyph - 1];
+        glyphStorage[firstGlyph + 1] = glyphStorage[lastGlyph];
+
+        glyphStorage[lastGlyph - 1] = a;
+        glyphStorage[lastGlyph] = b;
+
+        ia = glyphStorage.getCharIndex(firstGlyph, success);
+        ib = glyphStorage.getCharIndex(firstGlyph + 1, success);
+        ic = glyphStorage.getCharIndex(lastGlyph - 1, success);
+        id = glyphStorage.getCharIndex(lastGlyph, success);
+
+        glyphStorage.setCharIndex(firstGlyph, ic, success);
+        glyphStorage.setCharIndex(firstGlyph + 1, id, success);
+
+        glyphStorage.setCharIndex(lastGlyph - 1, ia, success);
+        glyphStorage.setCharIndex(lastGlyph, ib, success);
+        break;
+
+    case irvCDxBA:
+        a = glyphStorage[firstGlyph];
+        b = glyphStorage[firstGlyph + 1];
+
+        glyphStorage[firstGlyph] = glyphStorage[lastGlyph - 1];
+        glyphStorage[firstGlyph + 1] = glyphStorage[lastGlyph];
+
+        glyphStorage[lastGlyph - 1] = b;
+        glyphStorage[lastGlyph] = a;
+
+        ia = glyphStorage.getCharIndex(firstGlyph, success);
+        ib = glyphStorage.getCharIndex(firstGlyph + 1, success);
+        ic = glyphStorage.getCharIndex(lastGlyph - 1, success);
+        id = glyphStorage.getCharIndex(lastGlyph, success);
+
+        glyphStorage.setCharIndex(firstGlyph, ic, success);
+        glyphStorage.setCharIndex(firstGlyph + 1, id, success);
+
+        glyphStorage.setCharIndex(lastGlyph - 1, ib, success);
+        glyphStorage.setCharIndex(lastGlyph, ia, success);
+        break;
+
+    case irvDCxAB:
+        a = glyphStorage[firstGlyph];
+        b = glyphStorage[firstGlyph + 1];
+
+        glyphStorage[firstGlyph] = glyphStorage[lastGlyph];
+        glyphStorage[firstGlyph + 1] = glyphStorage[lastGlyph - 1];
+
+        glyphStorage[lastGlyph - 1] = a;
+        glyphStorage[lastGlyph] = b;
+
+        ia = glyphStorage.getCharIndex(firstGlyph, success);
+        ib = glyphStorage.getCharIndex(firstGlyph + 1, success);
+        ic = glyphStorage.getCharIndex(lastGlyph - 1, success);
+        id = glyphStorage.getCharIndex(lastGlyph, success);
+
+        glyphStorage.setCharIndex(firstGlyph, id, success);
+        glyphStorage.setCharIndex(firstGlyph + 1, ic, success);
+
+        glyphStorage.setCharIndex(lastGlyph - 1, ia, success);
+        glyphStorage.setCharIndex(lastGlyph, ib, success);
+        break;
+
+    case irvDCxBA:
+        a = glyphStorage[firstGlyph];
+        b = glyphStorage[firstGlyph + 1];
+
+        glyphStorage[firstGlyph] = glyphStorage[lastGlyph];
+        glyphStorage[firstGlyph + 1] = glyphStorage[lastGlyph - 1];
+
+        glyphStorage[lastGlyph - 1] = b;
+        glyphStorage[lastGlyph] = a;
+
+        ia = glyphStorage.getCharIndex(firstGlyph, success);
+        ib = glyphStorage.getCharIndex(firstGlyph + 1, success);
+        ic = glyphStorage.getCharIndex(lastGlyph - 1, success);
+        id = glyphStorage.getCharIndex(lastGlyph, success);
+
+        glyphStorage.setCharIndex(firstGlyph, id, success);
+        glyphStorage.setCharIndex(firstGlyph + 1, ic, success);
+
+        glyphStorage.setCharIndex(lastGlyph - 1, ib, success);
+        glyphStorage.setCharIndex(lastGlyph, ia, success);
+        break;
+
+    default:
+        break;
+    }
+
+}
+
+U_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/IndicRearrangementProcessor2.h	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#ifndef __INDICREARRANGEMENTPROCESSOR2_H
+#define __INDICREARRANGEMENTPROCESSOR2_H
+
+/**
+ * \file
+ * \internal
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor.h"
+#include "StateTableProcessor2.h"
+#include "IndicRearrangement.h"
+
+U_NAMESPACE_BEGIN
+
+class LEGlyphStorage;
+
+class IndicRearrangementProcessor2 : public StateTableProcessor2
+{
+public:
+    virtual void beginStateTable();
+
+    virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index, LEErrorCode &success);
+
+    virtual void endStateTable();
+
+    void doRearrangementAction(LEGlyphStorage &glyphStorage, IndicRearrangementVerb verb) const;
+
+    IndicRearrangementProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success);
+    virtual ~IndicRearrangementProcessor2();
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
+protected:
+    le_int32 firstGlyph;
+    le_int32 lastGlyph;
+
+    LEReferenceToArrayOf<IndicRearrangementStateEntry2> entryTable;
+    LEReferenceTo<IndicRearrangementSubtableHeader2> indicRearrangementSubtableHeader;
+
+};
+
+U_NAMESPACE_END
+#endif
--- a/src/share/native/sun/font/layout/IndicReordering.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/IndicReordering.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -266,7 +266,7 @@
                                         le_uint32 saveAuxData = fGlyphStorage.getAuxData(i+inv_count,success);
                     const SplitMatra *splitMatra = classTable->getSplitMatra(matraClass);
                     int j;
-                    for (j = 0 ; *(splitMatra)[j] != 0 ; j++) {
+                    for (j = 0 ; j < SM_MAX_PIECES && *(splitMatra)[j] != 0 ; j++) {
                         LEUnicode piece = (*splitMatra)[j];
                                                 if ( j == 0 ) {
                                                         fOutChars[i+inv_count] = piece;
@@ -357,7 +357,7 @@
                 const SplitMatra *splitMatra = classTable->getSplitMatra(matraClass);
                 int i;
 
-                for (i = 0; i < 3 && (*splitMatra)[i] != 0; i += 1) {
+                for (i = 0; i < SM_MAX_PIECES && (*splitMatra)[i] != 0; i += 1) {
                     LEUnicode piece = (*splitMatra)[i];
                     IndicClassTable::CharClass pieceClass = classTable->getCharClass(piece);
 
@@ -658,6 +658,11 @@
     MPreFixups *mpreFixups = NULL;
     const IndicClassTable *classTable = IndicClassTable::getScriptClassTable(scriptCode);
 
+    if(classTable==NULL) {
+      success = LE_MEMORY_ALLOCATION_ERROR;
+      return 0;
+    }
+
     if (classTable->scriptFlags & SF_MPRE_FIXUP) {
         mpreFixups = new MPreFixups(charCount);
         if (mpreFixups == NULL) {
@@ -1224,7 +1229,6 @@
 
 
     LEUnicode currentChar;
-    LEUnicode virama;
     LEUnicode workChars[2];
     LEGlyphStorage workGlyphs;
 
@@ -1232,14 +1236,17 @@
 
     //le_int32 offset = 0;
 
+#if 0
+// TODO:  Should this section of code have actually been doing something?
     // First find the relevant virama for the script we are dealing with
-
+    LEUnicode virama;
     for ( currentChar = classTable->firstChar ; currentChar <= classTable->lastChar ; currentChar++ ) {
         if ( classTable->isVirama(currentChar)) {
             virama = currentChar;
             break;
         }
     }
+#endif
 
     for ( currentChar = classTable->firstChar ; currentChar <= classTable->lastChar ; currentChar++ ) {
         if ( classTable->isConsonant(currentChar)) {
--- a/src/share/native/sun/font/layout/IndicReordering.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/IndicReordering.h	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2009 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -96,7 +96,9 @@
 #define SF_POST_BASE_LIMIT_MASK  0x0000FFFFU
 #define SF_NO_POST_BASE_LIMIT    0x00007FFFU
 
-typedef LEUnicode SplitMatra[3];
+#define SM_MAX_PIECES 3
+
+typedef LEUnicode SplitMatra[SM_MAX_PIECES];
 
 class MPreFixups;
 class LEGlyphStorage;
--- a/src/share/native/sun/font/layout/KernTable.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/KernTable.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -48,7 +48,7 @@
   le_int16  value; // fword, kern value in funits
 };
 #define KERN_PAIRINFO_SIZE 6
-
+LE_CORRECT_SIZE(PairInfo, KERN_PAIRINFO_SIZE)
 struct Subtable_0 {
   le_uint16 nPairs;
   le_uint16 searchRange;
@@ -56,6 +56,7 @@
   le_uint16 rangeShift;
 };
 #define KERN_SUBTABLE_0_HEADER_SIZE 8
+LE_CORRECT_SIZE(Subtable_0, KERN_SUBTABLE_0_HEADER_SIZE)
 
 // Kern table version 0 only
 struct SubtableHeader {
@@ -64,6 +65,7 @@
   le_uint16 coverage;
 };
 #define KERN_SUBTABLE_HEADER_SIZE 6
+LE_CORRECT_SIZE(SubtableHeader, KERN_SUBTABLE_HEADER_SIZE)
 
 // Version 0 only, version 1 has different layout
 struct KernTableHeader {
@@ -71,6 +73,7 @@
   le_uint16 nTables;
 };
 #define KERN_TABLE_HEADER_SIZE 4
+LE_CORRECT_SIZE(KernTableHeader, KERN_TABLE_HEADER_SIZE)
 
 #define COVERAGE_HORIZONTAL 0x1
 #define COVERAGE_MINIMUM 0x2
@@ -92,21 +95,21 @@
  * TODO: support multiple subtables
  * TODO: respect header flags
  */
-KernTable::KernTable(const LEFontInstance* font_, const void* tableData)
-  : pairs(0), font(font_)
+KernTable::KernTable(const LETableReference& base, LEErrorCode &success)
+  : pairs(), pairsSwapped(NULL), fTable(base)
 {
-  const KernTableHeader* header = (const KernTableHeader*)tableData;
-  if (header == 0) {
+  if(LE_FAILURE(success) || (fTable.isEmpty())) {
 #if DEBUG
     fprintf(stderr, "no kern data\n");
 #endif
     return;
   }
+  LEReferenceTo<KernTableHeader> header(fTable, success);
 
 #if DEBUG
   // dump first 32 bytes of header
   for (int i = 0; i < 64; ++i) {
-    fprintf(stderr, "%0.2x ", ((const char*)tableData)[i]&0xff);
+    fprintf(stderr, "%0.2x ", ((const char*)header.getAlias())[i]&0xff);
     if (((i+1)&0xf) == 0) {
       fprintf(stderr, "\n");
     } else if (((i+1)&0x7) == 0) {
@@ -115,12 +118,17 @@
   }
 #endif
 
-  if (header->version == 0 && SWAPW(header->nTables) > 0) {
-    const SubtableHeader* subhead = (const SubtableHeader*)((char*)tableData + KERN_TABLE_HEADER_SIZE);
-    if (subhead->version == 0) {
+  if(LE_FAILURE(success)) return;
+
+  if (!header.isEmpty() && header->version == 0 && SWAPW(header->nTables) > 0) {
+    LEReferenceTo<SubtableHeader> subhead(header, success, KERN_TABLE_HEADER_SIZE);
+
+    if (LE_SUCCESS(success) && !subhead.isEmpty() && subhead->version == 0) {
       coverage = SWAPW(subhead->coverage);
       if (coverage & COVERAGE_HORIZONTAL) { // only handle horizontal kerning
-        const Subtable_0* table = (const Subtable_0*)((char*)subhead + KERN_SUBTABLE_HEADER_SIZE);
+        LEReferenceTo<Subtable_0> table(subhead, success, KERN_SUBTABLE_HEADER_SIZE);
+
+        if(table.isEmpty() || LE_FAILURE(success)) return;
 
         nPairs        = SWAPW(table->nPairs);
 
@@ -134,19 +142,31 @@
         rangeShift    = (nPairs * KERN_PAIRINFO_SIZE) - searchRange;
 #endif
 
-        pairs = (PairInfo*)font->getKernPairs();
-        if (pairs == NULL) {
-            char *pairData = (char*)table + KERN_SUBTABLE_0_HEADER_SIZE;
-            char *pptr = pairData;
-            pairs =  (PairInfo*)(malloc(nPairs*sizeof(PairInfo)));
-            PairInfo *p = (PairInfo*)pairs;
-            for (int i = 0; i < nPairs; i++, pptr += KERN_PAIRINFO_SIZE, p++) {
-              memcpy(p, pptr, KERN_PAIRINFO_SIZE);
+        if(LE_SUCCESS(success) && nPairs>0) {
+          // pairs is an instance member, and table is on the stack.
+          // set 'pairs' based on table.getAlias(). This will range check it.
+
+          pairs = LEReferenceToArrayOf<PairInfo>(fTable, // based on overall table
+                                                 success,
+                                                 (const PairInfo*)table.getAlias(),  // subtable 0 + ..
+                                                 KERN_SUBTABLE_0_HEADER_SIZE,  // .. offset of header size
+                                                 nPairs); // count
+        }
+        if (LE_SUCCESS(success) && pairs.isValid()) {
+            pairsSwapped =  (PairInfo*)(malloc(nPairs*sizeof(PairInfo)));
+            PairInfo *p = (PairInfo*)pairsSwapped;
+            for (int i = 0; LE_SUCCESS(success) && i < nPairs; i++, p++) {
+              memcpy(p, pairs.getAlias(i,success), KERN_PAIRINFO_SIZE);
               p->key = SWAPL(p->key);
             }
-            font->setKernPairs((void*)pairs);
+            fTable.getFont()->setKernPairs((void*)pairsSwapped); // store it
         }
 
+#if 0
+        fprintf(stderr, "coverage: %0.4x nPairs: %d pairs %p\n", coverage, nPairs, pairs.getAlias());
+        fprintf(stderr, "  searchRange: %d entrySelector: %d rangeShift: %d\n", searchRange, entrySelector, rangeShift);
+        fprintf(stderr, "[[ ignored font table entries: range %d selector %d shift %d ]]\n", SWAPW(table->searchRange), SWAPW(table->entrySelector), SWAPW(table->rangeShift));
+#endif
 #if DEBUG
         fprintf(stderr, "coverage: %0.4x nPairs: %d pairs 0x%x\n", coverage, nPairs, pairs);
         fprintf(stderr,
@@ -194,14 +214,17 @@
  * Process the glyph positions.  The positions array has two floats for each
  * glyph, plus a trailing pair to mark the end of the last glyph.
  */
-void KernTable::process(LEGlyphStorage& storage)
+void KernTable::process(LEGlyphStorage& storage, LEErrorCode &success)
 {
-  if (pairs) {
-    LEErrorCode success = LE_NO_ERROR;
+  if(LE_FAILURE(success)) return;
+
+  if (pairsSwapped) {
+    success = LE_NO_ERROR;
 
     le_uint32 key = storage[0]; // no need to mask off high bits
     float adjust = 0;
-    for (int i = 1, e = storage.getGlyphCount(); i < e; ++i) {
+
+    for (int i = 1, e = storage.getGlyphCount(); LE_SUCCESS(success)&&  i < e; ++i) {
       key = key << 16 | (storage[i] & 0xffff);
 
       // argh, to do a binary search, we need to have the pair list in sorted order
@@ -209,7 +232,7 @@
       // so either I have to swap the element each time I examine it, or I have to swap
       // all the elements ahead of time and store them in the font
 
-      const PairInfo* p = pairs;
+      const PairInfo* p = pairsSwapped;
       const PairInfo* tp = (const PairInfo*)(p + (rangeShift/KERN_PAIRINFO_SIZE)); /* rangeshift is in original table bytes */
       if (key > tp->key) {
         p = tp;
@@ -225,7 +248,7 @@
         tp = (const PairInfo*)(p + (probe/KERN_PAIRINFO_SIZE));
         le_uint32 tkey = tp->key;
 #if DEBUG
-        fprintf(stdout, "   %.3d (%0.8x)\n", (tp - pairs), tkey);
+        fprintf(stdout, "   %.3d (%0.8x)\n", (tp - pairsSwapped), tkey);
 #endif
         if (tkey <= key) {
           if (tkey == key) {
@@ -240,10 +263,10 @@
             // device transform, or a faster way, such as moving the
             // entire kern table up to Java.
             LEPoint pt;
-            pt.fX = font->xUnitsToPoints(value);
+            pt.fX = fTable.getFont()->xUnitsToPoints(value);
             pt.fY = 0;
 
-            font->getKerningAdjustment(pt);
+            fTable.getFont()->getKerningAdjustment(pt);
             adjust += pt.fX;
             break;
           }
--- a/src/share/native/sun/font/layout/KernTable.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/KernTable.h	Wed Apr 17 21:48:04 2013 -0700
@@ -26,7 +26,7 @@
 /*
  *
  *
- * (C) Copyright IBM Corp. 2004-2005 - All Rights Reserved
+ * (C) Copyright IBM Corp. 2004-2013 - All Rights Reserved
  *
  */
 
@@ -38,6 +38,7 @@
 #endif
 
 #include "LETypes.h"
+#include "LETableReference.h"
 //#include "LEFontInstance.h"
 //#include "LEGlyphStorage.h"
 
@@ -56,19 +57,20 @@
  private:
   le_uint16 coverage;
   le_uint16 nPairs;
-  const PairInfo* pairs;
-  const LEFontInstance* font;
+  LEReferenceToArrayOf<PairInfo> pairs;
+  PairInfo  *pairsSwapped;
+  const LETableReference &fTable;
   le_uint16 searchRange;
   le_uint16 entrySelector;
   le_uint16 rangeShift;
 
  public:
-  KernTable(const LEFontInstance* font, const void* tableData);
+  KernTable(const LETableReference &table, LEErrorCode &success);
 
   /*
    * Process the glyph positions.
    */
-  void process(LEGlyphStorage& storage);
+  void process(LEGlyphStorage& storage, LEErrorCode &success);
 };
 
 U_NAMESPACE_END
--- a/src/share/native/sun/font/layout/KhmerLayoutEngine.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/KhmerLayoutEngine.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -43,7 +43,7 @@
 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(KhmerOpenTypeLayoutEngine)
 
 KhmerOpenTypeLayoutEngine::KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-                    le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success)
+                                                     le_int32 typoFlags, const LEReferenceTo<GlyphSubstitutionTableHeader> &gsubTable, LEErrorCode &success)
     : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success)
 {
     fFeatureMap   = KhmerReordering::getFeatureMap(fFeatureMapCount);
--- a/src/share/native/sun/font/layout/KhmerLayoutEngine.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/KhmerLayoutEngine.h	Wed Apr 17 21:48:04 2013 -0700
@@ -83,7 +83,7 @@
      * @internal
      */
     KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-                            le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success);
+                            le_int32 typoFlags, const LEReferenceTo<GlyphSubstitutionTableHeader> &gsubTable, LEErrorCode &success);
 
     /**
      * This constructor is used when the font requires a "canned" GSUB table which can't be known
--- a/src/share/native/sun/font/layout/LEFontInstance.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LEFontInstance.h	Wed Apr 17 21:48:04 2013 -0700
@@ -190,6 +190,25 @@
      */
     virtual const void *getFontTable(LETag tableTag) const = 0;
 
+    /**
+     * This method reads a table from the font. Note that in general,
+     * it only makes sense to call this method on an <code>LEFontInstance</code>
+     * which represents a physical font - i.e. one which has been returned by
+     * <code>getSubFont()</code>. This is because each subfont in a composite font
+     * will have different tables, and there's no way to know which subfont to access.
+     *
+     * Subclasses which represent composite fonts should always return <code>NULL</code>.
+     *
+     * This version sets a length, for range checking.
+     *
+     * @param tableTag - the four byte table tag. (e.g. 'cmap')
+     * @param length - ignored on entry, on exit will be the length of the table if known, or -1 if unknown.
+     * @return the address of the table in memory, or <code>NULL</code>
+     *         if the table doesn't exist.
+     * @internal
+     */
+    virtual const void* getFontTable(LETag tableTag, size_t &length) const { length=-1; return getFontTable(tableTag); }  /* -1 = unknown length */
+
     virtual void *getKernPairs() const = 0;
     virtual void  setKernPairs(void *pairs) const = 0;
 
--- a/src/share/native/sun/font/layout/LEGlyphFilter.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LEGlyphFilter.h	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -36,6 +36,7 @@
 
 U_NAMESPACE_BEGIN
 
+#ifndef U_HIDE_INTERNAL_API
 /**
  * This is a helper class that is used to
  * recognize a set of glyph indices.
@@ -63,6 +64,7 @@
      */
     virtual le_bool accept(LEGlyphID glyph) const = 0;
 };
+#endif  /* U_HIDE_INTERNAL_API */
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/LEInsertionList.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LEInsertionList.h	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  **********************************************************************
- *   Copyright (C) 1998-2008, International Business Machines
+ *   Copyright (C) 1998-2013, International Business Machines
  *   Corporation and others.  All Rights Reserved.
  **********************************************************************
  */
@@ -39,6 +39,7 @@
 
 struct InsertionRecord;
 
+#ifndef U_HIDE_INTERNAL_API
 /**
  * This class encapsulates the callback used by <code>LEInsertionList</code>
  * to apply an insertion from the insertion list.
@@ -194,6 +195,7 @@
      */
     le_bool  append;
 };
+#endif  /* U_HIDE_INTERNAL_API */
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/LEScripts.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LEScripts.h	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2010. All Rights Reserved.
+ * (C) Copyright IBM Corp. 1998-2013. All Rights Reserved.
  *
  * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS
  * YOU REALLY KNOW WHAT YOU'RE DOING.
@@ -241,8 +241,28 @@
     palmScriptCode = 144,
     sindScriptCode = 145,
     waraScriptCode = 146,
+/**
+ * @stable ICU 4.8
+ */
 
-    scriptCodeCount = 147
+    afakScriptCode = 147,
+    jurcScriptCode = 148,
+    mrooScriptCode = 149,
+    nshuScriptCode = 150,
+    shrdScriptCode = 151,
+    soraScriptCode = 152,
+    takrScriptCode = 153,
+    tangScriptCode = 154,
+    woleScriptCode = 155,
+/**
+ * @stable ICU 49
+ */
+
+    hluwScriptCode = 156, /* bump to match current ICU */
+    khojScriptCode = 157,
+    tirhScriptCode = 158,
+
+    scriptCodeCount = 159
 };
 
 U_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/LETableReference.h	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,442 @@
+/*
+ * 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.
+ */
+
+/*
+ * -*- c++ -*-
+ *
+ * (C) Copyright IBM Corp. and others 2013 - All Rights Reserved
+ *
+ * Range checking
+ *
+ */
+
+#ifndef __LETABLEREFERENCE_H
+#define __LETABLEREFERENCE_H
+
+#include "LETypes.h"
+#include "LEFontInstance.h"
+
+
+#define kQuestionmarkTableTag  0x3F3F3F3FUL
+#define kTildeTableTag  0x7e7e7e7eUL
+#ifdef __cplusplus
+
+// internal - interface for range checking
+U_NAMESPACE_BEGIN
+
+#if LE_ASSERT_BAD_FONT
+class LETableReference; // fwd
+/**
+ *  defined in OpenTypeUtilities.cpp
+ * @internal
+ */
+extern void _debug_LETableReference(const char *f, int l, const char *msg, const LETableReference *what, const void *ptr, size_t len);
+
+#define LE_DEBUG_TR(x) _debug_LETableReference(__FILE__, __LINE__, x, this, NULL, 0);
+#define LE_DEBUG_TR3(x,y,z) _debug_LETableReference(__FILE__, __LINE__, x, this, (const void*)y, (size_t)z);
+#if 0
+#define LE_TRACE_TR(x) _debug_LETableReference(__FILE__, __LINE__, x, this, NULL, 0);
+#else
+#define LE_TRACE_TR(x)
+#endif
+
+#else
+#define LE_DEBUG_TR(x)
+#define LE_DEBUG_TR3(x,y,z)
+#define LE_TRACE_TR(x)
+#endif
+
+/**
+ * @internal
+ */
+class LETableReference {
+public:
+/**
+ * @internal
+ * Construct from a specific tag
+ */
+  LETableReference(const LEFontInstance* font, LETag tableTag, LEErrorCode &success) :
+    fFont(font), fTag(tableTag), fParent(NULL), fStart(NULL),fLength(LE_UINTPTR_MAX) {
+      loadTable(success);
+    LE_TRACE_TR("INFO: new table load")
+  }
+
+  LETableReference(const LETableReference &parent, LEErrorCode &success) : fFont(parent.fFont), fTag(parent.fTag), fParent(&parent), fStart(parent.fStart), fLength(parent.fLength) {
+    if(LE_FAILURE(success)) {
+      clear();
+    }
+    LE_TRACE_TR("INFO: new clone")
+  }
+
+   LETableReference(const le_uint8* data, size_t length = LE_UINTPTR_MAX) :
+    fFont(NULL), fTag(kQuestionmarkTableTag), fParent(NULL), fStart(data), fLength(length) {
+    LE_TRACE_TR("INFO: new raw")
+  }
+  LETableReference() :
+    fFont(NULL), fTag(kQuestionmarkTableTag), fParent(NULL), fStart(NULL), fLength(0) {
+    LE_TRACE_TR("INFO: new empty")
+  }
+
+  ~LETableReference() {
+    fTag=kTildeTableTag;
+    LE_TRACE_TR("INFO: new dtor")
+  }
+
+  /**
+   * @internal
+   * @param length  if LE_UINTPTR_MAX means "whole table"
+   * subset
+   */
+  LETableReference(const LETableReference &parent, size_t offset, size_t length,
+                   LEErrorCode &err) :
+    fFont(parent.fFont), fTag(parent.fTag), fParent(&parent),
+    fStart((parent.fStart)+offset), fLength(length) {
+    if(LE_SUCCESS(err)) {
+      if(isEmpty()) {
+        //err = LE_MISSING_FONT_TABLE_ERROR;
+        clear(); // it's just empty. Not an error.
+      } else if(offset >= fParent->fLength) {
+        LE_DEBUG_TR3("offset out of range: (%p) +%d", NULL, offset);
+        err = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+        clear();
+      } else {
+        if(fLength == LE_UINTPTR_MAX &&
+           fParent->fLength != LE_UINTPTR_MAX) {
+          fLength = (fParent->fLength) - offset; // decrement length as base address is incremented
+        }
+        if(fLength != LE_UINTPTR_MAX) {  // if we have bounds:
+          if(offset+fLength > fParent->fLength) {
+            LE_DEBUG_TR3("offset+fLength out of range: (%p) +%d", NULL, offset+fLength);
+            err = LE_INDEX_OUT_OF_BOUNDS_ERROR; // exceeded
+            clear();
+          }
+        }
+      }
+    } else {
+      clear();
+    }
+    LE_TRACE_TR("INFO: new subset")
+  }
+
+  const void* getAlias() const { return (const void*)fStart; }
+  const void* getAliasTODO() const { LE_DEBUG_TR("getAliasTODO()"); return (const void*)fStart; }
+  le_bool isEmpty() const { return fStart==NULL || fLength==0; }
+  le_bool isValid() const { return !isEmpty(); }
+  le_bool hasBounds() const { return fLength!=LE_UINTPTR_MAX; }
+  void clear() { fLength=0; fStart=NULL; }
+  size_t getLength() const { return fLength; }
+  const LEFontInstance* getFont() const { return fFont; }
+  LETag getTag() const { return fTag; }
+  const LETableReference* getParent() const { return fParent; }
+
+  void addOffset(size_t offset, LEErrorCode &success) {
+    if(hasBounds()) {
+      if(offset > fLength) {
+        LE_DEBUG_TR("addOffset off end");
+        success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+        return;
+      } else {
+        fLength -= offset;
+      }
+    }
+    fStart += offset;
+  }
+
+  size_t ptrToOffset(const void *atPtr, LEErrorCode &success) const {
+    if(atPtr==NULL) return 0;
+    if(LE_FAILURE(success)) return LE_UINTPTR_MAX;
+    if((atPtr < fStart) ||
+       (hasBounds() && (atPtr > fStart+fLength))) {
+      LE_DEBUG_TR3("ptrToOffset args out of range: %p", atPtr, 0);
+      success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+      return LE_UINTPTR_MAX;
+    }
+    return ((const le_uint8*)atPtr)-fStart;
+  }
+
+  /**
+   * Clamp down the length, for range checking.
+   */
+  size_t contractLength(size_t newLength) {
+    if(fLength!=LE_UINTPTR_MAX&&newLength>0&&newLength<=fLength) {
+      fLength = newLength;
+    }
+    return fLength;
+  }
+
+  /**
+   * Throw an error if offset+length off end
+   */
+public:
+  size_t verifyLength(size_t offset, size_t length, LEErrorCode &success) {
+    if(isValid()&&
+       LE_SUCCESS(success) &&
+       fLength!=LE_UINTPTR_MAX && length!=LE_UINTPTR_MAX && offset!=LE_UINTPTR_MAX &&
+       (offset+length)>fLength) {
+      LE_DEBUG_TR3("verifyLength failed (%p) %d",NULL, offset+length);
+      success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+#if LE_ASSERT_BAD_FONT
+      fprintf(stderr, "offset=%lu, len=%lu, would be at %p, (%lu) off end. End at %p\n", offset,length, fStart+offset+length, (offset+length-fLength), (offset+length-fLength)+fStart);
+#endif
+    }
+    return fLength;
+  }
+
+  /**
+   * Change parent link to another
+   */
+  LETableReference &reparent(const LETableReference &base) {
+    fParent = &base;
+    return *this;
+  }
+
+  /**
+   * remove parent link. Factory functions should do this.
+   */
+  void orphan(void) {
+    fParent=NULL;
+  }
+
+protected:
+  const LEFontInstance* fFont;
+  LETag  fTag;
+  const LETableReference *fParent;
+  const le_uint8 *fStart; // keep as 8 bit internally, for pointer math
+  size_t fLength;
+
+  void loadTable(LEErrorCode &success) {
+    if(LE_SUCCESS(success)) {
+      fStart = (const le_uint8*)(fFont->getFontTable(fTag, fLength)); // note - a null table is not an error.
+    }
+  }
+
+  void setRaw(const void *data, size_t length = LE_UINTPTR_MAX) {
+    fFont = NULL;
+    fTag = kQuestionmarkTableTag;
+    fParent = NULL;
+    fStart = (const le_uint8*)data;
+    fLength = length;
+  }
+};
+
+
+template<class T>
+class LETableVarSizer {
+ public:
+  inline static size_t getSize();
+};
+
+// base definition- could override for adjustments
+template<class T> inline
+size_t LETableVarSizer<T>::getSize() {
+  return sizeof(T);
+}
+
+/**
+ * \def LE_VAR_ARRAY
+ * @param x Type (T)
+ * @param y some member that is of length ANY_NUMBER
+ * Call this after defining a class, for example:
+ *   LE_VAR_ARRAY(FeatureListTable,featureRecordArray)
+ * this is roughly equivalent to:
+ *   template<> inline size_t LETableVarSizer<FeatureListTable>::getSize() { return sizeof(FeatureListTable) - (sizeof(le_uint16)*ANY_NUMBER); }
+ * it's a specialization that informs the LETableReference subclasses to NOT include the variable array in the size.
+ * dereferencing NULL is valid here because we never actually dereference it, just inside sizeof.
+ */
+#define LE_VAR_ARRAY(x,y) template<> inline size_t LETableVarSizer<x>::getSize() { return sizeof(x) - (sizeof(((const x*)0)->y)); }
+/**
+ * \def LE_CORRECT_SIZE
+ * @param x type (T)
+ * @param y fixed size for T
+ */
+#define LE_CORRECT_SIZE(x,y) template<> inline size_t LETableVarSizer<x>::getSize() { return y; }
+
+/**
+ * Open a new entry based on an existing table
+ */
+
+/**
+ * \def LE_UNBOUNDED_ARRAY
+ * define an array with no *known* bound. Will trim to available size.
+ * @internal
+ */
+#define LE_UNBOUNDED_ARRAY LE_UINT32_MAX
+
+template<class T>
+class LEReferenceToArrayOf : public LETableReference {
+public:
+  LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, size_t offset, le_uint32 count)
+    : LETableReference(parent, offset, LE_UINTPTR_MAX, success), fCount(count) {
+    LE_TRACE_TR("INFO: new RTAO by offset")
+    if(LE_SUCCESS(success)) {
+      if(count == LE_UNBOUNDED_ARRAY) { // not a known length
+        count = getLength()/LETableVarSizer<T>::getSize(); // fit to max size
+      }
+      LETableReference::verifyLength(0, LETableVarSizer<T>::getSize()*count, success);
+    }
+    if(LE_FAILURE(success)) {
+      fCount=0;
+      clear();
+    }
+  }
+
+  LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, const T* array, le_uint32 count)
+    : LETableReference(parent, parent.ptrToOffset(array, success), LE_UINTPTR_MAX, success), fCount(count) {
+LE_TRACE_TR("INFO: new RTAO")
+    if(LE_SUCCESS(success)) {
+      if(count == LE_UNBOUNDED_ARRAY) { // not a known length
+        count = getLength()/LETableVarSizer<T>::getSize(); // fit to max size
+      }
+      LETableReference::verifyLength(0, LETableVarSizer<T>::getSize()*count, success);
+    }
+    if(LE_FAILURE(success)) clear();
+  }
+ LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, const T* array, size_t offset, le_uint32 count)
+   : LETableReference(parent, parent.ptrToOffset(array, success)+offset, LE_UINTPTR_MAX, success), fCount(count) {
+LE_TRACE_TR("INFO: new RTAO")
+    if(LE_SUCCESS(success)) {
+      if(count == LE_UNBOUNDED_ARRAY) { // not a known length
+        count = getLength()/LETableVarSizer<T>::getSize(); // fit to max size
+      }
+      LETableReference::verifyLength(0, LETableVarSizer<T>::getSize()*count, success);
+    }
+    if(LE_FAILURE(success)) clear();
+  }
+
+ LEReferenceToArrayOf() :LETableReference(), fCount(0) {}
+
+  le_uint32 getCount() const { return fCount; }
+
+  using LETableReference::getAlias;
+
+  const T *getAlias(le_uint32 i, LEErrorCode &success) const {
+    return ((const T*)(((const char*)getAlias())+getOffsetFor(i, success)));
+  }
+
+  const T *getAliasTODO() const { LE_DEBUG_TR("getAliasTODO<>"); return (const T*)fStart; }
+
+  const T& getObject(le_uint32 i, LEErrorCode &success) const {
+    return *getAlias(i,success);
+  }
+
+  const T& operator()(le_uint32 i, LEErrorCode &success) const {
+    return *getAlias(i,success);
+  }
+
+  size_t getOffsetFor(le_uint32 i, LEErrorCode &success) const {
+    if(LE_SUCCESS(success)&&i<getCount()) {
+      return LETableVarSizer<T>::getSize()*i;
+    } else {
+      success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+    }
+    return 0;
+  }
+
+  LEReferenceToArrayOf<T> &reparent(const LETableReference &base) {
+    fParent = &base;
+    return *this;
+  }
+
+ LEReferenceToArrayOf(const LETableReference& parent, LEErrorCode & success) : LETableReference(parent,0, LE_UINTPTR_MAX, success), fCount(0) {
+    LE_TRACE_TR("INFO: null RTAO")
+  }
+
+private:
+  le_uint32 fCount;
+};
+
+
+template<class T>
+class LEReferenceTo : public LETableReference {
+public:
+  /**
+   * open a sub reference.
+   * @param parent parent reference
+   * @param success error status
+   * @param atPtr location of reference - if NULL, will be at offset zero (i.e. downcast of parent). Otherwise must be a pointer within parent's bounds.
+   */
+  LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr)
+    : LETableReference(parent, parent.ptrToOffset(atPtr, success), LE_UINTPTR_MAX, success) {
+    verifyLength(0, LETableVarSizer<T>::getSize(), success);
+    if(LE_FAILURE(success)) clear();
+  }
+  /**
+   * ptr plus offset
+   */
+ LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr, size_t offset)
+    : LETableReference(parent, parent.ptrToOffset(atPtr, success)+offset, LE_UINTPTR_MAX, success) {
+    verifyLength(0, LETableVarSizer<T>::getSize(), success);
+    if(LE_FAILURE(success)) clear();
+  }
+  LEReferenceTo(const LETableReference &parent, LEErrorCode &success, size_t offset)
+    : LETableReference(parent, offset, LE_UINTPTR_MAX, success) {
+    verifyLength(0, LETableVarSizer<T>::getSize(), success);
+    if(LE_FAILURE(success)) clear();
+  }
+  LEReferenceTo(const LETableReference &parent, LEErrorCode &success)
+    : LETableReference(parent, 0, LE_UINTPTR_MAX, success) {
+    verifyLength(0, LETableVarSizer<T>::getSize(), success);
+    if(LE_FAILURE(success)) clear();
+  }
+ LEReferenceTo(const LEFontInstance *font, LETag tableTag, LEErrorCode &success)
+   : LETableReference(font, tableTag, success) {
+    verifyLength(0, LETableVarSizer<T>::getSize(), success);
+    if(LE_FAILURE(success)) clear();
+  }
+ LEReferenceTo(const le_uint8 *data, size_t length = LE_UINTPTR_MAX) : LETableReference(data, length) {}
+ LEReferenceTo(const T *data, size_t length = LE_UINTPTR_MAX) : LETableReference((const le_uint8*)data, length) {}
+  LEReferenceTo() : LETableReference(NULL) {}
+
+  LEReferenceTo<T>& operator=(const T* other) {
+    setRaw(other);
+    return *this;
+  }
+
+  LEReferenceTo<T> &reparent(const LETableReference &base) {
+    fParent = &base;
+    return *this;
+  }
+
+  /**
+   * roll forward by one <T> size.
+   * same as addOffset(LETableVarSizer<T>::getSize(),success)
+   */
+  void addObject(LEErrorCode &success) {
+    addOffset(LETableVarSizer<T>::getSize(), success);
+  }
+  void addObject(size_t count, LEErrorCode &success) {
+    addOffset(LETableVarSizer<T>::getSize()*count, success);
+  }
+
+  const T *operator->() const { return getAlias(); }
+  const T *getAlias() const { return (const T*)fStart; }
+  const T *getAliasTODO() const { LE_DEBUG_TR("getAliasTODO<>"); return (const T*)fStart; }
+};
+
+
+U_NAMESPACE_END
+
+#endif
+
+#endif
--- a/src/share/native/sun/font/layout/LETypes.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LETypes.h	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -50,14 +50,15 @@
 #endif
 
 #include "unicode/utypes.h"
+
+#ifdef __cplusplus
 #include "unicode/uobject.h"
+#endif
+
 #ifdef LE_USE_CMEMORY
 #include "cmemory.h"
 #endif
-#endif /* not standalone */
-
-
-U_NAMESPACE_BEGIN
+#endif
 
 /*!
  * \file
@@ -296,12 +297,14 @@
  */
 typedef UChar32 LEUnicode32;
 
+#ifndef U_HIDE_DEPRECATED_API
 /**
  * Used to represent 16-bit Unicode code points.
  *
  * @deprecated since ICU 2.4. Use LEUnicode16 instead
  */
 typedef UChar LEUnicode;
+#endif  /* U_HIDE_DEPRECATED_API */
 
 /**
  * Used to hold a pair of (x, y) values which represent a point.
@@ -325,7 +328,7 @@
     float fY;
 };
 
-#ifndef XP_CPLUSPLUS
+#ifndef __cplusplus
 /**
  * Used to hold a pair of (x, y) values which represent a point.
  *
@@ -335,6 +338,39 @@
 #endif
 
 
+#ifndef U_HIDE_INTERNAL_API
+
+#ifndef LE_ASSERT_BAD_FONT
+#define LE_ASSERT_BAD_FONT 0
+#endif
+
+#if LE_ASSERT_BAD_FONT
+#include <stdio.h>
+#define LE_DEBUG_BAD_FONT(x) fprintf(stderr,"%s:%d: BAD FONT: %s\n", __FILE__, __LINE__, (x));
+#else
+#define LE_DEBUG_BAD_FONT(x)
+#endif
+
+/**
+ * Max value representable by a uintptr
+ */
+
+#ifndef UINT32_MAX
+#define LE_UINT32_MAX 0xFFFFFFFFU
+#else
+#define LE_UINT32_MAX UINT32_MAX
+#endif
+
+#ifndef UINTPTR_MAX
+#define LE_UINTPTR_MAX LE_UINT32_MAX
+#else
+#define LE_UINTPTR_MAX UINTPTR_MAX
+#endif
+
+/**
+ * Range check for overflow
+ */
+#define LE_RANGE_CHECK(type, count, ptrfn) (( (LE_UINTPTR_MAX / sizeof(type)) < count ) ? NULL : (ptrfn))
 /**
  * A convenience macro to get the length of an array.
  *
@@ -356,7 +392,7 @@
  *
  * @internal
  */
-#define LE_NEW_ARRAY(type, count) (type *) uprv_malloc((count) * sizeof(type))
+#define LE_NEW_ARRAY(type, count) (type *)  LE_RANGE_CHECK(type,count,uprv_malloc((count) * sizeof(type)))
 
 /**
  * Re-allocate an array of basic types. This is used to isolate the rest of
@@ -373,7 +409,52 @@
  * @internal
  */
 #define LE_DELETE_ARRAY(array) uprv_free((void *) (array))
-#endif
+#else
+/* !LE_USE_CMEMORY - Not using ICU memory - use C std lib versions */
+
+#include <stdlib.h>
+#include <string.h>
+
+/**
+ * A convenience macro to get the length of an array.
+ *
+ * @internal
+ */
+#define LE_ARRAY_SIZE(array) (sizeof array / sizeof array[0])
+
+/**
+ * A convenience macro for copying an array.
+ *
+ * @internal
+ */
+#define LE_ARRAY_COPY(dst, src, count) memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
+
+/**
+ * Allocate an array of basic types. This is used to isolate the rest of
+ * the LayoutEngine code from cmemory.h.
+ *
+ * @internal
+ */
+#define LE_NEW_ARRAY(type, count) LE_RANGE_CHECK(type,count,(type *) malloc((count) * sizeof(type)))
+
+/**
+ * Re-allocate an array of basic types. This is used to isolate the rest of
+ * the LayoutEngine code from cmemory.h.
+ *
+ * @internal
+ */
+#define LE_GROW_ARRAY(array, newSize) realloc((void *) (array), (newSize) * sizeof (array)[0])
+
+ /**
+ * Free an array of basic types. This is used to isolate the rest of
+ * the LayoutEngine code from cmemory.h.
+ *
+ * @internal
+ */
+#define LE_DELETE_ARRAY(array) free((void *) (array))
+
+#endif  /* LE_USE_CMEMORY */
+#endif  /* U_HIDE_INTERNAL_API */
 
 /**
  * A macro to construct the four-letter tags used to
@@ -536,7 +617,7 @@
     LE_RAND_FEATURE_TAG = 0x72616E64UL, /**< 'rand' */
     LE_RLIG_FEATURE_TAG = 0x726C6967UL, /**< 'rlig' */
     LE_RPHF_FEATURE_TAG = 0x72706866UL, /**< 'rphf' */
-        LE_RKRF_FEATURE_TAG = 0x726B7266UL, /**< 'rkrf' */
+    LE_RKRF_FEATURE_TAG = 0x726B7266UL, /**< 'rkrf' */
     LE_RTBD_FEATURE_TAG = 0x72746264UL, /**< 'rtbd' */
     LE_RTLA_FEATURE_TAG = 0x72746C61UL, /**< 'rtla' */
     LE_RUBY_FEATURE_TAG = 0x72756279UL, /**< 'ruby' */
@@ -588,6 +669,68 @@
 };
 
 /**
+ * @internal
+ */
+enum LEFeatureENUMs {
+  LE_Kerning_FEATURE_ENUM = 0,   /**< Requests Kerning. Formerly LayoutEngine::kTypoFlagKern */
+  LE_Ligatures_FEATURE_ENUM = 1, /**< Requests Ligatures. Formerly LayoutEngine::kTypoFlagLiga */
+  LE_NoCanon_FEATURE_ENUM = 2, /**< Requests No Canonical Processing */
+  LE_CLIG_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_DLIG_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_HLIG_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_LIGA_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_RLIG_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_SMCP_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_FRAC_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_AFRC_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_ZERO_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_SWSH_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_CSWH_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_SALT_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_NALT_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_RUBY_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_SS01_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_SS02_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_SS03_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_SS04_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_SS05_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_SS06_FEATURE_ENUM,  /**< Feature specific enum */
+  LE_SS07_FEATURE_ENUM,   /**< Feature specific enum */
+
+  LE_CHAR_FILTER_FEATURE_ENUM = 31, /**< Apply CharSubstitutionFilter */
+  LE_FEATURE_ENUM_MAX = LE_CHAR_FILTER_FEATURE_ENUM
+};
+
+#define LE_Kerning_FEATURE_FLAG   (1 << LE_Kerning_FEATURE_ENUM)
+#define LE_Ligatures_FEATURE_FLAG (1 << LE_Ligatures_FEATURE_ENUM)
+#define LE_NoCanon_FEATURE_FLAG (1 << LE_NoCanon_FEATURE_ENUM)
+#define LE_CLIG_FEATURE_FLAG (1 << LE_CLIG_FEATURE_ENUM)
+#define LE_DLIG_FEATURE_FLAG (1 << LE_DLIG_FEATURE_ENUM)
+#define LE_HLIG_FEATURE_FLAG (1 << LE_HLIG_FEATURE_ENUM)
+#define LE_LIGA_FEATURE_FLAG (1 << LE_LIGA_FEATURE_ENUM)
+#define LE_RLIG_FEATURE_FLAG (1 << LE_RLIG_FEATURE_ENUM)
+#define LE_SMCP_FEATURE_FLAG (1 << LE_SMCP_FEATURE_ENUM)
+#define LE_FRAC_FEATURE_FLAG (1 << LE_FRAC_FEATURE_ENUM)
+#define LE_AFRC_FEATURE_FLAG (1 << LE_AFRC_FEATURE_ENUM)
+#define LE_ZERO_FEATURE_FLAG (1 << LE_ZERO_FEATURE_ENUM)
+#define LE_SWSH_FEATURE_FLAG (1 << LE_SWSH_FEATURE_ENUM)
+#define LE_CSWH_FEATURE_FLAG (1 << LE_CSWH_FEATURE_ENUM)
+#define LE_SALT_FEATURE_FLAG (1 << LE_SALT_FEATURE_ENUM)
+#define LE_NALT_FEATURE_FLAG (1 << LE_NALT_FEATURE_ENUM)
+#define LE_RUBY_FEATURE_FLAG (1 << LE_RUBY_FEATURE_ENUM)
+#define LE_SS01_FEATURE_FLAG (1 << LE_SS01_FEATURE_ENUM)
+#define LE_SS02_FEATURE_FLAG (1 << LE_SS02_FEATURE_ENUM)
+#define LE_SS03_FEATURE_FLAG (1 << LE_SS03_FEATURE_ENUM)
+#define LE_SS04_FEATURE_FLAG (1 << LE_SS04_FEATURE_ENUM)
+#define LE_SS05_FEATURE_FLAG (1 << LE_SS05_FEATURE_ENUM)
+#define LE_SS06_FEATURE_FLAG (1 << LE_SS06_FEATURE_ENUM)
+#define LE_SS07_FEATURE_FLAG (1 << LE_SS07_FEATURE_ENUM)
+
+#define LE_CHAR_FILTER_FEATURE_FLAG (1 << LE_CHAR_FILTER_FEATURE_ENUM)
+
+#define LE_DEFAULT_FEATURE_FLAG (LE_Kerning_FEATURE_FLAG | LE_Ligatures_FEATURE_FLAG) /**< default features */
+
+/**
  * Error codes returned by the LayoutEngine.
  *
  * @stable ICU 2.4
@@ -611,7 +754,7 @@
 };
 #endif
 
-#ifndef XP_CPLUSPLUS
+#ifndef __cplusplus
 /**
  * Error codes returned by the LayoutEngine.
  *
@@ -638,7 +781,4 @@
 #define LE_FAILURE(code) (U_FAILURE((UErrorCode)code))
 #endif
 
-U_NAMESPACE_END
-#endif
-
-
+#endif /* __LETYPES_H */
--- a/src/share/native/sun/font/layout/LayoutEngine.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LayoutEngine.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -33,6 +33,7 @@
 #include "LETypes.h"
 #include "LEScripts.h"
 #include "LELanguages.h"
+#include "LESwaps.h"
 
 #include "LayoutEngine.h"
 #include "ArabicLayoutEngine.h"
@@ -44,6 +45,8 @@
 #include "ThaiLayoutEngine.h"
 #include "TibetanLayoutEngine.h"
 #include "GXLayoutEngine.h"
+#include "GXLayoutEngine2.h"
+
 #include "ScriptAndLanguageTags.h"
 #include "CharSubstitutionFilter.h"
 
@@ -63,6 +66,10 @@
 /* Leave this copyright notice here! It needs to go somewhere in this library. */
 static const char copyright[] = U_COPYRIGHT_STRING;
 
+/* TODO: remove these? */
+const le_int32 LayoutEngine::kTypoFlagKern = LE_Kerning_FEATURE_FLAG;
+const le_int32 LayoutEngine::kTypoFlagLiga = LE_Ligatures_FEATURE_FLAG;
+
 const LEUnicode32 DefaultCharMapper::controlChars[] = {
     0x0009, 0x000A, 0x000D,
     /*0x200C, 0x200D,*/ 0x200E, 0x200F,
@@ -140,21 +147,21 @@
 class CanonMarkFilter : public UMemory, public LEGlyphFilter
 {
 private:
-    const GlyphClassDefinitionTable *classDefTable;
+  const LEReferenceTo<GlyphClassDefinitionTable> classDefTable;
 
     CanonMarkFilter(const CanonMarkFilter &other); // forbid copying of this class
     CanonMarkFilter &operator=(const CanonMarkFilter &other); // forbid copying of this class
 
 public:
-    CanonMarkFilter(const GlyphDefinitionTableHeader *gdefTable);
+    CanonMarkFilter(const LEReferenceTo<GlyphDefinitionTableHeader> &gdefTable, LEErrorCode &success);
     virtual ~CanonMarkFilter();
 
     virtual le_bool accept(LEGlyphID glyph) const;
 };
 
-CanonMarkFilter::CanonMarkFilter(const GlyphDefinitionTableHeader *gdefTable)
+CanonMarkFilter::CanonMarkFilter(const LEReferenceTo<GlyphDefinitionTableHeader> &gdefTable, LEErrorCode &success)
+  : classDefTable(gdefTable->getMarkAttachClassDefinitionTable(gdefTable, success))
 {
-    classDefTable = gdefTable->getMarkAttachClassDefinitionTable();
 }
 
 CanonMarkFilter::~CanonMarkFilter()
@@ -164,9 +171,10 @@
 
 le_bool CanonMarkFilter::accept(LEGlyphID glyph) const
 {
-    le_int32 glyphClass = classDefTable->getGlyphClass(glyph);
-
-    return glyphClass != 0;
+  LEErrorCode success = LE_NO_ERROR;
+  le_int32 glyphClass = classDefTable->getGlyphClass(classDefTable, glyph, success);
+  if(LE_FAILURE(success)) return false;
+  return glyphClass != 0;
 }
 
 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LayoutEngine)
@@ -251,24 +259,24 @@
         return 0;
     }
 
-    if ((fTypoFlags & 0x4) == 0) { // no canonical processing
+    if ((fTypoFlags & LE_NoCanon_FEATURE_FLAG) == 0) { // no canonical processing
       return count;
     }
 
-    const GlyphSubstitutionTableHeader *canonGSUBTable = (GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable;
+    LEReferenceTo<GlyphSubstitutionTableHeader> canonGSUBTable((GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable);
     LETag scriptTag  = OpenTypeLayoutEngine::getScriptTag(fScriptCode);
     LETag langSysTag = OpenTypeLayoutEngine::getLangSysTag(fLanguageCode);
     le_int32 i, dir = 1, out = 0, outCharCount = count;
 
-    if (canonGSUBTable->coversScript(scriptTag)) {
+    if (canonGSUBTable->coversScript(canonGSUBTable,scriptTag, success) || LE_SUCCESS(success)) {
         CharSubstitutionFilter *substitutionFilter = new CharSubstitutionFilter(fFontInstance);
         if (substitutionFilter == NULL) {
             success = LE_MEMORY_ALLOCATION_ERROR;
             return 0;
         }
 
-                const LEUnicode *inChars = &chars[offset];
-                LEUnicode *reordered = NULL;
+        const LEUnicode *inChars = &chars[offset];
+        LEUnicode *reordered = NULL;
         LEGlyphStorage fakeGlyphStorage;
 
         fakeGlyphStorage.allocateGlyphArray(count, rightToLeft, success);
@@ -278,20 +286,20 @@
             return 0;
         }
 
-                // This is the cheapest way to get mark reordering only for Hebrew.
-                // We could just do the mark reordering for all scripts, but most
-                // of them probably don't need it...
-                if (fScriptCode == hebrScriptCode) {
-                        reordered = LE_NEW_ARRAY(LEUnicode, count);
+        // This is the cheapest way to get mark reordering only for Hebrew.
+        // We could just do the mark reordering for all scripts, but most
+        // of them probably don't need it...
+        if (fScriptCode == hebrScriptCode) {
+          reordered = LE_NEW_ARRAY(LEUnicode, count);
 
-                        if (reordered == NULL) {
-                delete substitutionFilter;
-                                success = LE_MEMORY_ALLOCATION_ERROR;
-                                return 0;
-                        }
+          if (reordered == NULL) {
+            delete substitutionFilter;
+            success = LE_MEMORY_ALLOCATION_ERROR;
+            return 0;
+          }
 
-                        CanonShaping::reorderMarks(&chars[offset], count, rightToLeft, reordered, fakeGlyphStorage);
-                        inChars = reordered;
+          CanonShaping::reorderMarks(&chars[offset], count, rightToLeft, reordered, fakeGlyphStorage);
+          inChars = reordered;
                 }
 
         fakeGlyphStorage.allocateAuxData(success);
@@ -311,11 +319,11 @@
             fakeGlyphStorage.setAuxData(out, canonFeatures, success);
         }
 
-                if (reordered != NULL) {
-                        LE_DELETE_ARRAY(reordered);
-                }
+        if (reordered != NULL) {
+          LE_DELETE_ARRAY(reordered);
+        }
 
-        outCharCount = canonGSUBTable->process(fakeGlyphStorage, rightToLeft, scriptTag, langSysTag, NULL, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE, success);
+        outCharCount = canonGSUBTable->process(canonGSUBTable, fakeGlyphStorage, rightToLeft, scriptTag, langSysTag, (const GlyphDefinitionTableHeader*)NULL, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE, success);
 
         if (LE_FAILURE(success)) {
             delete substitutionFilter;
@@ -416,16 +424,16 @@
         return;
     }
 
-    GlyphDefinitionTableHeader *gdefTable = (GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable;
-    CanonMarkFilter filter(gdefTable);
+    LEReferenceTo<GlyphDefinitionTableHeader> gdefTable((GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable,
+                                                        CanonShaping::glyphDefinitionTableLen);
+    CanonMarkFilter filter(gdefTable, success);
 
     adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success);
 
-    if (fTypoFlags & 0x1) { /* kerning enabled */
-      static const le_uint32 kernTableTag = LE_KERN_TABLE_TAG;
-
-      KernTable kt(fFontInstance, getFontTable(kernTableTag));
-      kt.process(glyphStorage);
+    if (fTypoFlags & LE_Kerning_FEATURE_FLAG) { /* kerning enabled */
+      LETableReference kernTable(fFontInstance, LE_KERN_TABLE_TAG, success);
+      KernTable kt(kernTable, success);
+      kt.process(glyphStorage, success);
     }
 
     // default is no adjustments
@@ -510,9 +518,9 @@
     glyphStorage.adjustPosition(glyphCount, xAdjust, 0, success);
 }
 
-const void *LayoutEngine::getFontTable(LETag tableTag) const
+const void *LayoutEngine::getFontTable(LETag tableTag, size_t &length) const
 {
-    return fFontInstance->getFontTable(tableTag);
+  return fFontInstance->getFontTable(tableTag, length);
 }
 
 void LayoutEngine::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror,
@@ -559,37 +567,41 @@
 
 void LayoutEngine::reset()
 {
+  if(fGlyphStorage!=NULL) {
     fGlyphStorage->reset();
+    fGlyphStorage = NULL;
+  }
 }
 
 LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success)
 {
-  // 3 -> kerning and ligatures
-  return LayoutEngine::layoutEngineFactory(fontInstance, scriptCode, languageCode, 3, success);
+  //kerning and ligatures - by default
+  return LayoutEngine::layoutEngineFactory(fontInstance, scriptCode, languageCode, LE_DEFAULT_FEATURE_FLAG, success);
 }
 
 LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success)
 {
     static const le_uint32 gsubTableTag = LE_GSUB_TABLE_TAG;
     static const le_uint32 mortTableTag = LE_MORT_TABLE_TAG;
+    static const le_uint32 morxTableTag = LE_MORX_TABLE_TAG;
 
     if (LE_FAILURE(success)) {
         return NULL;
     }
 
-    const GlyphSubstitutionTableHeader *gsubTable = (const GlyphSubstitutionTableHeader *) fontInstance->getFontTable(gsubTableTag);
+    LEReferenceTo<GlyphSubstitutionTableHeader> gsubTable(fontInstance,gsubTableTag,success);
     LayoutEngine *result = NULL;
     LETag scriptTag   = 0x00000000;
     LETag languageTag = 0x00000000;
-        LETag v2ScriptTag = OpenTypeLayoutEngine::getV2ScriptTag(scriptCode);
+    LETag v2ScriptTag = OpenTypeLayoutEngine::getV2ScriptTag(scriptCode);
 
     // Right now, only invoke V2 processing for Devanagari.  TODO: Allow more V2 scripts as they are
     // properly tested.
 
-        if ( v2ScriptTag == dev2ScriptTag && gsubTable != NULL && gsubTable->coversScript( v2ScriptTag )) {
-                result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, TRUE, gsubTable, success);
-        }
-    else if (gsubTable != NULL && gsubTable->coversScript(scriptTag = OpenTypeLayoutEngine::getScriptTag(scriptCode))) {
+    if ( v2ScriptTag == dev2ScriptTag && gsubTable.isValid() && gsubTable->coversScript(gsubTable, v2ScriptTag, success )) {
+      result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, TRUE, gsubTable, success);
+    }
+    else if (gsubTable.isValid() && gsubTable->coversScript(gsubTable, scriptTag = OpenTypeLayoutEngine::getScriptTag(scriptCode), success)) {
         switch (scriptCode) {
         case bengScriptCode:
         case devaScriptCode:
@@ -608,6 +620,11 @@
             result = new ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success);
             break;
 
+        case hebrScriptCode:
+            // Disable hebrew ligatures since they have only archaic uses, see ticket #8318
+            result = new OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags & ~kTypoFlagLiga, gsubTable, success);
+            break;
+
         case hangScriptCode:
             result = new HangulOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success);
             break;
@@ -620,10 +637,10 @@
             case janLanguageCode:
             case zhtLanguageCode:
             case zhsLanguageCode:
-                if (gsubTable->coversScriptAndLanguage(scriptTag, languageTag, TRUE)) {
+              if (gsubTable->coversScriptAndLanguage(gsubTable, scriptTag, languageTag, success, TRUE)) {
                     result = new HanOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success);
                     break;
-                }
+              }
 
                 // note: falling through to default case.
             default:
@@ -646,26 +663,29 @@
             break;
         }
     } else {
-        const MorphTableHeader *morphTable = (MorphTableHeader *) fontInstance->getFontTable(mortTableTag);
-
-        if (morphTable != NULL) {
-            result = new GXLayoutEngine(fontInstance, scriptCode, languageCode, morphTable, success);
+        MorphTableHeader2 *morxTable = (MorphTableHeader2 *)fontInstance->getFontTable(morxTableTag);
+        if (morxTable != NULL && SWAPL(morxTable->version)==0x00020000) {
+            result = new GXLayoutEngine2(fontInstance, scriptCode, languageCode, morxTable, typoFlags, success);
         } else {
-            switch (scriptCode) {
-            case bengScriptCode:
-            case devaScriptCode:
-            case gujrScriptCode:
-            case kndaScriptCode:
-            case mlymScriptCode:
-            case oryaScriptCode:
-            case guruScriptCode:
-            case tamlScriptCode:
-            case teluScriptCode:
-            case sinhScriptCode:
-            {
-                result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success);
-                break;
-            }
+          LEReferenceTo<MorphTableHeader> mortTable(fontInstance, mortTableTag, success);
+          if (LE_SUCCESS(success) && mortTable.isValid() && SWAPL(mortTable->version)==0x00010000) { // mort
+            result = new GXLayoutEngine(fontInstance, scriptCode, languageCode, mortTable, success);
+            } else {
+                switch (scriptCode) {
+                    case bengScriptCode:
+                    case devaScriptCode:
+                    case gujrScriptCode:
+                    case kndaScriptCode:
+                    case mlymScriptCode:
+                    case oryaScriptCode:
+                    case guruScriptCode:
+                    case tamlScriptCode:
+                    case teluScriptCode:
+                    case sinhScriptCode:
+                    {
+                        result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success);
+                        break;
+                    }
 
             case arabScriptCode:
             //case hebrScriptCode:
@@ -683,9 +703,10 @@
                 result = new HangulOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success);
                 break;
 
-            default:
-                result = new LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success);
-                break;
+                    default:
+                        result = new LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success);
+                        break;
+                }
             }
         }
     }
--- a/src/share/native/sun/font/layout/LayoutEngine.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LayoutEngine.h	Wed Apr 17 21:48:04 2013 -0700
@@ -26,7 +26,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2008 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -90,6 +90,14 @@
  * @stable ICU 2.8
  */
 class U_LAYOUT_API LayoutEngine : public UObject {
+public:
+#ifndef U_HIDE_INTERNAL_API
+    /** @internal Flag to request kerning. Use LE_Kerning_FEATURE_FLAG instead. */
+    static const le_int32 kTypoFlagKern;
+    /** @internal Flag to request ligatures. Use LE_Ligatures_FEATURE_FLAG instead. */
+    static const le_int32 kTypoFlagLiga;
+#endif  /* U_HIDE_INTERNAL_API */
+
 protected:
     /**
      * The object which holds the glyph storage
@@ -140,6 +148,7 @@
      */
     le_bool fFilterZeroWidth;
 
+#ifndef U_HIDE_INTERNAL_API
     /**
      * This constructs an instance for a given font, script and language. Subclass constructors
      * must call this constructor.
@@ -161,7 +170,10 @@
                  le_int32 languageCode,
                  le_int32 typoFlags,
                  LEErrorCode &success);
+#endif  /* U_HIDE_INTERNAL_API */
 
+    // Do not enclose the protected default constructor with #ifndef U_HIDE_INTERNAL_API
+    // or else the compiler will create a public default constructor.
     /**
      * This overrides the default no argument constructor to make it
      * difficult for clients to call it. Clients are expected to call
@@ -268,12 +280,18 @@
      * some other way must override this method.
      *
      * @param tableTag - the four byte table tag.
+     * @param length - length to use
      *
      * @return the address of the table.
      *
      * @internal
      */
-    virtual const void *getFontTable(LETag tableTag) const;
+    virtual const void *getFontTable(LETag tableTag, size_t &length) const;
+
+    /**
+     * @deprecated
+     */
+    virtual const void *getFontTable(LETag tableTag) const { size_t ignored; return getFontTable(tableTag, ignored); }
 
     /**
      * This method does character to glyph mapping. The default implementation
@@ -302,6 +320,7 @@
      */
     virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror, LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
+#ifndef U_HIDE_INTERNAL_API
     /**
      * This is a convenience method that forces the advance width of mark
      * glyphs to be zero, which is required for proper selection and highlighting.
@@ -336,7 +355,7 @@
      * @internal
      */
     static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 charCount, le_bool reverse, LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter, LEErrorCode &success);
-
+#endif  /* U_HIDE_INTERNAL_API */
 
 public:
     /**
--- a/src/share/native/sun/font/layout/LigatureSubstProc.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LigatureSubstProc.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -47,15 +47,15 @@
 
 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LigatureSubstitutionProcessor)
 
-LigatureSubstitutionProcessor::LigatureSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader)
-  : StateTableProcessor(morphSubtableHeader)
+  LigatureSubstitutionProcessor::LigatureSubstitutionProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success)
+: StateTableProcessor(morphSubtableHeader, success), ligatureSubstitutionHeader(morphSubtableHeader, success)
 {
-    ligatureSubstitutionHeader = (const LigatureSubstitutionHeader *) morphSubtableHeader;
+    if(LE_FAILURE(success)) return;
     ligatureActionTableOffset = SWAPW(ligatureSubstitutionHeader->ligatureActionTableOffset);
     componentTableOffset = SWAPW(ligatureSubstitutionHeader->componentTableOffset);
     ligatureTableOffset = SWAPW(ligatureSubstitutionHeader->ligatureTableOffset);
 
-    entryTable = (const LigatureSubstitutionStateEntry *) ((char *) &stateTableHeader->stHeader + entryTableOffset);
+    entryTable = LEReferenceToArrayOf<LigatureSubstitutionStateEntry>(stHeader, success, entryTableOffset, LE_UNBOUNDED_ARRAY);
 }
 
 LigatureSubstitutionProcessor::~LigatureSubstitutionProcessor()
@@ -69,7 +69,9 @@
 
 ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index)
 {
-    const LigatureSubstitutionStateEntry *entry = &entryTable[index];
+  LEErrorCode success = LE_NO_ERROR;
+  const LigatureSubstitutionStateEntry *entry = entryTable.getAlias(index, success);
+
     ByteOffset newState = SWAPW(entry->newStateOffset);
     le_int16 flags = SWAPW(entry->flags);
 
@@ -79,12 +81,16 @@
         }
 
         componentStack[m] = currGlyph;
+    } else if ( m == -1) {
+        // bad font- skip this glyph.
+        currGlyph++;
+        return newState;
     }
 
     ByteOffset actionOffset = flags & lsfActionOffsetMask;
 
     if (actionOffset != 0) {
-        const LigatureActionEntry *ap = (const LigatureActionEntry *) ((char *) &ligatureSubstitutionHeader->stHeader + actionOffset);
+      LEReferenceTo<LigatureActionEntry> ap(stHeader, success, actionOffset);
         LigatureActionEntry action;
         le_int32 offset, i = 0;
         le_int32 stack[nComponents];
@@ -93,7 +99,8 @@
         do {
             le_uint32 componentGlyph = componentStack[m--];
 
-            action = SWAPL(*ap++);
+            action = SWAPL(*ap.getAlias());
+            ap.addObject(success); // ap++
 
             if (m < 0) {
                 m = nComponents - 1;
@@ -101,29 +108,48 @@
 
             offset = action & lafComponentOffsetMask;
             if (offset != 0) {
-                const le_int16 *offsetTable = (const le_int16 *)((char *) &ligatureSubstitutionHeader->stHeader + 2 * SignExtend(offset, lafComponentOffsetMask));
+              LEReferenceToArrayOf<le_int16> offsetTable(stHeader, success, 2 * SignExtend(offset, lafComponentOffsetMask), LE_UNBOUNDED_ARRAY);
 
-                i += SWAPW(offsetTable[LE_GET_GLYPH(glyphStorage[componentGlyph])]);
+              if(LE_FAILURE(success)) {
+                  currGlyph++;
+                  LE_DEBUG_BAD_FONT("off end of ligature substitution header");
+                  return newState; // get out! bad font
+              }
+              if(componentGlyph > glyphStorage.getGlyphCount()) {
+                LE_DEBUG_BAD_FONT("preposterous componentGlyph");
+                currGlyph++;
+                return newState; // get out! bad font
+              }
+              i += SWAPW(offsetTable.getObject(LE_GET_GLYPH(glyphStorage[componentGlyph]), success));
 
                 if (action & (lafLast | lafStore))  {
-                    const TTGlyphID *ligatureOffset = (const TTGlyphID *) ((char *) &ligatureSubstitutionHeader->stHeader + i);
-                    TTGlyphID ligatureGlyph = SWAPW(*ligatureOffset);
+                  LEReferenceTo<TTGlyphID> ligatureOffset(stHeader, success, i);
+                  TTGlyphID ligatureGlyph = SWAPW(*ligatureOffset.getAlias());
 
-                    glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], ligatureGlyph);
-                    stack[++mm] = componentGlyph;
-                    i = 0;
+                  glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], ligatureGlyph);
+                  if(mm==nComponents) {
+                    LE_DEBUG_BAD_FONT("exceeded nComponents");
+                    mm--; // don't overrun the stack.
+                  }
+                  stack[++mm] = componentGlyph;
+                  i = 0;
                 } else {
-                    glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], 0xFFFF);
+                  glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], 0xFFFF);
                 }
             }
-        } while (!(action & lafLast));
+#if LE_ASSERT_BAD_FONT
+            if(m<0) {
+              LE_DEBUG_BAD_FONT("m<0")
+            }
+#endif
+        } while (!(action & lafLast)  && (m>=0) ); // stop if last bit is set, or if run out of items
 
         while (mm >= 0) {
-            if (++m >= nComponents) {
-                m = 0;
-            }
+          if (++m >= nComponents) {
+            m = 0;
+          }
 
-            componentStack[m] = stack[mm--];
+          componentStack[m] = stack[mm--];
         }
     }
 
--- a/src/share/native/sun/font/layout/LigatureSubstProc.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LigatureSubstProc.h	Wed Apr 17 21:48:04 2013 -0700
@@ -58,7 +58,7 @@
 
     virtual void endStateTable();
 
-    LigatureSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader);
+    LigatureSubstitutionProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success);
     virtual ~LigatureSubstitutionProcessor();
 
     /**
@@ -83,12 +83,12 @@
     ByteOffset componentTableOffset;
     ByteOffset ligatureTableOffset;
 
-    const LigatureSubstitutionStateEntry *entryTable;
+    LEReferenceToArrayOf<LigatureSubstitutionStateEntry> entryTable;
 
     le_int32 componentStack[nComponents];
     le_int16 m;
 
-    const LigatureSubstitutionHeader *ligatureSubstitutionHeader;
+    LEReferenceTo<LigatureSubstitutionHeader> ligatureSubstitutionHeader;
 
 };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/LigatureSubstProc2.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,170 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp and Others. 1998-2013 - All Rights Reserved
+ *
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "StateTables.h"
+#include "MorphStateTables.h"
+#include "SubtableProcessor2.h"
+#include "StateTableProcessor2.h"
+#include "LigatureSubstProc2.h"
+#include "LEGlyphStorage.h"
+#include "LESwaps.h"
+
+U_NAMESPACE_BEGIN
+
+#define ExtendedComplement(m) ((le_int32) (~((le_uint32) (m))))
+#define SignBit(m) ((ExtendedComplement(m) >> 1) & (le_int32)(m))
+#define SignExtend(v,m) (((v) & SignBit(m))? ((v) | ExtendedComplement(m)): (v))
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LigatureSubstitutionProcessor2)
+
+LigatureSubstitutionProcessor2::LigatureSubstitutionProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
+  : StateTableProcessor2(morphSubtableHeader, success),
+  ligActionOffset(0),
+  ligatureSubstitutionHeader(morphSubtableHeader, success), componentOffset(0), ligatureOffset(0), entryTable()
+{
+    if (LE_FAILURE(success)) return;
+
+    ligActionOffset = SWAPL(ligatureSubstitutionHeader->ligActionOffset);
+    componentOffset = SWAPL(ligatureSubstitutionHeader->componentOffset);
+    ligatureOffset = SWAPL(ligatureSubstitutionHeader->ligatureOffset);
+
+    entryTable = LEReferenceToArrayOf<LigatureSubstitutionStateEntry2>(stHeader, success, entryTableOffset, LE_UNBOUNDED_ARRAY);
+}
+
+LigatureSubstitutionProcessor2::~LigatureSubstitutionProcessor2()
+{
+}
+
+void LigatureSubstitutionProcessor2::beginStateTable()
+{
+    m = -1;
+}
+
+le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index, LEErrorCode &success)
+{
+    const LigatureSubstitutionStateEntry2 *entry = entryTable.getAlias(index, success);
+    if(LE_FAILURE(success)) return 0;
+
+    le_uint16 nextStateIndex = SWAPW(entry->nextStateIndex);
+    le_uint16 flags = SWAPW(entry->entryFlags);
+    le_uint16 ligActionIndex = SWAPW(entry->ligActionIndex);
+
+    if (flags & lsfSetComponent) {
+        if (++m >= nComponents) {
+            m = 0;
+        }
+        componentStack[m] = currGlyph;
+    } else if ( m == -1) {
+        // bad font- skip this glyph.
+        //LE_DEBUG_BAD_FONT("m==-1 (componentCount went negative)")
+        currGlyph+= dir;
+        return nextStateIndex;
+    }
+
+    ByteOffset actionOffset = flags & lsfPerformAction;
+
+    if (actionOffset != 0) {
+        LEReferenceTo<LigatureActionEntry> ap(stHeader, success, ligActionOffset); // byte offset
+        ap.addObject(ligActionIndex - 1, success);  // index offset ( one before the actual start, because we will pre-increment)
+        LEReferenceToArrayOf<TTGlyphID> ligatureTable(stHeader, success, ligatureOffset, LE_UNBOUNDED_ARRAY);
+        LigatureActionEntry action;
+        le_int32 offset, i = 0;
+        le_int32 stack[nComponents];
+        le_int16 mm = -1;
+
+        LEReferenceToArrayOf<le_uint16> componentTable(stHeader, success, componentOffset, LE_UNBOUNDED_ARRAY);
+        if(LE_FAILURE(success)) {
+          currGlyph+= dir;
+            return nextStateIndex; // get out! bad font
+        }
+
+        do {
+            le_uint32 componentGlyph = componentStack[m--]; // pop off
+
+            ap.addObject(success);
+            action = SWAPL(*ap.getAlias());
+
+            if (m < 0) {
+                m = nComponents - 1;
+            }
+
+            offset = action & lafComponentOffsetMask;
+            if (offset != 0) {
+                if(componentGlyph > glyphStorage.getGlyphCount()) {
+                  LE_DEBUG_BAD_FONT("preposterous componentGlyph");
+                  currGlyph+= dir;
+                  return nextStateIndex; // get out! bad font
+                }
+                i += SWAPW(componentTable(LE_GET_GLYPH(glyphStorage[componentGlyph]) + (SignExtend(offset, lafComponentOffsetMask)),success));
+
+                if (action & (lafLast | lafStore))  {
+                  TTGlyphID ligatureGlyph = SWAPW(ligatureTable(i,success));
+                    glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], ligatureGlyph);
+                    if(mm==nComponents) {
+                      LE_DEBUG_BAD_FONT("exceeded nComponents");
+                      mm--; // don't overrun the stack.
+                    }
+                    stack[++mm] = componentGlyph;
+                    i = 0;
+                } else {
+                    glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], 0xFFFF);
+                }
+            }
+#if LE_ASSERT_BAD_FONT
+            if(m<0) {
+              LE_DEBUG_BAD_FONT("m<0")
+            }
+#endif
+        } while (!(action & lafLast) && (m>=0) ); // stop if last bit is set, or if run out of items
+
+        while (mm >= 0) {
+            if (++m >= nComponents) {
+                m = 0;
+            }
+
+            componentStack[m] = stack[mm--];
+        }
+    }
+
+    if (!(flags & lsfDontAdvance)) {
+        currGlyph += dir;
+    }
+
+    return nextStateIndex;
+}
+
+void LigatureSubstitutionProcessor2::endStateTable()
+{
+}
+
+U_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/LigatureSubstProc2.h	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,97 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#ifndef __LIGATURESUBSTITUTIONPROCESSOR2_H
+#define __LIGATURESUBSTITUTIONPROCESSOR2_H
+
+/**
+ * \file
+ * \internal
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "StateTableProcessor2.h"
+#include "LigatureSubstitution.h"
+
+U_NAMESPACE_BEGIN
+
+class LEGlyphStorage;
+
+#define nComponents 16
+
+class LigatureSubstitutionProcessor2 : public StateTableProcessor2
+{
+public:
+    virtual void beginStateTable();
+
+    virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph,
+                                        EntryTableIndex2 index, LEErrorCode &success);
+
+    virtual void endStateTable();
+
+    LigatureSubstitutionProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success);
+    virtual ~LigatureSubstitutionProcessor2();
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
+private:
+    LigatureSubstitutionProcessor2();
+
+protected:
+    le_uint32 ligActionOffset;
+    le_uint32 componentOffset;
+    le_uint32 ligatureOffset;
+
+    LEReferenceToArrayOf<LigatureSubstitutionStateEntry2> entryTable;
+
+    le_int32 componentStack[nComponents];
+    le_int16 m;
+
+    const LEReferenceTo<LigatureSubstitutionHeader2> ligatureSubstitutionHeader;
+
+};
+
+U_NAMESPACE_END
+#endif
--- a/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -40,10 +40,10 @@
 
 U_NAMESPACE_BEGIN
 
-le_uint32 LigatureSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const
+le_uint32 LigatureSubstitutionSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const
 {
     LEGlyphID glyph = glyphIterator->getCurrGlyphID();
-    le_int32 coverageIndex = getGlyphCoverage(glyph);
+    le_int32 coverageIndex = getGlyphCoverage(base, glyph, success);
 
     if (coverageIndex >= 0) {
         Offset ligSetTableOffset = SWAPW(ligSetTableOffsetArray[coverageIndex]);
--- a/src/share/native/sun/font/layout/LigatureSubstSubtables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LigatureSubstSubtables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -50,6 +50,7 @@
     le_uint16 ligatureCount;
     Offset    ligatureTableOffsetArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(LigatureSetTable, ligatureTableOffsetArray)
 
 struct LigatureTable
 {
@@ -57,14 +58,16 @@
     le_uint16 compCount;
     TTGlyphID componentArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(LigatureTable, componentArray)
 
 struct LigatureSubstitutionSubtable : GlyphSubstitutionSubtable
 {
     le_uint16 ligSetCount;
     Offset    ligSetTableOffsetArray[ANY_NUMBER];
 
-    le_uint32  process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
+    le_uint32  process(const LETableReference &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter = NULL) const;
 };
+LE_VAR_ARRAY(LigatureSubstitutionSubtable, ligSetTableOffsetArray)
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/LigatureSubstitution.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LigatureSubstitution.h	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -52,17 +52,32 @@
     ByteOffset ligatureTableOffset;
 };
 
+struct LigatureSubstitutionHeader2 : MorphStateTableHeader2
+{
+    le_uint32 ligActionOffset;
+    le_uint32 componentOffset;
+    le_uint32 ligatureOffset;
+};
+
 enum LigatureSubstitutionFlags
 {
     lsfSetComponent     = 0x8000,
     lsfDontAdvance      = 0x4000,
-    lsfActionOffsetMask = 0x3FFF
+    lsfActionOffsetMask = 0x3FFF, // N/A in morx
+    lsfPerformAction    = 0x2000
 };
 
 struct LigatureSubstitutionStateEntry : StateEntry
 {
 };
 
+struct LigatureSubstitutionStateEntry2
+{
+    le_uint16 nextStateIndex;
+    le_uint16 entryFlags;
+    le_uint16 ligActionIndex;
+};
+
 typedef le_uint32 LigatureActionEntry;
 
 enum LigatureActionFlags
--- a/src/share/native/sun/font/layout/LookupProcessor.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LookupProcessor.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -44,7 +44,7 @@
 
 U_NAMESPACE_BEGIN
 
-le_uint32 LookupProcessor::applyLookupTable(const LookupTable *lookupTable, GlyphIterator *glyphIterator,
+le_uint32 LookupProcessor::applyLookupTable(const LEReferenceTo<LookupTable> &lookupTable, GlyphIterator *glyphIterator,
                                          const LEFontInstance *fontInstance, LEErrorCode& success) const
 {
     if (LE_FAILURE(success)) {
@@ -57,7 +57,7 @@
     le_uint32 delta;
 
     for (le_uint16 subtable = 0; subtable < subtableCount; subtable += 1) {
-        const LookupSubtable *lookupSubtable = lookupTable->getLookupSubtable(subtable);
+      LEReferenceTo<LookupSubtable> lookupSubtable = lookupTable->getLookupSubtable(lookupTable, subtable, success);
 
         delta = applySubtable(lookupSubtable, lookupType, glyphIterator, fontInstance, success);
 
@@ -72,7 +72,7 @@
 }
 
 le_int32 LookupProcessor::process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments,
-                              le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
+                                  le_bool rightToLeft, const LEReferenceTo<GlyphDefinitionTableHeader> &glyphDefinitionTableHeader,
                               const LEFontInstance *fontInstance, LEErrorCode& success) const
 {
     if (LE_FAILURE(success)) {
@@ -89,22 +89,21 @@
                                 rightToLeft, 0, 0, glyphDefinitionTableHeader);
     le_int32 newGlyphCount = glyphCount;
 
-    for (le_uint16 order = 0; order < lookupOrderCount; order += 1) {
+    for (le_uint16 order = 0; order < lookupOrderCount && LE_SUCCESS(success); order += 1) {
         le_uint16 lookup = lookupOrderArray[order];
         FeatureMask selectMask = lookupSelectArray[lookup];
 
         if (selectMask != 0) {
-            const LookupTable *lookupTable = lookupListTable->getLookupTable(lookup);
-
-            if (!lookupTable)
+          const LEReferenceTo<LookupTable> lookupTable = lookupListTable->getLookupTable(lookupListTable, lookup, success);
+          if (!lookupTable.isValid() ||LE_FAILURE(success) ) {
                 continue;
-
+            }
             le_uint16 lookupFlags = SWAPW(lookupTable->lookupFlags);
 
             glyphIterator.reset(lookupFlags, selectMask);
 
             while (glyphIterator.findFeatureTag()) {
-                applyLookupTable(lookupTable, &glyphIterator, fontInstance, success);
+              applyLookupTable(lookupTable, &glyphIterator, fontInstance, success); // TODO
                 if (LE_FAILURE(success)) {
                     return 0;
                 }
@@ -124,8 +123,8 @@
         return 0;
     }
 
-    const LookupTable *lookupTable = lookupListTable->getLookupTable(lookupTableIndex);
-    if (lookupTable == NULL) {
+    const LEReferenceTo<LookupTable> lookupTable = lookupListTable->getLookupTable(lookupListTable, lookupTableIndex, success);
+    if (!lookupTable.isValid()) {
         success = LE_INTERNAL_ERROR;
         return 0;
     }
@@ -136,33 +135,35 @@
     return delta;
 }
 
-le_int32 LookupProcessor::selectLookups(const FeatureTable *featureTable, FeatureMask featureMask, le_int32 order)
+le_int32 LookupProcessor::selectLookups(const LEReferenceTo<FeatureTable> &featureTable, FeatureMask featureMask, le_int32 order, LEErrorCode &success)
 {
-    le_uint16 lookupCount = featureTable? SWAPW(featureTable->lookupCount) : 0;
+  le_uint16 lookupCount = featureTable.isValid()? SWAPW(featureTable->lookupCount) : 0;
     le_int32  store = order;
 
-    for (le_uint16 lookup = 0; lookup < lookupCount; lookup += 1) {
-        le_uint16 lookupListIndex = SWAPW(featureTable->lookupListIndexArray[lookup]);
+    LEReferenceToArrayOf<le_uint16> lookupListIndexArray(featureTable, success, featureTable->lookupListIndexArray, lookupCount);
 
-        if (lookupListIndex >= lookupSelectCount)
-            continue;
+    for (le_uint16 lookup = 0; LE_SUCCESS(success) && lookup < lookupCount; lookup += 1) {
+      le_uint16 lookupListIndex = SWAPW(lookupListIndexArray.getObject(lookup,success));
+      if (lookupListIndex >= lookupSelectCount) {
+        continue;
+      }
 
-        lookupSelectArray[lookupListIndex] |= featureMask;
-        lookupOrderArray[store++] = lookupListIndex;
+      lookupSelectArray[lookupListIndex] |= featureMask;
+      lookupOrderArray[store++] = lookupListIndex;
     }
 
     return store - order;
 }
 
-LookupProcessor::LookupProcessor(const char *baseAddress,
+LookupProcessor::LookupProcessor(const LETableReference &baseAddress,
         Offset scriptListOffset, Offset featureListOffset, Offset lookupListOffset,
         LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool orderFeatures,
         LEErrorCode& success)
-    : lookupListTable(NULL), featureListTable(NULL), lookupSelectArray(NULL), lookupSelectCount(0),
-      lookupOrderArray(NULL), lookupOrderCount(0)
+    : lookupListTable(), featureListTable(), lookupSelectArray(NULL), lookupSelectCount(0),
+      lookupOrderArray(NULL), lookupOrderCount(0), fReference(baseAddress)
 {
-    const ScriptListTable *scriptListTable = NULL;
-    const LangSysTable *langSysTable = NULL;
+  LEReferenceTo<ScriptListTable> scriptListTable;
+  LEReferenceTo<LangSysTable> langSysTable;
     le_uint16 featureCount = 0;
     le_uint16 lookupListCount = 0;
     le_uint16 requiredFeatureIndex;
@@ -172,29 +173,33 @@
     }
 
     if (scriptListOffset != 0) {
-        scriptListTable = (const ScriptListTable *) (baseAddress + scriptListOffset);
-        langSysTable = scriptListTable->findLanguage(scriptTag, languageTag);
+      scriptListTable = LEReferenceTo<ScriptListTable>(baseAddress, success, scriptListOffset);
+      langSysTable = scriptListTable->findLanguage(scriptListTable, scriptTag, languageTag, success);
 
-        if (langSysTable != 0) {
-            featureCount = SWAPW(langSysTable->featureCount);
-        }
+      if (langSysTable.isValid() && LE_SUCCESS(success)) {
+        featureCount = SWAPW(langSysTable->featureCount);
+      }
     }
 
     if (featureListOffset != 0) {
-        featureListTable = (const FeatureListTable *) (baseAddress + featureListOffset);
+      featureListTable = LEReferenceTo<FeatureListTable>(baseAddress, success, featureListOffset);
     }
 
     if (lookupListOffset != 0) {
-        lookupListTable = (const LookupListTable *) (baseAddress + lookupListOffset);
+      lookupListTable = LEReferenceTo<LookupListTable>(baseAddress,success, lookupListOffset);
+      if(LE_SUCCESS(success) && lookupListTable.isValid()) {
         lookupListCount = SWAPW(lookupListTable->lookupCount);
+      }
     }
 
-    if (langSysTable == NULL || featureListTable == NULL || lookupListTable == NULL ||
+    if (langSysTable.isEmpty() || featureListTable.isEmpty() || lookupListTable.isEmpty() ||
         featureCount == 0 || lookupListCount == 0) {
         return;
     }
 
-    requiredFeatureIndex = SWAPW(langSysTable->reqFeatureIndex);
+    if(langSysTable.isValid()) {
+      requiredFeatureIndex = SWAPW(langSysTable->reqFeatureIndex);
+    }
 
     lookupSelectArray = LE_NEW_ARRAY(FeatureMask, lookupListCount);
     if (lookupSelectArray == NULL) {
@@ -209,31 +214,39 @@
     lookupSelectCount = lookupListCount;
 
     le_int32 count, order = 0;
-    le_int32 featureReferences = 0;
-    const FeatureTable *featureTable = NULL;
+    le_uint32 featureReferences = 0;
+    LEReferenceTo<FeatureTable> featureTable;
     LETag featureTag;
 
-    const FeatureTable *requiredFeatureTable = NULL;
+    LEReferenceTo<FeatureTable> requiredFeatureTable;
     LETag requiredFeatureTag = 0x00000000U;
 
     // Count the total number of lookups referenced by all features. This will
     // be the maximum number of entries in the lookupOrderArray. We can't use
     // lookupListCount because some lookups might be referenced by more than
     // one feature.
-    for (le_int32 feature = 0; feature < featureCount; feature += 1) {
-        le_uint16 featureIndex = SWAPW(langSysTable->featureIndexArray[feature]);
+    if(featureListTable.isValid() && LE_SUCCESS(success)) {
+      LEReferenceToArrayOf<le_uint16> featureIndexArray(langSysTable, success, langSysTable->featureIndexArray, featureCount);
 
-        featureTable = featureListTable->getFeatureTable(featureIndex, &featureTag);
+      for (le_uint32 feature = 0; LE_SUCCESS(success)&&(feature < featureCount); feature += 1) {
+        le_uint16 featureIndex = SWAPW(featureIndexArray.getObject(feature, success));
 
-        if (!featureTable)
-            continue;
+        featureTable = featureListTable->getFeatureTable(featureListTable, featureIndex,  &featureTag, success);
+        if (!featureTable.isValid() || LE_FAILURE(success)) {
+          continue;
+        }
+        featureReferences += SWAPW(featureTable->lookupCount);
+      }
+    }
 
-        featureReferences += SWAPW(featureTable->lookupCount);
+    if (!featureTable.isValid() || LE_FAILURE(success)) {
+        success = LE_INTERNAL_ERROR;
+        return;
     }
 
     if (requiredFeatureIndex != 0xFFFF) {
-        requiredFeatureTable = featureListTable->getFeatureTable(requiredFeatureIndex, &requiredFeatureTag);
-        featureReferences += SWAPW(featureTable->lookupCount);
+      requiredFeatureTable = featureListTable->getFeatureTable(featureListTable, requiredFeatureIndex, &requiredFeatureTag, success);
+      featureReferences += SWAPW(featureTable->lookupCount);
     }
 
     lookupOrderArray = LE_NEW_ARRAY(le_uint16, featureReferences);
@@ -248,7 +261,7 @@
 
         // If this is the required feature, add its lookups
         if (requiredFeatureTag == fm.tag) {
-            count += selectLookups(requiredFeatureTable, fm.mask, order);
+          count += selectLookups(requiredFeatureTable, fm.mask, order, success);
         }
 
         if (orderFeatures) {
@@ -258,7 +271,8 @@
             }
 
             for (le_uint16 feature = 0; feature < featureCount; feature += 1) {
-                le_uint16 featureIndex = SWAPW(langSysTable->featureIndexArray[feature]);
+              LEReferenceToArrayOf<le_uint16> featureIndexArray(langSysTable, success, langSysTable->featureIndexArray, featureCount);
+              le_uint16 featureIndex = SWAPW(featureIndexArray.getObject(feature,success));
 
                 // don't add the required feature to the list more than once...
                 // TODO: Do we need this check? (Spec. says required feature won't be in feature list...)
@@ -266,10 +280,10 @@
                     continue;
                 }
 
-                featureTable = featureListTable->getFeatureTable(featureIndex, &featureTag);
+                featureTable = featureListTable->getFeatureTable(featureListTable, featureIndex, &featureTag, success);
 
                 if (featureTag == fm.tag) {
-                    count += selectLookups(featureTable, fm.mask, order + count);
+                  count += selectLookups(featureTable, fm.mask, order + count, success);
                 }
             }
 
@@ -278,9 +292,10 @@
             }
 
             order += count;
-        } else {
-            for (le_uint16 feature = 0; feature < featureCount; feature += 1) {
-                le_uint16 featureIndex = SWAPW(langSysTable->featureIndexArray[feature]);
+        } else if(langSysTable.isValid()) {
+          LEReferenceToArrayOf<le_uint16> featureIndexArray(langSysTable, success, langSysTable->featureIndexArray, featureCount);
+          for (le_uint16 feature = 0; LE_SUCCESS(success)&& (feature < featureCount); feature += 1) {
+            le_uint16 featureIndex = SWAPW(featureIndexArray.getObject(feature,success));
 
                 // don't add the required feature to the list more than once...
                 // NOTE: This check is commented out because the spec. says that
@@ -292,10 +307,10 @@
                 }
 #endif
 
-                featureTable = featureListTable->getFeatureTable(featureIndex, &featureTag);
+                featureTable = featureListTable->getFeatureTable(featureListTable, featureIndex, &featureTag, success);
 
                 if (featureTag == fm.tag) {
-                    order += selectLookups(featureTable, fm.mask, order);
+                  order += selectLookups(featureTable, fm.mask, order, success);
                 }
             }
         }
--- a/src/share/native/sun/font/layout/LookupProcessor.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LookupProcessor.h	Wed Apr 17 21:48:04 2013 -0700
@@ -41,6 +41,7 @@
 #include "LETypes.h"
 #include "LEFontInstance.h"
 #include "OpenTypeTables.h"
+#include "LETableReference.h"
 //#include "Lookups.h"
 //#include "Features.h"
 
@@ -59,19 +60,21 @@
 class LookupProcessor : public UMemory {
 public:
     le_int32 process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments,
-                 le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, const LEFontInstance *fontInstance, LEErrorCode& success) const;
+                 le_bool rightToLeft, const LEReferenceTo<GlyphDefinitionTableHeader> &glyphDefinitionTableHeader, const LEFontInstance *fontInstance, LEErrorCode& success) const;
 
-    le_uint32 applyLookupTable(const LookupTable *lookupTable, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const;
+    le_uint32 applyLookupTable(const LEReferenceTo<LookupTable> &lookupTable, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const;
 
     le_uint32 applySingleLookup(le_uint16 lookupTableIndex, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const;
 
-    virtual le_uint32 applySubtable(const LookupSubtable *lookupSubtable, le_uint16 subtableType,
+    virtual le_uint32 applySubtable(const LEReferenceTo<LookupSubtable> &lookupSubtable, le_uint16 subtableType,
         GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const = 0;
 
     virtual ~LookupProcessor();
 
+    const LETableReference &getReference() const { return fReference; }
+
 protected:
-     LookupProcessor(const char *baseAddress,
+    LookupProcessor(const LETableReference &baseAddress,
         Offset scriptListOffset,
         Offset featureListOffset,
         Offset lookupListOffset,
@@ -84,10 +87,10 @@
 
    LookupProcessor();
 
-    le_int32 selectLookups(const FeatureTable *featureTable, FeatureMask featureMask, le_int32 order);
+    le_int32 selectLookups(const LEReferenceTo<FeatureTable> &featureTable, FeatureMask featureMask, le_int32 order, LEErrorCode &success);
 
-    const LookupListTable   *lookupListTable;
-    const FeatureListTable  *featureListTable;
+    LEReferenceTo<LookupListTable>   lookupListTable;
+    LEReferenceTo<FeatureListTable>  featureListTable;
 
     FeatureMask            *lookupSelectArray;
     le_uint32              lookupSelectCount;
@@ -95,6 +98,8 @@
     le_uint16               *lookupOrderArray;
     le_uint32               lookupOrderCount;
 
+    LETableReference        fReference;
+
 private:
 
     LookupProcessor(const LookupProcessor &other); // forbid copying of this class
--- a/src/share/native/sun/font/layout/LookupTables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LookupTables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -49,22 +49,26 @@
     of the derived classes, and implement it in the others by casting
     the "this" pointer to the type that has the implementation.
 */
-const LookupSegment *BinarySearchLookupTable::lookupSegment(const LookupSegment *segments, LEGlyphID glyph) const
+const LookupSegment *BinarySearchLookupTable::lookupSegment(const LETableReference &base, const LookupSegment *segments, LEGlyphID glyph, LEErrorCode &success) const
 {
+
     le_int16  unity = SWAPW(unitSize);
     le_int16  probe = SWAPW(searchRange);
     le_int16  extra = SWAPW(rangeShift);
     TTGlyphID ttGlyph = (TTGlyphID) LE_GET_GLYPH(glyph);
-    const LookupSegment *entry = segments;
-    const LookupSegment *trial = (const LookupSegment *) ((char *) entry + extra);
+    LEReferenceTo<LookupSegment> entry(base, success, segments);
+    LEReferenceTo<LookupSegment> trial(entry, success, extra);
+
+    if(LE_FAILURE(success)) return NULL;
 
     if (SWAPW(trial->lastGlyph) <= ttGlyph) {
         entry = trial;
     }
 
-    while (probe > unity) {
+    while (probe > unity && LE_SUCCESS(success)) {
         probe >>= 1;
-        trial = (const LookupSegment *) ((char *) entry + probe);
+        trial = entry; // copy
+        trial.addOffset(probe, success);
 
         if (SWAPW(trial->lastGlyph) <= ttGlyph) {
             entry = trial;
@@ -72,28 +76,29 @@
     }
 
     if (SWAPW(entry->firstGlyph) <= ttGlyph) {
-        return entry;
+      return entry.getAlias();
     }
 
     return NULL;
 }
 
-const LookupSingle *BinarySearchLookupTable::lookupSingle(const LookupSingle *entries, LEGlyphID glyph) const
+const LookupSingle *BinarySearchLookupTable::lookupSingle(const LETableReference &base, const LookupSingle *entries, LEGlyphID glyph, LEErrorCode &success) const
 {
     le_int16  unity = SWAPW(unitSize);
     le_int16  probe = SWAPW(searchRange);
     le_int16  extra = SWAPW(rangeShift);
     TTGlyphID ttGlyph = (TTGlyphID) LE_GET_GLYPH(glyph);
-    const LookupSingle *entry = entries;
-    const LookupSingle *trial = (const LookupSingle *) ((char *) entry + extra);
+    LEReferenceTo<LookupSingle> entry(base, success, entries);
+    LEReferenceTo<LookupSingle> trial(entry, success, extra);
 
     if (SWAPW(trial->glyph) <= ttGlyph) {
         entry = trial;
     }
 
-    while (probe > unity) {
+    while (probe > unity && LE_SUCCESS(success)) {
         probe >>= 1;
-        trial = (const LookupSingle *) ((char *) entry + probe);
+        trial = entry;
+        trial.addOffset(probe, success);
 
         if (SWAPW(trial->glyph) <= ttGlyph) {
             entry = trial;
@@ -101,7 +106,7 @@
     }
 
     if (SWAPW(entry->glyph) == ttGlyph) {
-        return entry;
+      return entry.getAlias();
     }
 
     return NULL;
--- a/src/share/native/sun/font/layout/LookupTables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/LookupTables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -39,6 +39,7 @@
 
 #include "LETypes.h"
 #include "LayoutTables.h"
+#include "LETableReference.h"
 
 U_NAMESPACE_BEGIN
 
@@ -79,30 +80,34 @@
     le_int16 entrySelector;
     le_int16 rangeShift;
 
-    const LookupSegment *lookupSegment(const LookupSegment *segments, LEGlyphID glyph) const;
+    const LookupSegment *lookupSegment(const LETableReference &base, const LookupSegment *segments, LEGlyphID glyph, LEErrorCode &success) const;
 
-    const LookupSingle *lookupSingle(const LookupSingle *entries, LEGlyphID glyph) const;
+    const LookupSingle *lookupSingle(const LETableReference &base, const LookupSingle *entries, LEGlyphID glyph, LEErrorCode &success) const;
 };
 
 struct SimpleArrayLookupTable : LookupTable
 {
     LookupValue valueArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(SimpleArrayLookupTable, valueArray)
 
 struct SegmentSingleLookupTable : BinarySearchLookupTable
 {
     LookupSegment segments[ANY_NUMBER];
 };
+LE_VAR_ARRAY(SegmentSingleLookupTable, segments)
 
 struct SegmentArrayLookupTable : BinarySearchLookupTable
 {
     LookupSegment segments[ANY_NUMBER];
 };
+LE_VAR_ARRAY(SegmentArrayLookupTable, segments)
 
 struct SingleTableLookupTable : BinarySearchLookupTable
 {
     LookupSingle entries[ANY_NUMBER];
 };
+LE_VAR_ARRAY(SingleTableLookupTable, entries)
 
 struct TrimmedArrayLookupTable : LookupTable
 {
@@ -110,6 +115,7 @@
     TTGlyphID   glyphCount;
     LookupValue valueArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(TrimmedArrayLookupTable, valueArray)
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/Lookups.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/Lookups.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -37,33 +37,35 @@
 
 U_NAMESPACE_BEGIN
 
-const LookupTable *LookupListTable::getLookupTable(le_uint16 lookupTableIndex) const
+const LEReferenceTo<LookupTable> LookupListTable::getLookupTable(const LEReferenceTo<LookupListTable> &base, le_uint16 lookupTableIndex, LEErrorCode &success) const
 {
-    if (lookupTableIndex >= SWAPW(lookupCount)) {
-        return 0;
-    }
+  LEReferenceToArrayOf<Offset> lookupTableOffsetArrayRef(base, success, (const Offset*)&lookupTableOffsetArray, SWAPW(lookupCount));
 
-    Offset lookupTableOffset = lookupTableOffsetArray[lookupTableIndex];
-
-    return (const LookupTable *) ((char *) this + SWAPW(lookupTableOffset));
+  if(LE_FAILURE(success) || lookupTableIndex>lookupTableOffsetArrayRef.getCount()) {
+    return LEReferenceTo<LookupTable>();
+  } else {
+    return LEReferenceTo<LookupTable>(base, success, SWAPW(lookupTableOffsetArrayRef.getObject(lookupTableIndex, success)));
+  }
 }
 
-const LookupSubtable *LookupTable::getLookupSubtable(le_uint16 subtableIndex) const
+const LEReferenceTo<LookupSubtable> LookupTable::getLookupSubtable(const LEReferenceTo<LookupTable> &base, le_uint16 subtableIndex, LEErrorCode &success) const
 {
-    if (subtableIndex >= SWAPW(subTableCount)) {
-        return 0;
-    }
+  LEReferenceToArrayOf<Offset> subTableOffsetArrayRef(base, success, (const Offset*)&subTableOffsetArray, SWAPW(subTableCount));
 
-    Offset subtableOffset = subTableOffsetArray[subtableIndex];
-
-    return (const LookupSubtable *) ((char *) this + SWAPW(subtableOffset));
+  if(LE_FAILURE(success) || subtableIndex>subTableOffsetArrayRef.getCount()) {
+    return LEReferenceTo<LookupSubtable>();
+  } else {
+    return LEReferenceTo<LookupSubtable>(base, success, SWAPW(subTableOffsetArrayRef.getObject(subtableIndex, success)));
+  }
 }
 
-le_int32 LookupSubtable::getGlyphCoverage(Offset tableOffset, LEGlyphID glyphID) const
+le_int32 LookupSubtable::getGlyphCoverage(const LEReferenceTo<LookupSubtable> &base, Offset tableOffset, LEGlyphID glyphID, LEErrorCode &success) const
 {
-    const CoverageTable *coverageTable = (const CoverageTable *) ((char *) this + SWAPW(tableOffset));
+  const LEReferenceTo<CoverageTable> coverageTable(base, success, SWAPW(tableOffset));
 
-    return coverageTable->getGlyphCoverage(glyphID);
+  if(LE_FAILURE(success)) return 0;
+
+  return coverageTable->getGlyphCoverage(glyphID);
 }
 
 U_NAMESPACE_END
--- a/src/share/native/sun/font/layout/Lookups.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/Lookups.h	Wed Apr 17 21:48:04 2013 -0700
@@ -58,9 +58,14 @@
     le_uint16 subtableFormat;
     Offset    coverageTableOffset;
 
-    inline le_int32  getGlyphCoverage(LEGlyphID glyphID) const;
+  inline le_int32  getGlyphCoverage(const LEReferenceTo<LookupSubtable> &base, LEGlyphID glyphID, LEErrorCode &success) const;
+
+  le_int32  getGlyphCoverage(const LEReferenceTo<LookupSubtable> &base, Offset tableOffset, LEGlyphID glyphID, LEErrorCode &success) const;
 
-    le_int32  getGlyphCoverage(Offset tableOffset, LEGlyphID glyphID) const;
+  // convenience
+  inline le_int32  getGlyphCoverage(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const;
+
+  inline le_int32  getGlyphCoverage(const LETableReference &base, Offset tableOffset, LEGlyphID glyphID, LEErrorCode &success) const;
 };
 
 struct LookupTable
@@ -70,20 +75,32 @@
     le_uint16       subTableCount;
     Offset          subTableOffsetArray[ANY_NUMBER];
 
-    const LookupSubtable  *getLookupSubtable(le_uint16 subtableIndex) const;
+  const LEReferenceTo<LookupSubtable> getLookupSubtable(const LEReferenceTo<LookupTable> &base, le_uint16 subtableIndex, LEErrorCode &success) const;
 };
+LE_VAR_ARRAY(LookupTable, subTableOffsetArray)
 
 struct LookupListTable
 {
     le_uint16   lookupCount;
     Offset      lookupTableOffsetArray[ANY_NUMBER];
 
-    const LookupTable *getLookupTable(le_uint16 lookupTableIndex) const;
+  const LEReferenceTo<LookupTable> getLookupTable(const LEReferenceTo<LookupListTable> &base, le_uint16 lookupTableIndex, LEErrorCode &success) const;
 };
+LE_VAR_ARRAY(LookupListTable, lookupTableOffsetArray)
+
+inline le_int32 LookupSubtable::getGlyphCoverage(const LEReferenceTo<LookupSubtable> &base, LEGlyphID glyphID, LEErrorCode &success) const
+{
+  return getGlyphCoverage(base, coverageTableOffset, glyphID, success);
+}
 
-inline le_int32 LookupSubtable::getGlyphCoverage(LEGlyphID glyphID) const
-{
-    return getGlyphCoverage(coverageTableOffset, glyphID);
+inline le_int32  LookupSubtable::getGlyphCoverage(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const {
+  LEReferenceTo<LookupSubtable> thisRef(base, success, this);
+  return getGlyphCoverage(thisRef, glyphID, success);
+}
+
+inline le_int32  LookupSubtable::getGlyphCoverage(const LETableReference &base, Offset tableOffset, LEGlyphID glyphID, LEErrorCode &success) const {
+  LEReferenceTo<LookupSubtable> thisRef(base, success, this);
+  return getGlyphCoverage(thisRef, tableOffset, glyphID, success);
 }
 
 U_NAMESPACE_END
--- a/src/share/native/sun/font/layout/MPreFixups.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/MPreFixups.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 2002-2008 - All Rights Reserved
+ * (C) Copyright IBM Corp. 2002-2013 - All Rights Reserved
  *
  */
 
@@ -65,9 +65,9 @@
     }
 }
 
-void MPreFixups::apply(LEGlyphStorage &glyphStorage, LEErrorCode& leSuccess)
+void MPreFixups::apply(LEGlyphStorage &glyphStorage, LEErrorCode& success)
 {
-    if (LE_FAILURE(leSuccess)) {
+    if (LE_FAILURE(success)) {
         return;
     }
 
--- a/src/share/native/sun/font/layout/MarkArrays.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/MarkArrays.h	Wed Apr 17 21:48:04 2013 -0700
@@ -57,6 +57,7 @@
     le_int32 getMarkClass(LEGlyphID glyphID, le_int32 coverageIndex, const LEFontInstance *fontInstance,
         LEPoint &anchor) const;
 };
+LE_VAR_ARRAY(MarkArray, markRecordArray)
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -51,10 +51,10 @@
     return 0xFFFF;
 }
 
-le_int32 MarkToBasePositioningSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
+le_int32 MarkToBasePositioningSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
 {
     LEGlyphID markGlyph = glyphIterator->getCurrGlyphID();
-    le_int32 markCoverage = getGlyphCoverage((LEGlyphID) markGlyph);
+    le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success);
 
     if (markCoverage < 0) {
         // markGlyph isn't a covered mark glyph
@@ -75,7 +75,7 @@
     // FIXME: We probably don't want to find a base glyph before a previous ligature...
     GlyphIterator baseIterator(*glyphIterator, (le_uint16) (lfIgnoreMarks /*| lfIgnoreLigatures*/));
     LEGlyphID baseGlyph = findBaseGlyph(&baseIterator);
-    le_int32 baseCoverage = getBaseCoverage((LEGlyphID) baseGlyph);
+    le_int32 baseCoverage = getBaseCoverage(base, (LEGlyphID) baseGlyph, success);
     const BaseArray *baseArray = (const BaseArray *) ((char *) this + SWAPW(baseArrayOffset));
     le_uint16 baseCount = SWAPW(baseArray->baseRecordCount);
 
--- a/src/share/native/sun/font/layout/MarkToBasePosnSubtables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/MarkToBasePosnSubtables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -48,7 +48,7 @@
 
 struct MarkToBasePositioningSubtable : AttachmentPositioningSubtable
 {
-    le_int32   process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
+  le_int32   process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const;
     LEGlyphID  findBaseGlyph(GlyphIterator *glyphIterator) const;
 };
 
@@ -56,12 +56,14 @@
 {
     Offset baseAnchorTableOffsetArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(BaseRecord, baseAnchorTableOffsetArray)
 
 struct BaseArray
 {
     le_int16 baseRecordCount;
     BaseRecord baseRecordArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(BaseArray, baseRecordArray)
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -50,10 +50,10 @@
     return 0xFFFF;
 }
 
-le_int32 MarkToLigaturePositioningSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
+le_int32 MarkToLigaturePositioningSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
 {
     LEGlyphID markGlyph = glyphIterator->getCurrGlyphID();
-    le_int32 markCoverage = getGlyphCoverage((LEGlyphID) markGlyph);
+    le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success);
 
     if (markCoverage < 0) {
         // markGlyph isn't a covered mark glyph
@@ -74,7 +74,7 @@
     // FIXME: we probably don't want to find a ligature before a previous base glyph...
     GlyphIterator ligatureIterator(*glyphIterator, (le_uint16) (lfIgnoreMarks /*| lfIgnoreBaseGlyphs*/));
     LEGlyphID ligatureGlyph = findLigatureGlyph(&ligatureIterator);
-    le_int32 ligatureCoverage = getBaseCoverage((LEGlyphID) ligatureGlyph);
+    le_int32 ligatureCoverage = getBaseCoverage(base, (LEGlyphID) ligatureGlyph, success);
     const LigatureArray *ligatureArray = (const LigatureArray *) ((char *) this + SWAPW(baseArrayOffset));
     le_uint16 ligatureCount = SWAPW(ligatureArray->ligatureCount);
 
--- a/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -48,7 +48,7 @@
 
 struct MarkToLigaturePositioningSubtable : AttachmentPositioningSubtable
 {
-    le_int32   process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
+  le_int32   process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const;
     LEGlyphID  findLigatureGlyph(GlyphIterator *glyphIterator) const;
 };
 
@@ -56,18 +56,21 @@
 {
     Offset ligatureAnchorTableOffsetArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(ComponentRecord, ligatureAnchorTableOffsetArray)
 
 struct LigatureAttachTable
 {
     le_uint16 componentCount;
     ComponentRecord componentRecordArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(LigatureAttachTable, componentRecordArray)
 
 struct LigatureArray
 {
     le_uint16 ligatureCount;
     Offset ligatureAttachTableOffsetArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(LigatureArray, ligatureAttachTableOffsetArray)
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -51,10 +51,10 @@
     return 0xFFFF;
 }
 
-le_int32 MarkToMarkPositioningSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
+le_int32 MarkToMarkPositioningSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
 {
     LEGlyphID markGlyph = glyphIterator->getCurrGlyphID();
-    le_int32 markCoverage = getGlyphCoverage((LEGlyphID) markGlyph);
+    le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success);
 
     if (markCoverage < 0) {
         // markGlyph isn't a covered mark glyph
@@ -74,7 +74,7 @@
 
     GlyphIterator mark2Iterator(*glyphIterator);
     LEGlyphID mark2Glyph = findMark2Glyph(&mark2Iterator);
-    le_int32 mark2Coverage = getBaseCoverage((LEGlyphID) mark2Glyph);
+    le_int32 mark2Coverage = getBaseCoverage(base, (LEGlyphID) mark2Glyph, success);
     const Mark2Array *mark2Array = (const Mark2Array *) ((char *) this + SWAPW(baseArrayOffset));
     le_uint16 mark2Count = SWAPW(mark2Array->mark2RecordCount);
 
--- a/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -48,7 +48,7 @@
 
 struct MarkToMarkPositioningSubtable : AttachmentPositioningSubtable
 {
-    le_int32   process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
+  le_int32   process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const;
     LEGlyphID  findMark2Glyph(GlyphIterator *glyphIterator) const;
 };
 
@@ -56,12 +56,14 @@
 {
     Offset mark2AnchorTableOffsetArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(Mark2Record, mark2AnchorTableOffsetArray)
 
 struct Mark2Array
 {
     le_uint16 mark2RecordCount;
     Mark2Record mark2RecordArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(Mark2Array, mark2RecordArray)
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/MorphStateTables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/MorphStateTables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -49,5 +49,10 @@
     StateTableHeader stHeader;
 };
 
+struct MorphStateTableHeader2 : MorphSubtableHeader2
+{
+    StateTableHeader2 stHeader;
+};
+
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/MorphTables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/MorphTables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -44,61 +44,61 @@
 
 U_NAMESPACE_BEGIN
 
-void MorphTableHeader::process(LEGlyphStorage &glyphStorage) const
+void MorphTableHeader::process(const LETableReference &base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const
 {
-    const ChainHeader *chainHeader = chains;
-    le_uint32 chainCount = SWAPL(this->nChains);
+  le_uint32 chainCount = SWAPL(this->nChains);
+  LEReferenceTo<ChainHeader> chainHeader(base, success, chains); // moving header
+    LEReferenceToArrayOf<ChainHeader> chainHeaderArray(base, success, chains, chainCount);
     le_uint32 chain;
 
-    for (chain = 0; chain < chainCount; chain += 1) {
+    for (chain = 0; LE_SUCCESS(success) && (chain < chainCount); chain += 1) {
         FeatureFlags defaultFlags = SWAPL(chainHeader->defaultFlags);
         le_uint32 chainLength = SWAPL(chainHeader->chainLength);
         le_int16 nFeatureEntries = SWAPW(chainHeader->nFeatureEntries);
         le_int16 nSubtables = SWAPW(chainHeader->nSubtables);
-        const MorphSubtableHeader *subtableHeader =
-            (const MorphSubtableHeader *)&chainHeader->featureTable[nFeatureEntries];
+        LEReferenceTo<MorphSubtableHeader> subtableHeader =
+          LEReferenceTo<MorphSubtableHeader>(chainHeader,success, &(chainHeader->featureTable[nFeatureEntries]));
         le_int16 subtable;
 
-        for (subtable = 0; subtable < nSubtables; subtable += 1) {
+        for (subtable = 0; LE_SUCCESS(success) && (subtable < nSubtables); subtable += 1) {
             le_int16 length = SWAPW(subtableHeader->length);
             SubtableCoverage coverage = SWAPW(subtableHeader->coverage);
             FeatureFlags subtableFeatures = SWAPL(subtableHeader->subtableFeatures);
 
             // should check coverage more carefully...
-            if ((coverage & scfVertical) == 0 && (subtableFeatures & defaultFlags) != 0) {
-                subtableHeader->process(glyphStorage);
+            if ((coverage & scfVertical) == 0 && (subtableFeatures & defaultFlags) != 0  && LE_SUCCESS(success)) {
+              subtableHeader->process(subtableHeader, glyphStorage, success);
             }
 
-            subtableHeader = (const MorphSubtableHeader *) ((char *)subtableHeader + length);
+            subtableHeader.addOffset(length, success);
         }
-
-        chainHeader = (const ChainHeader *)((char *)chainHeader + chainLength);
+        chainHeader.addOffset(chainLength, success);
     }
 }
 
-void MorphSubtableHeader::process(LEGlyphStorage &glyphStorage) const
+void MorphSubtableHeader::process(const LEReferenceTo<MorphSubtableHeader> &base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const
 {
     SubtableProcessor *processor = NULL;
 
     switch (SWAPW(coverage) & scfTypeMask)
     {
     case mstIndicRearrangement:
-        processor = new IndicRearrangementProcessor(this);
+      processor = new IndicRearrangementProcessor(base, success);
         break;
 
     case mstContextualGlyphSubstitution:
-        processor = new ContextualGlyphSubstitutionProcessor(this);
+      processor = new ContextualGlyphSubstitutionProcessor(base, success);
         break;
 
     case mstLigatureSubstitution:
-        processor = new LigatureSubstitutionProcessor(this);
+      processor = new LigatureSubstitutionProcessor(base, success);
         break;
 
     case mstReservedUnused:
         break;
 
     case mstNonContextualGlyphSubstitution:
-        processor = NonContextualGlyphSubstitutionProcessor::createInstance(this);
+      processor = NonContextualGlyphSubstitutionProcessor::createInstance(base, success);
         break;
 
     /*
@@ -112,8 +112,10 @@
     }
 
     if (processor != NULL) {
-        processor->process(glyphStorage);
-        delete processor;
+      if(LE_SUCCESS(success)) {
+        processor->process(glyphStorage, success);
+      }
+      delete processor;
     }
 }
 
--- a/src/share/native/sun/font/layout/MorphTables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/MorphTables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -39,6 +39,7 @@
 
 #include "LETypes.h"
 #include "LayoutTables.h"
+#include "LETableReference.h"
 
 U_NAMESPACE_BEGIN
 
@@ -65,6 +66,7 @@
     le_int16           nSubtables;
     FeatureTableEntry   featureTable[ANY_NUMBER];
 };
+LE_VAR_ARRAY(ChainHeader, featureTable)
 
 struct MorphTableHeader
 {
@@ -72,10 +74,12 @@
     le_uint32   nChains;
     ChainHeader chains[ANY_NUMBER];
 
-    void process(LEGlyphStorage &glyphStorage) const;
+  void process(const LETableReference& base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const;
 };
+LE_VAR_ARRAY(MorphTableHeader, chains)
 
 typedef le_int16 SubtableCoverage;
+typedef le_uint32 SubtableCoverage2;
 
 enum SubtableCoverageFlags
 {
@@ -102,7 +106,305 @@
     SubtableCoverage    coverage;
     FeatureFlags        subtableFeatures;
 
-    void process(LEGlyphStorage &glyphStorage) const;
+  void process(const LEReferenceTo<MorphSubtableHeader> &base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const;
+};
+
+enum SubtableCoverageFlags2
+{
+    scfVertical2 = 0x80000000,
+    scfReverse2  = 0x40000000,
+    scfIgnoreVt2 = 0x20000000,
+    scfReserved2 = 0x1FFFFF00,
+    scfTypeMask2 = 0x000000FF
+};
+
+struct MorphSubtableHeader2
+{
+    le_uint32           length;
+    SubtableCoverage2    coverage;
+    FeatureFlags        subtableFeatures;
+
+    void process(const LEReferenceTo<MorphSubtableHeader2> &base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const;
+};
+
+struct ChainHeader2
+{
+    FeatureFlags        defaultFlags;
+    le_uint32           chainLength;
+    le_uint32           nFeatureEntries;
+    le_uint32           nSubtables;
+    FeatureTableEntry   featureTable[ANY_NUMBER];
+};
+LE_VAR_ARRAY(ChainHeader2, featureTable)
+
+struct MorphTableHeader2
+{
+    le_int32    version;
+    le_uint32   nChains;
+    ChainHeader2 chains[ANY_NUMBER];
+
+    void process(const LEReferenceTo<MorphTableHeader2> &base, LEGlyphStorage &glyphStorage, le_int32 typoFlags, LEErrorCode &success) const;
+};
+LE_VAR_ARRAY(MorphTableHeader2, chains)
+
+/*
+ * AAT Font Features
+ * source: https://developer.apple.com/fonts/registry/
+ * (plus addition from ATS/SFNTLayoutTypes.h)
+ */
+
+enum {
+
+   allTypographicFeaturesType = 0,
+
+      allTypeFeaturesOnSelector            = 0,
+      allTypeFeaturesOffSelector           = 1,
+
+   ligaturesType = 1,
+
+      requiredLigaturesOnSelector          = 0,
+      requiredLigaturesOffSelector         = 1,
+      commonLigaturesOnSelector            = 2,
+      commonLigaturesOffSelector           = 3,
+      rareLigaturesOnSelector              = 4,
+      rareLigaturesOffSelector             = 5,
+      logosOnSelector                      = 6,
+      logosOffSelector                     = 7,
+      rebusPicturesOnSelector              = 8,
+      rebusPicturesOffSelector             = 9,
+      diphthongLigaturesOnSelector         = 10,
+      diphthongLigaturesOffSelector        = 11,
+      squaredLigaturesOnSelector           = 12,
+      squaredLigaturesOffSelector          = 13,
+      abbrevSquaredLigaturesOnSelector     = 14,
+      abbrevSquaredLigaturesOffSelector    = 15,
+      symbolLigaturesOnSelector            = 16,
+      symbolLigaturesOffSelector           = 17,
+      contextualLigaturesOnSelector        = 18,
+      contextualLigaturesOffSelector       = 19,
+      historicalLigaturesOnSelector        = 20,
+      historicalLigaturesOffSelector       = 21,
+
+   cursiveConnectionType = 2,
+
+      unconnectedSelector                  = 0,
+      partiallyConnectedSelector           = 1,
+      cursiveSelector                      = 2,
+
+   letterCaseType = 3,
+
+      upperAndLowerCaseSelector            = 0,
+      allCapsSelector                      = 1,
+      allLowerCaseSelector                 = 2,
+      smallCapsSelector                    = 3,
+      initialCapsSelector                  = 4,
+      initialCapsAndSmallCapsSelector      = 5,
+
+   verticalSubstitutionType = 4,
+
+      substituteVerticalFormsOnSelector    = 0,
+      substituteVerticalFormsOffSelector   = 1,
+
+   linguisticRearrangementType = 5,
+
+      linguisticRearrangementOnSelector    = 0,
+      linguisticRearrangementOffSelector   = 1,
+
+   numberSpacingType = 6,
+
+      monospacedNumbersSelector            = 0,
+      proportionalNumbersSelector          = 1,
+
+   /*
+   appleReserved1Type = 7,
+   */
+
+   smartSwashType = 8,
+
+      wordInitialSwashesOnSelector         = 0,
+      wordInitialSwashesOffSelector        = 1,
+      wordFinalSwashesOnSelector           = 2,
+      wordFinalSwashesOffSelector          = 3,
+      lineInitialSwashesOnSelector         = 4,
+      lineInitialSwashesOffSelector        = 5,
+      lineFinalSwashesOnSelector           = 6,
+      lineFinalSwashesOffSelector          = 7,
+      nonFinalSwashesOnSelector            = 8,
+      nonFinalSwashesOffSelector           = 9,
+
+   diacriticsType = 9,
+
+      showDiacriticsSelector               = 0,
+      hideDiacriticsSelector               = 1,
+      decomposeDiacriticsSelector          = 2,
+
+   verticalPositionType = 10,
+
+      normalPositionSelector               = 0,
+      superiorsSelector                    = 1,
+      inferiorsSelector                    = 2,
+      ordinalsSelector                     = 3,
+
+   fractionsType = 11,
+
+      noFractionsSelector                  = 0,
+      verticalFractionsSelector            = 1,
+      diagonalFractionsSelector            = 2,
+
+   /*
+   appleReserved2Type = 12,
+   */
+
+   overlappingCharactersType = 13,
+
+      preventOverlapOnSelector             = 0,
+      preventOverlapOffSelector            = 1,
+
+   typographicExtrasType = 14,
+
+      hyphensToEmDashOnSelector            = 0,
+      hyphensToEmDashOffSelector           = 1,
+      hyphenToEnDashOnSelector             = 2,
+      hyphenToEnDashOffSelector            = 3,
+      unslashedZeroOnSelector              = 4,
+      slashedZeroOffSelector               = 4,
+      unslashedZeroOffSelector             = 5,
+      slashedZeroOnSelector                = 5,
+      formInterrobangOnSelector            = 6,
+      formInterrobangOffSelector           = 7,
+      smartQuotesOnSelector                = 8,
+      smartQuotesOffSelector               = 9,
+      periodsToEllipsisOnSelector          = 10,
+      periodsToEllipsisOffSelector         = 11,
+
+   mathematicalExtrasType = 15,
+
+      hyphenToMinusOnSelector              = 0,
+      hyphenToMinusOffSelector             = 1,
+      asteriskToMultiplyOnSelector         = 2,
+      asteriskToMultiplyOffSelector        = 3,
+      slashToDivideOnSelector              = 4,
+      slashToDivideOffSelector             = 5,
+      inequalityLigaturesOnSelector        = 6,
+      inequalityLigaturesOffSelector       = 7,
+      exponentsOnSelector                  = 8,
+      exponentsOffSelector                 = 9,
+
+   ornamentSetsType = 16,
+
+      noOrnamentsSelector                  = 0,
+      dingbatsSelector                     = 1,
+      piCharactersSelector                 = 2,
+      fleuronsSelector                     = 3,
+      decorativeBordersSelector            = 4,
+      internationalSymbolsSelector         = 5,
+      mathSymbolsSelector                  = 6,
+
+   characterAlternativesType = 17,
+
+      noAlternatesSelector                 = 0,
+
+   designComplexityType = 18,
+
+      designLevel1Selector                 = 0,
+      designLevel2Selector                 = 1,
+      designLevel3Selector                 = 2,
+      designLevel4Selector                 = 3,
+      designLevel5Selector                 = 4,
+      designLevel6Selector                 = 5,
+      designLevel7Selector                 = 6,
+
+   styleOptionsType = 19,
+
+      noStyleOptionsSelector               = 0,
+      displayTextSelector                  = 1,
+      engravedTextSelector                 = 2,
+      illuminatedCapsSelector              = 3,
+      titlingCapsSelector                  = 4,
+      tallCapsSelector                     = 5,
+
+   characterShapeType = 20,
+
+      traditionalCharactersSelector        = 0,
+      simplifiedCharactersSelector         = 1,
+      jis1978CharactersSelector            = 2,
+      jis1983CharactersSelector            = 3,
+      jis1990CharactersSelector            = 4,
+      traditionalAltOneSelector            = 5,
+      traditionalAltTwoSelector            = 6,
+      traditionalAltThreeSelector          = 7,
+      traditionalAltFourSelector           = 8,
+      traditionalAltFiveSelector           = 9,
+      expertCharactersSelector             = 10,
+
+   numberCaseType = 21,
+
+      lowerCaseNumbersSelector             = 0,
+      upperCaseNumbersSelector             = 1,
+
+   textSpacingType = 22,
+
+      proportionalTextSelector             = 0,
+      monospacedTextSelector               = 1,
+      halfWidthTextSelector                = 2,
+      normallySpacedTextSelector           = 3,
+
+   transliterationType = 23,
+
+      noTransliterationSelector            = 0,
+      hanjaToHangulSelector                = 1,
+      hiraganaToKatakanaSelector           = 2,
+      katakanaToHiraganaSelector           = 3,
+      kanaToRomanizationSelector           = 4,
+      romanizationToHiraganaSelector       = 5,
+      romanizationToKatakanaSelector       = 6,
+      hanjaToHangulAltOneSelector          = 7,
+      hanjaToHangulAltTwoSelector          = 8,
+      hanjaToHangulAltThreeSelector        = 9,
+
+   annotationType = 24,
+
+      noAnnotationSelector                 = 0,
+      boxAnnotationSelector                = 1,
+      roundedBoxAnnotationSelector         = 2,
+      circleAnnotationSelector             = 3,
+      invertedCircleAnnotationSelector     = 4,
+      parenthesisAnnotationSelector        = 5,
+      periodAnnotationSelector             = 6,
+      romanNumeralAnnotationSelector       = 7,
+      diamondAnnotationSelector            = 8,
+
+   kanaSpacingType = 25,
+
+      fullWidthKanaSelector                = 0,
+      proportionalKanaSelector             = 1,
+
+   ideographicSpacingType = 26,
+
+      fullWidthIdeographsSelector          = 0,
+      proportionalIdeographsSelector       = 1,
+
+   cjkRomanSpacingType = 103,
+
+      halfWidthCJKRomanSelector            = 0,
+      proportionalCJKRomanSelector         = 1,
+      defaultCJKRomanSelector              = 2,
+      fullWidthCJKRomanSelector            = 3,
+
+   rubyKanaType = 28,
+
+      rubyKanaOnSelector                = 2,
+      rubyKanaOffSelector               = 3,
+
+/* The following types are provided for compatibility; note that
+   their use is deprecated. */
+
+   adobeCharacterSpacingType = 100,        /* prefer 22 */
+   adobeKanaSpacingType = 101,             /* prefer 25 */
+   adobeKanjiSpacingType = 102,            /* prefer 26 */
+   adobeSquareLigatures = 104,             /* prefer 1 */
+
+   lastFeatureType = -1
 };
 
 U_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/MorphTables2.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,248 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ * (C) Copyright IBM Corp. and others 1998 - 2013 - All Rights Reserved
+ *
+ */
+
+#include "LETypes.h"
+#include "LayoutTables.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "IndicRearrangementProcessor2.h"
+#include "ContextualGlyphSubstProc2.h"
+#include "LigatureSubstProc2.h"
+#include "NonContextualGlyphSubstProc2.h"
+#include "ContextualGlyphInsertionProc2.h"
+#include "LEGlyphStorage.h"
+#include "LESwaps.h"
+
+U_NAMESPACE_BEGIN
+
+void MorphTableHeader2::process(const LEReferenceTo<MorphTableHeader2> &base, LEGlyphStorage &glyphStorage,
+                                le_int32 typoFlags, LEErrorCode &success) const
+{
+  if(LE_FAILURE(success)) return;
+
+  le_uint32 chainCount = SWAPL(this->nChains);
+  LEReferenceTo<ChainHeader2> chainHeader(base, success, &chains[0]);
+  /* chainHeader and subtableHeader are implemented as a moving pointer rather than an array dereference
+   * to (slightly) reduce code churn. However, must be careful to preincrement them the 2nd time through.
+   * We don't want to increment them at the end of the loop, as that would attempt to dereference
+   * out of range memory.
+   */
+  le_uint32 chain;
+
+  for (chain = 0; LE_SUCCESS(success) && (chain < chainCount); chain++) {
+        if (chain>0) {
+          le_uint32 chainLength = SWAPL(chainHeader->chainLength);
+          chainHeader.addOffset(chainLength, success); // Don't increment the first time
+        }
+        FeatureFlags flag = SWAPL(chainHeader->defaultFlags);
+        le_uint32 nFeatureEntries = SWAPL(chainHeader->nFeatureEntries);
+        le_uint32 nSubtables = SWAPL(chainHeader->nSubtables);
+        LEReferenceTo<MorphSubtableHeader2> subtableHeader(chainHeader,
+              success, (const MorphSubtableHeader2 *)&chainHeader->featureTable[nFeatureEntries]);
+        le_uint32 subtable;
+        if(LE_FAILURE(success)) break; // malformed table
+
+        if (typoFlags != 0) {
+           le_uint32 featureEntry;
+           LEReferenceToArrayOf<FeatureTableEntry> featureTableRef(chainHeader, success, &chainHeader->featureTable[0], nFeatureEntries);
+           if(LE_FAILURE(success)) break;
+            // Feature subtables
+            for (featureEntry = 0; featureEntry < nFeatureEntries; featureEntry++) {
+                const FeatureTableEntry &featureTableEntry = featureTableRef(featureEntry, success);
+                le_int16 featureType = SWAPW(featureTableEntry.featureType);
+                le_int16 featureSetting = SWAPW(featureTableEntry.featureSetting);
+                le_uint32 enableFlags = SWAPL(featureTableEntry.enableFlags);
+                le_uint32 disableFlags = SWAPL(featureTableEntry.disableFlags);
+                switch (featureType) {
+                    case ligaturesType:
+                        if ((typoFlags & LE_Ligatures_FEATURE_ENUM ) && (featureSetting ^ 0x1)){
+                            flag &= disableFlags;
+                            flag |= enableFlags;
+                        } else {
+                            if (((typoFlags & LE_RLIG_FEATURE_FLAG) && featureSetting == requiredLigaturesOnSelector) ||
+                                ((typoFlags & LE_CLIG_FEATURE_FLAG) && featureSetting == contextualLigaturesOnSelector) ||
+                                ((typoFlags & LE_HLIG_FEATURE_FLAG) && featureSetting == historicalLigaturesOnSelector) ||
+                                ((typoFlags & LE_LIGA_FEATURE_FLAG) && featureSetting == commonLigaturesOnSelector)) {
+                                flag &= disableFlags;
+                                flag |= enableFlags;
+                            }
+                        }
+                        break;
+                    case letterCaseType:
+                        if ((typoFlags & LE_SMCP_FEATURE_FLAG) && featureSetting == smallCapsSelector) {
+                            flag &= disableFlags;
+                            flag |= enableFlags;
+                        }
+                        break;
+                    case verticalSubstitutionType:
+                        break;
+                    case linguisticRearrangementType:
+                        break;
+                    case numberSpacingType:
+                        break;
+                    case smartSwashType:
+                        if ((typoFlags & LE_SWSH_FEATURE_FLAG) && (featureSetting ^ 0x1)){
+                            flag &= disableFlags;
+                            flag |= enableFlags;
+                        }
+                        break;
+                    case diacriticsType:
+                        break;
+                    case verticalPositionType:
+                        break;
+                    case fractionsType:
+                        if (((typoFlags & LE_FRAC_FEATURE_FLAG) && featureSetting == diagonalFractionsSelector) ||
+                            ((typoFlags & LE_AFRC_FEATURE_FLAG) && featureSetting == verticalFractionsSelector)) {
+                            flag &= disableFlags;
+                            flag |= enableFlags;
+                        } else {
+                            flag &= disableFlags;
+                        }
+                        break;
+                    case typographicExtrasType:
+                        if ((typoFlags & LE_ZERO_FEATURE_FLAG) && featureSetting == slashedZeroOnSelector) {
+                            flag &= disableFlags;
+                            flag |= enableFlags;
+                        }
+                        break;
+                    case mathematicalExtrasType:
+                        break;
+                    case ornamentSetsType:
+                        break;
+                    case characterAlternativesType:
+                        break;
+                    case designComplexityType:
+                        if (((typoFlags & LE_SS01_FEATURE_FLAG) && featureSetting == designLevel1Selector) ||
+                            ((typoFlags & LE_SS02_FEATURE_FLAG) && featureSetting == designLevel2Selector) ||
+                            ((typoFlags & LE_SS03_FEATURE_FLAG) && featureSetting == designLevel3Selector) ||
+                            ((typoFlags & LE_SS04_FEATURE_FLAG) && featureSetting == designLevel4Selector) ||
+                            ((typoFlags & LE_SS05_FEATURE_FLAG) && featureSetting == designLevel5Selector) ||
+                            ((typoFlags & LE_SS06_FEATURE_FLAG) && featureSetting == designLevel6Selector) ||
+                            ((typoFlags & LE_SS07_FEATURE_FLAG) && featureSetting == designLevel7Selector)) {
+
+                            flag &= disableFlags;
+                            flag |= enableFlags;
+                        }
+                        break;
+                    case styleOptionsType:
+                        break;
+                    case characterShapeType:
+                        break;
+                    case numberCaseType:
+                        break;
+                    case textSpacingType:
+                        break;
+                    case transliterationType:
+                        break;
+                    case annotationType:
+                        if ((typoFlags & LE_NALT_FEATURE_FLAG) && featureSetting == circleAnnotationSelector) {
+                            flag &= disableFlags;
+                            flag |= enableFlags;
+                        }
+                        break;
+                    case kanaSpacingType:
+                        break;
+                    case ideographicSpacingType:
+                        break;
+                    case rubyKanaType:
+                        if ((typoFlags & LE_RUBY_FEATURE_FLAG) && featureSetting == rubyKanaOnSelector) {
+                            flag &= disableFlags;
+                            flag |= enableFlags;
+                        }
+                        break;
+                    case cjkRomanSpacingType:
+                        break;
+                    default:
+                        break;
+                }
+            }
+        }
+
+        for (subtable = 0;  LE_SUCCESS(success) && subtable < nSubtables; subtable++) {
+            if(subtable>0)  {
+              le_uint32 length = SWAPL(subtableHeader->length);
+              subtableHeader.addOffset(length, success); // Don't addOffset for the last entry.
+            }
+            le_uint32 coverage = SWAPL(subtableHeader->coverage);
+            FeatureFlags subtableFeatures = SWAPL(subtableHeader->subtableFeatures);
+            // should check coverage more carefully...
+            if (((coverage & scfIgnoreVt2) || !(coverage & scfVertical2)) && (subtableFeatures & flag) != 0) {
+              subtableHeader->process(subtableHeader, glyphStorage, success);
+            }
+        }
+    }
+}
+
+void MorphSubtableHeader2::process(const LEReferenceTo<MorphSubtableHeader2> &base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const
+{
+    SubtableProcessor2 *processor = NULL;
+
+    switch (SWAPL(coverage) & scfTypeMask2)
+    {
+    case mstIndicRearrangement:
+        processor = new IndicRearrangementProcessor2(base, success);
+        break;
+
+    case mstContextualGlyphSubstitution:
+        processor = new ContextualGlyphSubstitutionProcessor2(base, success);
+        break;
+
+    case mstLigatureSubstitution:
+        processor = new LigatureSubstitutionProcessor2(base, success);
+        break;
+
+    case mstReservedUnused:
+        break;
+
+    case mstNonContextualGlyphSubstitution:
+        processor = NonContextualGlyphSubstitutionProcessor2::createInstance(base, success);
+        break;
+
+
+    case mstContextualGlyphInsertion:
+        processor = new ContextualGlyphInsertionProcessor2(base, success);
+        break;
+
+    default:
+        return;
+        break; /*NOTREACHED*/
+    }
+
+    if (processor != NULL) {
+      processor->process(glyphStorage, success);
+        delete processor;
+    } else {
+      if(LE_SUCCESS(success)) {
+        success = LE_MEMORY_ALLOCATION_ERROR; // because ptr is null and we didn't break out.
+      }
+    }
+}
+
+U_NAMESPACE_END
--- a/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -39,7 +39,7 @@
 
 U_NAMESPACE_BEGIN
 
-le_uint32 MultipleSubstitutionSubtable::process(GlyphIterator *glyphIterator, LEErrorCode& success, const LEGlyphFilter *filter) const
+le_uint32 MultipleSubstitutionSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, LEErrorCode& success, const LEGlyphFilter *filter) const
 {
     if (LE_FAILURE(success)) {
         return 0;
@@ -58,7 +58,7 @@
         return 0;
     }
 
-    le_int32 coverageIndex = getGlyphCoverage(glyph);
+    le_int32 coverageIndex = getGlyphCoverage(base, glyph, success);
     le_uint16 seqCount = SWAPW(sequenceCount);
 
     if (coverageIndex >= 0 && coverageIndex < seqCount) {
--- a/src/share/native/sun/font/layout/MultipleSubstSubtables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/MultipleSubstSubtables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -50,14 +50,16 @@
     le_uint16 glyphCount;
     TTGlyphID substituteArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(SequenceTable, substituteArray)
 
 struct MultipleSubstitutionSubtable : GlyphSubstitutionSubtable
 {
     le_uint16 sequenceCount;
     Offset    sequenceTableOffsetArray[ANY_NUMBER];
 
-    le_uint32 process(GlyphIterator *glyphIterator, LEErrorCode& success, const LEGlyphFilter *filter = NULL) const;
+    le_uint32 process(const LETableReference &base, GlyphIterator *glyphIterator, LEErrorCode& success, const LEGlyphFilter *filter = NULL) const;
 };
+LE_VAR_ARRAY(MultipleSubstitutionSubtable, sequenceTableOffsetArray)
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/NonContextualGlyphSubst.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/NonContextualGlyphSubst.h	Wed Apr 17 21:48:04 2013 -0700
@@ -26,7 +26,7 @@
 /*
  *
  *
- * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -50,6 +50,11 @@
     LookupTable table;
 };
 
+struct NonContextualGlyphSubstitutionHeader2 : MorphSubtableHeader2
+{
+    LookupTable table;
+};
+
 U_NAMESPACE_END
 #endif
 
--- a/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -47,8 +47,8 @@
 {
 }
 
-NonContextualGlyphSubstitutionProcessor::NonContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader)
-    : SubtableProcessor(morphSubtableHeader)
+NonContextualGlyphSubstitutionProcessor::NonContextualGlyphSubstitutionProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success)
+  : SubtableProcessor(morphSubtableHeader, success)
 {
 }
 
@@ -56,26 +56,27 @@
 {
 }
 
-SubtableProcessor *NonContextualGlyphSubstitutionProcessor::createInstance(const MorphSubtableHeader *morphSubtableHeader)
+SubtableProcessor *NonContextualGlyphSubstitutionProcessor::createInstance(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success)
 {
-    const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) morphSubtableHeader;
+  LEReferenceTo<NonContextualGlyphSubstitutionHeader> header(morphSubtableHeader, success);
 
-    switch (SWAPW(header->table.format))
-    {
+  if(LE_FAILURE(success)) return NULL;
+
+  switch (SWAPW(header->table.format)) {
     case ltfSimpleArray:
-        return new SimpleArrayProcessor(morphSubtableHeader);
+      return new SimpleArrayProcessor(morphSubtableHeader, success);
 
     case ltfSegmentSingle:
-        return new SegmentSingleProcessor(morphSubtableHeader);
+      return new SegmentSingleProcessor(morphSubtableHeader, success);
 
     case ltfSegmentArray:
-        return new SegmentArrayProcessor(morphSubtableHeader);
+      return new SegmentArrayProcessor(morphSubtableHeader, success);
 
     case ltfSingleTable:
-        return new SingleTableProcessor(morphSubtableHeader);
+      return new SingleTableProcessor(morphSubtableHeader, success);
 
     case ltfTrimmedArray:
-        return new TrimmedArrayProcessor(morphSubtableHeader);
+      return new TrimmedArrayProcessor(morphSubtableHeader, success);
 
     default:
         return NULL;
--- a/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.h	Wed Apr 17 21:48:04 2013 -0700
@@ -49,13 +49,13 @@
 class NonContextualGlyphSubstitutionProcessor : public SubtableProcessor
 {
 public:
-    virtual void process(LEGlyphStorage &glyphStorage) = 0;
+  virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success) = 0;
 
-    static SubtableProcessor *createInstance(const MorphSubtableHeader *morphSubtableHeader);
+    static SubtableProcessor *createInstance(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success);
 
 protected:
     NonContextualGlyphSubstitutionProcessor();
-    NonContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader);
+    NonContextualGlyphSubstitutionProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &status);
 
     virtual ~NonContextualGlyphSubstitutionProcessor();
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "NonContextualGlyphSubst.h"
+#include "NonContextualGlyphSubstProc2.h"
+#include "SimpleArrayProcessor2.h"
+#include "SegmentSingleProcessor2.h"
+#include "SegmentArrayProcessor2.h"
+#include "SingleTableProcessor2.h"
+#include "TrimmedArrayProcessor2.h"
+#include "LESwaps.h"
+
+U_NAMESPACE_BEGIN
+
+NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2()
+{
+}
+
+NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2(
+     const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
+  : SubtableProcessor2(morphSubtableHeader, success)
+{
+}
+
+NonContextualGlyphSubstitutionProcessor2::~NonContextualGlyphSubstitutionProcessor2()
+{
+}
+
+SubtableProcessor2 *NonContextualGlyphSubstitutionProcessor2::createInstance(
+      const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
+{
+    const LEReferenceTo<NonContextualGlyphSubstitutionHeader2> header(morphSubtableHeader, success);
+    if(LE_FAILURE(success)) return NULL;
+
+    switch (SWAPW(header->table.format))
+    {
+    case ltfSimpleArray:
+      return new SimpleArrayProcessor2(morphSubtableHeader, success);
+
+    case ltfSegmentSingle:
+      return new SegmentSingleProcessor2(morphSubtableHeader, success);
+
+    case ltfSegmentArray:
+      return new SegmentArrayProcessor2(morphSubtableHeader, success);
+
+    case ltfSingleTable:
+      return new SingleTableProcessor2(morphSubtableHeader, success);
+
+    case ltfTrimmedArray:
+      return new TrimmedArrayProcessor2(morphSubtableHeader, success);
+
+    default:
+        return NULL;
+    }
+}
+
+U_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.h	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#ifndef __NONCONTEXTUALGLYPHSUBSTITUTIONPROCESSOR2_H
+#define __NONCONTEXTUALGLYPHSUBSTITUTIONPROCESSOR2_H
+
+/**
+ * \file
+ * \internal
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "NonContextualGlyphSubst.h"
+
+U_NAMESPACE_BEGIN
+
+class LEGlyphStorage;
+
+class NonContextualGlyphSubstitutionProcessor2 : public SubtableProcessor2
+{
+public:
+    virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success) = 0;
+
+    static SubtableProcessor2 *createInstance(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success);
+
+protected:
+    NonContextualGlyphSubstitutionProcessor2();
+    NonContextualGlyphSubstitutionProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success);
+
+    virtual ~NonContextualGlyphSubstitutionProcessor2();
+
+private:
+    NonContextualGlyphSubstitutionProcessor2(const NonContextualGlyphSubstitutionProcessor2 &other); // forbid copying of this class
+    NonContextualGlyphSubstitutionProcessor2 &operator=(const NonContextualGlyphSubstitutionProcessor2 &other); // forbid copying of this class
+};
+
+U_NAMESPACE_END
+#endif
--- a/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -26,7 +26,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -64,11 +64,27 @@
 #define loclFeatureTag LE_LOCL_FEATURE_TAG
 #define caltFeatureTag LE_CALT_FEATURE_TAG
 
-// 'dlig' not used at the moment
-#define dligFeatureTag 0x646C6967
+#define dligFeatureTag LE_DLIG_FEATURE_TAG
+#define rligFeatureTag LE_RLIG_FEATURE_TAG
+#define paltFeatureTag LE_PALT_FEATURE_TAG
 
-// 'palt'
-#define paltFeatureTag 0x70616C74
+#define hligFeatureTag LE_HLIG_FEATURE_TAG
+#define smcpFeatureTag LE_SMCP_FEATURE_TAG
+#define fracFeatureTag LE_FRAC_FEATURE_TAG
+#define afrcFeatureTag LE_AFRC_FEATURE_TAG
+#define zeroFeatureTag LE_ZERO_FEATURE_TAG
+#define swshFeatureTag LE_SWSH_FEATURE_TAG
+#define cswhFeatureTag LE_CSWH_FEATURE_TAG
+#define saltFeatureTag LE_SALT_FEATURE_TAG
+#define naltFeatureTag LE_NALT_FEATURE_TAG
+#define rubyFeatureTag LE_RUBY_FEATURE_TAG
+#define ss01FeatureTag LE_SS01_FEATURE_TAG
+#define ss02FeatureTag LE_SS02_FEATURE_TAG
+#define ss03FeatureTag LE_SS03_FEATURE_TAG
+#define ss04FeatureTag LE_SS04_FEATURE_TAG
+#define ss05FeatureTag LE_SS05_FEATURE_TAG
+#define ss06FeatureTag LE_SS06_FEATURE_TAG
+#define ss07FeatureTag LE_SS07_FEATURE_TAG
 
 #define ccmpFeatureMask 0x80000000UL
 #define ligaFeatureMask 0x40000000UL
@@ -80,60 +96,146 @@
 #define loclFeatureMask 0x01000000UL
 #define caltFeatureMask 0x00800000UL
 
+#define dligFeatureMask 0x00400000UL
+#define rligFeatureMask 0x00200000UL
+#define hligFeatureMask 0x00100000UL
+#define smcpFeatureMask 0x00080000UL
+#define fracFeatureMask 0x00040000UL
+#define afrcFeatureMask 0x00020000UL
+#define zeroFeatureMask 0x00010000UL
+#define swshFeatureMask 0x00008000UL
+#define cswhFeatureMask 0x00004000UL
+#define saltFeatureMask 0x00002000UL
+#define naltFeatureMask 0x00001000UL
+#define rubyFeatureMask 0x00000800UL
+#define ss01FeatureMask 0x00000400UL
+#define ss02FeatureMask 0x00000200UL
+#define ss03FeatureMask 0x00000100UL
+#define ss04FeatureMask 0x00000080UL
+#define ss05FeatureMask 0x00000040UL
+#define ss06FeatureMask 0x00000020UL
+#define ss07FeatureMask 0x00000010UL
+
 #define minimalFeatures     (ccmpFeatureMask | markFeatureMask | mkmkFeatureMask | loclFeatureMask | caltFeatureMask)
-#define ligaFeatures        (ligaFeatureMask | cligFeatureMask | minimalFeatures)
-#define kernFeatures        (kernFeatureMask | paltFeatureMask | minimalFeatures)
-#define kernAndLigaFeatures (ligaFeatures    | kernFeatures)
 
 static const FeatureMap featureMap[] =
 {
     {ccmpFeatureTag, ccmpFeatureMask},
     {ligaFeatureTag, ligaFeatureMask},
     {cligFeatureTag, cligFeatureMask},
-        {kernFeatureTag, kernFeatureMask},
+    {kernFeatureTag, kernFeatureMask},
     {paltFeatureTag, paltFeatureMask},
     {markFeatureTag, markFeatureMask},
     {mkmkFeatureTag, mkmkFeatureMask},
     {loclFeatureTag, loclFeatureMask},
-    {caltFeatureTag, caltFeatureMask}
+    {caltFeatureTag, caltFeatureMask},
+    {hligFeatureTag, hligFeatureMask},
+    {smcpFeatureTag, smcpFeatureMask},
+    {fracFeatureTag, fracFeatureMask},
+    {afrcFeatureTag, afrcFeatureMask},
+    {zeroFeatureTag, zeroFeatureMask},
+    {swshFeatureTag, swshFeatureMask},
+    {cswhFeatureTag, cswhFeatureMask},
+    {saltFeatureTag, saltFeatureMask},
+    {naltFeatureTag, naltFeatureMask},
+    {rubyFeatureTag, rubyFeatureMask},
+    {ss01FeatureTag, ss01FeatureMask},
+    {ss02FeatureTag, ss02FeatureMask},
+    {ss03FeatureTag, ss03FeatureMask},
+    {ss04FeatureTag, ss04FeatureMask},
+    {ss05FeatureTag, ss05FeatureMask},
+    {ss06FeatureTag, ss06FeatureMask},
+    {ss07FeatureTag, ss07FeatureMask}
 };
 
 static const le_int32 featureMapCount = LE_ARRAY_SIZE(featureMap);
 
 OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-                        le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success)
+                     le_int32 typoFlags, const LEReferenceTo<GlyphSubstitutionTableHeader> &gsubTable, LEErrorCode &success)
     : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success), fFeatureMask(minimalFeatures),
       fFeatureMap(featureMap), fFeatureMapCount(featureMapCount), fFeatureOrder(FALSE),
-      fGSUBTable(gsubTable), fGDEFTable(NULL), fGPOSTable(NULL), fSubstitutionFilter(NULL)
+      fGSUBTable(gsubTable),
+      fGDEFTable(fontInstance, LE_GDEF_TABLE_TAG, success),
+      fGPOSTable(fontInstance, LE_GPOS_TABLE_TAG, success), fSubstitutionFilter(NULL)
 {
-    static const le_uint32 gdefTableTag = LE_GDEF_TABLE_TAG;
-    static const le_uint32 gposTableTag = LE_GPOS_TABLE_TAG;
-    const GlyphPositioningTableHeader *gposTable = (const GlyphPositioningTableHeader *) getFontTable(gposTableTag);
-
-    // todo: switch to more flags and bitfield rather than list of feature tags?
-    switch (typoFlags & ~0x80000000L) {
-    case 0: break; // default
-    case 1: fFeatureMask = kernFeatures; break;
-    case 2: fFeatureMask = ligaFeatures; break;
-    case 3: fFeatureMask = kernAndLigaFeatures; break;
-    default: break;
-    }
-
-    if (typoFlags & 0x80000000L) {
-        fSubstitutionFilter = new CharSubstitutionFilter(fontInstance);
-    }
+    applyTypoFlags();
 
     setScriptAndLanguageTags();
 
-    fGDEFTable = (const GlyphDefinitionTableHeader *) getFontTable(gdefTableTag);
-
 // JK patch, 2008-05-30 - see Sinhala bug report and LKLUG font
 //    if (gposTable != NULL && gposTable->coversScriptAndLanguage(fScriptTag, fLangSysTag)) {
-    if (gposTable != NULL && gposTable->coversScript(fScriptTag)) {
-        fGPOSTable = gposTable;
+    if (!fGPOSTable.isEmpty()&& !fGPOSTable->coversScript(fGPOSTable, fScriptTag, success)) {
+      fGPOSTable.clear(); // already loaded
     }
 }
 
+void OpenTypeLayoutEngine::applyTypoFlags() {
+    const le_int32& typoFlags = fTypoFlags;
+    const LEFontInstance *fontInstance = fFontInstance;
+
+    switch (typoFlags & (LE_SS01_FEATURE_FLAG
+                         | LE_SS02_FEATURE_FLAG
+                         | LE_SS03_FEATURE_FLAG
+                         | LE_SS04_FEATURE_FLAG
+                         | LE_SS05_FEATURE_FLAG
+                         | LE_SS06_FEATURE_FLAG
+                         | LE_SS07_FEATURE_FLAG)) {
+        case LE_SS01_FEATURE_FLAG:
+            fFeatureMask |= ss01FeatureMask;
+            break;
+        case LE_SS02_FEATURE_FLAG:
+            fFeatureMask |= ss02FeatureMask;
+            break;
+        case LE_SS03_FEATURE_FLAG:
+            fFeatureMask |= ss03FeatureMask;
+            break;
+        case LE_SS04_FEATURE_FLAG:
+            fFeatureMask |= ss04FeatureMask;
+            break;
+        case LE_SS05_FEATURE_FLAG:
+            fFeatureMask |= ss05FeatureMask;
+            break;
+        case LE_SS06_FEATURE_FLAG:
+            fFeatureMask |= ss06FeatureMask;
+            break;
+        case LE_SS07_FEATURE_FLAG:
+            fFeatureMask |= ss07FeatureMask;
+            break;
+    }
+
+    if (typoFlags & LE_Kerning_FEATURE_FLAG) {
+      fFeatureMask |= (kernFeatureMask | paltFeatureMask);
+      // Convenience.
+    }
+    if (typoFlags & LE_Ligatures_FEATURE_FLAG) {
+      fFeatureMask |= (ligaFeatureMask | cligFeatureMask);
+      // Convenience TODO: should add: .. dligFeatureMask | rligFeatureMask ?
+    }
+    if (typoFlags & LE_CLIG_FEATURE_FLAG) fFeatureMask |= cligFeatureMask;
+    if (typoFlags & LE_DLIG_FEATURE_FLAG) fFeatureMask |= dligFeatureMask;
+    if (typoFlags & LE_HLIG_FEATURE_FLAG) fFeatureMask |= hligFeatureMask;
+    if (typoFlags & LE_LIGA_FEATURE_FLAG) fFeatureMask |= ligaFeatureMask;
+    if (typoFlags & LE_RLIG_FEATURE_FLAG) fFeatureMask |= rligFeatureMask;
+    if (typoFlags & LE_SMCP_FEATURE_FLAG) fFeatureMask |= smcpFeatureMask;
+    if (typoFlags & LE_FRAC_FEATURE_FLAG) fFeatureMask |= fracFeatureMask;
+    if (typoFlags & LE_AFRC_FEATURE_FLAG) fFeatureMask |= afrcFeatureMask;
+    if (typoFlags & LE_ZERO_FEATURE_FLAG) fFeatureMask |= zeroFeatureMask;
+    if (typoFlags & LE_SWSH_FEATURE_FLAG) fFeatureMask |= swshFeatureMask;
+    if (typoFlags & LE_CSWH_FEATURE_FLAG) fFeatureMask |= cswhFeatureMask;
+    if (typoFlags & LE_SALT_FEATURE_FLAG) fFeatureMask |= saltFeatureMask;
+    if (typoFlags & LE_RUBY_FEATURE_FLAG) fFeatureMask |= rubyFeatureMask;
+    if (typoFlags & LE_NALT_FEATURE_FLAG) {
+      // Mutually exclusive with ALL other features. http://www.microsoft.com/typography/otspec/features_ko.htm
+      fFeatureMask = naltFeatureMask;
+    }
+
+    if (typoFlags & LE_CHAR_FILTER_FEATURE_FLAG) {
+      // This isn't a font feature, but requests a Char Substitution Filter
+      fSubstitutionFilter = new CharSubstitutionFilter(fontInstance);
+    }
+
+}
+
 void OpenTypeLayoutEngine::reset()
 {
     // NOTE: if we're called from
@@ -146,15 +248,17 @@
 OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
                        le_int32 typoFlags, LEErrorCode &success)
     : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success), fFeatureOrder(FALSE),
-      fGSUBTable(NULL), fGDEFTable(NULL), fGPOSTable(NULL), fSubstitutionFilter(NULL)
+      fGSUBTable(), fGDEFTable(), fGPOSTable(), fSubstitutionFilter(NULL)
 {
-    setScriptAndLanguageTags();
+  applyTypoFlags();
+  setScriptAndLanguageTags();
 }
 
 OpenTypeLayoutEngine::~OpenTypeLayoutEngine()
 {
-    if (fTypoFlags & 0x80000000L) {
+    if (fTypoFlags & LE_CHAR_FILTER_FEATURE_FLAG) {
         delete fSubstitutionFilter;
+        fSubstitutionFilter = NULL;
     }
 
     reset();
@@ -267,13 +371,13 @@
         return 0;
     }
 
-    if (fGSUBTable != NULL) {
-        if (fScriptTagV2 != nullScriptTag && fGSUBTable->coversScriptAndLanguage(fScriptTagV2,fLangSysTag)) {
-            count = fGSUBTable->process(glyphStorage, rightToLeft, fScriptTagV2, fLangSysTag, fGDEFTable, fSubstitutionFilter,
+    if (fGSUBTable.isValid()) {
+      if (fScriptTagV2 != nullScriptTag && fGSUBTable->coversScriptAndLanguage(fGSUBTable, fScriptTagV2, fLangSysTag, success)) {
+          count = fGSUBTable->process(fGSUBTable, glyphStorage, rightToLeft, fScriptTagV2, fLangSysTag, fGDEFTable, fSubstitutionFilter,
                                     fFeatureMap, fFeatureMapCount, fFeatureOrder, success);
 
         } else {
-        count = fGSUBTable->process(glyphStorage, rightToLeft, fScriptTag, fLangSysTag, fGDEFTable, fSubstitutionFilter,
+          count = fGSUBTable->process(fGSUBTable, glyphStorage, rightToLeft, fScriptTag, fLangSysTag, fGDEFTable, fSubstitutionFilter,
                                     fFeatureMap, fFeatureMapCount, fFeatureOrder, success);
     }
     }
@@ -294,13 +398,13 @@
         return 0;
     }
 
-    if (fGSUBTable != NULL) {
-        if (fScriptTagV2 != nullScriptTag && fGSUBTable->coversScriptAndLanguage(fScriptTagV2,fLangSysTag)) {
-            count = fGSUBTable->process(glyphStorage, rightToLeft, fScriptTagV2, fLangSysTag, fGDEFTable, fSubstitutionFilter,
+    if (fGSUBTable.isValid()) {
+       if (fScriptTagV2 != nullScriptTag && fGSUBTable->coversScriptAndLanguage(fGSUBTable,fScriptTagV2,fLangSysTag,success)) {
+          count = fGSUBTable->process(fGSUBTable, glyphStorage, rightToLeft, fScriptTagV2, fLangSysTag, fGDEFTable, fSubstitutionFilter,
                                     fFeatureMap, fFeatureMapCount, fFeatureOrder, success);
 
         } else {
-        count = fGSUBTable->process(glyphStorage, rightToLeft, fScriptTag, fLangSysTag, fGDEFTable, fSubstitutionFilter,
+          count = fGSUBTable->process(fGSUBTable, glyphStorage, rightToLeft, fScriptTag, fLangSysTag, fGDEFTable, fSubstitutionFilter,
                                     fFeatureMap, fFeatureMapCount, fFeatureOrder, success);
         }
     }
@@ -325,7 +429,7 @@
 {
     LEUnicode *outChars = NULL;
     LEGlyphStorage fakeGlyphStorage;
-    le_int32 outCharCount, outGlyphCount, fakeGlyphCount;
+    le_int32 outCharCount, outGlyphCount;
 
     if (LE_FAILURE(success)) {
         return 0;
@@ -343,11 +447,13 @@
     }
 
     if (outChars != NULL) {
-        fakeGlyphCount = glyphProcessing(outChars, 0, outCharCount, outCharCount, rightToLeft, fakeGlyphStorage, success);
+        // le_int32 fakeGlyphCount =
+        glyphProcessing(outChars, 0, outCharCount, outCharCount, rightToLeft, fakeGlyphStorage, success);
         LE_DELETE_ARRAY(outChars); // FIXME: a subclass may have allocated this, in which case this delete might not work...
         //adjustGlyphs(outChars, 0, outCharCount, rightToLeft, fakeGlyphs, fakeGlyphCount);
     } else {
-        fakeGlyphCount = glyphProcessing(chars, offset, count, max, rightToLeft, fakeGlyphStorage, success);
+        // le_int32 fakeGlyphCount =
+        glyphProcessing(chars, offset, count, max, rightToLeft, fakeGlyphStorage, success);
         //adjustGlyphs(chars, offset, count, rightToLeft, fakeGlyphs, fakeGlyphCount);
     }
 
@@ -378,7 +484,7 @@
         return;
     }
 
-    if (fGPOSTable != NULL) {
+    if (!fGPOSTable.isEmpty()) {
         GlyphPositionAdjustments *adjustments = new GlyphPositionAdjustments(glyphCount);
         le_int32 i;
 
@@ -401,19 +507,20 @@
         }
 #endif
 
-        if (fGPOSTable != NULL) {
-            if (fScriptTagV2 != nullScriptTag && fGPOSTable->coversScriptAndLanguage(fScriptTagV2,fLangSysTag)) {
-                fGPOSTable->process(glyphStorage, adjustments, reverse, fScriptTagV2, fLangSysTag, fGDEFTable, success, fFontInstance,
-                            fFeatureMap, fFeatureMapCount, fFeatureOrder);
+        if (!fGPOSTable.isEmpty()) {
+            if (fScriptTagV2 != nullScriptTag &&
+                fGPOSTable->coversScriptAndLanguage(fGPOSTable, fScriptTagV2,fLangSysTag,success)) {
+              fGPOSTable->process(fGPOSTable, glyphStorage, adjustments, reverse, fScriptTagV2, fLangSysTag,
+                                  fGDEFTable, success, fFontInstance, fFeatureMap, fFeatureMapCount, fFeatureOrder);
 
             } else {
-                fGPOSTable->process(glyphStorage, adjustments, reverse, fScriptTag, fLangSysTag, fGDEFTable, success, fFontInstance,
-                                fFeatureMap, fFeatureMapCount, fFeatureOrder);
+              fGPOSTable->process(fGPOSTable, glyphStorage, adjustments, reverse, fScriptTag, fLangSysTag,
+                                  fGDEFTable, success, fFontInstance, fFeatureMap, fFeatureMapCount, fFeatureOrder);
             }
-        } else if ( fTypoFlags & 0x1 ) {
-            static const le_uint32 kernTableTag = LE_KERN_TABLE_TAG;
-            KernTable kt(fFontInstance, getFontTable(kernTableTag));
-            kt.process(glyphStorage);
+        } else if (fTypoFlags & LE_Kerning_FEATURE_FLAG) { /* kerning enabled */
+          LETableReference kernTable(fFontInstance, LE_KERN_TABLE_TAG, success);
+          KernTable kt(kernTable, success);
+          kt.process(glyphStorage, success);
         }
 
         float xAdjust = 0, yAdjust = 0;
--- a/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h	Wed Apr 17 21:48:04 2013 -0700
@@ -24,7 +24,7 @@
  */
 
 /*
- * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -35,6 +35,7 @@
 #include "LEGlyphFilter.h"
 #include "LEFontInstance.h"
 #include "LayoutEngine.h"
+#include "LETableReference.h"
 
 #include "GlyphSubstitutionTables.h"
 #include "GlyphDefinitionTables.h"
@@ -88,7 +89,7 @@
      * @internal
      */
     OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-                            le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success);
+                            le_int32 typoFlags, const LEReferenceTo<GlyphSubstitutionTableHeader> &gsubTable, LEErrorCode &success);
 
     /**
      * This constructor is used when the font requires a "canned" GSUB table which can't be known
@@ -184,6 +185,11 @@
      */
     static const LETag scriptTags[];
 
+    /**
+     * apply the typoflags. Only called by the c'tors.
+     */
+    void applyTypoFlags();
+
 protected:
     /**
      * A set of "default" features. The default characterProcessing method
@@ -223,21 +229,21 @@
      *
      * @internal
      */
-    const GlyphSubstitutionTableHeader *fGSUBTable;
+    LEReferenceTo<GlyphSubstitutionTableHeader> fGSUBTable;
 
     /**
      * The address of the GDEF table.
      *
      * @internal
      */
-    const GlyphDefinitionTableHeader   *fGDEFTable;
+    LEReferenceTo<GlyphDefinitionTableHeader> fGDEFTable;
 
     /**
      * The address of the GPOS table.
      *
      * @internal
      */
-    const GlyphPositioningTableHeader  *fGPOSTable;
+    LEReferenceTo<GlyphPositioningTableHeader> fGPOSTable;
 
     /**
      * An optional filter used to inhibit substitutions
--- a/src/share/native/sun/font/layout/OpenTypeTables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/OpenTypeTables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -38,6 +38,7 @@
  */
 
 #include "LETypes.h"
+#include "LETableReference.h"
 
 U_NAMESPACE_BEGIN
 
@@ -50,7 +51,7 @@
 #define LE_GLYPH_GROUP_MASK 0x00000001UL
 typedef le_uint32 FeatureMask;
 
-#define SWAPT(atag) ((LETag) ((atag[0] << 24) + (atag[1] << 16) + (atag[2] << 8) + atag[3]))
+#define SWAPT(atag) ((LETag) (((atag[0]) << 24) + ((atag[1]) << 16) + ((atag[2]) << 8) + (atag[3])))
 
 struct TagAndOffsetRecord
 {
--- a/src/share/native/sun/font/layout/OpenTypeUtilities.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/OpenTypeUtilities.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -76,58 +76,74 @@
     return bit;
 }
 
-Offset OpenTypeUtilities::getTagOffset(LETag tag, const TagAndOffsetRecord *records, le_int32 recordCount)
+
+Offset OpenTypeUtilities::getTagOffset(LETag tag, const LEReferenceToArrayOf<TagAndOffsetRecord> &records, LEErrorCode &success)
 {
-    le_uint8 bit = highBit(recordCount);
-    le_int32 power = 1 << bit;
-    le_int32 extra = recordCount - power;
-    le_int32 probe = power;
-    le_int32 index = 0;
+  if(LE_FAILURE(success)) return 0;
 
-    if (SWAPT(records[extra].tag) <= tag) {
-        index = extra;
+  le_uint32 recordCount = records.getCount();
+  le_uint8 bit = highBit(recordCount);
+  le_int32 power = 1 << bit;
+  le_int32 extra = recordCount - power;
+  le_int32 probe = power;
+  le_int32 index = 0;
+
+  {
+    const ATag &aTag = records.getAlias(extra,success)->tag;
+    if (SWAPT(aTag) <= tag) {
+      index = extra;
     }
+  }
 
-    while (probe > (1 << 0)) {
-        probe >>= 1;
+  while (probe > (1 << 0) && LE_SUCCESS(success)) {
+    probe >>= 1;
 
-        if (SWAPT(records[index + probe].tag) <= tag) {
-            index += probe;
-        }
+    {
+      const ATag &aTag = records.getAlias(index+probe,success)->tag;
+      if (SWAPT(aTag) <= tag) {
+        index += probe;
+      }
     }
+  }
 
-    if (SWAPT(records[index].tag) == tag) {
-        return SWAPW(records[index].offset);
+  {
+    const ATag &aTag = records.getAlias(index,success)->tag;
+    if (SWAPT(aTag) == tag) {
+      return SWAPW(records.getAlias(index,success)->offset);
     }
+  }
 
-    return 0;
+  return 0;
 }
 
-le_int32 OpenTypeUtilities::getGlyphRangeIndex(TTGlyphID glyphID, const GlyphRangeRecord *records, le_int32 recordCount)
+le_int32 OpenTypeUtilities::getGlyphRangeIndex(TTGlyphID glyphID, const LEReferenceToArrayOf<GlyphRangeRecord> &records, LEErrorCode &success)
 {
+  if(LE_FAILURE(success)) return -1;
+
+    le_uint32 recordCount = records.getCount();
     le_uint8 bit = highBit(recordCount);
     le_int32 power = 1 << bit;
     le_int32 extra = recordCount - power;
     le_int32 probe = power;
     le_int32 range = 0;
 
-        if (recordCount == 0) {
-                return -1;
-        }
+    if (recordCount == 0) {
+      return -1;
+    }
 
-    if (SWAPW(records[extra].firstGlyph) <= glyphID) {
+    if (SWAPW(records(extra,success).firstGlyph) <= glyphID) {
         range = extra;
     }
 
-    while (probe > (1 << 0)) {
+    while (probe > (1 << 0) && LE_SUCCESS(success)) {
         probe >>= 1;
 
-        if (SWAPW(records[range + probe].firstGlyph) <= glyphID) {
+        if (SWAPW(records(range + probe,success).firstGlyph) <= glyphID) {
             range += probe;
         }
     }
 
-    if (SWAPW(records[range].firstGlyph) <= glyphID && SWAPW(records[range].lastGlyph) >= glyphID) {
+    if (SWAPW(records(range,success).firstGlyph) <= glyphID && SWAPW(records(range,success).lastGlyph) >= glyphID) {
         return range;
     }
 
@@ -199,6 +215,38 @@
     }
 }
 
+U_NAMESPACE_END
 
+#if LE_ASSERT_BAD_FONT
+#include <stdio.h>
+
+static const char *letagToStr(LETag tag, char *str) {
+  str[0]= 0xFF & (tag>>24);
+  str[1]= 0xFF & (tag>>16);
+  str[2]= 0xFF & (tag>>8);
+  str[3]= 0xFF & (tag>>0);
+  str[4]= 0;
+  return str;
+}
+
+U_CAPI void U_EXPORT2 _debug_LETableReference(const char *f, int l, const char *msg, const LETableReference *what, const void *ptr, size_t len) {
+  char tagbuf[5];
 
-U_NAMESPACE_END
+  fprintf(stderr, "%s:%d: LETableReference@0x%p: ", f, l, what);
+  fprintf(stderr, msg, ptr, len);
+  fprintf(stderr, "\n");
+
+  for(int depth=0;depth<10&&(what!=NULL);depth++) {
+    for(int i=0;i<depth;i++) {
+      fprintf(stderr, " "); // indent
+    }
+    if(!what->isValid()) {
+      fprintf(stderr, "(invalid)");
+    }
+    fprintf(stderr, "@%p: tag (%s) font (0x%p), [0x%p+0x%lx]\n", what, letagToStr(what->getTag(), tagbuf), what->getFont(),
+            what->getAlias(), what->getLength());
+
+    what = what->getParent();
+  }
+}
+#endif
--- a/src/share/native/sun/font/layout/OpenTypeUtilities.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/OpenTypeUtilities.h	Wed Apr 17 21:48:04 2013 -0700
@@ -45,8 +45,17 @@
 class OpenTypeUtilities /* not : public UObject because all methods are static */ {
 public:
     static le_int8 highBit(le_int32 value);
-    static Offset getTagOffset(LETag tag, const TagAndOffsetRecord *records, le_int32 recordCount);
-    static le_int32 getGlyphRangeIndex(TTGlyphID glyphID, const GlyphRangeRecord *records, le_int32 recordCount);
+    static Offset getTagOffset(LETag tag, const LEReferenceToArrayOf<TagAndOffsetRecord> &records, LEErrorCode &success);
+    /**
+     * @deprecated TODO remove
+     */
+    static le_int32 getGlyphRangeIndex(TTGlyphID glyphID, const GlyphRangeRecord *records, le_int32 recordCount) {
+      LEErrorCode success = LE_NO_ERROR;
+      LETableReference recordRef0((const le_uint8*)records);
+      LEReferenceToArrayOf<GlyphRangeRecord> recordRef(recordRef0, success, (size_t)0, recordCount);
+      return getGlyphRangeIndex(glyphID, recordRef, success);
+    }
+    static le_int32 getGlyphRangeIndex(TTGlyphID glyphID, const LEReferenceToArrayOf<GlyphRangeRecord> &records, LEErrorCode &success);
     static le_int32 search(le_uint16 value, const le_uint16 array[], le_int32 count);
     static le_int32 search(le_uint32 value, const le_uint32 array[], le_int32 count);
     static void sort(le_uint16 *array, le_int32 count);
--- a/src/share/native/sun/font/layout/PairPositioningSubtables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/PairPositioningSubtables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -41,7 +41,7 @@
 
 U_NAMESPACE_BEGIN
 
-le_uint32 PairPositioningSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
+le_uint32 PairPositioningSubtable::process(const LEReferenceTo<PairPositioningSubtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
 {
     switch(SWAPW(subtableFormat))
     {
@@ -50,27 +50,32 @@
 
     case 1:
     {
-        const PairPositioningFormat1Subtable *subtable = (const PairPositioningFormat1Subtable *) this;
+      const LEReferenceTo<PairPositioningFormat1Subtable> subtable(base, success, (const PairPositioningFormat1Subtable *) this);
 
-        return subtable->process(glyphIterator, fontInstance);
+      if(LE_SUCCESS(success))
+      return subtable->process(subtable, glyphIterator, fontInstance, success);
+      else
+        return 0;
     }
 
     case 2:
     {
-        const PairPositioningFormat2Subtable *subtable = (const PairPositioningFormat2Subtable *) this;
+      const LEReferenceTo<PairPositioningFormat2Subtable> subtable(base, success, (const PairPositioningFormat2Subtable *) this);
 
-        return subtable->process(glyphIterator, fontInstance);
+      if(LE_SUCCESS(success))
+      return subtable->process(subtable, glyphIterator, fontInstance, success);
+      else
+        return 0;
     }
-
     default:
-        return 0;
+      return 0;
     }
 }
 
-le_uint32 PairPositioningFormat1Subtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
+le_uint32 PairPositioningFormat1Subtable::process(const LEReferenceTo<PairPositioningFormat1Subtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
 {
     LEGlyphID firstGlyph = glyphIterator->getCurrGlyphID();
-    le_int32 coverageIndex = getGlyphCoverage(firstGlyph);
+    le_int32 coverageIndex = getGlyphCoverage(base, firstGlyph, success);
     GlyphIterator tempIterator(*glyphIterator);
 
     if (coverageIndex >= 0 && glyphIterator->next()) {
@@ -110,10 +115,10 @@
     return 0;
 }
 
-le_uint32 PairPositioningFormat2Subtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
+le_uint32 PairPositioningFormat2Subtable::process(const LEReferenceTo<PairPositioningFormat2Subtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
 {
     LEGlyphID firstGlyph = glyphIterator->getCurrGlyphID();
-    le_int32 coverageIndex = getGlyphCoverage(firstGlyph);
+    le_int32 coverageIndex = getGlyphCoverage(base, firstGlyph, success);
     GlyphIterator tempIterator(*glyphIterator);
 
     if (coverageIndex >= 0 && glyphIterator->next()) {
--- a/src/share/native/sun/font/layout/PairPositioningSubtables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/PairPositioningSubtables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -59,13 +59,14 @@
     le_uint16       pairValueCount;
     PairValueRecord pairValueRecordArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(PairSetTable, pairValueRecordArray)
 
 struct PairPositioningSubtable : GlyphPositioningSubtable
 {
     ValueFormat valueFormat1;
     ValueFormat valueFormat2;
 
-    le_uint32  process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
+    le_uint32  process(const LEReferenceTo<PairPositioningSubtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const;
 };
 
 struct PairPositioningFormat1Subtable : PairPositioningSubtable
@@ -73,12 +74,13 @@
     le_uint16   pairSetCount;
     Offset      pairSetTableOffsetArray[ANY_NUMBER];
 
-    le_uint32  process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
+    le_uint32  process(const LEReferenceTo<PairPositioningFormat1Subtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const;
 
 private:
     const PairValueRecord *findPairValueRecord(TTGlyphID glyphID, const PairValueRecord *records,
         le_uint16 recordCount, le_uint16 recordSize) const;
 };
+LE_VAR_ARRAY(PairPositioningFormat1Subtable, pairSetTableOffsetArray)
 
 // NOTE: ValueRecord has a variable size
 struct Class2Record
@@ -91,6 +93,7 @@
 {
     Class2Record class2RecordArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(Class1Record, class2RecordArray)
 
 struct PairPositioningFormat2Subtable : PairPositioningSubtable
 {
@@ -100,8 +103,9 @@
     le_uint16    class2Count;
     Class1Record class1RecordArray[ANY_NUMBER];
 
-    le_uint32  process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
+    le_uint32  process(const LEReferenceTo<PairPositioningFormat2Subtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const;
 };
+LE_VAR_ARRAY(PairPositioningFormat2Subtable, class1RecordArray)
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/ScriptAndLanguage.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ScriptAndLanguage.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -38,29 +38,33 @@
 
 U_NAMESPACE_BEGIN
 
-const LangSysTable *ScriptTable::findLanguage(LETag languageTag, le_bool exactMatch) const
+LEReferenceTo<LangSysTable> ScriptTable::findLanguage(const LETableReference& base, LETag languageTag, LEErrorCode &success, le_bool exactMatch) const
 {
     le_uint16 count = SWAPW(langSysCount);
     Offset langSysTableOffset = exactMatch? 0 : SWAPW(defaultLangSysTableOffset);
 
     if (count > 0) {
-        Offset foundOffset =
-            OpenTypeUtilities::getTagOffset(languageTag, langSysRecordArray, count);
+      LEReferenceToArrayOf<TagAndOffsetRecord> langSysRecords(base, success, langSysRecordArray, count);
+      Offset foundOffset =
+        OpenTypeUtilities::getTagOffset(languageTag, langSysRecords, success);
 
-        if (foundOffset != 0) {
-            langSysTableOffset = foundOffset;
-        }
+      if (foundOffset != 0 && LE_SUCCESS(success)) {
+        langSysTableOffset = foundOffset;
+      }
     }
 
     if (langSysTableOffset != 0) {
-        return (const LangSysTable *) ((char *)this + langSysTableOffset);
+      return LEReferenceTo<LangSysTable>(base, success, langSysTableOffset);
     }
 
-    return NULL;
+    return LEReferenceTo<LangSysTable>();
 }
 
-const ScriptTable *ScriptListTable::findScript(LETag scriptTag) const
+LEReferenceTo<ScriptTable> ScriptListTable::findScript(const LETableReference &base, LETag scriptTag, LEErrorCode &success) const
 {
+    if (LE_FAILURE(success) ) {
+      return LEReferenceTo<ScriptTable>(); // get out
+    }
     /*
      * There are some fonts that have a large, bogus value for scriptCount. To try
      * and protect against this, we use the offset in the first scriptRecord,
@@ -74,38 +78,53 @@
      * to be unsorted.
      */
     le_uint16 count = SWAPW(scriptCount);
+
+    if (count == 0) {
+      return LEReferenceTo<ScriptTable>(); // no items, no search
+    }
+
+    // attempt to construct a ref with at least one element
+    LEReferenceToArrayOf<ScriptRecord> oneElementTable(base, success, &scriptRecordArray[0], 1);
+
+    if( LE_FAILURE(success) ) {
+      return LEReferenceTo<ScriptTable>(); // couldn't even read the first record - bad font.
+    }
+
     le_uint16 limit = ((SWAPW(scriptRecordArray[0].offset) - sizeof(ScriptListTable)) / sizeof(scriptRecordArray)) + ANY_NUMBER;
     Offset scriptTableOffset = 0;
 
+
     if (count > limit) {
         // the scriptCount value is bogus; do a linear search
         // because limit may still be too large.
-        for(le_int32 s = 0; s < limit; s += 1) {
-            if (SWAPT(scriptRecordArray[s].tag) == scriptTag) {
-                scriptTableOffset = SWAPW(scriptRecordArray[s].offset);
-                break;
-            }
+        LEReferenceToArrayOf<ScriptRecord> scriptRecordArrayRef(base, success, &scriptRecordArray[0], limit);
+        for(le_int32 s = 0; (s < limit)&&LE_SUCCESS(success); s += 1) {
+          if (SWAPT(scriptRecordArrayRef(s,success).tag) == scriptTag) {
+            scriptTableOffset = SWAPW(scriptRecordArrayRef(s,success).offset);
+            break;
+          }
         }
     } else {
-        scriptTableOffset = OpenTypeUtilities::getTagOffset(scriptTag, scriptRecordArray, count);
+      LEReferenceToArrayOf<ScriptRecord> scriptRecordArrayRef(base, success, &scriptRecordArray[0], count);
+      scriptTableOffset = OpenTypeUtilities::getTagOffset(scriptTag, scriptRecordArrayRef, success); // TODO
     }
 
     if (scriptTableOffset != 0) {
-        return (const ScriptTable *) ((char *)this + scriptTableOffset);
+      return LEReferenceTo<ScriptTable>(base, success, scriptTableOffset);
     }
 
-    return NULL;
+  return LEReferenceTo<ScriptTable>();
 }
 
-const LangSysTable *ScriptListTable::findLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch) const
+LEReferenceTo<LangSysTable>  ScriptListTable::findLanguage(const LETableReference &base, LETag scriptTag, LETag languageTag, LEErrorCode &success, le_bool exactMatch) const
 {
-    const ScriptTable *scriptTable = findScript(scriptTag);
+  const LEReferenceTo<ScriptTable> scriptTable = findScript(base, scriptTag, success);
 
-    if (scriptTable == 0) {
-        return NULL;
-    }
+  if (scriptTable.isEmpty()) {
+    return LEReferenceTo<LangSysTable>();
+  }
 
-    return scriptTable->findLanguage(languageTag, exactMatch);
+  return scriptTable->findLanguage(scriptTable, languageTag, success, exactMatch).reparent(base);
 }
 
 U_NAMESPACE_END
--- a/src/share/native/sun/font/layout/ScriptAndLanguage.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ScriptAndLanguage.h	Wed Apr 17 21:48:04 2013 -0700
@@ -51,6 +51,7 @@
     le_uint16 featureCount;
     le_uint16 featureIndexArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(LangSysTable, featureIndexArray)
 
 struct ScriptTable
 {
@@ -58,8 +59,9 @@
     le_uint16           langSysCount;
     LangSysRecord       langSysRecordArray[ANY_NUMBER];
 
-    const LangSysTable  *findLanguage(LETag languageTag, le_bool exactMatch = FALSE) const;
+  LEReferenceTo<LangSysTable>  findLanguage(const LETableReference &base, LETag languageTag, LEErrorCode &success, le_bool exactMatch = FALSE) const;
 };
+LE_VAR_ARRAY(ScriptTable, langSysRecordArray)
 
 typedef TagAndOffsetRecord ScriptRecord;
 
@@ -68,9 +70,10 @@
     le_uint16           scriptCount;
     ScriptRecord        scriptRecordArray[ANY_NUMBER];
 
-    const ScriptTable   *findScript(LETag scriptTag) const;
-    const LangSysTable  *findLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch = FALSE) const;
+  LEReferenceTo<ScriptTable>   findScript(const LETableReference &base, LETag scriptTag, LEErrorCode &success) const;
+  LEReferenceTo<LangSysTable>  findLanguage(const LETableReference &base, LETag scriptTag, LETag languageTag, LEErrorCode &success, le_bool exactMatch = FALSE) const;
 };
+LE_VAR_ARRAY(ScriptListTable, scriptRecordArray)
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2010. All Rights Reserved.
+ * (C) Copyright IBM Corp. 1998-2013. All Rights Reserved.
  *
  * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS
  * YOU REALLY KNOW WHAT YOU'RE DOING.
@@ -186,7 +186,18 @@
     nbatScriptTag, /* 'nbat' (NBAT) */
     palmScriptTag, /* 'palm' (PALM) */
     sindScriptTag, /* 'sind' (SIND) */
-    waraScriptTag  /* 'wara' (WARA) */
+    waraScriptTag, /* 'wara' (WARA) */
+    afakScriptTag, /* 'afak' (AFAK) */
+    jurcScriptTag, /* 'jurc' (JURC) */
+    mrooScriptTag, /* 'mroo' (MROO) */
+    nshuScriptTag, /* 'nshu' (NSHU) */
+    shrdScriptTag, /* 'shrd' (SHARADA) */
+    soraScriptTag, /* 'sora' (SORA_SOMPENG) */
+    takrScriptTag, /* 'takr' (TAKRI) */
+    tangScriptTag, /* 'tang' (TANG) */
+    woleScriptTag, /* 'wole' (WOLE) */
+    khojScriptTag, /* 'khoj' (KHOJ) */
+    tirhScriptTag  /* 'tirh' (TIRH) */
 };
 
 const LETag OpenTypeLayoutEngine::languageTags[] = {
--- a/src/share/native/sun/font/layout/ScriptAndLanguageTags.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ScriptAndLanguageTags.h	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2010. All Rights Reserved.
+ * (C) Copyright IBM Corp. 1998-2013. All Rights Reserved.
  *
  * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS
  * YOU REALLY KNOW WHAT YOU'RE DOING.
@@ -201,6 +201,17 @@
 const LETag palmScriptTag = 0x70616C6D; /* 'palm' (PALM) */
 const LETag sindScriptTag = 0x73696E64; /* 'sind' (SIND) */
 const LETag waraScriptTag = 0x77617261; /* 'wara' (WARA) */
+const LETag afakScriptTag = 0x6166616B; /* 'afak' (AFAK) */
+const LETag jurcScriptTag = 0x6A757263; /* 'jurc' (JURC) */
+const LETag mrooScriptTag = 0x6D726F6F; /* 'mroo' (MROO) */
+const LETag nshuScriptTag = 0x6E736875; /* 'nshu' (NSHU) */
+const LETag shrdScriptTag = 0x73687264; /* 'shrd' (SHARADA) */
+const LETag soraScriptTag = 0x736F7261; /* 'sora' (SORA_SOMPENG) */
+const LETag takrScriptTag = 0x74616B72; /* 'takr' (TAKRI) */
+const LETag tangScriptTag = 0x74616E67; /* 'tang' (TANG) */
+const LETag woleScriptTag = 0x776F6C65; /* 'wole' (WOLE) */
+const LETag khojScriptTag = 0x6B686F6A; /* 'khoj' (KHOJ) */
+const LETag tirhScriptTag = 0x74697268; /* 'tirh' (TIRH) */
 
 const LETag nullScriptTag = 0x00000000; /* ''     (NULL) */
 
--- a/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -46,19 +46,18 @@
 {
 }
 
-SegmentArrayProcessor::SegmentArrayProcessor(const MorphSubtableHeader *morphSubtableHeader)
-  : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader)
+SegmentArrayProcessor::SegmentArrayProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success)
+  : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader, success)
 {
-    const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) morphSubtableHeader;
-
-    segmentArrayLookupTable = (const SegmentArrayLookupTable *) &header->table;
+  LEReferenceTo<NonContextualGlyphSubstitutionHeader> header(morphSubtableHeader, success);
+  segmentArrayLookupTable = LEReferenceTo<SegmentArrayLookupTable>(morphSubtableHeader, success, (const SegmentArrayLookupTable*)&header->table);
 }
 
 SegmentArrayProcessor::~SegmentArrayProcessor()
 {
 }
 
-void SegmentArrayProcessor::process(LEGlyphStorage &glyphStorage)
+void SegmentArrayProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     const LookupSegment *segments = segmentArrayLookupTable->segments;
     le_int32 glyphCount = glyphStorage.getGlyphCount();
@@ -66,17 +65,16 @@
 
     for (glyph = 0; glyph < glyphCount; glyph += 1) {
         LEGlyphID thisGlyph = glyphStorage[glyph];
-        const LookupSegment *lookupSegment = segmentArrayLookupTable->lookupSegment(segments, thisGlyph);
+        const LookupSegment *lookupSegment = segmentArrayLookupTable->lookupSegment(segmentArrayLookupTable, segments, thisGlyph, success);
 
         if (lookupSegment != NULL)  {
             TTGlyphID firstGlyph = SWAPW(lookupSegment->firstGlyph);
             le_int16  offset = SWAPW(lookupSegment->value);
 
             if (offset != 0) {
-                TTGlyphID  *glyphArray = (TTGlyphID *) ((char *) subtableHeader + offset);
-                TTGlyphID   newGlyph   = SWAPW(glyphArray[LE_GET_GLYPH(thisGlyph) - firstGlyph]);
-
-                glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph);
+              LEReferenceToArrayOf<TTGlyphID> glyphArray(subtableHeader, success, offset, LE_UNBOUNDED_ARRAY);
+              TTGlyphID   newGlyph   = SWAPW(glyphArray(LE_GET_GLYPH(thisGlyph) - firstGlyph, success));
+              glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph);
             }
         }
     }
--- a/src/share/native/sun/font/layout/SegmentArrayProcessor.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/SegmentArrayProcessor.h	Wed Apr 17 21:48:04 2013 -0700
@@ -50,9 +50,9 @@
 class SegmentArrayProcessor : public NonContextualGlyphSubstitutionProcessor
 {
 public:
-    virtual void process(LEGlyphStorage &glyphStorage);
+    virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
-    SegmentArrayProcessor(const MorphSubtableHeader *morphSubtableHeader);
+    SegmentArrayProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success);
 
     virtual ~SegmentArrayProcessor();
 
@@ -74,7 +74,7 @@
     SegmentArrayProcessor();
 
 protected:
-    const SegmentArrayLookupTable *segmentArrayLookupTable;
+    LEReferenceTo<SegmentArrayLookupTable> segmentArrayLookupTable;
 
 };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,84 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "NonContextualGlyphSubst.h"
+#include "NonContextualGlyphSubstProc2.h"
+#include "SegmentArrayProcessor2.h"
+#include "LEGlyphStorage.h"
+#include "LESwaps.h"
+
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SegmentArrayProcessor2)
+
+SegmentArrayProcessor2::SegmentArrayProcessor2()
+{
+}
+
+SegmentArrayProcessor2::SegmentArrayProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
+  : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader, success)
+{
+  const LEReferenceTo<NonContextualGlyphSubstitutionHeader2> header(morphSubtableHeader, success);
+  segmentArrayLookupTable = LEReferenceTo<SegmentArrayLookupTable>(morphSubtableHeader,  success, &header->table); // don't parent to 'header' as it is on the stack
+}
+
+SegmentArrayProcessor2::~SegmentArrayProcessor2()
+{
+}
+
+void SegmentArrayProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
+{
+    const LookupSegment *segments = segmentArrayLookupTable->segments;
+    le_int32 glyphCount = glyphStorage.getGlyphCount();
+    le_int32 glyph;
+
+    for (glyph = 0; glyph < glyphCount; glyph += 1) {
+        LEGlyphID thisGlyph = glyphStorage[glyph];
+        const LookupSegment *lookupSegment = segmentArrayLookupTable->lookupSegment(segmentArrayLookupTable, segments, thisGlyph, success);
+
+        if (lookupSegment != NULL)  {
+            TTGlyphID firstGlyph = SWAPW(lookupSegment->firstGlyph);
+            le_int16  offset = SWAPW(lookupSegment->value);
+
+            if (offset != 0) {
+              TTGlyphID  *glyphArray = (TTGlyphID *) ((char *) subtableHeader.getAliasTODO() + offset);
+                TTGlyphID   newGlyph   = SWAPW(glyphArray[LE_GET_GLYPH(thisGlyph) - firstGlyph]);
+
+                glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph);
+            }
+        }
+    }
+}
+
+U_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/SegmentArrayProcessor2.h	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#ifndef __SEGMENTARRAYPROCESSOR_H
+#define __SEGMENTARRAYPROCESSOR_H
+
+/**
+ * \file
+ * \internal
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "NonContextualGlyphSubst.h"
+#include "NonContextualGlyphSubstProc2.h"
+
+U_NAMESPACE_BEGIN
+
+class LEGlyphStorage;
+
+class SegmentArrayProcessor2 : public NonContextualGlyphSubstitutionProcessor2
+{
+public:
+    virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
+    SegmentArrayProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success);
+
+    virtual ~SegmentArrayProcessor2();
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
+private:
+    SegmentArrayProcessor2();
+
+protected:
+    LEReferenceTo<SegmentArrayLookupTable> segmentArrayLookupTable;
+
+};
+
+U_NAMESPACE_END
+#endif
--- a/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -46,29 +46,28 @@
 {
 }
 
-SegmentSingleProcessor::SegmentSingleProcessor(const MorphSubtableHeader *morphSubtableHeader)
-  : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader)
+SegmentSingleProcessor::SegmentSingleProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success)
+  : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader, success)
 {
-    const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) morphSubtableHeader;
-
-    segmentSingleLookupTable = (const SegmentSingleLookupTable *) &header->table;
+  LEReferenceTo<NonContextualGlyphSubstitutionHeader> header(morphSubtableHeader, success);
+  segmentSingleLookupTable = LEReferenceTo<SegmentSingleLookupTable>(morphSubtableHeader, success, (const SegmentSingleLookupTable*)&header->table);
 }
 
 SegmentSingleProcessor::~SegmentSingleProcessor()
 {
 }
 
-void SegmentSingleProcessor::process(LEGlyphStorage &glyphStorage)
+void SegmentSingleProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     const LookupSegment *segments = segmentSingleLookupTable->segments;
     le_int32 glyphCount = glyphStorage.getGlyphCount();
     le_int32 glyph;
 
-    for (glyph = 0; glyph < glyphCount; glyph += 1) {
+    for (glyph = 0; glyph < glyphCount && LE_SUCCESS(success); glyph += 1) {
         LEGlyphID thisGlyph = glyphStorage[glyph];
-        const LookupSegment *lookupSegment = segmentSingleLookupTable->lookupSegment(segments, thisGlyph);
+        const LookupSegment *lookupSegment = segmentSingleLookupTable->lookupSegment(segmentSingleLookupTable, segments, thisGlyph, success);
 
-        if (lookupSegment != NULL) {
+        if (lookupSegment != NULL && LE_SUCCESS(success)) {
             TTGlyphID   newGlyph  = (TTGlyphID) LE_GET_GLYPH(thisGlyph) + SWAPW(lookupSegment->value);
 
             glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph);
--- a/src/share/native/sun/font/layout/SegmentSingleProcessor.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/SegmentSingleProcessor.h	Wed Apr 17 21:48:04 2013 -0700
@@ -50,9 +50,9 @@
 class SegmentSingleProcessor : public NonContextualGlyphSubstitutionProcessor
 {
 public:
-    virtual void process(LEGlyphStorage &glyphStorage);
+    virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
-    SegmentSingleProcessor(const MorphSubtableHeader *morphSubtableHeader);
+    SegmentSingleProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success);
 
     virtual ~SegmentSingleProcessor();
 
@@ -74,7 +74,7 @@
     SegmentSingleProcessor();
 
 protected:
-    const SegmentSingleLookupTable *segmentSingleLookupTable;
+    LEReferenceTo<SegmentSingleLookupTable> segmentSingleLookupTable;
 
 };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "NonContextualGlyphSubst.h"
+#include "NonContextualGlyphSubstProc2.h"
+#include "SegmentSingleProcessor2.h"
+#include "LEGlyphStorage.h"
+#include "LESwaps.h"
+
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SegmentSingleProcessor2)
+
+SegmentSingleProcessor2::SegmentSingleProcessor2()
+{
+}
+
+SegmentSingleProcessor2::SegmentSingleProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
+  : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader, success)
+{
+  const LEReferenceTo<NonContextualGlyphSubstitutionHeader2> header(morphSubtableHeader, success);
+
+  segmentSingleLookupTable = LEReferenceTo<SegmentSingleLookupTable>(morphSubtableHeader, success, &header->table);
+}
+
+SegmentSingleProcessor2::~SegmentSingleProcessor2()
+{
+}
+
+void SegmentSingleProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
+{
+    const LookupSegment *segments = segmentSingleLookupTable->segments;
+    le_int32 glyphCount = glyphStorage.getGlyphCount();
+    le_int32 glyph;
+
+    for (glyph = 0; glyph < glyphCount; glyph += 1) {
+        LEGlyphID thisGlyph = glyphStorage[glyph];
+        const LookupSegment *lookupSegment = segmentSingleLookupTable->lookupSegment(segmentSingleLookupTable, segments, thisGlyph, success);
+
+        if (lookupSegment != NULL && LE_SUCCESS(success)) {
+            TTGlyphID   newGlyph  = (TTGlyphID) LE_GET_GLYPH(thisGlyph) + SWAPW(lookupSegment->value);
+
+            glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph);
+        }
+    }
+}
+
+U_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/SegmentSingleProcessor2.h	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#ifndef __SEGMENTSINGLEPROCESSOR_H
+#define __SEGMENTSINGLEPROCESSOR_H
+
+/**
+ * \file
+ * \internal
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "NonContextualGlyphSubst.h"
+#include "NonContextualGlyphSubstProc2.h"
+
+U_NAMESPACE_BEGIN
+
+class LEGlyphStorage;
+
+class SegmentSingleProcessor2 : public NonContextualGlyphSubstitutionProcessor2
+{
+public:
+    virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
+    SegmentSingleProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success);
+
+    virtual ~SegmentSingleProcessor2();
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
+private:
+    SegmentSingleProcessor2();
+
+protected:
+    LEReferenceTo<SegmentSingleLookupTable> segmentSingleLookupTable;
+
+};
+
+U_NAMESPACE_END
+#endif
--- a/src/share/native/sun/font/layout/ShapingTypeData.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ShapingTypeData.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -122,4 +122,6 @@
     0x00, 0x05, 0xFE, 0xFF, 0xFE, 0xFF, 0x00, 0x05, 0xFF, 0xF9, 0xFF, 0xFB, 0x00, 0x05
 };
 
+const size_t ArabicShaping::shapingTypeTableLen = sizeof(shapingTypeTable)/sizeof(shapingTypeTable[0]);
+
 U_NAMESPACE_END
--- a/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -46,29 +46,29 @@
 {
 }
 
-SimpleArrayProcessor::SimpleArrayProcessor(const MorphSubtableHeader *morphSubtableHeader)
-  : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader)
+SimpleArrayProcessor::SimpleArrayProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success)
+  : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader, success)
 {
-    const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) morphSubtableHeader;
-
-    simpleArrayLookupTable = (const SimpleArrayLookupTable *) &header->table;
+  LEReferenceTo<NonContextualGlyphSubstitutionHeader> header(morphSubtableHeader, success);
+  simpleArrayLookupTable = LEReferenceTo<SimpleArrayLookupTable>(morphSubtableHeader, success, (const SimpleArrayLookupTable*)&header->table);
 }
 
 SimpleArrayProcessor::~SimpleArrayProcessor()
 {
 }
 
-void SimpleArrayProcessor::process(LEGlyphStorage &glyphStorage)
+void SimpleArrayProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     le_int32 glyphCount = glyphStorage.getGlyphCount();
     le_int32 glyph;
 
-    for (glyph = 0; glyph < glyphCount; glyph += 1) {
+    LEReferenceToArrayOf<LookupValue> valueArray(simpleArrayLookupTable, success, (const LookupValue*)&simpleArrayLookupTable->valueArray, LE_UNBOUNDED_ARRAY);
+
+    for (glyph = 0; LE_SUCCESS(success) && (glyph < glyphCount); glyph += 1) {
         LEGlyphID thisGlyph = glyphStorage[glyph];
         if (LE_GET_GLYPH(thisGlyph) < 0xFFFF) {
-            TTGlyphID newGlyph = SWAPW(simpleArrayLookupTable->valueArray[LE_GET_GLYPH(thisGlyph)]);
-
-            glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph);
+          TTGlyphID newGlyph = SWAPW(valueArray.getObject(LE_GET_GLYPH(thisGlyph),success));
+          glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph);
         }
     }
 }
--- a/src/share/native/sun/font/layout/SimpleArrayProcessor.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/SimpleArrayProcessor.h	Wed Apr 17 21:48:04 2013 -0700
@@ -50,9 +50,9 @@
 class SimpleArrayProcessor : public NonContextualGlyphSubstitutionProcessor
 {
 public:
-    virtual void process(LEGlyphStorage &glyphStorage);
+    virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
-    SimpleArrayProcessor(const MorphSubtableHeader *morphSubtableHeader);
+    SimpleArrayProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success);
 
     virtual ~SimpleArrayProcessor();
 
@@ -74,7 +74,7 @@
     SimpleArrayProcessor();
 
 protected:
-    const SimpleArrayLookupTable *simpleArrayLookupTable;
+    LEReferenceTo<SimpleArrayLookupTable> simpleArrayLookupTable;
 
 };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/SimpleArrayProcessor2.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "NonContextualGlyphSubst.h"
+#include "NonContextualGlyphSubstProc2.h"
+#include "SimpleArrayProcessor2.h"
+#include "LEGlyphStorage.h"
+#include "LESwaps.h"
+
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SimpleArrayProcessor2)
+
+SimpleArrayProcessor2::SimpleArrayProcessor2()
+{
+}
+
+SimpleArrayProcessor2::SimpleArrayProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
+  : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader, success)
+{
+  const LEReferenceTo<NonContextualGlyphSubstitutionHeader2> header(morphSubtableHeader, success);
+
+  simpleArrayLookupTable = LEReferenceTo<SimpleArrayLookupTable>(morphSubtableHeader, success, &header->table);
+  valueArray = LEReferenceToArrayOf<LookupValue>(morphSubtableHeader, success, &simpleArrayLookupTable->valueArray[0], LE_UNBOUNDED_ARRAY);
+}
+
+SimpleArrayProcessor2::~SimpleArrayProcessor2()
+{
+}
+
+void SimpleArrayProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
+{
+    if (LE_FAILURE(success)) return;
+    le_int32 glyphCount = glyphStorage.getGlyphCount();
+    le_int32 glyph;
+
+    for (glyph = 0; glyph < glyphCount; glyph += 1) {
+        LEGlyphID thisGlyph = glyphStorage[glyph];
+        if (LE_GET_GLYPH(thisGlyph) < 0xFFFF) {
+          TTGlyphID newGlyph = SWAPW(valueArray(LE_GET_GLYPH(thisGlyph),success));
+
+            glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph);
+        }
+    }
+}
+
+U_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/SimpleArrayProcessor2.h	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#ifndef __SIMPLEARRAYPROCESSOR2_H
+#define __SIMPLEARRAYPROCESSOR2_H
+
+/**
+ * \file
+ * \internal
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "NonContextualGlyphSubst.h"
+#include "NonContextualGlyphSubstProc2.h"
+
+U_NAMESPACE_BEGIN
+
+class LEGlyphStorage;
+
+class SimpleArrayProcessor2 : public NonContextualGlyphSubstitutionProcessor2
+{
+public:
+    virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
+    SimpleArrayProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success);
+
+    virtual ~SimpleArrayProcessor2();
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
+private:
+    SimpleArrayProcessor2();
+
+protected:
+    LEReferenceTo<SimpleArrayLookupTable> simpleArrayLookupTable;
+    LEReferenceToArrayOf<LookupValue> valueArray;
+
+};
+
+U_NAMESPACE_END
+#endif
--- a/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -40,7 +40,7 @@
 
 U_NAMESPACE_BEGIN
 
-le_uint32 SinglePositioningSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
+le_uint32 SinglePositioningSubtable::process(const LEReferenceTo<SinglePositioningSubtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
 {
     switch(SWAPW(subtableFormat))
     {
@@ -49,16 +49,16 @@
 
     case 1:
     {
-        const SinglePositioningFormat1Subtable *subtable = (const SinglePositioningFormat1Subtable *) this;
+      const LEReferenceTo<SinglePositioningFormat1Subtable> subtable(base, success, (const SinglePositioningFormat1Subtable *) this);
 
-        return subtable->process(glyphIterator, fontInstance);
+      return subtable->process(subtable, glyphIterator, fontInstance, success);
     }
 
     case 2:
     {
-        const SinglePositioningFormat2Subtable *subtable = (const SinglePositioningFormat2Subtable *) this;
+      const LEReferenceTo<SinglePositioningFormat2Subtable> subtable(base, success, (const SinglePositioningFormat2Subtable *) this);
 
-        return subtable->process(glyphIterator, fontInstance);
+      return subtable->process(subtable, glyphIterator, fontInstance, success);
     }
 
     default:
@@ -66,10 +66,10 @@
     }
 }
 
-le_uint32 SinglePositioningFormat1Subtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
+le_uint32 SinglePositioningFormat1Subtable::process(const LEReferenceTo<SinglePositioningFormat1Subtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
 {
     LEGlyphID glyph = glyphIterator->getCurrGlyphID();
-    le_int32 coverageIndex = getGlyphCoverage(glyph);
+    le_int32 coverageIndex = getGlyphCoverage(base, glyph, success);
 
     if (coverageIndex >= 0) {
         valueRecord.adjustPosition(SWAPW(valueFormat), (const char *) this, *glyphIterator, fontInstance);
@@ -80,10 +80,10 @@
     return 0;
 }
 
-le_uint32 SinglePositioningFormat2Subtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
+le_uint32 SinglePositioningFormat2Subtable::process(const LEReferenceTo<SinglePositioningFormat2Subtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
 {
     LEGlyphID glyph = glyphIterator->getCurrGlyphID();
-    le_int16 coverageIndex = (le_int16) getGlyphCoverage(glyph);
+    le_int16 coverageIndex = (le_int16) getGlyphCoverage(base, glyph, success);
 
     if (coverageIndex >= 0) {
         valueRecordArray[0].adjustPosition(coverageIndex, SWAPW(valueFormat), (const char *) this, *glyphIterator, fontInstance);
--- a/src/share/native/sun/font/layout/SinglePositioningSubtables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/SinglePositioningSubtables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -48,7 +48,7 @@
 
 struct SinglePositioningSubtable : GlyphPositioningSubtable
 {
-    le_uint32  process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
+    le_uint32  process(const LEReferenceTo<SinglePositioningSubtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const;
 };
 
 struct SinglePositioningFormat1Subtable : SinglePositioningSubtable
@@ -56,7 +56,7 @@
     ValueFormat valueFormat;
     ValueRecord valueRecord;
 
-    le_uint32  process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
+    le_uint32  process(const LEReferenceTo<SinglePositioningFormat1Subtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const;
 };
 
 struct SinglePositioningFormat2Subtable : SinglePositioningSubtable
@@ -65,8 +65,9 @@
     le_uint16   valueCount;
     ValueRecord valueRecordArray[ANY_NUMBER];
 
-    le_uint32  process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
+    le_uint32  process(const LEReferenceTo<SinglePositioningFormat2Subtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const;
 };
+LE_VAR_ARRAY(SinglePositioningFormat2Subtable, valueRecordArray)
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -39,7 +39,7 @@
 
 U_NAMESPACE_BEGIN
 
-le_uint32 SingleSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const
+le_uint32 SingleSubstitutionSubtable::process(const LEReferenceTo<SingleSubstitutionSubtable> &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const
 {
     switch(SWAPW(subtableFormat))
     {
@@ -48,16 +48,16 @@
 
     case 1:
     {
-        const SingleSubstitutionFormat1Subtable *subtable = (const SingleSubstitutionFormat1Subtable *) this;
+      const LEReferenceTo<SingleSubstitutionFormat1Subtable> subtable(base, success, (const SingleSubstitutionFormat1Subtable *) this);
 
-        return subtable->process(glyphIterator, filter);
+      return subtable->process(subtable, glyphIterator, success, filter);
     }
 
     case 2:
     {
-        const SingleSubstitutionFormat2Subtable *subtable = (const SingleSubstitutionFormat2Subtable *) this;
+      const LEReferenceTo<SingleSubstitutionFormat2Subtable> subtable(base, success, (const SingleSubstitutionFormat2Subtable *) this);
 
-        return subtable->process(glyphIterator, filter);
+      return subtable->process(subtable, glyphIterator, success, filter);
     }
 
     default:
@@ -65,10 +65,10 @@
     }
 }
 
-le_uint32 SingleSubstitutionFormat1Subtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const
+le_uint32 SingleSubstitutionFormat1Subtable::process(const LEReferenceTo<SingleSubstitutionFormat1Subtable> &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const
 {
     LEGlyphID glyph = glyphIterator->getCurrGlyphID();
-    le_int32 coverageIndex = getGlyphCoverage(glyph);
+    le_int32 coverageIndex = getGlyphCoverage(base, glyph, success);
 
     if (coverageIndex >= 0) {
         TTGlyphID substitute = ((TTGlyphID) LE_GET_GLYPH(glyph)) + SWAPW(deltaGlyphID);
@@ -83,10 +83,10 @@
     return 0;
 }
 
-le_uint32 SingleSubstitutionFormat2Subtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const
+le_uint32 SingleSubstitutionFormat2Subtable::process(const LEReferenceTo<SingleSubstitutionFormat2Subtable> &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const
 {
     LEGlyphID glyph = glyphIterator->getCurrGlyphID();
-    le_int32 coverageIndex = getGlyphCoverage(glyph);
+    le_int32 coverageIndex = getGlyphCoverage(base, glyph, success);
 
     if (coverageIndex >= 0) {
         TTGlyphID substitute = SWAPW(substituteArray[coverageIndex]);
--- a/src/share/native/sun/font/layout/SingleSubstitutionSubtables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/SingleSubstitutionSubtables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -47,14 +47,14 @@
 
 struct SingleSubstitutionSubtable : GlyphSubstitutionSubtable
 {
-    le_uint32  process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
+    le_uint32  process(const LEReferenceTo<SingleSubstitutionSubtable> &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter = NULL) const;
 };
 
 struct SingleSubstitutionFormat1Subtable : SingleSubstitutionSubtable
 {
     le_int16   deltaGlyphID;
 
-    le_uint32  process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
+    le_uint32  process(const LEReferenceTo<SingleSubstitutionFormat1Subtable> &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter = NULL) const;
 };
 
 struct SingleSubstitutionFormat2Subtable : SingleSubstitutionSubtable
@@ -62,8 +62,9 @@
     le_uint16  glyphCount;
     TTGlyphID  substituteArray[ANY_NUMBER];
 
-    le_uint32  process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
+    le_uint32  process(const LEReferenceTo<SingleSubstitutionFormat2Subtable> &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter = NULL) const;
 };
+LE_VAR_ARRAY(SingleSubstitutionFormat2Subtable, substituteArray)
 
 U_NAMESPACE_END
 #endif
--- a/src/share/native/sun/font/layout/SingleTableProcessor.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/SingleTableProcessor.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -46,26 +46,25 @@
 {
 }
 
-SingleTableProcessor::SingleTableProcessor(const MorphSubtableHeader *moprhSubtableHeader)
-  : NonContextualGlyphSubstitutionProcessor(moprhSubtableHeader)
+SingleTableProcessor::SingleTableProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success)
+  : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader, success)
 {
-    const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) moprhSubtableHeader;
-
-    singleTableLookupTable = (const SingleTableLookupTable *) &header->table;
+  LEReferenceTo<NonContextualGlyphSubstitutionHeader> header(morphSubtableHeader, success);
+  singleTableLookupTable = LEReferenceTo<SingleTableLookupTable>(morphSubtableHeader, success, (const SingleTableLookupTable*)&header->table);
 }
 
 SingleTableProcessor::~SingleTableProcessor()
 {
 }
 
-void SingleTableProcessor::process(LEGlyphStorage &glyphStorage)
+void SingleTableProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
     const LookupSingle *entries = singleTableLookupTable->entries;
     le_int32 glyph;
     le_int32 glyphCount = glyphStorage.getGlyphCount();
 
     for (glyph = 0; glyph < glyphCount; glyph += 1) {
-        const LookupSingle *lookupSingle = singleTableLookupTable->lookupSingle(entries, glyphStorage[glyph]);
+      const LookupSingle *lookupSingle = singleTableLookupTable->lookupSingle(singleTableLookupTable, entries, glyphStorage[glyph], success);
 
         if (lookupSingle != NULL) {
             glyphStorage[glyph] = SWAPW(lookupSingle->value);
--- a/src/share/native/sun/font/layout/SingleTableProcessor.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/SingleTableProcessor.h	Wed Apr 17 21:48:04 2013 -0700
@@ -50,9 +50,9 @@
 class SingleTableProcessor : public NonContextualGlyphSubstitutionProcessor
 {
 public:
-    virtual void process(LEGlyphStorage &glyphStorage);
+    virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
-    SingleTableProcessor(const MorphSubtableHeader *morphSubtableHeader);
+    SingleTableProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success);
 
     virtual ~SingleTableProcessor();
 
@@ -74,7 +74,7 @@
     SingleTableProcessor();
 
 protected:
-    const SingleTableLookupTable *singleTableLookupTable;
+    LEReferenceTo<SingleTableLookupTable> singleTableLookupTable;
 
 };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/SingleTableProcessor2.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "NonContextualGlyphSubst.h"
+#include "NonContextualGlyphSubstProc2.h"
+#include "SingleTableProcessor2.h"
+#include "LEGlyphStorage.h"
+#include "LESwaps.h"
+
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SingleTableProcessor2)
+
+SingleTableProcessor2::SingleTableProcessor2()
+{
+}
+
+SingleTableProcessor2::SingleTableProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
+  : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader, success)
+{
+  const LEReferenceTo<NonContextualGlyphSubstitutionHeader2> header(morphSubtableHeader, success);
+
+    singleTableLookupTable = LEReferenceTo<SingleTableLookupTable>(morphSubtableHeader, success, &header->table);
+}
+
+SingleTableProcessor2::~SingleTableProcessor2()
+{
+}
+
+void SingleTableProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
+{
+  if(LE_FAILURE(success)) return;
+    const LookupSingle *entries = singleTableLookupTable->entries;
+    le_int32 glyph;
+    le_int32 glyphCount = glyphStorage.getGlyphCount();
+
+    for (glyph = 0; glyph < glyphCount; glyph += 1) {
+      const LookupSingle *lookupSingle = singleTableLookupTable->lookupSingle(singleTableLookupTable, entries, glyphStorage[glyph], success);
+
+        if (lookupSingle != NULL) {
+            glyphStorage[glyph] = SWAPW(lookupSingle->value);
+        }
+    }
+}
+
+U_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/SingleTableProcessor2.h	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#ifndef __SINGLETABLEPROCESSOR2_H
+#define __SINGLETABLEPROCESSOR2_H
+
+/**
+ * \file
+ * \internal
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "NonContextualGlyphSubst.h"
+#include "NonContextualGlyphSubstProc2.h"
+
+U_NAMESPACE_BEGIN
+
+class LEGlyphStorage;
+
+class SingleTableProcessor2 : public NonContextualGlyphSubstitutionProcessor2
+{
+public:
+    virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
+    SingleTableProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success);
+
+    virtual ~SingleTableProcessor2();
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
+private:
+    SingleTableProcessor2();
+
+protected:
+    LEReferenceTo<SingleTableLookupTable> singleTableLookupTable;
+
+};
+
+U_NAMESPACE_END
+#endif
--- a/src/share/native/sun/font/layout/StateTableProcessor.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/StateTableProcessor.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -44,17 +44,18 @@
 {
 }
 
-StateTableProcessor::StateTableProcessor(const MorphSubtableHeader *morphSubtableHeader)
-  : SubtableProcessor(morphSubtableHeader)
+StateTableProcessor::StateTableProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success)
+  : SubtableProcessor(morphSubtableHeader, success), stateTableHeader(morphSubtableHeader, success),
+    stHeader(stateTableHeader, success, (const StateTableHeader*)&stateTableHeader->stHeader)
 {
-    stateTableHeader = (const MorphStateTableHeader *) morphSubtableHeader;
-
+  if(LE_FAILURE(success)) return;
     stateSize = SWAPW(stateTableHeader->stHeader.stateSize);
     classTableOffset = SWAPW(stateTableHeader->stHeader.classTableOffset);
     stateArrayOffset = SWAPW(stateTableHeader->stHeader.stateArrayOffset);
     entryTableOffset = SWAPW(stateTableHeader->stHeader.entryTableOffset);
 
-    classTable = (const ClassTable *) ((char *) &stateTableHeader->stHeader + classTableOffset);
+    classTable = LEReferenceTo<ClassTable>(stateTableHeader, success, ((char *) &stateTableHeader->stHeader + classTableOffset));
+  if(LE_FAILURE(success)) return;
     firstGlyph = SWAPW(classTable->firstGlyph);
     lastGlyph  = firstGlyph + SWAPW(classTable->nGlyphs);
 }
@@ -63,8 +64,11 @@
 {
 }
 
-void StateTableProcessor::process(LEGlyphStorage &glyphStorage)
+void StateTableProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
+    if (LE_FAILURE(success)) return;
+    LE_STATE_PATIENCE_INIT();
+
     // Start at state 0
     // XXX: How do we know when to start at state 1?
     ByteOffset currentState = stateArrayOffset;
@@ -76,6 +80,7 @@
     beginStateTable();
 
     while (currGlyph <= glyphCount) {
+        if(LE_STATE_PATIENCE_DECR()) break; // patience exceeded.
         ClassCode classCode = classCodeOOB;
         if (currGlyph == glyphCount) {
             // XXX: How do we handle EOT vs. EOL?
@@ -90,10 +95,11 @@
             }
         }
 
-        const EntryTableIndex *stateArray = (const EntryTableIndex *) ((char *) &stateTableHeader->stHeader + currentState);
-        EntryTableIndex entryTableIndex = stateArray[(le_uint8)classCode];
-
+        LEReferenceToArrayOf<EntryTableIndex> stateArray(stHeader, success, currentState, LE_UNBOUNDED_ARRAY);
+        EntryTableIndex entryTableIndex = stateArray.getObject((le_uint8)classCode, success);
+        LE_STATE_PATIENCE_CURR(le_int32, currGlyph);
         currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex);
+        LE_STATE_PATIENCE_INCR(currGlyph);
     }
 
     endStateTable();
--- a/src/share/native/sun/font/layout/StateTableProcessor.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/StateTableProcessor.h	Wed Apr 17 21:48:04 2013 -0700
@@ -49,7 +49,7 @@
 class StateTableProcessor : public SubtableProcessor
 {
 public:
-    void process(LEGlyphStorage &glyphStorage);
+    void process(LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
     virtual void beginStateTable() = 0;
 
@@ -58,7 +58,7 @@
     virtual void endStateTable() = 0;
 
 protected:
-    StateTableProcessor(const MorphSubtableHeader *morphSubtableHeader);
+    StateTableProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success);
     virtual ~StateTableProcessor();
 
     StateTableProcessor();
@@ -68,11 +68,12 @@
     ByteOffset stateArrayOffset;
     ByteOffset entryTableOffset;
 
-    const ClassTable *classTable;
+    LEReferenceTo<ClassTable> classTable;
     TTGlyphID firstGlyph;
     TTGlyphID lastGlyph;
 
-    const MorphStateTableHeader *stateTableHeader;
+    LEReferenceTo<MorphStateTableHeader> stateTableHeader;
+    LEReferenceTo<StateTableHeader> stHeader; // for convenience
 
 private:
     StateTableProcessor(const StateTableProcessor &other); // forbid copying of this class
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/StateTableProcessor2.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,236 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "StateTables.h"
+#include "MorphStateTables.h"
+#include "SubtableProcessor2.h"
+#include "StateTableProcessor2.h"
+#include "LEGlyphStorage.h"
+#include "LESwaps.h"
+#include "LookupTables.h"
+
+U_NAMESPACE_BEGIN
+
+StateTableProcessor2::StateTableProcessor2()
+{
+}
+
+StateTableProcessor2::StateTableProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
+  : SubtableProcessor2(morphSubtableHeader, success), stateTableHeader(morphSubtableHeader, success),
+    stHeader(stateTableHeader, success, (const StateTableHeader2*)&stateTableHeader->stHeader),
+    nClasses(0), classTableOffset(0), stateArrayOffset(0), entryTableOffset(0), classTable(), format(0),
+    stateArray()
+{
+  if (LE_FAILURE(success)) {
+    return;
+  }
+  nClasses = SWAPL(stHeader->nClasses);
+  classTableOffset = SWAPL(stHeader->classTableOffset);
+  stateArrayOffset = SWAPL(stHeader->stateArrayOffset);
+  entryTableOffset = SWAPL(stHeader->entryTableOffset);
+
+  classTable = LEReferenceTo<LookupTable>(stHeader, success, classTableOffset);
+  format = SWAPW(classTable->format);
+
+  stateArray = LEReferenceToArrayOf<EntryTableIndex2>(stHeader, success, stateArrayOffset, LE_UNBOUNDED_ARRAY);
+}
+
+StateTableProcessor2::~StateTableProcessor2()
+{
+}
+
+void StateTableProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
+{
+    if (LE_FAILURE(success)) return;
+    // Start at state 0
+    // XXX: How do we know when to start at state 1?
+    le_uint16 currentState = 0;
+    le_int32 glyphCount = glyphStorage.getGlyphCount();
+
+    LE_STATE_PATIENCE_INIT();
+
+    le_int32 currGlyph = 0;
+    if ((coverage & scfReverse2) != 0) {  // process glyphs in descending order
+        currGlyph = glyphCount - 1;
+        dir = -1;
+    } else {
+        dir = 1;
+    }
+
+    beginStateTable();
+    switch (format) {
+        case ltfSimpleArray: {
+#ifdef TEST_FORMAT
+          LEReferenceTo<SimpleArrayLookupTable> lookupTable0(classTable, success);
+          if(LE_FAILURE(success)) break;
+            while ((dir == 1 && currGlyph <= glyphCount) || (dir == -1 && currGlyph >= -1)) {
+                if (LE_FAILURE(success)) break;
+                if (LE_STATE_PATIENCE_DECR()) {
+                  LE_DEBUG_BAD_FONT("patience exceeded - state table not moving")
+                  break; // patience exceeded.
+                }
+                LookupValue classCode = classCodeOOB;
+                if (currGlyph == glyphCount || currGlyph == -1) {
+                    // XXX: How do we handle EOT vs. EOL?
+                    classCode = classCodeEOT;
+                } else {
+                    LEGlyphID gid = glyphStorage[currGlyph];
+                    TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid);
+
+                    if (glyphCode == 0xFFFF) {
+                        classCode = classCodeDEL;
+                    } else {
+                        classCode = SWAPW(lookupTable0->valueArray[gid]);
+                    }
+                }
+                EntryTableIndex2 entryTableIndex = SWAPW(stateArray(classCode + currentState * nClasses, success));
+                LE_STATE_PATIENCE_CURR(le_int32, currGlyph);
+                currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); // return a zero-based index instead of a byte offset
+                LE_STATE_PATIENCE_INCR(currGlyph);
+            }
+#endif
+            break;
+        }
+        case ltfSegmentSingle: {
+          LEReferenceTo<SegmentSingleLookupTable> lookupTable2(classTable, success);
+          if(LE_FAILURE(success)) break;
+            while ((dir == 1 && currGlyph <= glyphCount) || (dir == -1 && currGlyph >= -1)) {
+                if (LE_FAILURE(success)) break;
+                if (LE_STATE_PATIENCE_DECR()) {
+                  LE_DEBUG_BAD_FONT("patience exceeded  - state table not moving")
+                  break; // patience exceeded.
+                }
+                LookupValue classCode = classCodeOOB;
+                if (currGlyph == glyphCount || currGlyph == -1) {
+                    // XXX: How do we handle EOT vs. EOL?
+                    classCode = classCodeEOT;
+                } else {
+                    LEGlyphID gid = glyphStorage[currGlyph];
+                    TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid);
+
+                    if (glyphCode == 0xFFFF) {
+                        classCode = classCodeDEL;
+                    } else {
+                      const LookupSegment *segment =
+                        lookupTable2->lookupSegment(lookupTable2, lookupTable2->segments, gid, success);
+                        if (segment != NULL && LE_SUCCESS(success)) {
+                            classCode = SWAPW(segment->value);
+                        }
+                    }
+                }
+                EntryTableIndex2 entryTableIndex = SWAPW(stateArray(classCode + currentState * nClasses,success));
+                LE_STATE_PATIENCE_CURR(le_int32, currGlyph);
+                currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex, success);
+                LE_STATE_PATIENCE_INCR(currGlyph);
+            }
+            break;
+        }
+        case ltfSegmentArray: {
+          //printf("Lookup Table Format4: specific interpretation needed!\n");
+            break;
+        }
+        case ltfSingleTable: {
+            LEReferenceTo<SingleTableLookupTable> lookupTable6(classTable, success);
+            while ((dir == 1 && currGlyph <= glyphCount) || (dir == -1 && currGlyph >= -1)) {
+                if (LE_FAILURE(success)) break;
+                if (LE_STATE_PATIENCE_DECR()) {
+                  LE_DEBUG_BAD_FONT("patience exceeded - state table not moving")
+                  break; // patience exceeded.
+                }
+                LookupValue classCode = classCodeOOB;
+                if (currGlyph == glyphCount || currGlyph == -1) {
+                    // XXX: How do we handle EOT vs. EOL?
+                    classCode = classCodeEOT;
+                } else if(currGlyph > glyphCount) {
+                  // note if > glyphCount, we've run off the end (bad font)
+                  currGlyph = glyphCount;
+                  classCode = classCodeEOT;
+                } else {
+                    LEGlyphID gid = glyphStorage[currGlyph];
+                    TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid);
+
+                    if (glyphCode == 0xFFFF) {
+                        classCode = classCodeDEL;
+                    } else {
+                      const LookupSingle *segment = lookupTable6->lookupSingle(lookupTable6, lookupTable6->entries, gid, success);
+                        if (segment != NULL) {
+                            classCode = SWAPW(segment->value);
+                        }
+                    }
+                }
+                EntryTableIndex2 entryTableIndex = SWAPW(stateArray(classCode + currentState * nClasses, success));
+                LE_STATE_PATIENCE_CURR(le_int32, currGlyph);
+                currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex, success);
+                LE_STATE_PATIENCE_INCR(currGlyph);
+            }
+            break;
+        }
+        case ltfTrimmedArray: {
+            LEReferenceTo<TrimmedArrayLookupTable> lookupTable8(classTable, success);
+            if (LE_FAILURE(success)) break;
+            TTGlyphID firstGlyph = SWAPW(lookupTable8->firstGlyph);
+            TTGlyphID lastGlyph  = firstGlyph + SWAPW(lookupTable8->glyphCount);
+
+            while ((dir == 1 && currGlyph <= glyphCount) || (dir == -1 && currGlyph >= -1)) {
+                if(LE_STATE_PATIENCE_DECR()) {
+                  LE_DEBUG_BAD_FONT("patience exceeded - state table not moving")
+                  break; // patience exceeded.
+                }
+
+                LookupValue classCode = classCodeOOB;
+                if (currGlyph == glyphCount || currGlyph == -1) {
+                    // XXX: How do we handle EOT vs. EOL?
+                    classCode = classCodeEOT;
+                } else {
+                    TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(glyphStorage[currGlyph]);
+                    if (glyphCode == 0xFFFF) {
+                        classCode = classCodeDEL;
+                    } else if ((glyphCode >= firstGlyph) && (glyphCode < lastGlyph)) {
+                        classCode = SWAPW(lookupTable8->valueArray[glyphCode - firstGlyph]);
+                    }
+                }
+                EntryTableIndex2 entryTableIndex = SWAPW(stateArray(classCode + currentState * nClasses, success));
+                LE_STATE_PATIENCE_CURR(le_int32, currGlyph);
+                currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex, success);
+                LE_STATE_PATIENCE_INCR(currGlyph);
+            }
+            break;
+        }
+        default:
+            break;
+    }
+
+    endStateTable();
+}
+
+U_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/StateTableProcessor2.h	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,85 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#ifndef __STATETABLEPROCESSOR2_H
+#define __STATETABLEPROCESSOR2_H
+
+/**
+ * \file
+ * \internal
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "MorphStateTables.h"
+#include "SubtableProcessor2.h"
+#include "LookupTables.h"
+
+U_NAMESPACE_BEGIN
+
+class LEGlyphStorage;
+
+class StateTableProcessor2 : public SubtableProcessor2
+{
+public:
+    void process(LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
+    virtual void beginStateTable() = 0;
+
+    virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index, LEErrorCode &success) = 0;
+
+    virtual void endStateTable() = 0;
+
+protected:
+    StateTableProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success);
+    virtual ~StateTableProcessor2();
+
+    StateTableProcessor2();
+
+    le_int32  dir;
+    le_uint16 format;
+    le_uint32 nClasses;
+    le_uint32 classTableOffset;
+    le_uint32 stateArrayOffset;
+    le_uint32 entryTableOffset;
+
+    LEReferenceTo<LookupTable> classTable;
+    LEReferenceToArrayOf<EntryTableIndex2> stateArray;
+    LEReferenceTo<MorphStateTableHeader2> stateTableHeader;
+    LEReferenceTo<StateTableHeader2> stHeader; // for convenience
+
+private:
+    StateTableProcessor2(const StateTableProcessor2 &other); // forbid copying of this class
+    StateTableProcessor2 &operator=(const StateTableProcessor2 &other); // forbid copying of this class
+};
+
+U_NAMESPACE_END
+#endif
--- a/src/share/native/sun/font/layout/StateTables.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/StateTables.h	Wed Apr 17 21:48:04 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -42,6 +42,41 @@
 
 U_NAMESPACE_BEGIN
 
+
+
+
+/*
+ * State table loop detection.
+ * Detects if too many ( LE_STATE_PATIENCE_COUNT ) state changes occur without moving the glyph index 'g'.
+ *
+ * Usage (pseudocode):
+ *
+ * {
+ *   LE_STATE_PATIENCE_INIT();
+ *
+ *   int g=0; // the glyph index - expect it to be moving
+ *
+ *   for(;;) {
+ *     if(LE_STATE_PATIENCE_DECR()) { // decrements the patience counter
+ *        // ran out of patience, get out.
+ *        break;
+ *     }
+ *
+ *     LE_STATE_PATIENCE_CURR(int, g); // store the 'current'
+ *     state = newState(state,g);
+ *     g+= <something, could be zero>;
+ *     LE_STATE_PATIENCE_INCR(g);  // if g has moved, increment the patience counter. Otherwise leave it.
+ *   }
+ *
+ */
+
+#define LE_STATE_PATIENCE_COUNT 4096 /**< give up if a state table doesn't move the glyph after this many iterations */
+#define LE_STATE_PATIENCE_INIT()  le_uint32 le_patience_count = LE_STATE_PATIENCE_COUNT
+#define LE_STATE_PATIENCE_DECR()  --le_patience_count==0
+#define LE_STATE_PATIENCE_CURR(type,x)  type le_patience_curr=(x)
+#define LE_STATE_PATIENCE_INCR(x)    if((x)!=le_patience_curr) ++le_patience_count;
+
+
 struct StateTableHeader
 {
     le_int16 stateSize;
@@ -50,6 +85,14 @@
     ByteOffset entryTableOffset;
 };
 
+struct StateTableHeader2
+{
+    le_uint32 nClasses;
+    le_uint32 classTableOffset;
+    le_uint32 stateArrayOffset;
+    le_uint32 entryTableOffset;
+};
+
 enum ClassCodes
 {
     classCodeEOT = 0,
@@ -68,6 +111,7 @@
     le_uint16 nGlyphs;
     ClassCode classArray[ANY_NUMBER];
 };
+LE_VAR_ARRAY(ClassTable, classArray)
 
 enum StateNumber
 {
@@ -85,6 +129,14 @@
     le_int16    flags;
 };
 
+typedef le_uint16 EntryTableIndex2;
+
+struct StateEntry2 // same struct different interpretation
+{
+    le_uint16    newStateIndex;
+    le_uint16    flags;
+};
+
 U_NAMESPACE_END
 #endif
 
--- a/src/share/native/sun/font/layout/SubtableProcessor.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/SubtableProcessor.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -40,10 +40,10 @@
 {
 }
 
-SubtableProcessor::SubtableProcessor(const MorphSubtableHeader *morphSubtableHeader)
+SubtableProcessor::SubtableProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success)
+  : length(0), coverage(0), subtableFeatures(0L), subtableHeader(morphSubtableHeader)
 {
-    subtableHeader = morphSubtableHeader;
-
+  if(LE_FAILURE(success)) return;
     length = SWAPW(subtableHeader->length);
     coverage = SWAPW(subtableHeader->coverage);
     subtableFeatures = SWAPL(subtableHeader->subtableFeatures);
--- a/src/share/native/sun/font/layout/SubtableProcessor.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/SubtableProcessor.h	Wed Apr 17 21:48:04 2013 -0700
@@ -46,11 +46,11 @@
 
 class SubtableProcessor : public UMemory {
 public:
-    virtual void process(LEGlyphStorage &glyphStorage) = 0;
+    virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success) = 0;
     virtual ~SubtableProcessor();
 
 protected:
-    SubtableProcessor(const MorphSubtableHeader *morphSubtableHeader);
+    SubtableProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success);
 
     SubtableProcessor();
 
@@ -58,7 +58,7 @@
     SubtableCoverage coverage;
     FeatureFlags subtableFeatures;
 
-    const MorphSubtableHeader *subtableHeader;
+    const LEReferenceTo<MorphSubtableHeader> subtableHeader;
 
 private:
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/SubtableProcessor2.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "LESwaps.h"
+
+U_NAMESPACE_BEGIN
+
+SubtableProcessor2::SubtableProcessor2()
+{
+}
+
+SubtableProcessor2::SubtableProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
+  : subtableHeader(morphSubtableHeader, success), length(0), coverage(0), subtableFeatures(0L)
+{
+  if(LE_FAILURE(success)) return;
+
+  length = SWAPL(subtableHeader->length);
+  coverage = SWAPL(subtableHeader->coverage);
+  subtableFeatures = SWAPL(subtableHeader->subtableFeatures);
+}
+
+SubtableProcessor2::~SubtableProcessor2()
+{
+}
+
+U_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/SubtableProcessor2.h	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#ifndef __SUBTABLEPROCESSOR2_H
+#define __SUBTABLEPROCESSOR2_H
+
+/**
+ * \file
+ * \internal
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+
+U_NAMESPACE_BEGIN
+
+class LEGlyphStorage;
+
+class SubtableProcessor2 : public UMemory {
+public:
+    virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success) = 0;
+    virtual ~SubtableProcessor2();
+
+protected:
+    SubtableProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success);
+
+    SubtableProcessor2();
+
+    le_uint32 length;
+    SubtableCoverage2 coverage;
+    FeatureFlags subtableFeatures;
+
+    const LEReferenceTo<MorphSubtableHeader2> subtableHeader;
+
+private:
+
+    SubtableProcessor2(const SubtableProcessor2 &other); // forbid copying of this class
+    SubtableProcessor2 &operator=(const SubtableProcessor2 &other); // forbid copying of this class
+};
+
+U_NAMESPACE_END
+#endif
--- a/src/share/native/sun/font/layout/ThaiLayoutEngine.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ThaiLayoutEngine.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -134,11 +134,10 @@
         return;
     }
 
-    if (fTypoFlags & 0x1) { /* kerning enabled */
-      static const le_uint32 kernTableTag = LE_KERN_TABLE_TAG;
-
-      KernTable kt(fFontInstance, getFontTable(kernTableTag));
-      kt.process(glyphStorage);
+    if (fTypoFlags & LE_Kerning_FEATURE_FLAG) { /* kerning enabled */
+      LETableReference kernTable(fFontInstance, LE_KERN_TABLE_TAG, success);
+      KernTable kt(kernTable, success);
+      kt.process(glyphStorage, success);
     }
 
     // default is no adjustments
--- a/src/share/native/sun/font/layout/TibetanLayoutEngine.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/TibetanLayoutEngine.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -49,7 +49,7 @@
 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TibetanOpenTypeLayoutEngine)
 
 TibetanOpenTypeLayoutEngine::TibetanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-                    le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success)
+                                                         le_int32 typoFlags, const LEReferenceTo<GlyphSubstitutionTableHeader> &gsubTable, LEErrorCode &success)
     : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success)
 {
     fFeatureMap   = TibetanReordering::getFeatureMap(fFeatureMapCount);
--- a/src/share/native/sun/font/layout/TibetanLayoutEngine.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/TibetanLayoutEngine.h	Wed Apr 17 21:48:04 2013 -0700
@@ -83,7 +83,7 @@
      * @internal
      */
     TibetanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
-                            le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success);
+                            le_int32 typoFlags, const LEReferenceTo<GlyphSubstitutionTableHeader> &gsubTable, LEErrorCode &success);
 
     /**
      * This constructor is used when the font requires a "canned" GSUB table which can't be known
--- a/src/share/native/sun/font/layout/TrimmedArrayProcessor.cpp	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/TrimmedArrayProcessor.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -46,22 +46,28 @@
 {
 }
 
-TrimmedArrayProcessor::TrimmedArrayProcessor(const MorphSubtableHeader *morphSubtableHeader)
-  : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader)
+TrimmedArrayProcessor::TrimmedArrayProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success)
+  : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader, success), firstGlyph(0), lastGlyph(0)
 {
-    const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) morphSubtableHeader;
+  LEReferenceTo<NonContextualGlyphSubstitutionHeader> header(morphSubtableHeader, success);
+
+  if(LE_FAILURE(success)) return;
 
-    trimmedArrayLookupTable = (const TrimmedArrayLookupTable *) &header->table;
-    firstGlyph = SWAPW(trimmedArrayLookupTable->firstGlyph);
-    lastGlyph = firstGlyph + SWAPW(trimmedArrayLookupTable->glyphCount);
+  trimmedArrayLookupTable = LEReferenceTo<TrimmedArrayLookupTable>(morphSubtableHeader, success, (const TrimmedArrayLookupTable*)&header->table);
+
+  if(LE_FAILURE(success)) return;
+
+  firstGlyph = SWAPW(trimmedArrayLookupTable->firstGlyph);
+  lastGlyph = firstGlyph + SWAPW(trimmedArrayLookupTable->glyphCount);
 }
 
 TrimmedArrayProcessor::~TrimmedArrayProcessor()
 {
 }
 
-void TrimmedArrayProcessor::process(LEGlyphStorage &glyphStorage)
+void TrimmedArrayProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
+  if(LE_FAILURE(success)) return;
     le_int32 glyphCount = glyphStorage.getGlyphCount();
     le_int32 glyph;
 
--- a/src/share/native/sun/font/layout/TrimmedArrayProcessor.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/TrimmedArrayProcessor.h	Wed Apr 17 21:48:04 2013 -0700
@@ -50,9 +50,9 @@
 class TrimmedArrayProcessor : public NonContextualGlyphSubstitutionProcessor
 {
 public:
-    virtual void process(LEGlyphStorage &glyphStorage);
+    virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success);
 
-    TrimmedArrayProcessor(const MorphSubtableHeader *morphSubtableHeader);
+    TrimmedArrayProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success);
 
     virtual ~TrimmedArrayProcessor();
 
@@ -76,7 +76,7 @@
 protected:
     TTGlyphID firstGlyph;
     TTGlyphID lastGlyph;
-    const TrimmedArrayLookupTable *trimmedArrayLookupTable;
+    LEReferenceTo<TrimmedArrayLookupTable> trimmedArrayLookupTable;
 
 };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/TrimmedArrayProcessor2.cpp	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "NonContextualGlyphSubst.h"
+#include "NonContextualGlyphSubstProc2.h"
+#include "TrimmedArrayProcessor2.h"
+#include "LEGlyphStorage.h"
+#include "LESwaps.h"
+
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TrimmedArrayProcessor2)
+
+TrimmedArrayProcessor2::TrimmedArrayProcessor2()
+{
+}
+
+TrimmedArrayProcessor2::TrimmedArrayProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
+  : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader, success)
+{
+    const LEReferenceTo<NonContextualGlyphSubstitutionHeader2> header(morphSubtableHeader, success);
+
+    trimmedArrayLookupTable = LEReferenceTo<TrimmedArrayLookupTable>(morphSubtableHeader, success, &header->table);
+    firstGlyph = SWAPW(trimmedArrayLookupTable->firstGlyph);
+    lastGlyph = firstGlyph + SWAPW(trimmedArrayLookupTable->glyphCount);
+    valueArray = LEReferenceToArrayOf<LookupValue>(morphSubtableHeader, success, &trimmedArrayLookupTable->valueArray[0], LE_UNBOUNDED_ARRAY);
+}
+
+TrimmedArrayProcessor2::~TrimmedArrayProcessor2()
+{
+}
+
+void TrimmedArrayProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
+{
+    if(LE_FAILURE(success)) return;
+    le_int32 glyphCount = glyphStorage.getGlyphCount();
+    le_int32 glyph;
+
+    for (glyph = 0; glyph < glyphCount; glyph += 1) {
+        LEGlyphID thisGlyph = glyphStorage[glyph];
+        TTGlyphID ttGlyph = (TTGlyphID) LE_GET_GLYPH(thisGlyph);
+
+        if ((ttGlyph > firstGlyph) && (ttGlyph < lastGlyph)) {
+            TTGlyphID newGlyph = SWAPW(valueArray(ttGlyph - firstGlyph, success));
+
+            glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph);
+        }
+    }
+}
+
+U_NAMESPACE_END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/font/layout/TrimmedArrayProcessor2.h	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,84 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ *
+ * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ *
+ */
+
+#ifndef __TRIMMEDARRAYPROCESSOR2_H
+#define __TRIMMEDARRAYPROCESSOR2_H
+
+/**
+ * \file
+ * \internal
+ */
+
+#include "LETypes.h"
+#include "MorphTables.h"
+#include "SubtableProcessor2.h"
+#include "NonContextualGlyphSubst.h"
+#include "NonContextualGlyphSubstProc2.h"
+
+U_NAMESPACE_BEGIN
+
+class LEGlyphStorage;
+
+class TrimmedArrayProcessor2 : public NonContextualGlyphSubstitutionProcessor2
+{
+public:
+    virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
+    TrimmedArrayProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success);
+
+    virtual ~TrimmedArrayProcessor2();
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual UClassID getDynamicClassID() const;
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static UClassID getStaticClassID();
+
+private:
+    TrimmedArrayProcessor2();
+
+protected:
+    TTGlyphID firstGlyph;
+    TTGlyphID lastGlyph;
+    LEReferenceTo<TrimmedArrayLookupTable> trimmedArrayLookupTable;
+    LEReferenceToArrayOf<LookupValue> valueArray;
+};
+
+U_NAMESPACE_END
+#endif
--- a/src/share/native/sun/font/layout/ValueRecords.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/layout/ValueRecords.h	Wed Apr 17 21:48:04 2013 -0700
@@ -64,6 +64,7 @@
     static le_int16    getFieldCount(ValueFormat valueFormat);
     static le_int16    getFieldIndex(ValueFormat valueFormat, ValueRecordField field);
 };
+LE_VAR_ARRAY(ValueRecord, values)
 
 enum ValueRecordFields
 {
--- a/src/share/native/sun/font/sunFont.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/font/sunFont.c	Wed Apr 17 21:48:04 2013 -0700
@@ -320,22 +320,20 @@
 JNIEXPORT TTLayoutTableCache* newLayoutTableCache() {
   TTLayoutTableCache* ltc = calloc(1, sizeof(TTLayoutTableCache));
   if (ltc) {
-    ltc->gsub_len = -1;
-    ltc->gpos_len = -1;
-    ltc->gdef_len = -1;
-    ltc->mort_len = -1;
-    ltc->kern_len = -1;
+    int i;
+    for(i=0;i<LAYOUTCACHE_ENTRIES;i++) {
+      ltc->entries[i].len = -1;
+    }
   }
   return ltc;
 }
 
 JNIEXPORT void freeLayoutTableCache(TTLayoutTableCache* ltc) {
   if (ltc) {
-    if (ltc->gsub) free(ltc->gsub);
-    if (ltc->gpos) free(ltc->gpos);
-    if (ltc->gdef) free(ltc->gdef);
-    if (ltc->mort) free(ltc->mort);
-    if (ltc->kern) free(ltc->kern);
+    int i;
+    for(i=0;i<LAYOUTCACHE_ENTRIES;i++) {
+      if(ltc->entries[i].ptr) free (ltc->entries[i].ptr);
+    }
     if (ltc->kernPairs) free(ltc->kernPairs);
     free(ltc);
   }
--- a/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h	Wed Apr 17 21:48:04 2013 -0700
@@ -143,9 +143,9 @@
  * structure from the information present in a given Java Composite
  * object.
  */
-typedef JNIEXPORT void (JNICALL CompInfoFunc)(JNIEnv *env,
-                                              CompositeInfo *pCompInfo,
-                                              jobject Composite);
+typedef void (JNICALL CompInfoFunc)(JNIEnv *env,
+                                    CompositeInfo *pCompInfo,
+                                    jobject Composite);
 
 /*
  * The additional information needed to implement a primitive that
--- a/src/share/native/sun/reflect/Reflection.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/native/sun/reflect/Reflection.c	Wed Apr 17 21:48:04 2013 -0700
@@ -27,9 +27,9 @@
 #include "sun_reflect_Reflection.h"
 
 JNIEXPORT jclass JNICALL Java_sun_reflect_Reflection_getCallerClass
-(JNIEnv *env, jclass unused, jint depth)
+(JNIEnv *env, jclass unused)
 {
-    return JVM_GetCallerClass(env, depth);
+    return JVM_GetCallerClass(env, JVM_DEPTH); // JVM_DEPTH is only the expected value
 }
 
 JNIEXPORT jint JNICALL Java_sun_reflect_Reflection_getClassAccessFlags
--- a/src/share/npt/npt.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/share/npt/npt.h	Wed Apr 17 21:48:04 2013 -0700
@@ -94,13 +94,13 @@
 
 JNIEXPORT void JNICALL nptInitialize
                        (NptEnv **pnpt, char *nptVersion, char *options);
-typedef JNIEXPORT void (JNICALL *NptInitialize)
-                       (NptEnv **pnpt, char *nptVersion, char *options);
+typedef void (JNICALL *NptInitialize)
+             (NptEnv **pnpt, char *nptVersion, char *options);
 
 JNIEXPORT void JNICALL nptTerminate
                        (NptEnv* npt, char *options);
-typedef JNIEXPORT void (JNICALL *NptTerminate)
-                       (NptEnv* npt, char *options);
+typedef void (JNICALL *NptTerminate)
+             (NptEnv* npt, char *options);
 
 #ifdef __cplusplus
 } /* extern "C" */
--- a/src/solaris/classes/java/lang/UNIXProcess.java.bsd	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/classes/java/lang/UNIXProcess.java.bsd	Wed Apr 17 21:48:04 2013 -0700
@@ -270,11 +270,10 @@
         return !hasExited;
     }
 
-    /* This routine initializes JNI field offsets for the class */
-    private static native void initIDs();
+    private static native void init();
 
     static {
-        initIDs();
+        init();
     }
 
     /**
--- a/src/solaris/classes/java/lang/UNIXProcess.java.linux	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/classes/java/lang/UNIXProcess.java.linux	Wed Apr 17 21:48:04 2013 -0700
@@ -270,11 +270,10 @@
         return !hasExited;
     }
 
-    /* This routine initializes JNI field offsets for the class */
-    private static native void initIDs();
+    private static native void init();
 
     static {
-        initIDs();
+        init();
     }
 
     /**
--- a/src/solaris/classes/java/lang/UNIXProcess.java.solaris	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/classes/java/lang/UNIXProcess.java.solaris	Wed Apr 17 21:48:04 2013 -0700
@@ -328,10 +328,9 @@
 
     }
 
-    /* This routine initializes JNI field offsets for the class */
-    private static native void initIDs();
+    private static native void init();
 
     static {
-        initIDs();
+        init();
     }
 }
--- a/src/solaris/classes/sun/awt/X11/XWindowPeer.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/classes/sun/awt/X11/XWindowPeer.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1001,8 +1001,8 @@
                              XLayerProtocol.LAYER_NORMAL);
     }
 
-    public void setAlwaysOnTop(boolean alwaysOnTop) {
-        this.alwaysOnTop = alwaysOnTop;
+    public void updateAlwaysOnTopState() {
+        this.alwaysOnTop = ((Window) this.target).isAlwaysOnTop();
         updateAlwaysOnTop();
     }
 
--- a/src/solaris/classes/sun/nio/ch/FileDispatcherImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/FileDispatcherImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -46,8 +46,9 @@
         return read0(fd, address, len);
     }
 
-    int pread(FileDescriptor fd, long address, int len,
-                             long position, Object lock) throws IOException {
+    int pread(FileDescriptor fd, long address, int len, long position)
+        throws IOException
+    {
         return pread0(fd, address, len, position);
     }
 
@@ -59,8 +60,8 @@
         return write0(fd, address, len);
     }
 
-    int pwrite(FileDescriptor fd, long address, int len,
-                             long position, Object lock) throws IOException
+    int pwrite(FileDescriptor fd, long address, int len, long position)
+        throws IOException
     {
         return pwrite0(fd, address, len, position);
     }
--- a/src/solaris/classes/sun/nio/ch/SinkChannelImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/SinkChannelImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -165,7 +165,7 @@
                     return 0;
                 thread = NativeThread.current();
                 do {
-                    n = IOUtil.write(fd, src, -1, nd, lock);
+                    n = IOUtil.write(fd, src, -1, nd);
                 } while ((n == IOStatus.INTERRUPTED) && isOpen());
                 return IOStatus.normalize(n);
             } finally {
--- a/src/solaris/classes/sun/nio/ch/SourceChannelImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/SourceChannelImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -165,7 +165,7 @@
                     return 0;
                 thread = NativeThread.current();
                 do {
-                    n = IOUtil.read(fd, dst, -1, nd, lock);
+                    n = IOUtil.read(fd, dst, -1, nd);
                 } while ((n == IOStatus.INTERRUPTED) && isOpen());
                 return IOStatus.normalize(n);
             } finally {
--- a/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -384,7 +384,7 @@
             if (scattering) {
                 n = (int)IOUtil.read(fd, readBuffers, nd);
             } else {
-                n = IOUtil.read(fd, readBuffer, -1, nd, null);
+                n = IOUtil.read(fd, readBuffer, -1, nd);
             }
             if (n == IOStatus.UNAVAILABLE) {
                 // spurious wakeup, is this possible?
@@ -505,7 +505,7 @@
                 if (isScatteringRead) {
                     n = (int)IOUtil.read(fd, dsts, nd);
                 } else {
-                    n = IOUtil.read(fd, dst, -1, nd, null);
+                    n = IOUtil.read(fd, dst, -1, nd);
                 }
             }
 
@@ -579,7 +579,7 @@
             if (gathering) {
                 n = (int)IOUtil.write(fd, writeBuffers, nd);
             } else {
-                n = IOUtil.write(fd, writeBuffer, -1, nd, null);
+                n = IOUtil.write(fd, writeBuffer, -1, nd);
             }
             if (n == IOStatus.UNAVAILABLE) {
                 // spurious wakeup, is this possible?
@@ -688,7 +688,7 @@
                 if (isGatheringWrite) {
                     n = (int)IOUtil.write(fd, srcs, nd);
                 } else {
-                    n = IOUtil.write(fd, src, -1, nd, null);
+                    n = IOUtil.write(fd, src, -1, nd);
                 }
             }
 
--- a/src/solaris/classes/sun/security/provider/NativePRNG.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/classes/sun/security/provider/NativePRNG.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, 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,34 +26,47 @@
 package sun.security.provider;
 
 import java.io.*;
-
+import java.net.*;
 import java.security.*;
-import java.security.SecureRandom;
+import sun.security.util.Debug;
 
 /**
- * Native PRNG implementation for Solaris/Linux. It interacts with
- * /dev/random and /dev/urandom, so it is only available if those
- * files are present. Otherwise, SHA1PRNG is used instead of this class.
- *
- * getSeed() and setSeed() directly read/write /dev/random. However,
- * /dev/random is only writable by root in many configurations. Because
- * we cannot just ignore bytes specified via setSeed(), we keep a
- * SHA1PRNG around in parallel.
- *
- * nextBytes() reads the bytes directly from /dev/urandom (and then
- * mixes them with bytes from the SHA1PRNG for the reasons explained
- * above). Reading bytes from /dev/urandom means that constantly get
- * new entropy the operating system has collected. This is a notable
- * advantage over the SHA1PRNG model, which acquires entropy only
- * initially during startup although the VM may be running for months.
- *
- * Also note that we do not need any initial pure random seed from
- * /dev/random. This is an advantage because on some versions of Linux
- * it can be exhausted very quickly and could thus impact startup time.
- *
+ * Native PRNG implementation for Solaris/Linux/MacOS.
+ * <p>
+ * It obtains seed and random numbers by reading system files such as
+ * the special device files /dev/random and /dev/urandom.  This
+ * implementation respects the {@code securerandom.source} Security
+ * property and {@code java.security.egd} System property for obtaining
+ * seed material.  If the file specified by the properties does not
+ * exist, /dev/random is the default seed source.  /dev/urandom is
+ * the default source of random numbers.
+ * <p>
+ * On some Unix platforms, /dev/random may block until enough entropy is
+ * available, but that may negatively impact the perceived startup
+ * time.  By selecting these sources, this implementation tries to
+ * strike a balance between performance and security.
+ * <p>
+ * generateSeed() and setSeed() attempt to directly read/write to the seed
+ * source. However, this file may only be writable by root in many
+ * configurations. Because we cannot just ignore bytes specified via
+ * setSeed(), we keep a SHA1PRNG around in parallel.
+ * <p>
+ * nextBytes() reads the bytes directly from the source of random
+ * numbers (and then mixes them with bytes from the SHA1PRNG for the
+ * reasons explained above). Reading bytes from the random generator means
+ * that we are generally getting entropy from the operating system. This
+ * is a notable advantage over the SHA1PRNG model, which acquires
+ * entropy only initially during startup although the VM may be running
+ * for months.
+ * <p>
+ * Also note for nextBytes() that we do not need any initial pure random
+ * seed from /dev/random. This is an advantage because on some versions
+ * of Linux entropy can be exhausted very quickly and could thus impact
+ * startup time.
+ * <p>
  * Finally, note that we use a singleton for the actual work (RandomIO)
  * to avoid having to open and close /dev/[u]random constantly. However,
- * there may me many NativePRNG instances created by the JCA framework.
+ * there may be many NativePRNG instances created by the JCA framework.
  *
  * @since   1.5
  * @author  Andreas Sterbenz
@@ -62,32 +75,121 @@
 
     private static final long serialVersionUID = -6599091113397072932L;
 
+    private static final Debug debug = Debug.getInstance("provider");
+
     // name of the pure random file (also used for setSeed())
     private static final String NAME_RANDOM = "/dev/random";
     // name of the pseudo random file
     private static final String NAME_URANDOM = "/dev/urandom";
 
+    // which kind of RandomIO object are we creating?
+    private enum Variant {
+        MIXED, BLOCKING, NONBLOCKING
+    }
+
     // singleton instance or null if not available
-    private static final RandomIO INSTANCE = initIO();
+    private static final RandomIO INSTANCE = initIO(Variant.MIXED);
 
-    private static RandomIO initIO() {
-        return AccessController.doPrivileged(
-            new PrivilegedAction<RandomIO>() {
-                public RandomIO run() {
-                File randomFile = new File(NAME_RANDOM);
-                if (randomFile.exists() == false) {
+    /**
+     * Get the System egd source (if defined).  We only allow "file:"
+     * URLs for now. If there is a egd value, parse it.
+     *
+     * @return the URL or null if not available.
+     */
+    private static URL getEgdUrl() {
+        // This will return "" if nothing was set.
+        String egdSource = SunEntries.getSeedSource();
+        URL egdUrl;
+
+        if (egdSource.length() != 0) {
+            if (debug != null) {
+                debug.println("NativePRNG egdUrl: " + egdSource);
+            }
+            try {
+                egdUrl = new URL(egdSource);
+                if (!egdUrl.getProtocol().equalsIgnoreCase("file")) {
                     return null;
                 }
-                File urandomFile = new File(NAME_URANDOM);
-                if (urandomFile.exists() == false) {
-                    return null;
+            } catch (MalformedURLException e) {
+                return null;
+            }
+        } else {
+            egdUrl = null;
+        }
+
+        return egdUrl;
+    }
+
+    /**
+     * Create a RandomIO object for all I/O of this Variant type.
+     */
+    private static RandomIO initIO(final Variant v) {
+        return AccessController.doPrivileged(
+            new PrivilegedAction<RandomIO>() {
+                @Override
+                public RandomIO run() {
+
+                    File seedFile;
+                    File nextFile;
+
+                    switch(v) {
+                    case MIXED:
+                        URL egdUrl;
+                        File egdFile = null;
+
+                        if ((egdUrl = getEgdUrl()) != null) {
+                            try {
+                                egdFile = SunEntries.getDeviceFile(egdUrl);
+                            } catch (IOException e) {
+                                // Swallow, seedFile is still null
+                            }
+                        }
+
+                        // Try egd first.
+                        if ((egdFile != null) && egdFile.canRead()) {
+                            seedFile = egdFile;
+                        } else {
+                            // fall back to /dev/random.
+                            seedFile = new File(NAME_RANDOM);
+                        }
+                        nextFile = new File(NAME_URANDOM);
+                        break;
+
+                    case BLOCKING:
+                        seedFile = new File(NAME_RANDOM);
+                        nextFile = new File(NAME_RANDOM);
+                        break;
+
+                    case NONBLOCKING:
+                        seedFile = new File(NAME_URANDOM);
+                        nextFile = new File(NAME_URANDOM);
+                        break;
+
+                    default:
+                        // Shouldn't happen!
+                        return null;
+                    }
+
+                    if (debug != null) {
+                        debug.println("NativePRNG." + v +
+                            " seedFile: " + seedFile +
+                            " nextFile: " + nextFile);
+                    }
+
+                    if (!seedFile.canRead() || !nextFile.canRead()) {
+                        if (debug != null) {
+                            debug.println("NativePRNG." + v +
+                                " Couldn't read Files.");
+                        }
+                        return null;
+                    }
+
+                    try {
+                        return new RandomIO(seedFile, nextFile);
+                    } catch (Exception e) {
+                        return null;
+                    }
                 }
-                try {
-                    return new RandomIO(randomFile, urandomFile);
-                } catch (Exception e) {
-                    return null;
-                }
-            }
         });
     }
 
@@ -105,67 +207,173 @@
     }
 
     // set the seed
+    @Override
     protected void engineSetSeed(byte[] seed) {
         INSTANCE.implSetSeed(seed);
     }
 
     // get pseudo random bytes
+    @Override
     protected void engineNextBytes(byte[] bytes) {
         INSTANCE.implNextBytes(bytes);
     }
 
     // get true random bytes
+    @Override
     protected byte[] engineGenerateSeed(int numBytes) {
         return INSTANCE.implGenerateSeed(numBytes);
     }
 
     /**
+     * A NativePRNG-like class that uses /dev/random for both
+     * seed and random material.
+     *
+     * Note that it does not respect the egd properties, since we have
+     * no way of knowing what those qualities are.
+     *
+     * This is very similar to the outer NativePRNG class, minimizing any
+     * breakage to the serialization of the existing implementation.
+     *
+     * @since   1.8
+     */
+    public static final class Blocking extends SecureRandomSpi {
+        private static final long serialVersionUID = -6396183145759983347L;
+
+        private static final RandomIO INSTANCE = initIO(Variant.BLOCKING);
+
+        // return whether this is available
+        static boolean isAvailable() {
+            return INSTANCE != null;
+        }
+
+        // constructor, called by the JCA framework
+        public Blocking() {
+            super();
+            if (INSTANCE == null) {
+                throw new AssertionError("NativePRNG$Blocking not available");
+            }
+        }
+
+        // set the seed
+        @Override
+        protected void engineSetSeed(byte[] seed) {
+            INSTANCE.implSetSeed(seed);
+        }
+
+        // get pseudo random bytes
+        @Override
+        protected void engineNextBytes(byte[] bytes) {
+            INSTANCE.implNextBytes(bytes);
+        }
+
+        // get true random bytes
+        @Override
+        protected byte[] engineGenerateSeed(int numBytes) {
+            return INSTANCE.implGenerateSeed(numBytes);
+        }
+    }
+
+    /**
+     * A NativePRNG-like class that uses /dev/urandom for both
+     * seed and random material.
+     *
+     * Note that it does not respect the egd properties, since we have
+     * no way of knowing what those qualities are.
+     *
+     * This is very similar to the outer NativePRNG class, minimizing any
+     * breakage to the serialization of the existing implementation.
+     *
+     * @since   1.8
+     */
+    public static final class NonBlocking extends SecureRandomSpi {
+        private static final long serialVersionUID = -1102062982994105487L;
+
+        private static final RandomIO INSTANCE = initIO(Variant.NONBLOCKING);
+
+        // return whether this is available
+        static boolean isAvailable() {
+            return INSTANCE != null;
+        }
+
+        // constructor, called by the JCA framework
+        public NonBlocking() {
+            super();
+            if (INSTANCE == null) {
+                throw new AssertionError(
+                    "NativePRNG$NonBlocking not available");
+            }
+        }
+
+        // set the seed
+        @Override
+        protected void engineSetSeed(byte[] seed) {
+            INSTANCE.implSetSeed(seed);
+        }
+
+        // get pseudo random bytes
+        @Override
+        protected void engineNextBytes(byte[] bytes) {
+            INSTANCE.implNextBytes(bytes);
+        }
+
+        // get true random bytes
+        @Override
+        protected byte[] engineGenerateSeed(int numBytes) {
+            return INSTANCE.implGenerateSeed(numBytes);
+        }
+    }
+
+    /**
      * Nested class doing the actual work. Singleton, see INSTANCE above.
      */
     private static class RandomIO {
 
-        // we buffer data we read from /dev/urandom for efficiency,
+        // we buffer data we read from the "next" file for efficiency,
         // but we limit the lifetime to avoid using stale bits
         // lifetime in ms, currently 100 ms (0.1 s)
         private final static long MAX_BUFFER_TIME = 100;
 
-        // size of the /dev/urandom buffer
+        // size of the "next" buffer
         private final static int BUFFER_SIZE = 32;
 
-        // In/OutputStream for /dev/random and /dev/urandom
-        private final InputStream randomIn, urandomIn;
-        private OutputStream randomOut;
+        // Holder for the seedFile.  Used if we ever add seed material.
+        File seedFile;
 
-        // flag indicating if we have tried to open randomOut yet
-        private boolean randomOutInitialized;
+        // In/OutputStream for "seed" and "next"
+        private final InputStream seedIn, nextIn;
+        private OutputStream seedOut;
+
+        // flag indicating if we have tried to open seedOut yet
+        private boolean seedOutInitialized;
 
         // SHA1PRNG instance for mixing
         // initialized lazily on demand to avoid problems during startup
         private volatile sun.security.provider.SecureRandom mixRandom;
 
-        // buffer for /dev/urandom bits
-        private final byte[] urandomBuffer;
+        // buffer for next bits
+        private final byte[] nextBuffer;
 
-        // number of bytes left in urandomBuffer
+        // number of bytes left in nextBuffer
         private int buffered;
 
-        // time we read the data into the urandomBuffer
+        // time we read the data into the nextBuffer
         private long lastRead;
 
         // mutex lock for nextBytes()
         private final Object LOCK_GET_BYTES = new Object();
 
-        // mutex lock for getSeed()
+        // mutex lock for generateSeed()
         private final Object LOCK_GET_SEED = new Object();
 
         // mutex lock for setSeed()
         private final Object LOCK_SET_SEED = new Object();
 
         // constructor, called only once from initIO()
-        private RandomIO(File randomFile, File urandomFile) throws IOException {
-            randomIn = new FileInputStream(randomFile);
-            urandomIn = new FileInputStream(urandomFile);
-            urandomBuffer = new byte[BUFFER_SIZE];
+        private RandomIO(File seedFile, File nextFile) throws IOException {
+            this.seedFile = seedFile;
+            seedIn = new FileInputStream(seedFile);
+            nextIn = new FileInputStream(nextFile);
+            nextBuffer = new byte[BUFFER_SIZE];
         }
 
         // get the SHA1PRNG for mixing
@@ -179,7 +387,7 @@
                         r = new sun.security.provider.SecureRandom();
                         try {
                             byte[] b = new byte[20];
-                            readFully(urandomIn, b);
+                            readFully(nextIn, b);
                             r.engineSetSeed(b);
                         } catch (IOException e) {
                             throw new ProviderException("init failed", e);
@@ -192,7 +400,7 @@
         }
 
         // read data.length bytes from in
-        // /dev/[u]random are not normal files, so we need to loop the read.
+        // These are not normal files, so we need to loop the read.
         // just keep trying as long as we are making progress
         private static void readFully(InputStream in, byte[] data)
                 throws IOException {
@@ -201,22 +409,22 @@
             while (len > 0) {
                 int k = in.read(data, ofs, len);
                 if (k <= 0) {
-                    throw new EOFException("/dev/[u]random closed?");
+                    throw new EOFException("File(s) closed?");
                 }
                 ofs += k;
                 len -= k;
             }
             if (len > 0) {
-                throw new IOException("Could not read from /dev/[u]random");
+                throw new IOException("Could not read from file(s)");
             }
         }
 
-        // get true random bytes, just read from /dev/random
+        // get true random bytes, just read from "seed"
         private byte[] implGenerateSeed(int numBytes) {
             synchronized (LOCK_GET_SEED) {
                 try {
                     byte[] b = new byte[numBytes];
-                    readFully(randomIn, b);
+                    readFully(seedIn, b);
                     return b;
                 } catch (IOException e) {
                     throw new ProviderException("generateSeed() failed", e);
@@ -225,26 +433,27 @@
         }
 
         // supply random bytes to the OS
-        // write to /dev/random if possible
+        // write to "seed" if possible
         // always add the seed to our mixing random
         private void implSetSeed(byte[] seed) {
             synchronized (LOCK_SET_SEED) {
-                if (randomOutInitialized == false) {
-                    randomOutInitialized = true;
-                    randomOut = AccessController.doPrivileged(
+                if (seedOutInitialized == false) {
+                    seedOutInitialized = true;
+                    seedOut = AccessController.doPrivileged(
                             new PrivilegedAction<OutputStream>() {
+                        @Override
                         public OutputStream run() {
                             try {
-                                return new FileOutputStream(NAME_RANDOM, true);
+                                return new FileOutputStream(seedFile, true);
                             } catch (Exception e) {
                                 return null;
                             }
                         }
                     });
                 }
-                if (randomOut != null) {
+                if (seedOut != null) {
                     try {
-                        randomOut.write(seed);
+                        seedOut.write(seed);
                     } catch (IOException e) {
                         throw new ProviderException("setSeed() failed", e);
                     }
@@ -261,12 +470,12 @@
                 return;
             }
             lastRead = time;
-            readFully(urandomIn, urandomBuffer);
-            buffered = urandomBuffer.length;
+            readFully(nextIn, nextBuffer);
+            buffered = nextBuffer.length;
         }
 
         // get pseudo random bytes
-        // read from /dev/urandom and XOR with bytes generated by the
+        // read from "next" and XOR with bytes generated by the
         // mixing SHA1PRNG
         private void implNextBytes(byte[] data) {
             synchronized (LOCK_GET_BYTES) {
@@ -276,9 +485,9 @@
                     int ofs = 0;
                     while (len > 0) {
                         ensureBufferValid();
-                        int bufferOfs = urandomBuffer.length - buffered;
+                        int bufferOfs = nextBuffer.length - buffered;
                         while ((len > 0) && (buffered > 0)) {
-                            data[ofs++] ^= urandomBuffer[bufferOfs++];
+                            data[ofs++] ^= nextBuffer[bufferOfs++];
                             len--;
                             buffered--;
                         }
@@ -288,7 +497,5 @@
                 }
             }
         }
-
     }
-
 }
--- a/src/solaris/classes/sun/security/provider/NativeSeedGenerator.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/classes/sun/security/provider/NativeSeedGenerator.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,8 +34,8 @@
  */
 class NativeSeedGenerator extends SeedGenerator.URLSeedGenerator {
 
-    NativeSeedGenerator() throws IOException {
-        super();
+    NativeSeedGenerator(String seedFile) throws IOException {
+        super(seedFile);
     }
 
 }
--- a/src/solaris/javavm/export/jni_md.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/javavm/export/jni_md.h	Wed Apr 17 21:48:04 2013 -0700
@@ -26,8 +26,17 @@
 #ifndef _JAVASOFT_JNI_MD_H_
 #define _JAVASOFT_JNI_MD_H_
 
-#define JNIEXPORT
-#define JNIIMPORT
+#ifndef __has_attribute
+  #define __has_attribute(x) 0
+#endif
+#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
+  #define JNIEXPORT     __attribute__((visibility("default")))
+  #define JNIIMPORT     __attribute__((visibility("default")))
+#else
+  #define JNIEXPORT
+  #define JNIIMPORT
+#endif
+
 #define JNICALL
 
 typedef int jint;
--- a/src/solaris/native/java/lang/ProcessEnvironment_md.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/native/java/lang/ProcessEnvironment_md.c	Wed Apr 17 21:48:04 2013 -0700
@@ -31,21 +31,24 @@
 #ifdef __APPLE__
 #include <crt_externs.h>
 #define environ (*_NSGetEnviron())
+#else
+/* This is one of the rare times it's more portable to declare an
+ * external symbol explicitly, rather than via a system header.
+ * The declaration is standardized as part of UNIX98, but there is
+ * no standard (not even de-facto) header file where the
+ * declaration is to be found.  See:
+ * http://www.opengroup.org/onlinepubs/009695399/functions/environ.html
+ * http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html
+ *
+ * "All identifiers in this volume of IEEE Std 1003.1-2001, except
+ * environ, are defined in at least one of the headers" (!)
+ */
+extern char **environ;
 #endif
 
 JNIEXPORT jobjectArray JNICALL
 Java_java_lang_ProcessEnvironment_environ(JNIEnv *env, jclass ign)
 {
-    /* This is one of the rare times it's more portable to declare an
-     * external symbol explicitly, rather than via a system header.
-     * The declaration is standardized as part of UNIX98, but there is
-     * no standard (not even de-facto) header file where the
-     * declaration is to be found.  See:
-     * http://www.opengroup.org/onlinepubs/007908799/xbd/envvar.html */
-#ifndef __APPLE__
-    extern char ** environ; /* environ[i] looks like: VAR=VALUE\0 */
-#endif
-
     jsize count = 0;
     jsize i, j;
     jobjectArray result;
--- a/src/solaris/native/java/lang/UNIXProcess_md.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/native/java/lang/UNIXProcess_md.c	Wed Apr 17 21:48:04 2013 -0700
@@ -52,6 +52,19 @@
 #ifdef __APPLE__
 #include <crt_externs.h>
 #define environ (*_NSGetEnviron())
+#else
+/* This is one of the rare times it's more portable to declare an
+ * external symbol explicitly, rather than via a system header.
+ * The declaration is standardized as part of UNIX98, but there is
+ * no standard (not even de-facto) header file where the
+ * declaration is to be found.  See:
+ * http://www.opengroup.org/onlinepubs/009695399/functions/environ.html
+ * http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html
+ *
+ * "All identifiers in this volume of IEEE Std 1003.1-2001, except
+ * environ, are defined in at least one of the headers" (!)
+ */
+extern char **environ;
 #endif
 
 /*
@@ -152,19 +165,6 @@
   } while((_result == -1) && (errno == EINTR)); \
 } while(0)
 
-/* This is one of the rare times it's more portable to declare an
- * external symbol explicitly, rather than via a system header.
- * The declaration is standardized as part of UNIX98, but there is
- * no standard (not even de-facto) header file where the
- * declaration is to be found.  See:
- * http://www.opengroup.org/onlinepubs/009695399/functions/environ.html
- * http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html
- *
- * "All identifiers in this volume of IEEE Std 1003.1-2001, except
- * environ, are defined in at least one of the headers" (!)
- */
-extern char **environ;
-
 
 static void
 setSIGCHLDHandler(JNIEnv *env)
@@ -241,52 +241,41 @@
 }
 
 static const char * const *
-splitPath(JNIEnv *env, const char *path)
+effectivePathv(JNIEnv *env)
 {
-    const char *p, *q;
-    char **pathv;
+    char *p;
     int i;
+    const char *path = effectivePath();
     int count = countOccurrences(path, ':') + 1;
+    size_t pathvsize = sizeof(const char *) * (count+1);
+    size_t pathsize = strlen(path) + 1;
+    const char **pathv = (const char **) xmalloc(env, pathvsize + pathsize);
 
-    pathv = NEW(char*, count+1);
+    if (pathv == NULL)
+        return NULL;
+    p = (char *) pathv + pathvsize;
+    memcpy(p, path, pathsize);
+    /* split PATH by replacing ':' with NULs; empty components => "." */
+    for (i = 0; i < count; i++) {
+        char *q = p + strcspn(p, ":");
+        pathv[i] = (p == q) ? "." : p;
+        *q = '\0';
+        p = q + 1;
+    }
     pathv[count] = NULL;
-    for (p = path, i = 0; i < count; i++, p = q + 1) {
-        for (q = p; (*q != ':') && (*q != '\0'); q++)
-            ;
-        if (q == p)             /* empty PATH component => "." */
-            pathv[i] = "./";
-        else {
-            int addSlash = ((*(q - 1)) != '/');
-            pathv[i] = NEW(char, q - p + addSlash + 1);
-            memcpy(pathv[i], p, q - p);
-            if (addSlash)
-                pathv[i][q - p] = '/';
-            pathv[i][q - p + addSlash] = '\0';
-        }
-    }
-    return (const char * const *) pathv;
+    return pathv;
 }
 
 /**
- * Cached value of JVM's effective PATH.
+ * The cached and split version of the JDK's effective PATH.
  * (We don't support putenv("PATH=...") in native code)
  */
-static const char *parentPath;
-
-/**
- * Split, canonicalized version of parentPath
- */
 static const char * const *parentPathv;
 
-static jfieldID field_exitcode;
-
 JNIEXPORT void JNICALL
-Java_java_lang_UNIXProcess_initIDs(JNIEnv *env, jclass clazz)
+Java_java_lang_UNIXProcess_init(JNIEnv *env, jclass clazz)
 {
-    field_exitcode = (*env)->GetFieldID(env, clazz, "exitcode", "I");
-
-    parentPath  = effectivePath();
-    parentPathv = splitPath(env, parentPath);
+    parentPathv = effectivePathv(env);
 
     setSIGCHLDHandler(env);
 }
@@ -486,6 +475,9 @@
     }
     /* ASCII Decimal representation uses 2.4 times as many bits as binary. */
     errmsg = NEW(char, strlen(format) + strlen(detail) + 3 * sizeof(errnum));
+    if (errmsg == NULL)
+        return;
+
     sprintf(errmsg, format, errnum, detail);
     s = JNU_NewStringPlatform(env, errmsg);
     if (s != NULL) {
@@ -590,11 +582,13 @@
         for (dirs = parentPathv; *dirs; dirs++) {
             const char * dir = *dirs;
             int dirlen = strlen(dir);
-            if (filelen + dirlen + 1 >= PATH_MAX) {
+            if (filelen + dirlen + 2 >= PATH_MAX) {
                 errno = ENAMETOOLONG;
                 continue;
             }
             memcpy(expanded_file, dir, dirlen);
+            if (expanded_file[dirlen - 1] != '/')
+                expanded_file[dirlen++] = '/';
             memcpy(expanded_file + dirlen, file, filelen);
             expanded_file[dirlen + filelen] = '\0';
             execve_with_shell_fallback(expanded_file, argv, envp);
--- a/src/solaris/native/java/net/Inet4AddressImpl.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/native/java/net/Inet4AddressImpl.c	Wed Apr 17 21:48:04 2013 -0700
@@ -135,9 +135,6 @@
       ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address");
       ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls);
       ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "<init>", "()V");
-      ni_iaaddressID = (*env)->GetFieldID(env, ni_iacls, "address", "I");
-      ni_iafamilyID = (*env)->GetFieldID(env, ni_iacls, "family", "I");
-      ni_iahostID = (*env)->GetFieldID(env, ni_iacls, "hostName", "Ljava/lang/String;");
       initialized = 1;
     }
 
@@ -238,9 +235,8 @@
                 ret = NULL;
                 goto cleanupAndReturn;
             }
-            (*env)->SetIntField(env, iaObj, ni_iaaddressID,
-                                ntohl(((struct sockaddr_in*)(iterator->ai_addr))->sin_addr.s_addr));
-            (*env)->SetObjectField(env, iaObj, ni_iahostID, name);
+            setInetAddress_addr(env, iaObj, ntohl(((struct sockaddr_in*)(iterator->ai_addr))->sin_addr.s_addr));
+            setInetAddress_hostName(env, iaObj, name);
             (*env)->SetObjectArrayElement(env, ret, retLen - i -1, iaObj);
             i++;
             iterator = iterator->ai_next;
@@ -372,9 +368,6 @@
 static jclass ni_iacls;
 static jclass ni_ia4cls;
 static jmethodID ni_ia4ctrID;
-static jfieldID ni_iaaddressID;
-static jfieldID ni_iahostID;
-static jfieldID ni_iafamilyID;
 static int initialized = 0;
 
 /*
@@ -403,9 +396,6 @@
       ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address");
       ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls);
       ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "<init>", "()V");
-      ni_iaaddressID = (*env)->GetFieldID(env, ni_iacls, "address", "I");
-      ni_iafamilyID = (*env)->GetFieldID(env, ni_iacls, "family", "I");
-      ni_iahostID = (*env)->GetFieldID(env, ni_iacls, "hostName", "Ljava/lang/String;");
       initialized = 1;
     }
 
@@ -499,9 +489,8 @@
                 ret = NULL;
                 goto cleanupAndReturn;
             }
-            (*env)->SetIntField(env, iaObj, ni_iaaddressID,
-                                ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr));
-            (*env)->SetObjectField(env, iaObj, ni_iahostID, host);
+            setInetAddress_addr(env, iaObj, ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr));
+            setInetAddress_hostName(env, iaObj, host);
             (*env)->SetObjectArrayElement(env, ret, i++, iaObj);
             iterator = iterator->ai_next;
         }
--- a/src/solaris/native/java/net/Inet6AddressImpl.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/native/java/net/Inet6AddressImpl.c	Wed Apr 17 21:48:04 2013 -0700
@@ -120,9 +120,6 @@
 static jclass ni_ia6cls;
 static jmethodID ni_ia4ctrID;
 static jmethodID ni_ia6ctrID;
-static jfieldID ni_iaaddressID;
-static jfieldID ni_iahostID;
-static jfieldID ni_iafamilyID;
 static jfieldID ni_ia6ipaddressID;
 static int initialized = 0;
 
@@ -159,9 +156,6 @@
       ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls);
       ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "<init>", "()V");
       ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "<init>", "()V");
-      ni_iaaddressID = (*env)->GetFieldID(env, ni_iacls, "address", "I");
-      ni_iafamilyID = (*env)->GetFieldID(env, ni_iacls, "family", "I");
-      ni_iahostID = (*env)->GetFieldID(env, ni_iacls, "hostName", "Ljava/lang/String;");
       ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B");
       initialized = 1;
     }
@@ -315,9 +309,8 @@
                     ret = NULL;
                     goto cleanupAndReturn;
                 }
-                (*env)->SetIntField(env, iaObj, ni_iaaddressID,
-                                    ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr));
-                (*env)->SetObjectField(env, iaObj, ni_iahostID, host);
+                setInetAddress_addr(env, iaObj, ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr));
+                setInetAddress_hostName(env, iaObj, host);
                 (*env)->SetObjectArrayElement(env, ret, inetIndex, iaObj);
                 inetIndex++;
             } else if (iterator->ai_family == AF_INET6) {
@@ -342,7 +335,7 @@
                     (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE);
                 }
                 (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress);
-                (*env)->SetObjectField(env, iaObj, ni_iahostID, host);
+                setInetAddress_hostName(env, iaObj, host);
                 (*env)->SetObjectArrayElement(env, ret, inet6Index, iaObj);
                 inet6Index++;
             }
--- a/src/solaris/native/java/net/NetworkInterface.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/native/java/net/NetworkInterface.c	Wed Apr 17 21:48:04 2013 -0700
@@ -118,8 +118,6 @@
 static jmethodID ni_ia4ctrID;
 static jmethodID ni_ia6ctrID;
 static jmethodID ni_ibctrID;
-static jfieldID ni_iaaddressID;
-static jfieldID ni_iafamilyID;
 static jfieldID ni_ia6ipaddressID;
 static jfieldID ni_ibaddressID;
 static jfieldID ni_ib4broadcastID;
@@ -195,8 +193,6 @@
     ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "<init>", "()V");
     ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "<init>", "()V");
     ni_ibctrID = (*env)->GetMethodID(env, ni_ibcls, "<init>", "()V");
-    ni_iaaddressID = (*env)->GetFieldID(env, ni_iacls, "address", "I");
-    ni_iafamilyID = (*env)->GetFieldID(env, ni_iacls, "family", "I");
     ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B");
     ni_ibaddressID = (*env)->GetFieldID(env, ni_ibcls, "address", "Ljava/net/InetAddress;");
     ni_ib4broadcastID = (*env)->GetFieldID(env, ni_ibcls, "broadcast", "Ljava/net/Inet4Address;");
@@ -300,7 +296,7 @@
     netif *ifs, *curr;
 
 #ifdef AF_INET6
-    int family = (  (*env)->GetIntField(env, iaObj, ni_iafamilyID) == IPv4 ) ? AF_INET : AF_INET6;
+    int family = (getInetAddress_family(env, iaObj) == IPv4) ? AF_INET : AF_INET6;
 #else
     int family =  AF_INET;
 #endif
@@ -325,7 +321,7 @@
             if (family == addrP->family) {
                 if (family == AF_INET) {
                     int address1 = htonl(((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr);
-                    int address2 = (*env)->GetIntField(env, iaObj, ni_iaaddressID);
+                    int address2 = getInetAddress_addr(env, iaObj);
 
                     if (address1 == address2) {
                         match = JNI_TRUE;
@@ -651,7 +647,7 @@
         if (addrP->family == AF_INET) {
             iaObj = (*env)->NewObject(env, ni_ia4cls, ni_ia4ctrID);
             if (iaObj) {
-                 (*env)->SetIntField(env, iaObj, ni_iaaddressID, htonl(((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr));
+                 setInetAddress_addr(env, iaObj, htonl(((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr));
             }
             ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID);
             if (ibObj) {
@@ -660,8 +656,7 @@
                     jobject ia2Obj = NULL;
                     ia2Obj = (*env)->NewObject(env, ni_ia4cls, ni_ia4ctrID);
                     if (ia2Obj) {
-                       (*env)->SetIntField(env, ia2Obj, ni_iaaddressID,
-                                                               htonl(((struct sockaddr_in*)addrP->brdcast)->sin_addr.s_addr));
+                       setInetAddress_addr(env, ia2Obj, htonl(((struct sockaddr_in*)addrP->brdcast)->sin_addr.s_addr));
                        (*env)->SetObjectField(env, ibObj, ni_ib4broadcastID, ia2Obj);
                        (*env)->SetShortField(env, ibObj, ni_ib4maskID, addrP->mask);
                     }
--- a/src/solaris/native/java/net/PlainDatagramSocketImpl.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/native/java/net/PlainDatagramSocketImpl.c	Wed Apr 17 21:48:04 2013 -0700
@@ -552,14 +552,13 @@
 
     iaObj = NET_SockaddrToInetAddress(env, (struct sockaddr *)&remote_addr, &port);
 #ifdef AF_INET6
-    family = (*env)->GetIntField(env, iaObj, ia_familyID) == IPv4?
-        AF_INET : AF_INET6;
+    family = getInetAddress_family(env, iaObj) == IPv4? AF_INET : AF_INET6;
 #else
     family = AF_INET;
 #endif
     if (family == AF_INET) { /* this API can't handle IPV6 addresses */
-        int address = (*env)->GetIntField(env, iaObj, ia_addressID);
-        (*env)->SetIntField(env, addressObj, ia_addressID, address);
+        int address = getInetAddress_addr(env, iaObj);
+        setInetAddress_addr(env, addressObj, address);
     }
     return port;
 }
@@ -1028,23 +1027,18 @@
  */
 static void mcast_set_if_by_if_v4(JNIEnv *env, jobject this, int fd, jobject value) {
     static jfieldID ni_addrsID;
-    static jfieldID ia_addressID;
     struct in_addr in;
     jobjectArray addrArray;
     jsize len;
     jobject addr;
     int i;
 
-    if (ni_addrsID == NULL || ia_addressID == NULL) {
+    if (ni_addrsID == NULL ) {
         jclass c = (*env)->FindClass(env, "java/net/NetworkInterface");
         CHECK_NULL(c);
         ni_addrsID = (*env)->GetFieldID(env, c, "addrs",
                                         "[Ljava/net/InetAddress;");
         CHECK_NULL(ni_addrsID);
-        c = (*env)->FindClass(env,"java/net/InetAddress");
-        CHECK_NULL(c);
-        ia_addressID = (*env)->GetFieldID(env, c, "address", "I");
-        CHECK_NULL(ia_addressID);
     }
 
     addrArray = (*env)->GetObjectField(env, value, ni_addrsID);
@@ -1065,8 +1059,8 @@
      */
     for (i = 0; i < len; i++) {
         addr = (*env)->GetObjectArrayElement(env, addrArray, i);
-        if ((*env)->GetIntField(env, addr, ia_familyID) == IPv4) {
-            in.s_addr = htonl((*env)->GetIntField(env, addr, ia_addressID));
+        if (getInetAddress_family(env, addr) == IPv4) {
+            in.s_addr = htonl(getInetAddress_addr(env, addr));
             break;
         }
     }
@@ -1116,17 +1110,9 @@
  * Throw exception if failed.
  */
 static void mcast_set_if_by_addr_v4(JNIEnv *env, jobject this, int fd, jobject value) {
-    static jfieldID ia_addressID;
     struct in_addr in;
 
-    if (ia_addressID == NULL) {
-        jclass c = (*env)->FindClass(env,"java/net/InetAddress");
-        CHECK_NULL(c);
-        ia_addressID = (*env)->GetFieldID(env, c, "address", "I");
-        CHECK_NULL(ia_addressID);
-    }
-
-    in.s_addr = htonl( (*env)->GetIntField(env, value, ia_addressID) );
+    in.s_addr = htonl( getInetAddress_addr(env, value) );
 
     if (JVM_SetSockOpt(fd, IPPROTO_IP, IP_MULTICAST_IF,
                        (const char*)&in, sizeof(in)) < 0) {
@@ -1456,7 +1442,6 @@
     if (isIPV4) {
         static jclass inet4_class;
         static jmethodID inet4_ctrID;
-        static jfieldID inet4_addrID;
 
         static jclass ni_class;
         static jmethodID ni_ctrID;
@@ -1486,15 +1471,13 @@
             CHECK_NULL_RETURN(c, NULL);
             inet4_ctrID = (*env)->GetMethodID(env, c, "<init>", "()V");
             CHECK_NULL_RETURN(inet4_ctrID, NULL);
-            inet4_addrID = (*env)->GetFieldID(env, c, "address", "I");
-            CHECK_NULL_RETURN(inet4_addrID, NULL);
             inet4_class = (*env)->NewGlobalRef(env, c);
             CHECK_NULL_RETURN(inet4_class, NULL);
         }
         addr = (*env)->NewObject(env, inet4_class, inet4_ctrID, 0);
         CHECK_NULL_RETURN(addr, NULL);
 
-        (*env)->SetIntField(env, addr, inet4_addrID, ntohl(in.s_addr));
+        setInetAddress_addr(env, addr, ntohl(in.s_addr));
 
         /*
          * For IP_MULTICAST_IF return InetAddress
@@ -1942,7 +1925,7 @@
     ipv6_join_leave = ipv6_available();
 
 #ifdef __linux__
-    if ((*env)->GetIntField(env, iaObj, ia_familyID) == IPv4) {
+    if (getInetAddress_family(env, iaObj) == IPv4) {
         ipv6_join_leave = JNI_FALSE;
     }
 #endif
@@ -1989,7 +1972,7 @@
                     CHECK_NULL(ni_indexID);
                 }
 
-                mname.imr_multiaddr.s_addr = htonl((*env)->GetIntField(env, iaObj, ia_addressID));
+                mname.imr_multiaddr.s_addr = htonl(getInetAddress_addr(env, iaObj));
                 mname.imr_address.s_addr = 0;
                 mname.imr_ifindex =  (*env)->GetIntField(env, niObj, ni_indexID);
                 mname_len = sizeof(struct ip_mreqn);
@@ -2007,11 +1990,11 @@
                 }
                 addr = (*env)->GetObjectArrayElement(env, addrArray, 0);
 
-                mname.imr_multiaddr.s_addr = htonl((*env)->GetIntField(env, iaObj, ia_addressID));
+                mname.imr_multiaddr.s_addr = htonl(getInetAddress_addr(env, iaObj));
 #ifdef __linux__
-                mname.imr_address.s_addr = htonl((*env)->GetIntField(env, addr, ia_addressID));
+                mname.imr_address.s_addr = htonl(getInetAddress_addr(env, addr));
 #else
-                mname.imr_interface.s_addr = htonl((*env)->GetIntField(env, addr, ia_addressID));
+                mname.imr_interface.s_addr = htonl(getInetAddress_addr(env, addr));
 #endif
                 mname_len = sizeof(struct ip_mreq);
             }
@@ -2046,7 +2029,7 @@
                     return;
                 }
 
-                mname.imr_multiaddr.s_addr = htonl((*env)->GetIntField(env, iaObj, ia_addressID));
+                mname.imr_multiaddr.s_addr = htonl(getInetAddress_addr(env, iaObj));
                 mname.imr_address.s_addr = 0 ;
                 mname.imr_ifindex = index;
                 mname_len = sizeof(struct ip_mreqn);
@@ -2068,7 +2051,7 @@
 #else
                 mname.imr_interface.s_addr = in.s_addr;
 #endif
-                mname.imr_multiaddr.s_addr = htonl((*env)->GetIntField(env, iaObj, ia_addressID));
+                mname.imr_multiaddr.s_addr = htonl(getInetAddress_addr(env, iaObj));
                 mname_len = sizeof(struct ip_mreq);
             }
         }
@@ -2133,10 +2116,10 @@
         jbyte caddr[16];
         jint family;
         jint address;
-        family = (*env)->GetIntField(env, iaObj, ia_familyID) == IPv4? AF_INET : AF_INET6;
+        family = getInetAddress_family(env, iaObj) == IPv4? AF_INET : AF_INET6;
         if (family == AF_INET) { /* will convert to IPv4-mapped address */
             memset((char *) caddr, 0, 16);
-            address = (*env)->GetIntField(env, iaObj, ia_addressID);
+            address = getInetAddress_addr(env, iaObj);
 
             caddr[10] = 0xff;
             caddr[11] = 0xff;
--- a/src/solaris/native/java/net/net_util_md.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/native/java/net/net_util_md.c	Wed Apr 17 21:48:04 2013 -0700
@@ -777,7 +777,7 @@
 NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port, struct sockaddr *him,
                           int *len, jboolean v4MappedAddress) {
     jint family;
-    family = (*env)->GetIntField(env, iaObj, ia_familyID);
+    family = getInetAddress_family(env, iaObj);
 #ifdef AF_INET6
     /* needs work. 1. family 2. clean up him6 etc deallocate memory */
     if (ipv6_available() && !(family == IPv4 && v4MappedAddress == JNI_FALSE)) {
@@ -789,7 +789,7 @@
 
         if (family == IPv4) { /* will convert to IPv4-mapped address */
             memset((char *) caddr, 0, 16);
-            address = (*env)->GetIntField(env, iaObj, ia_addressID);
+            address = getInetAddress_addr(env, iaObj);
             if (address == INADDR_ANY) {
                 /* we would always prefer IPv6 wildcard address
                    caddr[10] = 0xff;
@@ -898,7 +898,7 @@
               return -1;
             }
             memset((char *) him4, 0, sizeof(struct sockaddr_in));
-            address = (*env)->GetIntField(env, iaObj, ia_addressID);
+            address = getInetAddress_addr(env, iaObj);
             him4->sin_port = htons((short) port);
             him4->sin_addr.s_addr = (uint32_t) htonl(address);
             him4->sin_family = AF_INET;
--- a/src/solaris/native/sun/awt/awt_LoadLibrary.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/solaris/native/sun/awt/awt_LoadLibrary.c	Wed Apr 17 21:48:04 2013 -0700
@@ -43,7 +43,7 @@
 
 static void *awtHandle = NULL;
 
-typedef JNIEXPORT jint JNICALL JNI_OnLoad_type(JavaVM *vm, void *reserved);
+typedef jint JNICALL JNI_OnLoad_type(JavaVM *vm, void *reserved);
 
 /* Initialize the Java VM instance variable when the library is
    first loaded */
@@ -206,7 +206,7 @@
                                      jobject frame, jstring jcommand)
 {
     /* type of the old backdoor function */
-    typedef JNIEXPORT void JNICALL
+    typedef void JNICALL
         XsessionWMcommand_type(JNIEnv *env, jobject this,
                                jobject frame, jstring jcommand);
 
@@ -234,7 +234,7 @@
 JNIEXPORT void JNICALL
 Java_sun_awt_motif_XsessionWMcommand_New(JNIEnv *env, jobjectArray jargv)
 {
-    typedef JNIEXPORT void JNICALL
+    typedef void JNICALL
         XsessionWMcommand_New_type(JNIEnv *env, jobjectArray jargv);
 
     static XsessionWMcommand_New_type *XsessionWMcommand = NULL;
--- a/src/windows/classes/java/lang/ProcessImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/classes/java/lang/ProcessImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -145,6 +145,88 @@
 
     }
 
+    // We guarantee the only command file execution for implicit [cmd.exe] run.
+    //    http://technet.microsoft.com/en-us/library/bb490954.aspx
+    private static final char CMD_BAT_ESCAPE[] = {' ', '\t', '<', '>', '&', '|', '^'};
+    private static final char WIN32_EXECUTABLE_ESCAPE[] = {' ', '\t', '<', '>'};
+
+    private static boolean isQuoted(boolean noQuotesInside, String arg,
+            String errorMessage) {
+        int lastPos = arg.length() - 1;
+        if (lastPos >=1 && arg.charAt(0) == '"' && arg.charAt(lastPos) == '"') {
+            // The argument has already been quoted.
+            if (noQuotesInside) {
+                if (arg.indexOf('"', 1) != lastPos) {
+                    // There is ["] inside.
+                    throw new IllegalArgumentException(errorMessage);
+                }
+            }
+            return true;
+        }
+        if (noQuotesInside) {
+            if (arg.indexOf('"') >= 0) {
+                // There is ["] inside.
+                throw new IllegalArgumentException(errorMessage);
+            }
+        }
+        return false;
+    }
+
+    private static boolean needsEscaping(boolean isCmdFile, String arg) {
+        // Switch off MS heuristic for internal ["].
+        // Please, use the explicit [cmd.exe] call
+        // if you need the internal ["].
+        //    Example: "cmd.exe", "/C", "Extended_MS_Syntax"
+
+        // For [.exe] or [.com] file the unpaired/internal ["]
+        // in the argument is not a problem.
+        boolean argIsQuoted = isQuoted(isCmdFile, arg,
+            "Argument has embedded quote, use the explicit CMD.EXE call.");
+
+        if (!argIsQuoted) {
+            char testEscape[] = isCmdFile
+                    ? CMD_BAT_ESCAPE
+                    : WIN32_EXECUTABLE_ESCAPE;
+            for (int i = 0; i < testEscape.length; ++i) {
+                if (arg.indexOf(testEscape[i]) >= 0) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    private static String getExecutablePath(String path)
+        throws IOException
+    {
+        boolean pathIsQuoted = isQuoted(true, path,
+                "Executable name has embedded quote, split the arguments");
+
+        // Win32 CreateProcess requires path to be normalized
+        File fileToRun = new File(pathIsQuoted
+            ? path.substring(1, path.length() - 1)
+            : path);
+
+        // From the [CreateProcess] function documentation:
+        //
+        // "If the file name does not contain an extension, .exe is appended.
+        // Therefore, if the file name extension is .com, this parameter
+        // must include the .com extension. If the file name ends in
+        // a period (.) with no extension, or if the file name contains a path,
+        // .exe is not appended."
+        //
+        // "If the file name !does not contain a directory path!,
+        // the system searches for the executable file in the following
+        // sequence:..."
+        //
+        // In practice ANY non-existent path is extended by [.exe] extension
+        // in the [CreateProcess] funcion with the only exception:
+        // the path ends by (.)
+
+        return fileToRun.getPath();
+    }
+
+
     private long handle = 0;
     private OutputStream stdin_stream;
     private InputStream stdout_stream;
@@ -157,30 +239,47 @@
                         final boolean redirectErrorStream)
         throws IOException
     {
-        // Win32 CreateProcess requires cmd[0] to be normalized
-        cmd[0] = new File(cmd[0]).getPath();
+        // The [executablePath] is not quoted for any case.
+        String executablePath = getExecutablePath(cmd[0]);
+
+        // We need to extend the argument verification procedure
+        // to guarantee the only command file execution for implicit [cmd.exe]
+        // run.
+        String upPath = executablePath.toUpperCase();
+        boolean isCmdFile = (upPath.endsWith(".CMD") || upPath.endsWith(".BAT"));
 
         StringBuilder cmdbuf = new StringBuilder(80);
-        for (int i = 0; i < cmd.length; i++) {
-            if (i > 0) {
-                cmdbuf.append(' ');
-            }
+
+        // Quotation protects from interpretation of the [path] argument as
+        // start of longer path with spaces. Quotation has no influence to
+        // [.exe] extension heuristic.
+        cmdbuf.append('"');
+        cmdbuf.append(executablePath);
+        cmdbuf.append('"');
+
+        for (int i = 1; i < cmd.length; i++) {
+            cmdbuf.append(' ');
             String s = cmd[i];
-            if (s.indexOf(' ') >= 0 || s.indexOf('\t') >= 0) {
-                if (s.charAt(0) != '"') {
-                    cmdbuf.append('"');
-                    cmdbuf.append(s);
-                    if (s.endsWith("\\")) {
-                        cmdbuf.append("\\");
-                    }
-                    cmdbuf.append('"');
-                } else if (s.endsWith("\"")) {
-                    /* The argument has already been quoted. */
-                    cmdbuf.append(s);
-                } else {
-                    /* Unmatched quote for the argument. */
-                    throw new IllegalArgumentException();
+            if (needsEscaping(isCmdFile, s)) {
+                cmdbuf.append('"');
+                cmdbuf.append(s);
+
+                // The code protects the [java.exe] and console command line
+                // parser, that interprets the [\"] combination as an escape
+                // sequence for the ["] char.
+                //     http://msdn.microsoft.com/en-us/library/17w5ykft.aspx
+                //
+                // If the argument is an FS path, doubling of the tail [\]
+                // char is not a problem for non-console applications.
+                //
+                // The [\"] sequence is not an escape sequence for the [cmd.exe]
+                // command line parser. The case of the [""] tail escape
+                // sequence could not be realized due to the argument validation
+                // procedure.
+                if (!isCmdFile && s.endsWith("\\")) {
+                    cmdbuf.append('\\');
                 }
+                cmdbuf.append('"');
             } else {
                 cmdbuf.append(s);
             }
--- a/src/windows/classes/java/net/DualStackPlainSocketImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/classes/java/net/DualStackPlainSocketImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -152,8 +152,9 @@
         if (!fd.valid())
             return;
 
-        close0(fdAccess.get(fd));
+        final int nativefd = fdAccess.get(fd);
         fdAccess.set(fd, -1);
+        close0(nativefd);
     }
 
     void socketShutdown(int howto) throws IOException {
--- a/src/windows/classes/java/net/TwoStacksPlainDatagramSocketImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/classes/java/net/TwoStacksPlainDatagramSocketImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -102,7 +102,7 @@
             if ((fd != null && fd1 != null) && !connected) {
                 return anyLocalBoundAddr;
             }
-            int family = connectedAddress == null ? -1 : connectedAddress.family;
+            int family = connectedAddress == null ? -1 : connectedAddress.holder().getFamily();
             return socketLocalAddress(family);
         } else
             return super.getOption(optID);
--- a/src/windows/classes/sun/awt/windows/WFileDialogPeer.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/classes/sun/awt/windows/WFileDialogPeer.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -237,7 +237,7 @@
 
     // unused methods.  Overridden to disable this functionality as
     // it requires HWND which is not available for FileDialog
-    public void setAlwaysOnTop(boolean value) {}
+    public void updateAlwaysOnTopState() {}
     public void setDirectory(String dir) {}
     public void setFile(String file) {}
     public void setTitle(String title) {}
--- a/src/windows/classes/sun/awt/windows/WPrintDialogPeer.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/classes/sun/awt/windows/WPrintDialogPeer.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -117,7 +117,7 @@
     // unused methods.  Overridden to disable this functionality as
     // it requires HWND which is not available for FileDialog
     void initialize() {}
-    public void setAlwaysOnTop(boolean b) {}
+    public void updateAlwaysOnTopState() {}
     public void setResizable(boolean resizable) {}
     public void hide() {}
     public void enable() {}
--- a/src/windows/classes/sun/awt/windows/WWindowPeer.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/classes/sun/awt/windows/WWindowPeer.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -132,6 +132,10 @@
         }
     }
 
+    public void updateAlwaysOnTopState() {
+        setAlwaysOnTop(((Window)target).isAlwaysOnTop());
+    }
+
     public void updateFocusableWindowState() {
         setFocusableWindow(((Window)target).isFocusableWindow());
     }
--- a/src/windows/classes/sun/nio/ch/FileDispatcherImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/classes/sun/nio/ch/FileDispatcherImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -49,18 +49,21 @@
         this(false);
     }
 
+    @Override
+    boolean needsPositionLock() {
+        return true;
+    }
+
     int read(FileDescriptor fd, long address, int len)
         throws IOException
     {
         return read0(fd, address, len);
     }
 
-    int pread(FileDescriptor fd, long address, int len,
-                             long position, Object lock) throws IOException
+    int pread(FileDescriptor fd, long address, int len, long position)
+        throws IOException
     {
-        synchronized(lock) {
-            return pread0(fd, address, len, position);
-        }
+        return pread0(fd, address, len, position);
     }
 
     long readv(FileDescriptor fd, long address, int len) throws IOException {
@@ -71,12 +74,10 @@
         return write0(fd, address, len, append);
     }
 
-    int pwrite(FileDescriptor fd, long address, int len,
-                             long position, Object lock) throws IOException
+    int pwrite(FileDescriptor fd, long address, int len, long position)
+        throws IOException
     {
-        synchronized(lock) {
-            return pwrite0(fd, address, len, position);
-        }
+        return pwrite0(fd, address, len, position);
     }
 
     long writev(FileDescriptor fd, long address, int len) throws IOException {
--- a/src/windows/classes/sun/security/mscapi/PRNG.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/classes/sun/security/mscapi/PRNG.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,6 +58,7 @@
      *
      * @param seed the seed.
      */
+    @Override
     protected void engineSetSeed(byte[] seed) {
         if (seed != null) {
             generateSeed(-1, seed);
@@ -69,6 +70,7 @@
      *
      * @param bytes the array to be filled in with random bytes.
      */
+    @Override
     protected void engineNextBytes(byte[] bytes) {
         if (bytes != null) {
             if (generateSeed(0, bytes) == null) {
@@ -85,6 +87,7 @@
      *
      * @return the seed bytes.
      */
+    @Override
     protected byte[] engineGenerateSeed(int numBytes) {
         byte[] seed = generateSeed(numBytes, null);
 
--- a/src/windows/classes/sun/security/provider/NativePRNG.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/classes/sun/security/provider/NativePRNG.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,4 +39,15 @@
         return false;
     }
 
+    public static final class NonBlocking {
+        static boolean isAvailable() {
+            return false;
+        }
+    }
+
+    public static final class Blocking {
+        static boolean isAvailable() {
+            return false;
+        }
+    }
 }
--- a/src/windows/classes/sun/security/provider/NativeSeedGenerator.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/classes/sun/security/provider/NativeSeedGenerator.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,7 +39,8 @@
      * @exception IOException if CryptoAPI seeds are not available
      * on this platform.
      */
-    NativeSeedGenerator() throws IOException {
+    NativeSeedGenerator(String seedFile) throws IOException {
+        // seedFile is ignored.
         super();
         // try generating two random bytes to see if CAPI is available
         if (!nativeGenerateSeed(new byte[2])) {
--- a/src/windows/native/java/net/Inet4AddressImpl.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/native/java/net/Inet4AddressImpl.c	Wed Apr 17 21:48:04 2013 -0700
@@ -114,9 +114,6 @@
 static jclass ni_iacls;
 static jclass ni_ia4cls;
 static jmethodID ni_ia4ctrID;
-static jfieldID ni_iaaddressID;
-static jfieldID ni_iahostID;
-static jfieldID ni_iafamilyID;
 static int initialized = 0;
 
 /*
@@ -149,9 +146,6 @@
       ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address");
       ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls);
       ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "<init>", "()V");
-      ni_iaaddressID = (*env)->GetFieldID(env, ni_iacls, "address", "I");
-      ni_iafamilyID = (*env)->GetFieldID(env, ni_iacls, "family", "I");
-      ni_iahostID = (*env)->GetFieldID(env, ni_iacls, "hostName", "Ljava/lang/String;");
       initialized = 1;
     }
 
@@ -208,8 +202,7 @@
           ret = NULL;
           goto cleanupAndReturn;
         }
-        (*env)->SetIntField(env, iaObj, ni_iaaddressID,
-                            ntohl(address));
+        setInetAddress_addr(env, iaObj, ntohl(address));
         (*env)->SetObjectArrayElement(env, ret, 0, iaObj);
         JNU_ReleaseStringPlatformChars(env, host, hostname);
         return ret;
@@ -242,9 +235,8 @@
             ret = NULL;
             goto cleanupAndReturn;
           }
-          (*env)->SetIntField(env, iaObj, ni_iaaddressID,
-                              ntohl((*addrp)->s_addr));
-          (*env)->SetObjectField(env, iaObj, ni_iahostID, host);
+          setInetAddress_addr(env, iaObj, ntohl((*addrp)->s_addr));
+          setInetAddress_hostName(env, iaObj, host);
           (*env)->SetObjectArrayElement(env, ret, i, iaObj);
           addrp++;
           i++;
--- a/src/windows/native/java/net/Inet6AddressImpl.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/native/java/net/Inet6AddressImpl.c	Wed Apr 17 21:48:04 2013 -0700
@@ -77,9 +77,6 @@
 static jclass ni_ia6cls;
 static jmethodID ni_ia4ctrID;
 static jmethodID ni_ia6ctrID;
-static jfieldID ni_iaaddressID;
-static jfieldID ni_iahostID;
-static jfieldID ni_iafamilyID;
 static jfieldID ni_ia6ipaddressID;
 static int initialized = 0;
 
@@ -104,9 +101,6 @@
       ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls);
       ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "<init>", "()V");
       ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "<init>", "()V");
-      ni_iaaddressID = (*env)->GetFieldID(env, ni_iacls, "address", "I");
-      ni_iafamilyID = (*env)->GetFieldID(env, ni_iacls, "family", "I");
-      ni_iahostID = (*env)->GetFieldID(env, ni_iacls, "hostName", "Ljava/lang/String;");
       ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B");
       initialized = 1;
     }
@@ -243,9 +237,8 @@
                 ret = NULL;
                 goto cleanupAndReturn;
               }
-              (*env)->SetIntField(env, iaObj, ni_iaaddressID,
-                                  ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr));
-              (*env)->SetObjectField(env, iaObj, ni_iahostID, host);
+              setInetAddress_addr(env, iaObj, ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr));
+              setInetAddress_hostName(env, iaObj, host);
               (*env)->SetObjectArrayElement(env, ret, inetIndex, iaObj);
                 inetIndex ++;
             } else if (iterator->ai_family == AF_INET6) {
@@ -269,7 +262,7 @@
                 (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE);
               }
               (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress);
-              (*env)->SetObjectField(env, iaObj, ni_iahostID, host);
+              setInetAddress_hostName(env, iaObj, host);
               (*env)->SetObjectArrayElement(env, ret, inet6Index, iaObj);
               inet6Index ++;
             }
--- a/src/windows/native/java/net/NetworkInterface.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/native/java/net/NetworkInterface.c	Wed Apr 17 21:48:04 2013 -0700
@@ -66,7 +66,6 @@
 jfieldID ni_displayNameID;  /* NetworkInterface.displayName */
 jfieldID ni_childsID;       /* NetworkInterface.childs */
 jclass ni_iacls;            /* InetAddress */
-jfieldID ni_iaAddr;         /* InetAddress.address */
 
 jclass ni_ia4cls;           /* Inet4Address */
 jmethodID ni_ia4Ctor;       /* Inet4Address() */
@@ -480,7 +479,6 @@
 
     ni_iacls = (*env)->FindClass(env, "java/net/InetAddress");
     ni_iacls = (*env)->NewGlobalRef(env, ni_iacls);
-    ni_iaAddr = (*env)->GetFieldID(env, ni_iacls, "address", "I");
 
     ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address");
     ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls);
@@ -568,7 +566,7 @@
             }
             /* default ctor will set family to AF_INET */
 
-            (*env)->SetIntField(env, iaObj, ni_iaAddr, ntohl(addrs->addr.him4.sin_addr.s_addr));
+            setInetAddress_addr(env, iaObj, ntohl(addrs->addr.him4.sin_addr.s_addr));
             if (addrs->mask != -1) {
               ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID);
               if (ibObj == NULL) {
@@ -581,8 +579,7 @@
                 free_netaddr(netaddrP);
                 return NULL;
               }
-              (*env)->SetIntField(env, ia2Obj, ni_iaAddr,
-                                  ntohl(addrs->brdcast.him4.sin_addr.s_addr));
+              setInetAddress_addr(env, ia2Obj, ntohl(addrs->brdcast.him4.sin_addr.s_addr));
               (*env)->SetObjectField(env, ibObj, ni_ibbroadcastID, ia2Obj);
               (*env)->SetShortField(env, ibObj, ni_ibmaskID, addrs->mask);
               (*env)->SetObjectArrayElement(env, bindsArr, bind_index++, ibObj);
@@ -736,7 +733,7 @@
     (JNIEnv *env, jclass cls, jobject iaObj)
 {
     netif *ifList, *curr;
-    jint addr = (*env)->GetIntField(env, iaObj, ni_iaAddr);
+    jint addr = getInetAddress_addr(env, iaObj);
     jobject netifObj = NULL;
 
     // Retained for now to support IPv4 only stack, java.net.preferIPv4Stack
--- a/src/windows/native/java/net/NetworkInterface.h	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/native/java/net/NetworkInterface.h	Wed Apr 17 21:48:04 2013 -0700
@@ -71,7 +71,6 @@
 extern jfieldID ni_childsID;        /* NetworkInterface.childs */
 
 extern jclass ni_iacls;             /* InetAddress */
-extern jfieldID ni_iaAddr;          /* InetAddress.address */
 
 extern jclass ni_ia4cls;            /* Inet4Address */
 extern jmethodID ni_ia4Ctor;        /* Inet4Address() */
--- a/src/windows/native/java/net/NetworkInterface_winXP.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/native/java/net/NetworkInterface_winXP.c	Wed Apr 17 21:48:04 2013 -0700
@@ -33,6 +33,7 @@
 #include "jni_util.h"
 
 #include "NetworkInterface.h"
+#include "net_util.h"
 
 /*
  * Windows implementation of the java.net.NetworkInterface native methods.
@@ -477,7 +478,7 @@
             }
             /* default ctor will set family to AF_INET */
 
-            (*env)->SetIntField(env, iaObj, ni_iaAddr, ntohl(addrs->addr.him4.sin_addr.s_addr));
+            setInetAddress_addr(env, iaObj, ntohl(addrs->addr.him4.sin_addr.s_addr));
 
             ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID);
             if (ibObj == NULL) {
@@ -490,8 +491,7 @@
               free_netaddr(netaddrP);
               return NULL;
             }
-            (*env)->SetIntField(env, ia2Obj, ni_iaAddr,
-                                ntohl(addrs->brdcast.him4.sin_addr.s_addr));
+            setInetAddress_addr(env, ia2Obj, ntohl(addrs->brdcast.him4.sin_addr.s_addr));
             (*env)->SetObjectField(env, ibObj, ni_ibbroadcastID, ia2Obj);
             (*env)->SetShortField(env, ibObj, ni_ibmaskID, addrs->mask);
             (*env)->SetObjectArrayElement(env, bindsArr, bind_index++, ibObj);
--- a/src/windows/native/java/net/SocketInputStream.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/native/java/net/SocketInputStream.c	Wed Apr 17 21:48:04 2013 -0700
@@ -134,32 +134,35 @@
         (*env)->SetByteArrayRegion(env, data, off, nread, (jbyte *)bufP);
     } else {
         if (nread < 0) {
-            /*
-             * Recv failed.
-             */
-            switch (WSAGetLastError()) {
-                case WSAEINTR:
-                    JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                        "socket closed");
-                    break;
+            // Check if the socket has been closed since we last checked.
+            // This could be a reason for recv failing.
+            if ((*env)->GetIntField(env, fdObj, IO_fd_fdID) == -1) {
+                NET_ThrowSocketException(env, "Socket closed");
+            } else {
+                switch (WSAGetLastError()) {
+                    case WSAEINTR:
+                        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
+                            "socket closed");
+                        break;
 
-                case WSAECONNRESET:
-                case WSAESHUTDOWN:
-                    /*
-                     * Connection has been reset - Windows sometimes reports
-                     * the reset as a shutdown error.
-                     */
-                    JNU_ThrowByName(env, "sun/net/ConnectionResetException",
-                        "");
-                    break;
+                    case WSAECONNRESET:
+                    case WSAESHUTDOWN:
+                        /*
+                         * Connection has been reset - Windows sometimes reports
+                         * the reset as a shutdown error.
+                         */
+                        JNU_ThrowByName(env, "sun/net/ConnectionResetException",
+                            "");
+                        break;
 
-                case WSAETIMEDOUT :
-                    JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException",
-                                   "Read timed out");
-                    break;
+                    case WSAETIMEDOUT :
+                        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException",
+                                       "Read timed out");
+                        break;
 
-                default:
-                    NET_ThrowCurrent(env, "recv failed");
+                    default:
+                        NET_ThrowCurrent(env, "recv failed");
+                }
             }
         }
     }
--- a/src/windows/native/java/net/TwoStacksPlainDatagramSocketImpl.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/native/java/net/TwoStacksPlainDatagramSocketImpl.c	Wed Apr 17 21:48:04 2013 -0700
@@ -432,7 +432,7 @@
     int lcladdrlen;
     int address;
 
-    family = (*env)->GetIntField(env, addressObj, ia_familyID);
+    family = getInetAddress_family(env, addressObj);
     if (family == IPv6 && !ipv6_supported) {
         JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
                         "Protocol family not supported");
@@ -452,7 +452,7 @@
         JNU_ThrowNullPointerException(env, "argument address");
         return;
     } else {
-        address = (*env)->GetIntField(env, addressObj, ia_addressID);
+        address = getInetAddress_addr(env, addressObj);
     }
 
     if (NET_InetAddressToSockaddr(env, addressObj, port, (struct sockaddr *)&lcladdr, &lcladdrlen, JNI_FALSE) != 0) {
@@ -552,9 +552,9 @@
         return;
     }
 
-    addr = (*env)->GetIntField(env, address, ia_addressID);
+    addr = getInetAddress_addr(env, address);
 
-    family = (*env)->GetIntField(env, address, ia_familyID);
+    family = getInetAddress_family(env, address);
     if (family == IPv6 && !ipv6_supported) {
         JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
                         "Protocol family not supported");
@@ -670,7 +670,7 @@
         return;
     }
 
-    family = (*env)->GetIntField(env, iaObj, ia_familyID);
+    family = getInetAddress_family(env, iaObj);
     if (family == IPv4) {
         fdObj = (*env)->GetObjectField(env, this, pdsi_fdID);
     } else {
@@ -714,7 +714,7 @@
         if (!w2k_or_later) { /* avoid this check on Win 2K or better. Does not work with IPv6.
                       * Check is not necessary on these OSes */
             if (connected) {
-                address = (*env)->GetIntField(env, iaObj, ia_addressID);
+                address = getInetAddress_addr(env, iaObj);
             } else {
                 address = ntohl(rmtaddr.him4.sin_addr.s_addr);
             }
@@ -823,7 +823,7 @@
     if (IS_NULL(addressObj)) {
         JNU_ThrowNullPointerException(env, "Null address in peek()");
     } else {
-        address = (*env)->GetIntField(env, addressObj, ia_addressID);
+        address = getInetAddress_addr(env, addressObj);
         /* We only handle IPv4 for now. Will support IPv6 once its in the os */
         family = AF_INET;
     }
@@ -905,9 +905,8 @@
         JNU_ThrowByName(env, JNU_JAVAIOPKG "InterruptedIOException", 0);
         return 0;
     }
-    (*env)->SetIntField(env, addressObj, ia_addressID,
-                        ntohl(remote_addr.sin_addr.s_addr));
-    (*env)->SetIntField(env, addressObj, ia_familyID, IPv4);
+    setInetAddress_addr(env, addressObj, ntohl(remote_addr.sin_addr.s_addr));
+    setInetAddress_family(env, addressObj, IPv4);
 
     /* return port */
     return ntohs(remote_addr.sin_port);
@@ -1574,21 +1573,16 @@
 {
     jobjectArray addrArray;
     static jfieldID ni_addrsID=0;
-    static jfieldID ia_familyID=0;
     jsize len;
     jobject addr;
     int i;
 
-    if (ni_addrsID == NULL || ia_familyID == NULL) {
+    if (ni_addrsID == NULL ) {
         jclass c = (*env)->FindClass(env, "java/net/NetworkInterface");
         CHECK_NULL_RETURN (c, -1);
         ni_addrsID = (*env)->GetFieldID(env, c, "addrs",
                                         "[Ljava/net/InetAddress;");
         CHECK_NULL_RETURN (ni_addrsID, -1);
-        c = (*env)->FindClass(env,"java/net/InetAddress");
-        CHECK_NULL_RETURN (c, -1);
-        ia_familyID = (*env)->GetFieldID(env, c, "family", "I");
-        CHECK_NULL_RETURN (ia_familyID, -1);
     }
 
     addrArray = (*env)->GetObjectField(env, nif, ni_addrsID);
@@ -1606,7 +1600,7 @@
     for (i=0; i<len; i++) {
         int fam;
         addr = (*env)->GetObjectArrayElement(env, addrArray, i);
-        fam = (*env)->GetIntField(env, addr, ia_familyID);
+        fam = getInetAddress_family(env, addr);
         if (fam == family) {
             *iaddr = addr;
             return 0;
@@ -1618,20 +1612,13 @@
 static int getInet4AddrFromIf (JNIEnv *env, jobject nif, struct in_addr *iaddr)
 {
     jobject addr;
-    static jfieldID ia_addressID;
 
     int ret = getInetAddrFromIf (env, IPv4, nif, &addr);
     if (ret == -1) {
         return -1;
     }
 
-    if (ia_addressID == 0) {
-        jclass c = (*env)->FindClass(env,"java/net/InetAddress");
-        CHECK_NULL_RETURN (c, -1);
-        ia_addressID = (*env)->GetFieldID(env, c, "address", "I");
-        CHECK_NULL_RETURN (ia_addressID, -1);
-    }
-    iaddr->s_addr = htonl((*env)->GetIntField(env, addr, ia_addressID));
+    iaddr->s_addr = htonl(getInetAddress_addr(env, addr));
     return 0;
 }
 
@@ -1706,17 +1693,9 @@
             }
             opt = java_net_SocketOptions_IP_MULTICAST_IF2;
         } else {
-            static jfieldID ia_addressID;
             struct in_addr in;
 
-            if (ia_addressID == NULL) {
-                        jclass c = (*env)->FindClass(env,"java/net/InetAddress");
-                CHECK_NULL(c);
-                ia_addressID = (*env)->GetFieldID(env, c, "address", "I");
-                CHECK_NULL(ia_addressID);
-            }
-
-            in.s_addr = htonl((*env)->GetIntField(env, value, ia_addressID));
+            in.s_addr = htonl(getInetAddress_addr(env, value));
 
             if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF,
                                (const char*)&in, sizeof(in)) < 0) {
@@ -1945,7 +1924,6 @@
     if (isIPV4) {
         static jclass inet4_class;
         static jmethodID inet4_ctrID;
-        static jfieldID inet4_addrID;
 
         static jclass ni_class;
         static jmethodID ni_ctrID;
@@ -1975,15 +1953,13 @@
             CHECK_NULL_RETURN(c, NULL);
             inet4_ctrID = (*env)->GetMethodID(env, c, "<init>", "()V");
             CHECK_NULL_RETURN(inet4_ctrID, NULL);
-            inet4_addrID = (*env)->GetFieldID(env, c, "address", "I");
-            CHECK_NULL_RETURN(inet4_addrID, NULL);
             inet4_class = (*env)->NewGlobalRef(env, c);
             CHECK_NULL_RETURN(inet4_class, NULL);
         }
         addr = (*env)->NewObject(env, inet4_class, inet4_ctrID, 0);
         CHECK_NULL_RETURN(addr, NULL);
 
-        (*env)->SetIntField(env, addr, inet4_addrID, ntohl(in.s_addr));
+        setInetAddress_addr(env, addr, ntohl(in.s_addr));
 
         /*
          * For IP_MULTICAST_IF return InetAddress
--- a/src/windows/native/java/net/TwoStacksPlainSocketImpl.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/native/java/net/TwoStacksPlainSocketImpl.c	Wed Apr 17 21:48:04 2013 -0700
@@ -411,7 +411,7 @@
     fdObj = (*env)->GetObjectField(env, this, psi_fdID);
     fd1Obj = (*env)->GetObjectField(env, this, psi_fd1ID);
 
-    family = (*env)->GetIntField(env, iaObj, ia_familyID);
+    family = getInetAddress_family(env, iaObj);
 
     if (family == IPv6 && !ipv6_supported) {
         JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
@@ -724,9 +724,8 @@
             return;
         }
 
-        (*env)->SetIntField(env, socketAddressObj, ia_addressID,
-                            ntohl(him.him4.sin_addr.s_addr));
-        (*env)->SetIntField(env, socketAddressObj, ia_familyID, IPv4);
+        setInetAddress_addr(env, socketAddressObj, ntohl(him.him4.sin_addr.s_addr));
+        setInetAddress_family(env, socketAddressObj, IPv4);
         (*env)->SetObjectField(env, socket, psi_addressID, socketAddressObj);
     } else {
         jbyteArray addr;
@@ -754,7 +753,7 @@
         }
         addr = (*env)->GetObjectField (env, socketAddressObj, ia6_ipaddressID);
         (*env)->SetByteArrayRegion (env, addr, 0, 16, (const char *)&him.him6.sin6_addr);
-        (*env)->SetIntField(env, socketAddressObj, ia_familyID, IPv6);
+        setInetAddress_family(env, socketAddressObj, IPv6);
         scope = him.him6.sin6_scope_id;
         (*env)->SetIntField(env, socketAddressObj, ia6_scopeidID, scope);
         if(scope>0) {
--- a/src/windows/native/java/net/net_util_md.c	Wed Apr 17 21:32:11 2013 -0700
+++ b/src/windows/native/java/net/net_util_md.c	Wed Apr 17 21:48:04 2013 -0700
@@ -804,7 +804,7 @@
 NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port, struct sockaddr *him,
                           int *len, jboolean v4MappedAddress) {
     jint family, iafam;
-    iafam = (*env)->GetIntField(env, iaObj, ia_familyID);
+    iafam = getInetAddress_family(env, iaObj);
     family = (iafam == IPv4)? AF_INET : AF_INET6;
     if (ipv6_available() && !(family == AF_INET && v4MappedAddress == JNI_FALSE)) {
         struct SOCKADDR_IN6 *him6 = (struct SOCKADDR_IN6 *)him;
@@ -815,7 +815,7 @@
 
         if (family == AF_INET) { /* will convert to IPv4-mapped address */
             memset((char *) caddr, 0, 16);
-            address = (*env)->GetIntField(env, iaObj, ia_addressID);
+            address = getInetAddress_addr(env, iaObj);
             if (address == INADDR_ANY) {
                 /* we would always prefer IPv6 wildcard address
                 caddr[10] = 0xff;
@@ -854,7 +854,7 @@
           return -1;
         }
         memset((char *) him4, 0, sizeof(struct sockaddr_in));
-        address = (int)(*env)->GetIntField(env, iaObj, ia_addressID);
+        address = getInetAddress_addr(env, iaObj);
         him4->sin_port = htons((short) port);
         him4->sin_addr.s_addr = (u_long) htonl(address);
         him4->sin_family = AF_INET;
--- a/test/Makefile	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/Makefile	Wed Apr 17 21:48:04 2013 -0700
@@ -478,7 +478,7 @@
 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 JDK_ALL_TARGETS += jdk_lang
 JDK_DEFAULT_TARGETS += jdk_lang
-jdk_lang: $(call TestDirs, java/lang sun/invoke sun/misc vm)
+jdk_lang: $(call TestDirs, java/lang sun/invoke sun/misc sun/reflect vm)
 	$(call RunAgentvmBatch)
 
 # Stable othervm testruns (minus items from PROBLEM_LIST)
@@ -513,8 +513,9 @@
           javax/script \
 	  java/sql javax/sql \
           javax/smartcardio \
+          javax/xml/jaxp \
 	  javax/xml/soap \
-	  javax/xml/ws com/sun/internal/ws \
+	  javax/xml/ws com/sun/internal/ws com/sun/org/glassfish \
 	  jdk/asm \
 	  com/sun/org/apache/xerces \
           com/sun/corba \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/crypto/provider/Cipher/PBE/NegativeLength.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8001596
+ * @summary Incorrect condition check in PBKDF2KeyImpl.java
+ */
+
+import java.security.*;
+import java.security.spec.*;
+import javax.crypto.*;
+import javax.crypto.spec.*;
+import java.lang.reflect.*;
+
+public class NegativeLength {
+
+    public static void main(String[] args) throws Exception {
+        SecretKeyFactory skf = SecretKeyFactory.getInstance(
+            "PBKDF2WithHmacSHA1", "SunJCE");
+
+        // Create a valid PBEKeySpec
+        PBEKeySpec pbeks = new PBEKeySpec(
+            new char['p'], new byte[1], 1024, 8);
+
+        // Use reflection to set it negative.
+        Class c = pbeks.getClass();
+        Field f = c.getDeclaredField("keyLength");
+        f.setAccessible(true);
+        f.setInt(pbeks, -8);
+
+        System.out.println("pbeks.getKeyLength(): " + pbeks.getKeyLength());
+
+        try {
+
+            // A negative length is clearly wrong, we should get a
+            // InvalidKeySpecException.  Anything else is wrong.
+            skf.generateSecret(pbeks);
+            throw new Exception("We shouldn't get here.");
+        } catch (InvalidKeySpecException ike) {
+            // swallow, this is the exception we want.
+            System.out.println("Test Passed.");
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/crypto/provider/Cipher/UTIL/SunJCEGetInstance.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7171982
+ * @summary Test that SunJCE.getInstance() is retrieving a provider when
+ * SunJCE has been removed from the provider list.
+ * @run main/othervm SunJCEGetInstance
+ */
+
+import java.security.Security;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+
+
+public class SunJCEGetInstance {
+    public static void main(String[] args) throws Exception {
+        Cipher jce;
+
+        try{
+            // Remove SunJCE from Provider list
+            Security.removeProvider("SunJCE");
+
+            // Create our own instance of SunJCE provider.  Purposefully not
+            // using SunJCE.getInstance() so we can have our own instance
+            // for the test.
+            jce = Cipher.getInstance("AES/CBC/PKCS5Padding",
+                new com.sun.crypto.provider.SunJCE());
+
+            jce.init(Cipher.ENCRYPT_MODE,
+                new SecretKeySpec("1234567890abcedf".getBytes(), "AES"));
+            jce.doFinal("PlainText".getBytes());
+        } catch (Exception e) {
+            System.err.println("Setup failure:  ");
+            throw e;
+        }
+
+        // Get parameters which will call SunJCE.getInstance().  Failure
+        // would occur on this line.
+        try {
+            jce.getParameters().getEncoded();
+
+        } catch (Exception e) {
+            System.err.println("Test Failure");
+            throw e;
+        }
+        System.out.println("Passed");
+    }
+}
--- a/test/demo/zipfs/ZipFSTester.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/demo/zipfs/ZipFSTester.java	Wed Apr 17 21:48:04 2013 -0700
@@ -138,14 +138,31 @@
             Path dst3 = Paths.get(tmpName + "_Tmp");
             Files.move(dst2, dst3);
             checkEqual(src, dst3);
+            if (Files.exists(dst2))
+                throw new RuntimeException("Failed!");
+
+            // copyback + move
+            Files.copy(dst3, dst);
+            Path dst4 = getPathWithParents(fs, tmpName + "_Tmp0");
+            Files.move(dst, dst4);
+            checkEqual(src, dst4);
 
             // delete
-            if (Files.exists(dst2))
+            Files.delete(dst4);
+            if (Files.exists(dst4))
                 throw new RuntimeException("Failed!");
             Files.delete(dst3);
             if (Files.exists(dst3))
                 throw new RuntimeException("Failed!");
 
+            // move (existing entry)
+            Path dst5 = fs.getPath("META-INF/MANIFEST.MF");
+            if (Files.exists(dst5)) {
+                Path dst6 = fs.getPath("META-INF/MANIFEST.MF_TMP");
+                Files.move(dst5, dst6);
+                walk(fs.getPath("/"));
+            }
+
             // newInputStream on dir
             Path parent = dst2.getParent();
             try {
--- a/test/demo/zipfs/basic.sh	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/demo/zipfs/basic.sh	Wed Apr 17 21:48:04 2013 -0700
@@ -22,7 +22,7 @@
 #
 # @test
 # @bug 6990846 7009092 7009085 7015391 7014948 7005986 7017840 7007596
-# 7157656
+# 7157656 8002390
 # @summary Test ZipFileSystem demo
 # @build Basic PathOps ZipFSTester
 # @run shell basic.sh
--- a/test/java/lang/instrument/RedefineMethodWithAnnotations.sh	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/lang/instrument/RedefineMethodWithAnnotations.sh	Wed Apr 17 21:48:04 2013 -0700
@@ -68,11 +68,12 @@
     RedefineMethodWithAnnotationsAnnotations.java
 
 "${JAVA}" ${TESTVMOPTS} -javaagent:RedefineMethodWithAnnotationsAgent.jar \
+    -XX:+StressLdcRewrite -XX:+IgnoreUnrecognizedVMOptions \
     -cp "${TESTCLASSES}" RedefineMethodWithAnnotationsApp > output.log 2>&1
 cat output.log
 
-MESG="Exception"
-grep "$MESG" output.log
+MESG="Exception|fatal"
+egrep "$MESG" output.log
 result=$?
 if [ "$result" = 0 ]; then
     echo "FAIL: found '$MESG' in the test output"
--- a/test/java/lang/instrument/RedefineMethodWithAnnotationsTarget.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/lang/instrument/RedefineMethodWithAnnotationsTarget.java	Wed Apr 17 21:48:04 2013 -0700
@@ -27,7 +27,13 @@
  */
 public class RedefineMethodWithAnnotationsTarget {
     public void annotatedMethod(@ParameterAnnotation(
-            value = ParameterAnnotation.STRING_VALUE_1) String parameter) { }
+            value = ParameterAnnotation.STRING_VALUE_1) String parameter) {
+        System.out.println("First version of annotatedMethod(String)");
+        System.out.println("parameter is " + parameter);
+    }
     public void annotatedMethod(@ParameterAnnotation(
-            value = ParameterAnnotation.INT_VALUE_1) int parameter) { }
+            value = ParameterAnnotation.INT_VALUE_1) int parameter) {
+        System.out.println("First version of annotatedMethod(int)");
+        System.out.println("parameter is " + parameter);
+    }
 }
--- a/test/java/lang/instrument/RedefineMethodWithAnnotationsTarget_2.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/lang/instrument/RedefineMethodWithAnnotationsTarget_2.java	Wed Apr 17 21:48:04 2013 -0700
@@ -29,7 +29,13 @@
  */
 public class RedefineMethodWithAnnotationsTarget {
     public void annotatedMethod(@ParameterAnnotation(
-            value = ParameterAnnotation.INT_VALUE_2) int parameter) { }
+            value = ParameterAnnotation.INT_VALUE_2) int parameter) {
+        System.out.println("Second version of annotatedMethod(int)");
+        System.out.println("parameter is " + parameter);
+     }
     public void annotatedMethod(@ParameterAnnotation(
-            value = ParameterAnnotation.STRING_VALUE_2) String parameter) { }
+            value = ParameterAnnotation.STRING_VALUE_2) String parameter) {
+        System.out.println("Second version of annotatedMethod(String)");
+        System.out.println("parameter is " + parameter);
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/lambda/LambdaClassFinal.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8012028
+ * @summary Generated Lambda implementing class should be final
+ */
+
+import java.lang.reflect.Modifier;
+import java.io.Serializable;
+
+public class LambdaClassFinal {
+
+    interface I {
+        void m();
+    }
+
+    interface Iser extends Serializable {
+        void m();
+    }
+
+    static void assertTrue(boolean cond) {
+        if (!cond)
+            throw new AssertionError();
+    }
+
+    public static void main(String[] args) throws Exception {
+        new LambdaClassFinal().test();
+    }
+
+     void test() throws Exception {
+        I lam = () -> { };
+        assertTrue((lam.getClass().getModifiers() & Modifier.FINAL) != 0);
+        Iser slam = () -> { };
+        assertTrue((slam.getClass().getModifiers() & Modifier.FINAL) != 0);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/lambda/LambdaClassSynthetic.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8008941
+ * @summary Generated Lambda implementing class should be synthetic
+ */
+
+import java.lang.reflect.Modifier;
+import java.io.Serializable;
+
+public class LambdaClassSynthetic {
+
+    interface I {
+        void m();
+    }
+
+    interface Iser extends Serializable {
+        void m();
+    }
+
+    static void assertTrue(boolean cond) {
+        if (!cond)
+            throw new AssertionError();
+    }
+
+    public static void main(String[] args) throws Exception {
+        new LambdaClassFinal().test();
+    }
+
+    void test() throws Exception {
+        I lam = () -> { };
+        assertTrue(lam.getClass().isSynthetic());
+        Iser slam = () -> { };
+        assertTrue(slam.getClass().isSynthetic());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/reflect/Proxy/nonPublicProxy/NonPublicProxyClass.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,215 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.Proxy;
+import java.lang.reflect.ReflectPermission;
+import java.security.AccessControlException;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.security.SecurityPermission;
+import java.util.*;
+
+/*
+ * @test
+ * @bug 8004260
+ * @summary Test proxy classes that implement non-public interface
+ *
+ * @build p.Foo
+ * @run main/othervm NonPublicProxyClass grant
+ * @run main/othervm NonPublicProxyClass deny
+ * @run main/othervm NonPublicProxyClass
+ */
+public class NonPublicProxyClass {
+    public interface PublicInterface {
+        void foo();
+    }
+    interface NonPublicInterface {
+        void bar();
+    }
+
+    public static void main(String[] args) throws Exception {
+        ClassLoader loader = ClassLoader.getSystemClassLoader();
+        Class<?> zipConstantsClass = Class.forName("java.util.zip.ZipConstants", false, null);
+        Class<?> fooClass = Class.forName("p.Foo");
+
+        NonPublicProxyClass test1 =
+            new NonPublicProxyClass(loader, PublicInterface.class, NonPublicInterface.class);
+        NonPublicProxyClass test2 =
+            new NonPublicProxyClass(loader, fooClass, PublicInterface.class);
+        NonPublicProxyClass test3 =
+            new NonPublicProxyClass(null, zipConstantsClass);
+
+        if (args.length == 1) {
+            switch (args[0]) {
+                case "grant": Policy.setPolicy(new NewInstancePolicy(true));
+                              break;
+                case "deny" : Policy.setPolicy(new NewInstancePolicy(false));
+                              break;
+                default: throw new IllegalArgumentException(args[0]);
+            }
+            System.setSecurityManager(new SecurityManager());
+        }
+
+        test1.run();
+        test2.run();
+        test3.run();
+        System.out.format("Test passed: security %s%n",
+            (args.length == 0 ? "manager not installed" : Policy.getPolicy()));
+    }
+
+    private final ClassLoader loader;
+    private final Class<?>[] interfaces;
+    private final InvocationHandler handler = newInvocationHandler();
+    private Class<?> proxyClass;
+    public NonPublicProxyClass(ClassLoader loader, Class<?> ... intfs) {
+        this.loader = loader;
+        this.interfaces = intfs;
+    }
+
+    public void run() throws Exception {
+        boolean hasAccess = loader != null || hasAccess();
+        try {
+            proxyClass = Proxy.getProxyClass(loader, interfaces);
+            if (!hasAccess) {
+                throw new RuntimeException("should have no permission to create proxy class");
+            }
+        } catch (AccessControlException e) {
+            if (hasAccess) {
+                throw e;
+            }
+            if (e.getPermission().getClass() != RuntimePermission.class ||
+                    !e.getPermission().getName().equals("getClassLoader")) {
+                throw e;
+            }
+            return;
+        }
+
+        if (Modifier.isPublic(proxyClass.getModifiers())) {
+            throw new RuntimeException(proxyClass + " must be non-public");
+        }
+        newProxyInstance();
+        newInstanceFromConstructor(proxyClass);
+    }
+
+    private boolean hasAccess() {
+        if (System.getSecurityManager() == null) {
+            return true;
+        }
+        NewInstancePolicy policy = NewInstancePolicy.class.cast(Policy.getPolicy());
+        return policy.grant;
+    }
+
+    private final static String NEW_PROXY_IN_PKG = "newProxyInPackage.";
+    private void newProxyInstance() {
+        // expect newProxyInstance to succeed if it's in the same runtime package
+        int i = proxyClass.getName().lastIndexOf('.');
+        String pkg = (i != -1) ? proxyClass.getName().substring(0, i) : "";
+        boolean hasAccess = pkg.isEmpty() || hasAccess();
+        try {
+            Proxy.newProxyInstance(loader, interfaces, handler);
+            if (!hasAccess) {
+                throw new RuntimeException("ERROR: Proxy.newProxyInstance should fail " + proxyClass);
+            }
+        } catch (AccessControlException e) {
+            if (hasAccess) {
+                throw e;
+            }
+            if (e.getPermission().getClass() != ReflectPermission.class ||
+                    !e.getPermission().getName().equals(NEW_PROXY_IN_PKG + pkg)) {
+                throw e;
+            }
+        }
+    }
+
+    private void newInstanceFromConstructor(Class<?> proxyClass)
+        throws Exception
+    {
+        // expect newInstance to succeed if it's in the same runtime package
+        boolean isSamePackage = proxyClass.getName().lastIndexOf('.') == -1;
+        try {
+            Constructor cons = proxyClass.getConstructor(InvocationHandler.class);
+            cons.newInstance(newInvocationHandler());
+            if (!isSamePackage) {
+                throw new RuntimeException("ERROR: Constructor.newInstance should not succeed");
+            }
+        }  catch (IllegalAccessException e) {
+            if (isSamePackage) {
+                throw e;
+            }
+        }
+    }
+
+    private static InvocationHandler newInvocationHandler() {
+        return new InvocationHandler() {
+            public Object invoke(Object proxy, Method method, Object[] args)
+                    throws Throwable {
+                Class<?>[] intfs = proxy.getClass().getInterfaces();
+                System.out.println("Proxy for " + Arrays.toString(intfs)
+                        + " " + method.getName() + " is being invoked");
+                return null;
+            }
+        };
+    }
+
+    static class NewInstancePolicy extends Policy {
+        final PermissionCollection permissions = new Permissions();
+        final boolean grant;
+        NewInstancePolicy(boolean grant) {
+            this.grant = grant;
+            permissions.add(new SecurityPermission("getPolicy"));
+            if (grant) {
+                permissions.add(new RuntimePermission("getClassLoader"));
+                permissions.add(new ReflectPermission(NEW_PROXY_IN_PKG + "p"));
+                permissions.add(new ReflectPermission(NEW_PROXY_IN_PKG + "java.util.zip"));
+            }
+        }
+        public PermissionCollection getPermissions(ProtectionDomain domain) {
+            return permissions;
+        }
+
+        public PermissionCollection getPermissions(CodeSource codesource) {
+            return permissions;
+        }
+
+        public boolean implies(ProtectionDomain domain, Permission perm) {
+            return permissions.implies(perm);
+        }
+
+        public String toString() {
+            StringBuilder sb = new StringBuilder("policy: ");
+            Enumeration<Permission> perms = permissions.elements();
+            while (perms.hasMoreElements()) {
+                sb.append("\n").append(perms.nextElement().toString());
+            }
+            return sb.toString();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/reflect/Proxy/nonPublicProxy/SimpleProxy.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.lang.reflect.*;
+import java.security.*;
+import java.util.Arrays;
+
+/*
+ * @test
+ * @bug 8004260
+ * @summary Test making a proxy instance that implements a non-public
+ *          interface with and without security manager installed
+ * @build p.Foo p.Bar
+ * @run main SimpleProxy
+ */
+public class SimpleProxy {
+    public static void main(String[] args) throws Exception {
+        ClassLoader loader = SimpleProxy.class.getClassLoader();
+        Class<?> fooClass = Class.forName("p.Foo");
+        Class<?> barClass = Class.forName("p.Bar");
+
+        makeProxy(loader, fooClass);
+
+        System.setSecurityManager(new SecurityManager());
+        try {
+            makeProxy(loader, barClass);
+            throw new RuntimeException("should fail to new proxy instance of a non-public interface");
+        } catch (AccessControlException e) {
+            if (e.getPermission().getClass() != ReflectPermission.class ||
+                    !e.getPermission().getName().equals("newProxyInPackage.p")) {
+                throw e;
+            }
+        }
+    }
+
+    private static void makeProxy(ClassLoader loader, Class<?> cls) {
+        Class<?>[] intfs = new Class<?>[] { cls };
+        Proxy.newProxyInstance(loader, intfs, new InvocationHandler() {
+            public Object invoke(Object proxy, Method method, Object[] args)
+                    throws Throwable {
+                Class<?>[] intfs = proxy.getClass().getInterfaces();
+                System.out.println("Proxy for " + Arrays.toString(intfs)
+                        + " " + method.getName() + " is being invoked");
+                return null;
+            }
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/reflect/Proxy/nonPublicProxy/p/Bar.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package p;
+interface Bar {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/reflect/Proxy/nonPublicProxy/p/Foo.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package p;
+interface Foo {
+}
--- a/test/java/net/Socket/asyncClose/Race.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/net/Socket/asyncClose/Race.java	Wed Apr 17 21:48:04 2013 -0700
@@ -23,8 +23,8 @@
 
 /*
  * @test
- * @bug 8006395
- * @summary Race in async socket close on Linux
+ * @bug 8006395 8012244
+ * @summary Tests racing code that reads and closes a Socket
  */
 
 import java.io.InputStream;
@@ -58,7 +58,7 @@
                                     Thread.sleep(50);
                             } catch (Exception x) {
                                 if (!(x instanceof SocketException
-                                      && x.getMessage().equals("Socket closed")))
+                                      && x.getMessage().equalsIgnoreCase("socket closed")))
                                     x.printStackTrace();
                                 // ok, expect Socket closed
                             }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/nio/channels/FileChannel/InterruptDeadlock.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 8012019
+ * @summary Tests interruption of threads doing position-based read methods in
+ *   an attempt to provoke a deadlock between position sensitive and position
+ *   insensitive methods
+ */
+import java.nio.ByteBuffer;
+import java.nio.channels.*;
+import java.nio.file.*;
+import static java.nio.file.StandardOpenOption.*;
+
+public class InterruptDeadlock {
+
+    /**
+     * A thread that continuously reads from a FileChannel with
+     * read(ByteBuffer,long). The thread terminates when interrupted and/or
+     * the FileChannel is closed.
+     */
+    static class Reader extends Thread {
+        final FileChannel fc;
+        volatile Exception exception;
+
+        Reader(FileChannel fc) {
+            this.fc = fc;
+        }
+
+        @Override
+        public void run() {
+            ByteBuffer bb = ByteBuffer.allocate(1024);
+            try {
+                long pos = 0L;
+                for (;;) {
+                    bb.clear();
+                    int n = fc.read(bb, pos);
+                    if (n > 0)
+                        pos += n;
+                    // fc.size is important here as it is position sensitive
+                    if (pos > fc.size())
+                        pos = 0L;
+                }
+            } catch (ClosedChannelException x) {
+                System.out.println(x.getClass() + " (expected)");
+            } catch (Exception unexpected) {
+                this.exception = unexpected;
+            }
+        }
+
+        Exception exception() {
+            return exception;
+        }
+
+        static Reader startReader(FileChannel fc) {
+            Reader r = new Reader(fc);
+            r.start();
+            return r;
+        }
+    }
+
+    // the number of reader threads to start
+    private static final int READER_COUNT = 4;
+
+    public static void main(String[] args) throws Exception {
+        Path file = Paths.get("data.txt");
+        try (FileChannel fc = FileChannel.open(file, CREATE, TRUNCATE_EXISTING, WRITE)) {
+            fc.position(1024L * 1024L);
+            fc.write(ByteBuffer.wrap(new byte[1]));
+        }
+
+        Reader[] readers = new Reader[READER_COUNT];
+
+        for (int i=1; i<=20; i++) {
+            System.out.format("Iteration: %s%n", i);
+
+            try (FileChannel fc = FileChannel.open(file)) {
+                boolean failed = false;
+
+                // start reader threads
+                for (int j=0; j<READER_COUNT; j++) {
+                    readers[j] = Reader.startReader(fc);
+                }
+
+                // give readers a bit of time to get started (not strictly required)
+                Thread.sleep(100);
+
+                // interrupt and wait for the readers to terminate
+                for (Reader r: readers) {
+                    r.interrupt();
+                }
+                for (Reader r: readers) {
+                    try {
+                        r.join(10000);
+                        Exception e = r.exception();
+                        if (e != null) {
+                            System.err.println("Reader thread failed with: " + e);
+                            failed = true;
+                        }
+                    } catch (InterruptedException x) {
+                        System.err.println("Reader thread did not terminte");
+                        failed = true;
+                    }
+                }
+
+                // the channel should not be open at this point
+                if (fc.isOpen()) {
+                    System.err.println("FileChannel was not closed");
+                    failed = true;
+                }
+
+                if (failed)
+                    throw new RuntimeException("Test failed - see log for details");
+            }
+        }
+    }
+}
--- a/test/java/nio/file/attribute/FileTime/Basic.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/nio/file/attribute/FileTime/Basic.java	Wed Apr 17 21:48:04 2013 -0700
@@ -22,14 +22,17 @@
  */
 
 /* @test
- * @bug 6844313
+ * @bug 6844313 8011647
  * @summary Unit test for java.nio.file.FileTime
  */
 
+
 import java.nio.file.attribute.FileTime;
+import java.time.Instant;
 import java.util.concurrent.TimeUnit;
 import static java.util.concurrent.TimeUnit.*;
 import java.util.Random;
+import java.util.EnumSet;
 
 public class Basic {
 
@@ -40,27 +43,59 @@
         long tomorrowInDays = TimeUnit.DAYS.convert(now, MILLISECONDS) + 1;
         long yesterdayInDays = TimeUnit.DAYS.convert(now, MILLISECONDS) - 1;
 
+        Instant nowInstant = Instant.ofEpochMilli(now);
+
         // equals
         eq(now, MILLISECONDS, now, MILLISECONDS);
         eq(now, MILLISECONDS, now*1000L, MICROSECONDS);
         neq(now, MILLISECONDS, 0, MILLISECONDS);
         neq(now, MILLISECONDS, 0, MICROSECONDS);
 
+        eq(nowInstant, now, MILLISECONDS);
+        eq(nowInstant, now*1000L, MICROSECONDS);
+        neq(nowInstant, 0, MILLISECONDS);
+        neq(nowInstant, 0, MICROSECONDS);
+
         // compareTo
         cmp(now, MILLISECONDS, now, MILLISECONDS, 0);
         cmp(now, MILLISECONDS, now*1000L, MICROSECONDS, 0);
         cmp(now, MILLISECONDS, now-1234, MILLISECONDS, 1);
         cmp(now, MILLISECONDS, now+1234, MILLISECONDS, -1);
+
         cmp(tomorrowInDays, DAYS, now, MILLISECONDS, 1);
         cmp(now, MILLISECONDS, tomorrowInDays, DAYS, -1);
         cmp(yesterdayInDays, DAYS, now, MILLISECONDS, -1);
         cmp(now, MILLISECONDS, yesterdayInDays, DAYS, 1);
         cmp(yesterdayInDays, DAYS, now, MILLISECONDS, -1);
+
         cmp(Long.MAX_VALUE, DAYS, Long.MAX_VALUE, NANOSECONDS, 1);
         cmp(Long.MAX_VALUE, DAYS, Long.MIN_VALUE, NANOSECONDS, 1);
         cmp(Long.MIN_VALUE, DAYS, Long.MIN_VALUE, NANOSECONDS, -1);
         cmp(Long.MIN_VALUE, DAYS, Long.MAX_VALUE, NANOSECONDS, -1);
 
+        cmp(Instant.MIN, Long.MIN_VALUE, DAYS, 1);
+        cmp(Instant.MIN, Long.MIN_VALUE, HOURS, 1);
+        cmp(Instant.MIN, Long.MIN_VALUE, MINUTES, 1);
+        cmp(Instant.MIN, Long.MIN_VALUE, SECONDS, 1);
+        cmp(Instant.MIN, Instant.MIN.getEpochSecond() - 1, SECONDS, 1);
+        cmp(Instant.MIN, Instant.MIN.getEpochSecond() - 100, SECONDS, 1);
+        cmp(Instant.MIN, Instant.MIN.getEpochSecond(), SECONDS, 0);
+
+        cmp(Instant.MAX, Long.MAX_VALUE, DAYS, -1);
+        cmp(Instant.MAX, Long.MAX_VALUE, HOURS, -1);
+        cmp(Instant.MAX, Long.MAX_VALUE, MINUTES, -1);
+        cmp(Instant.MAX, Long.MAX_VALUE, SECONDS, -1);
+        cmp(Instant.MAX, Instant.MAX.getEpochSecond() + 1, SECONDS, -1);
+        cmp(Instant.MAX, Instant.MAX.getEpochSecond() + 100, SECONDS, -1);
+        cmp(Instant.MAX, Instant.MAX.getEpochSecond(), SECONDS, 0);
+
+        cmp(nowInstant, now, MILLISECONDS, 0);
+        cmp(nowInstant, now*1000L, MICROSECONDS, 0);
+        cmp(nowInstant, now-1234, MILLISECONDS, 1);
+        cmp(nowInstant, now+1234, MILLISECONDS, -1);
+        cmp(nowInstant, tomorrowInDays, DAYS, -1);
+        cmp(nowInstant, yesterdayInDays, DAYS, 1);
+
         // to(TimeUnit)
         to(MILLISECONDS.convert(1, DAYS) - 1, MILLISECONDS);
         to(MILLISECONDS.convert(1, DAYS) + 0, MILLISECONDS);
@@ -77,6 +112,64 @@
             to(Long.MAX_VALUE, unit);
         }
 
+        // toInstant()
+        int N = 1000;
+        for (TimeUnit unit : EnumSet.allOf(TimeUnit.class)) {
+            for (int i = 0; i < N; i++) {
+                long value = rand.nextLong();
+                FileTime ft = FileTime.from(value, unit);
+                Instant instant = ft.toInstant();
+                if (instant != Instant.MIN && instant != Instant.MAX) {
+                    eqTime(value, unit, instant);
+                }
+            }
+        }
+        for (TimeUnit unit : EnumSet.allOf(TimeUnit.class)) {
+            long value = Long.MIN_VALUE;
+            FileTime ft = FileTime.from(value, unit);
+            Instant instant = ft.toInstant();
+            if (unit.compareTo(TimeUnit.SECONDS) < 0) {
+                eqTime(value, unit, instant);
+            } else if (!instant.equals(Instant.MIN)) {
+                throw new RuntimeException("should overflow to MIN");
+            }
+            value = Long.MAX_VALUE;
+            ft = FileTime.from(value, unit);
+            instant = ft.toInstant();
+            if (unit.compareTo(TimeUnit.SECONDS) < 0) {
+                eqTime(value, unit, instant);
+            } else if (!instant.equals(Instant.MAX)) {
+                throw new RuntimeException("should overflow to MAX");
+            }
+        }
+
+        // from(Instant)
+        final long MAX_SECOND = 31556889864403199L;
+        for (int i = 0; i < N; i++) {
+            long v = rand.nextLong();
+            long secs = v % MAX_SECOND;
+            Instant instant = Instant.ofEpochSecond(secs, rand.nextInt(1000_000_000));
+            FileTime ft = FileTime.from(instant);
+            if (!ft.toInstant().equals(instant) || ft.to(SECONDS)  != secs) {
+                throw new RuntimeException("from(Instant) failed");
+            }
+            long millis = v;
+            instant = Instant.ofEpochMilli(millis);
+            ft = FileTime.from(instant);
+            if (!ft.toInstant().equals(instant) ||
+                ft.toMillis()  != instant.toEpochMilli()) {
+                throw new RuntimeException("from(Instant) failed");
+            }
+            long nanos = v;
+            ft = FileTime.from(nanos, NANOSECONDS);
+            secs = nanos / 1000_000_000;
+            nanos = nanos % 1000_000_000;
+            instant = Instant.ofEpochSecond(secs, nanos);
+            if (!ft.equals(FileTime.from(instant))) {
+                throw new RuntimeException("from(Instant) failed");
+            }
+        }
+
         // toString
         ts(1L, DAYS, "1970-01-02T00:00:00Z");
         ts(1L, HOURS, "1970-01-01T01:00:00Z");
@@ -108,11 +201,18 @@
         // NTFS epoch in usec.
         ts(-11644473600000000L, MICROSECONDS, "1601-01-01T00:00:00Z");
 
-        // nulls
+        ts(Instant.MIN, "-1000000001-01-01T00:00:00Z");
+        ts(Instant.MAX, "1000000000-12-31T23:59:59.999999999Z");
+
         try {
             FileTime.from(0L, null);
             throw new RuntimeException("NullPointerException expected");
         } catch (NullPointerException npe) { }
+        try {
+            FileTime.from(null);
+            throw new RuntimeException("NullPointerException expected");
+        } catch (NullPointerException npe) { }
+
         FileTime time = FileTime.fromMillis(now);
         if (time.equals(null))
             throw new RuntimeException("should not be equal to null");
@@ -120,6 +220,39 @@
             time.compareTo(null);
             throw new RuntimeException("NullPointerException expected");
         } catch (NullPointerException npe) { }
+
+        // Instant + toMilli() overflow
+        overflow(Long.MAX_VALUE,
+                 FileTime.from(Instant.MAX).toMillis());
+        overflow(Long.MAX_VALUE,
+                 FileTime.from(Instant.ofEpochSecond(Long.MAX_VALUE / 1000 + 1))
+                         .toMillis());
+        overflow(Long.MIN_VALUE,
+                 FileTime.from(Instant.MIN).toMillis());
+        overflow(Long.MIN_VALUE,
+                 FileTime.from(Instant.ofEpochSecond(Long.MIN_VALUE / 1000 - 1))
+                         .toMillis());
+
+        // Instant + to(TimeUnit) overflow
+        overflow(Long.MAX_VALUE,
+                 FileTime.from(Instant.ofEpochSecond(Long.MAX_VALUE / 1000 + 1))
+                         .to(MILLISECONDS));
+        overflow(Long.MAX_VALUE,
+                 FileTime.from(Instant.ofEpochSecond(Long.MAX_VALUE / 1000,
+                                                     MILLISECONDS.toNanos(1000)))
+                    .to(MILLISECONDS));
+        overflow(Long.MIN_VALUE,
+                 FileTime.from(Instant.ofEpochSecond(Long.MIN_VALUE / 1000 - 1))
+                         .to(MILLISECONDS));
+        overflow(Long.MIN_VALUE,
+                 FileTime.from(Instant.ofEpochSecond(Long.MIN_VALUE / 1000,
+                                                     -MILLISECONDS.toNanos(1)))
+                         .to(MILLISECONDS));
+    }
+
+    static void overflow(long minmax, long v) {
+        if (v != minmax)
+            throw new RuntimeException("saturates to Long.MIN/MAX_VALUE expected");
     }
 
     static void cmp(long v1, TimeUnit u1, long v2, TimeUnit u2, int expected) {
@@ -128,6 +261,12 @@
             throw new RuntimeException("unexpected order");
     }
 
+    static void cmp(Instant ins, long v2, TimeUnit u2, int expected) {
+        int result = FileTime.from(ins).compareTo(FileTime.from(v2, u2));
+        if (result != expected)
+            throw new RuntimeException("unexpected order");
+    }
+
     static void eq(long v1, TimeUnit u1, long v2, TimeUnit u2) {
         FileTime t1 = FileTime.from(v1, u1);
         FileTime t2 = FileTime.from(v2, u2);
@@ -137,6 +276,28 @@
             throw new RuntimeException("hashCodes should be equal");
     }
 
+    static void eq(Instant ins, long v2, TimeUnit u2) {
+        FileTime t1 = FileTime.from(ins);
+        FileTime t2 = FileTime.from(v2, u2);
+        if (!t1.equals(t2))
+            throw new RuntimeException("not equal");
+        if (t1.hashCode() != t2.hashCode())
+            throw new RuntimeException("hashCodes should be equal");
+    }
+
+    static void eqTime(long value, TimeUnit unit, Instant instant) {
+        long secs = SECONDS.convert(value, unit);
+        long nanos = NANOSECONDS.convert(value - unit.convert(secs, SECONDS), unit);
+        if (nanos < 0) {    // normalize nanoOfSecond to positive
+            secs -= 1;
+            nanos += 1000_000_000;
+        }
+        if (secs != instant.getEpochSecond() || (int)nanos != instant.getNano()) {
+            System.err.println(" ins=" + instant);
+            throw new RuntimeException("ft and instant are not the same time point");
+        }
+    }
+
     static void neq(long v1, TimeUnit u1, long v2, TimeUnit u2) {
         FileTime t1 = FileTime.from(v1, u1);
         FileTime t2 = FileTime.from(v2, u2);
@@ -144,6 +305,13 @@
             throw new RuntimeException("should not be equal");
     }
 
+    static void neq(Instant ins, long v2, TimeUnit u2) {
+        FileTime t1 = FileTime.from(ins);
+        FileTime t2 = FileTime.from(v2, u2);
+        if (t1.equals(t2))
+            throw new RuntimeException("should not be equal");
+    }
+
     static void to(long v, TimeUnit unit) {
         FileTime t = FileTime.from(v, unit);
         for (TimeUnit u: TimeUnit.values()) {
@@ -164,4 +332,14 @@
             throw new RuntimeException();
         }
     }
+
+    static void ts(Instant instant, String expected) {
+        String result = FileTime.from(instant).toString();
+        if (!result.equals(expected)) {
+            System.err.format("FileTime.from(%s).toString() failed\n", instant);
+            System.err.format("Expected: %s\n", expected);
+            System.err.format("     Got: %s\n", result);
+            throw new RuntimeException();
+        }
+    }
 }
--- a/test/java/rmi/registry/classPathCodebase/ClassPathCodebase.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/rmi/registry/classPathCodebase/ClassPathCodebase.java	Wed Apr 17 21:48:04 2013 -0700
@@ -31,7 +31,8 @@
  *
  * @library ../../testlibrary
  * @build TestLibrary Dummy
- * @run main/othervm/policy=security.policy ClassPathCodebase
+ * @run main/othervm/policy=security.policy
+ *     -Djava.rmi.server.useCodebaseOnly=false ClassPathCodebase
  */
 
 import java.io.*;
--- a/test/java/rmi/registry/readTest/readTest.sh	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/rmi/registry/readTest/readTest.sh	Wed Apr 17 21:48:04 2013 -0700
@@ -61,7 +61,8 @@
 #start rmiregistry without any local classes on classpath
 cd rmi_tmp
 # NOTE: This RMI Registry port must match TestLibrary.READTEST_REGISTRY_PORT
-${TESTJAVA}${FS}bin${FS}rmiregistry ${TESTTOOLVMOPTS} 64005 > ..${FS}${RMIREG_OUT} 2>&1 &
+${TESTJAVA}${FS}bin${FS}rmiregistry -J-Djava.rmi.server.useCodebaseOnly=false \
+    ${TESTTOOLVMOPTS} 64005 > ..${FS}${RMIREG_OUT} 2>&1 &
 RMIREG_PID=$!
 # allow some time to start
 sleep 3
--- a/test/java/rmi/server/RMIClassLoader/downloadArrayClass/DownloadArrayClass.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/rmi/server/RMIClassLoader/downloadArrayClass/DownloadArrayClass.java	Wed Apr 17 21:48:04 2013 -0700
@@ -64,6 +64,10 @@
             TestLibrary.bomb(e);
         }
 
+        System.err.println("Setting codebase property to: " + remoteCodebase);
+        System.setProperty("java.rmi.server.codebase",
+            remoteCodebase.toString());
+
         /*
          * Load Foo from a non-RMI class loader so that it won't be already
          * loaded by an RMI class loader in this VM (for whatever that's
--- a/test/java/rmi/server/RMIClassLoader/downloadArrayClass/security.policy	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/rmi/server/RMIClassLoader/downloadArrayClass/security.policy	Wed Apr 17 21:48:04 2013 -0700
@@ -7,6 +7,8 @@
 };
 
 grant {
+    permission java.util.PropertyPermission
+        "java.rmi.server.codebase", "read,write";
 
     // permissions needed to move classes into separate codebase directories
     permission java.io.FilePermission
--- a/test/java/rmi/server/RMIClassLoader/loadProxyClasses/LoadProxyClasses.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/rmi/server/RMIClassLoader/loadProxyClasses/LoadProxyClasses.java	Wed Apr 17 21:48:04 2013 -0700
@@ -32,7 +32,8 @@
  * @library ../../../testlibrary
  * @build TestLibrary FnnClass FnnUnmarshal NonpublicInterface
  *     NonpublicInterface1 PublicInterface PublicInterface1
- * @run main/othervm/policy=security.policy LoadProxyClasses
+ * @run main/othervm/policy=security.policy
+ *     -Djava.rmi.server.useCodebaseOnly=false LoadProxyClasses
  */
 
 import java.rmi.server.RMIClassLoader;
--- a/test/java/rmi/server/RMIClassLoader/loadProxyClasses/security.policy	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/rmi/server/RMIClassLoader/loadProxyClasses/security.policy	Wed Apr 17 21:48:04 2013 -0700
@@ -16,6 +16,9 @@
     permission java.lang.RuntimePermission "getClassLoader";
     permission java.lang.RuntimePermission "setContextClassLoader";
 
+    permission java.lang.reflect.ReflectPermission "newProxyInPackage.";
+    permission java.lang.reflect.ReflectPermission "newProxyInPackage.java.util.zip";
+
     // used by TestLibrary to determine test environment
     permission java.util.PropertyPermission "test.classes", "read";
     permission java.util.PropertyPermission "test.src", "read";
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/rmi/server/RMIClassLoader/useCodebaseOnlyDefault/UseCodebaseOnlyDefault.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8001040
+ * @summary Tests proper parsing and defaulting of the
+ * "java.rmi.server.useCodebaseOnly" property.
+ *
+ * @run main/othervm UseCodebaseOnlyDefault true
+ * @run main/othervm -Djava.rmi.server.useCodebaseOnly=xyzzy UseCodebaseOnlyDefault true
+ * @run main/othervm -Djava.rmi.server.useCodebaseOnly UseCodebaseOnlyDefault true
+ * @run main/othervm -Djava.rmi.server.useCodebaseOnly=true UseCodebaseOnlyDefault true
+ * @run main/othervm -Djava.rmi.server.useCodebaseOnly=false UseCodebaseOnlyDefault false
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectOutputStream;
+import java.lang.reflect.Field;
+import sun.rmi.server.MarshalInputStream;
+
+/**
+ * usage: UseCodebaseOnlyDefault expected
+ *
+ * 'expected' is the expected value of useCodebaseOnly, which
+ * must be "true" or "false".
+ */
+public class UseCodebaseOnlyDefault {
+    static final String USAGE = "usage: UseCodebaseOnlyDefault boolean";
+    static final String PROPNAME = "java.rmi.server.useCodebaseOnly";
+
+    /**
+     * Gets the actual useCodebaseOnly value by creating an instance
+     * of MarshalInputStream and reflecting on the useCodebaseOnly field.
+     */
+    static boolean getActualValue() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream oos = new ObjectOutputStream(baos);
+        oos.writeObject("foo");
+        oos.close();
+
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+        MarshalInputStream mis = new MarshalInputStream(bais);
+
+        Field f = MarshalInputStream.class.getDeclaredField("useCodebaseOnly");
+        f.setAccessible(true);
+        return f.getBoolean(mis);
+    }
+
+    public static void main(String[] args) throws Exception {
+        if (args.length != 1) {
+            throw new IllegalArgumentException(USAGE);
+        }
+
+        boolean expected;
+        if (args[0].equals("true")) {
+            expected = true;
+        } else if (args[0].equals("false")) {
+            expected = false;
+        } else {
+            throw new IllegalArgumentException(USAGE);
+        }
+        System.out.println("expected = " + expected);
+
+        String prop = System.getProperty(PROPNAME);
+        System.out.print("Property " + PROPNAME);
+        if (prop == null) {
+            System.out.println(" is not set");
+        } else {
+            System.out.println(" = '" + prop + "'");
+        }
+
+        boolean actual = getActualValue();
+        System.out.println("actual = " + actual);
+
+        if (expected != actual)
+            throw new AssertionError("actual does not match expected value");
+    }
+}
--- a/test/java/rmi/testlibrary/RMID.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/rmi/testlibrary/RMID.java	Wed Apr 17 21:48:04 2013 -0700
@@ -108,6 +108,9 @@
         if (!TestParams.testClasses.equals("")) {
             args += " -C-Dtest.classes=" + TestParams.testClasses;
         }
+
+        args += " -C-Djava.rmi.server.useCodebaseOnly=false ";
+
         args += " " + getCodeCoverageArgs();
         return args;
     }
--- a/test/java/time/tck/java/time/AbstractDateTimeTest.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/AbstractDateTimeTest.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,19 +59,16 @@
  */
 package tck.java.time;
 
-import java.time.*;
-
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.fail;
 
+import java.time.DateTimeException;
+import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQuery;
 import java.util.List;
 
-import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalQuery;
-import java.time.temporal.TemporalField;
-
 import org.testng.annotations.Test;
-import test.java.time.AbstractTest;
 import test.java.time.temporal.MockFieldNoValue;
 
 /**
@@ -100,7 +97,7 @@
     //-----------------------------------------------------------------------
     // isSupported(TemporalField)
     //-----------------------------------------------------------------------
-    @Test(groups = "tck")
+    @Test()
     public void basicTest_isSupported_TemporalField_supported() {
         for (TemporalAccessor sample : samples()) {
             for (TemporalField field : validFields()) {
@@ -109,7 +106,7 @@
         }
     }
 
-    @Test(groups = "tck")
+    @Test()
     public void basicTest_isSupported_TemporalField_unsupported() {
         for (TemporalAccessor sample : samples()) {
             for (TemporalField field : invalidFields()) {
@@ -118,7 +115,7 @@
         }
     }
 
-    @Test(groups = "tck")
+    @Test()
     public void basicTest_isSupported_TemporalField_null() {
         for (TemporalAccessor sample : samples()) {
             assertEquals(sample.isSupported(null), false, "Failed on " + sample);
@@ -128,7 +125,7 @@
     //-----------------------------------------------------------------------
     // range(TemporalField)
     //-----------------------------------------------------------------------
-    @Test(groups = "tck")
+    @Test()
     public void basicTest_range_TemporalField_supported() {
         for (TemporalAccessor sample : samples()) {
             for (TemporalField field : validFields()) {
@@ -137,7 +134,7 @@
         }
     }
 
-    @Test(groups = "tck")
+    @Test()
     public void basicTest_range_TemporalField_unsupported() {
         for (TemporalAccessor sample : samples()) {
             for (TemporalField field : invalidFields()) {
@@ -151,7 +148,7 @@
         }
     }
 
-    @Test(groups = "tck")
+    @Test()
     public void basicTest_range_TemporalField_null() {
         for (TemporalAccessor sample : samples()) {
             try {
@@ -166,7 +163,7 @@
     //-----------------------------------------------------------------------
     // get(TemporalField)
     //-----------------------------------------------------------------------
-    @Test(groups = "tck")
+    @Test()
     public void basicTest_get_TemporalField_supported() {
         for (TemporalAccessor sample : samples()) {
             for (TemporalField field : validFields()) {
@@ -184,7 +181,7 @@
         }
     }
 
-    @Test(groups = "tck")
+    @Test()
     public void basicTest_get_TemporalField_unsupported() {
         for (TemporalAccessor sample : samples()) {
             for (TemporalField field : invalidFields()) {
@@ -205,7 +202,7 @@
         }
     }
 
-    @Test(groups = "tck")
+    @Test()
     public void basicTest_get_TemporalField_null() {
         for (TemporalAccessor sample : samples()) {
             try {
@@ -220,7 +217,7 @@
     //-----------------------------------------------------------------------
     // getLong(TemporalField)
     //-----------------------------------------------------------------------
-    @Test(groups = "tck")
+    @Test()
     public void basicTest_getLong_TemporalField_supported() {
         for (TemporalAccessor sample : samples()) {
             for (TemporalField field : validFields()) {
@@ -229,7 +226,7 @@
         }
     }
 
-    @Test(groups = "tck")
+    @Test()
     public void basicTest_getLong_TemporalField_unsupported() {
         for (TemporalAccessor sample : samples()) {
             for (TemporalField field : invalidFields()) {
@@ -250,7 +247,7 @@
         }
     }
 
-    @Test(groups = "tck")
+    @Test()
     public void basicTest_getLong_TemporalField_null() {
         for (TemporalAccessor sample : samples()) {
             try {
@@ -263,7 +260,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void basicTest_query() {
         for (TemporalAccessor sample : samples()) {
             assertEquals(sample.query(new TemporalQuery<String>() {
--- a/test/java/time/tck/java/time/TCKClock.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKClock.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,9 +59,11 @@
  */
 package tck.java.time;
 
-import java.time.*;
+import static org.testng.Assert.assertEquals;
 
-import static org.testng.Assert.assertEquals;
+import java.time.Clock;
+import java.time.Instant;
+import java.time.ZoneId;
 
 import org.testng.annotations.Test;
 
--- a/test/java/time/tck/java/time/TCKDayOfWeek.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKDayOfWeek.java	Wed Apr 17 21:48:04 2013 -0700
@@ -70,12 +70,10 @@
 import java.time.DayOfWeek;
 import java.time.LocalDate;
 import java.time.LocalTime;
-import java.time.chrono.IsoChronology;
 import java.time.format.TextStyle;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.JulianFields;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
@@ -125,7 +123,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_int_singleton() {
         for (int i = 1; i <= 7; i++) {
             DayOfWeek test = DayOfWeek.of(i);
@@ -134,28 +132,28 @@
         }
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_valueTooLow() {
         DayOfWeek.of(0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_valueTooHigh() {
         DayOfWeek.of(8);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_CalendricalObject() {
         assertEquals(DayOfWeek.from(LocalDate.of(2011, 6, 6)), DayOfWeek.MONDAY);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_CalendricalObject_invalid_noDerive() {
         DayOfWeek.from(LocalTime.of(12, 30));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_CalendricalObject_null() {
         DayOfWeek.from((TemporalAccessor) null);
     }
@@ -179,13 +177,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {DayOfWeek.FRIDAY, Queries.chronology(), null},
-                {DayOfWeek.FRIDAY, Queries.zoneId(), null},
-                {DayOfWeek.FRIDAY, Queries.precision(), ChronoUnit.DAYS},
-                {DayOfWeek.FRIDAY, Queries.zone(), null},
-                {DayOfWeek.FRIDAY, Queries.offset(), null},
-                {DayOfWeek.FRIDAY, Queries.localDate(), null},
-                {DayOfWeek.FRIDAY, Queries.localTime(), null},
+                {DayOfWeek.FRIDAY, TemporalQuery.chronology(), null},
+                {DayOfWeek.FRIDAY, TemporalQuery.zoneId(), null},
+                {DayOfWeek.FRIDAY, TemporalQuery.precision(), ChronoUnit.DAYS},
+                {DayOfWeek.FRIDAY, TemporalQuery.zone(), null},
+                {DayOfWeek.FRIDAY, TemporalQuery.offset(), null},
+                {DayOfWeek.FRIDAY, TemporalQuery.localDate(), null},
+                {DayOfWeek.FRIDAY, TemporalQuery.localTime(), null},
         };
     }
 
@@ -207,17 +205,17 @@
     //-----------------------------------------------------------------------
     // getText()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_getText() {
         assertEquals(DayOfWeek.MONDAY.getDisplayName(TextStyle.SHORT, Locale.US), "Mon");
     }
 
-    @Test(expectedExceptions = NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions = NullPointerException.class)
     public void test_getText_nullStyle() {
         DayOfWeek.MONDAY.getDisplayName(null, Locale.US);
     }
 
-    @Test(expectedExceptions = NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions = NullPointerException.class)
     public void test_getText_nullLocale() {
         DayOfWeek.MONDAY.getDisplayName(TextStyle.FULL, null);
     }
@@ -264,7 +262,7 @@
         };
     }
 
-    @Test(dataProvider="plus", groups={"tck"})
+    @Test(dataProvider="plus")
     public void test_plus_long(int base, long amount, int expected) {
         assertEquals(DayOfWeek.of(base).plus(amount), DayOfWeek.of(expected));
     }
@@ -295,7 +293,7 @@
         };
     }
 
-    @Test(dataProvider="minus", groups={"tck"})
+    @Test(dataProvider="minus")
     public void test_minus_long(int base, long amount, int expected) {
         assertEquals(DayOfWeek.of(base).minus(amount), DayOfWeek.of(expected));
     }
@@ -303,7 +301,7 @@
     //-----------------------------------------------------------------------
     // adjustInto()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_adjustInto() {
         assertEquals(DayOfWeek.MONDAY.adjustInto(LocalDate.of(2012, 9, 2)), LocalDate.of(2012, 8, 27));
         assertEquals(DayOfWeek.MONDAY.adjustInto(LocalDate.of(2012, 9, 3)), LocalDate.of(2012, 9, 3));
@@ -312,7 +310,7 @@
         assertEquals(DayOfWeek.MONDAY.adjustInto(LocalDate.of(2012, 9, 11)), LocalDate.of(2012, 9, 10));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_adjustInto_null() {
         DayOfWeek.MONDAY.adjustInto((Temporal) null);
     }
@@ -320,7 +318,7 @@
     //-----------------------------------------------------------------------
     // toString()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toString() {
         assertEquals(DayOfWeek.MONDAY.toString(), "MONDAY");
         assertEquals(DayOfWeek.TUESDAY.toString(), "TUESDAY");
@@ -334,7 +332,7 @@
     //-----------------------------------------------------------------------
     // generated methods
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_enum() {
         assertEquals(DayOfWeek.valueOf("MONDAY"), DayOfWeek.MONDAY);
         assertEquals(DayOfWeek.values()[0], DayOfWeek.MONDAY);
--- a/test/java/time/tck/java/time/TCKDuration.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKDuration.java	Wed Apr 17 21:48:04 2013 -0700
@@ -72,20 +72,23 @@
 import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
 
-import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
 import java.time.DateTimeException;
 import java.time.Duration;
 import java.time.Instant;
+import java.time.LocalDateTime;
 import java.time.LocalTime;
+import java.time.Period;
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoUnit;
+import java.time.temporal.Temporal;
+import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalUnit;
+import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.Locale;
 
@@ -98,6 +101,8 @@
 @Test
 public class TCKDuration extends AbstractTCKTest {
 
+    private static final long CYCLE_SECS = 146097L * 86400L;
+
     //-----------------------------------------------------------------------
     @Test
     public void test_serialization() throws Exception {
@@ -121,7 +126,7 @@
     //-----------------------------------------------------------------------
     // constants
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_zero() {
         assertEquals(Duration.ZERO.getSeconds(), 0L);
         assertEquals(Duration.ZERO.getNano(), 0);
@@ -130,7 +135,7 @@
     //-----------------------------------------------------------------------
     // ofSeconds(long)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_seconds_long() {
         for (long i = -2; i <= 2; i++) {
             Duration t = Duration.ofSeconds(i);
@@ -142,7 +147,7 @@
     //-----------------------------------------------------------------------
     // ofSeconds(long,long)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_seconds_long_long() {
         for (long i = -2; i <= 2; i++) {
             for (int j = 0; j < 10; j++) {
@@ -163,14 +168,14 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_seconds_long_long_nanosNegativeAdjusted() {
         Duration test = Duration.ofSeconds(2L, -1);
         assertEquals(test.getSeconds(), 1);
         assertEquals(test.getNano(), 999999999);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void factory_seconds_long_long_tooBig() {
         Duration.ofSeconds(Long.MAX_VALUE, 1000000000);
     }
@@ -195,7 +200,7 @@
         };
     }
 
-    @Test(dataProvider="MillisDurationNoNanos", groups={"tck"})
+    @Test(dataProvider="MillisDurationNoNanos")
     public void factory_millis_long(long millis, long expectedSeconds, int expectedNanoOfSecond) {
         Duration test = Duration.ofMillis(millis);
         assertEquals(test.getSeconds(), expectedSeconds);
@@ -205,35 +210,35 @@
     //-----------------------------------------------------------------------
     // ofNanos(long)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_nanos_nanos() {
         Duration test = Duration.ofNanos(1);
         assertEquals(test.getSeconds(), 0);
         assertEquals(test.getNano(), 1);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_nanos_nanosSecs() {
         Duration test = Duration.ofNanos(1000000002);
         assertEquals(test.getSeconds(), 1);
         assertEquals(test.getNano(), 2);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_nanos_negative() {
         Duration test = Duration.ofNanos(-2000000001);
         assertEquals(test.getSeconds(), -3);
         assertEquals(test.getNano(), 999999999);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_nanos_max() {
         Duration test = Duration.ofNanos(Long.MAX_VALUE);
         assertEquals(test.getSeconds(), Long.MAX_VALUE / 1000000000);
         assertEquals(test.getNano(), Long.MAX_VALUE % 1000000000);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_nanos_min() {
         Duration test = Duration.ofNanos(Long.MIN_VALUE);
         assertEquals(test.getSeconds(), Long.MIN_VALUE / 1000000000 - 1);
@@ -243,33 +248,33 @@
     //-----------------------------------------------------------------------
     // ofMinutes()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_minutes() {
         Duration test = Duration.ofMinutes(2);
         assertEquals(test.getSeconds(), 120);
         assertEquals(test.getNano(), 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_minutes_max() {
         Duration test = Duration.ofMinutes(Long.MAX_VALUE / 60);
         assertEquals(test.getSeconds(), (Long.MAX_VALUE / 60) * 60);
         assertEquals(test.getNano(), 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_minutes_min() {
         Duration test = Duration.ofMinutes(Long.MIN_VALUE / 60);
         assertEquals(test.getSeconds(), (Long.MIN_VALUE / 60) * 60);
         assertEquals(test.getNano(), 0);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void factory_minutes_tooBig() {
         Duration.ofMinutes(Long.MAX_VALUE / 60 + 1);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void factory_minutes_tooSmall() {
         Duration.ofMinutes(Long.MIN_VALUE / 60 - 1);
     }
@@ -277,33 +282,33 @@
     //-----------------------------------------------------------------------
     // ofHours()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_hours() {
         Duration test = Duration.ofHours(2);
         assertEquals(test.getSeconds(), 2 * 3600);
         assertEquals(test.getNano(), 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_hours_max() {
         Duration test = Duration.ofHours(Long.MAX_VALUE / 3600);
         assertEquals(test.getSeconds(), (Long.MAX_VALUE / 3600) * 3600);
         assertEquals(test.getNano(), 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_hours_min() {
         Duration test = Duration.ofHours(Long.MIN_VALUE / 3600);
         assertEquals(test.getSeconds(), (Long.MIN_VALUE / 3600) * 3600);
         assertEquals(test.getNano(), 0);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void factory_hours_tooBig() {
         Duration.ofHours(Long.MAX_VALUE / 3600 + 1);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void factory_hours_tooSmall() {
         Duration.ofHours(Long.MIN_VALUE / 3600 - 1);
     }
@@ -311,33 +316,33 @@
     //-----------------------------------------------------------------------
     // ofDays()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_days() {
         Duration test = Duration.ofDays(2);
         assertEquals(test.getSeconds(), 2 * 86400);
         assertEquals(test.getNano(), 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_days_max() {
         Duration test = Duration.ofDays(Long.MAX_VALUE / 86400);
         assertEquals(test.getSeconds(), (Long.MAX_VALUE / 86400) * 86400);
         assertEquals(test.getNano(), 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_days_min() {
         Duration test = Duration.ofDays(Long.MIN_VALUE / 86400);
         assertEquals(test.getSeconds(), (Long.MIN_VALUE / 86400) * 86400);
         assertEquals(test.getNano(), 0);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void factory_days_tooBig() {
         Duration.ofDays(Long.MAX_VALUE / 86400 + 1);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void factory_days_tooSmall() {
         Duration.ofDays(Long.MIN_VALUE / 86400 - 1);
     }
@@ -405,7 +410,7 @@
         };
     }
 
-    @Test(dataProvider="OfTemporalUnit", groups={"tck"})
+    @Test(dataProvider="OfTemporalUnit")
     public void factory_of_longTemporalUnit(long amount, TemporalUnit unit, long expectedSeconds, int expectedNanoOfSecond) {
         Duration t = Duration.of(amount, unit);
         assertEquals(t.getSeconds(), expectedSeconds);
@@ -424,76 +429,93 @@
         };
     }
 
-    @Test(dataProvider="OfTemporalUnitOutOfRange", expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(dataProvider="OfTemporalUnitOutOfRange", expectedExceptions=ArithmeticException.class)
     public void factory_of_longTemporalUnit_outOfRange(long amount, TemporalUnit unit) {
         Duration.of(amount, unit);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_longTemporalUnit_estimatedUnit() {
         Duration.of(2, WEEKS);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_longTemporalUnit_null() {
         Duration.of(1, (TemporalUnit) null);
     }
 
     //-----------------------------------------------------------------------
-    // between()
+    // from(TemporalAmount)
     //-----------------------------------------------------------------------
-    @DataProvider(name="durationBetweenInstant")
-    Object[][] data_durationBetweenInstant() {
-        return new Object[][] {
-            {0, 0, 0, 0, 0, 0},
-            {3, 0, 7, 0, 4, 0},
-            {3, 20, 7, 50, 4, 30},
-            {3, 80, 7, 50, 3, 999999970},
-            {7, 0, 3, 0, -4, 0},
-        };
-    }
-
-    @Test(dataProvider="durationBetweenInstant")
-    public void factory_between_TemporalTemporal_Instant(long secs1, int nanos1, long secs2, int nanos2, long expectedSeconds, int expectedNanoOfSecond) {
-        Instant start = Instant.ofEpochSecond(secs1, nanos1);
-        Instant end = Instant.ofEpochSecond(secs2, nanos2);
-        Duration t = Duration.between(start, end);
-        assertEquals(t.getSeconds(), expectedSeconds);
-        assertEquals(t.getNano(), expectedNanoOfSecond);
+    @Test
+    public void factory_from_TemporalAmount_Duration() {
+        TemporalAmount amount = Duration.ofHours(3);
+        assertEquals(Duration.from(amount), Duration.ofHours(3));
     }
 
-    @DataProvider(name="durationBetweenLocalTime")
-    Object[][] data_durationBetweenLocalTime() {
-        return new Object[][] {
-                {LocalTime.of(11, 0, 30), LocalTime.of(11, 0, 45), 15L, 0},
-                {LocalTime.of(11, 0, 30), LocalTime.of(11, 0, 25), -5L, 0},
+    @Test
+    public void factory_from_TemporalAmount_DaysNanos() {
+        TemporalAmount amount = new TemporalAmount() {
+            @Override
+            public long get(TemporalUnit unit) {
+                if (unit == DAYS) {
+                    return 23;
+                } else {
+                    return 45;
+                }
+            }
+            @Override
+            public List<TemporalUnit> getUnits() {
+                List<TemporalUnit> list = new ArrayList<>();
+                list.add(DAYS);
+                list.add(NANOS);
+                return list;
+            }
+            @Override
+            public Temporal addTo(Temporal temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public Temporal subtractFrom(Temporal temporal) {
+                throw new UnsupportedOperationException();
+            }
         };
-    }
-
-    @Test(dataProvider="durationBetweenLocalTime")
-    public void factory_between_TemporalTemporal_LT(LocalTime start, LocalTime end, long expectedSeconds, int expectedNanoOfSecond) {
-        Duration t = Duration.between(start, end);
-        assertEquals(t.getSeconds(), expectedSeconds);
-        assertEquals(t.getNano(), expectedNanoOfSecond);
+        Duration t = Duration.from(amount);
+        assertEquals(t.getSeconds(), 23 * 86400);
+        assertEquals(t.getNano(), 45);
     }
 
-    @Test(expectedExceptions=DateTimeException.class)
-    public void factory_between_TemporalTemporal_mixedTypes() {
-        Instant start = Instant.ofEpochSecond(1);
-        ZonedDateTime end = Instant.ofEpochSecond(4).atZone(ZoneOffset.UTC);
-        Duration.between(start, end);
+    @Test(expectedExceptions = ArithmeticException.class)
+    public void factory_from_TemporalAmount_Minutes_tooBig() {
+        TemporalAmount amount = new TemporalAmount() {
+            @Override
+            public long get(TemporalUnit unit) {
+                return (Long.MAX_VALUE / 60) + 2;
+            }
+            @Override
+            public List<TemporalUnit> getUnits() {
+                return Collections.<TemporalUnit>singletonList(MINUTES);
+            }
+            @Override
+            public Temporal addTo(Temporal temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public Temporal subtractFrom(Temporal temporal) {
+                throw new UnsupportedOperationException();
+            }
+        };
+        Duration.from(amount);
     }
 
-    @Test(expectedExceptions=NullPointerException.class)
-    public void factory_between__TemporalTemporal_startNull() {
-        Instant end = Instant.ofEpochSecond(1);
-        Duration.between(null, end);
+    @Test(expectedExceptions = DateTimeException.class)
+    public void factory_from_TemporalAmount_Period() {
+        Duration.from(Period.ZERO);
     }
 
-    @Test(expectedExceptions=NullPointerException.class)
-    public void factory_between__TemporalTemporal_endNull() {
-        Instant start = Instant.ofEpochSecond(1);
-        Duration.between(start, null);
+    @Test(expectedExceptions = NullPointerException.class)
+    public void factory_from_TemporalAmount_null() {
+        Duration.from(null);
     }
 
     //-----------------------------------------------------------------------
@@ -749,17 +771,115 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_deserialization() throws Exception {
-        Duration orginal = Duration.ofSeconds(2);
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(orginal);
-        out.close();
-        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        ObjectInputStream in = new ObjectInputStream(bais);
-        Duration ser = (Duration) in.readObject();
-        assertEquals(Duration.ofSeconds(2), ser);
+    // between()
+    //-----------------------------------------------------------------------
+    @DataProvider(name="durationBetweenInstant")
+    Object[][] data_durationBetweenInstant() {
+        return new Object[][] {
+                {0, 0, 0, 0, 0, 0},
+                {3, 0, 7, 0, 4, 0},
+                {7, 0, 3, 0, -4, 0},
+
+                {3, 20, 7, 50, 4, 30},
+                {3, 80, 7, 50, 3, 999999970},
+                {3, 80, 7, 79, 3, 999999999},
+                {3, 80, 7, 80, 4, 0},
+                {3, 80, 7, 81, 4, 1},
+        };
+    }
+
+    @Test(dataProvider="durationBetweenInstant")
+    public void factory_between_TemporalTemporal_Instant(long secs1, int nanos1, long secs2, int nanos2, long expectedSeconds, int expectedNanoOfSecond) {
+        Instant start = Instant.ofEpochSecond(secs1, nanos1);
+        Instant end = Instant.ofEpochSecond(secs2, nanos2);
+        Duration t = Duration.between(start, end);
+        assertEquals(t.getSeconds(), expectedSeconds);
+        assertEquals(t.getNano(), expectedNanoOfSecond);
+    }
+
+    @Test(dataProvider="durationBetweenInstant")
+    public void factory_between_TemporalTemporal_Instant_negated(long secs1, int nanos1, long secs2, int nanos2, long expectedSeconds, int expectedNanoOfSecond) {
+        Instant start = Instant.ofEpochSecond(secs1, nanos1);
+        Instant end = Instant.ofEpochSecond(secs2, nanos2);
+        assertEquals(Duration.between(end, start), Duration.between(start, end).negated());
+    }
+
+    @DataProvider(name="durationBetweenLocalTime")
+    Object[][] data_durationBetweenLocalTime() {
+        return new Object[][] {
+                {LocalTime.of(11, 0, 30), LocalTime.of(11, 0, 45), 15L, 0},
+                {LocalTime.of(11, 0, 30), LocalTime.of(11, 0, 25), -5L, 0},
+        };
+    }
+
+    @Test(dataProvider="durationBetweenLocalTime")
+    public void factory_between_TemporalTemporal_LT(LocalTime start, LocalTime end, long expectedSeconds, int expectedNanoOfSecond) {
+        Duration t = Duration.between(start, end);
+        assertEquals(t.getSeconds(), expectedSeconds);
+        assertEquals(t.getNano(), expectedNanoOfSecond);
+    }
+
+    @Test(dataProvider="durationBetweenLocalTime")
+    public void factory_between_TemporalTemporal_LT_negated(LocalTime start, LocalTime end, long expectedSeconds, int expectedNanoOfSecond) {
+        assertEquals(Duration.between(end, start), Duration.between(start, end).negated());
+    }
+
+    @DataProvider(name="durationBetweenLocalDateTime")
+    Object[][] data_durationBetweenLocalDateTime() {
+        return new Object[][] {
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 565_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 30, 65_000_000), -2L, 500_000_000},
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 565_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), -1L, 500_000_000},
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 565_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 32, 65_000_000), 0L, 500_000_000},
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 565_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 33, 65_000_000), 1L, 500_000_000},
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 565_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 34, 65_000_000), 2L, 500_000_000},
+
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 30, 565_000_000), -1L, 500_000_000},
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 31, 565_000_000), 0L, 500_000_000},
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 32, 565_000_000), 1L, 500_000_000},
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 33, 565_000_000), 2L, 500_000_000},
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 34, 565_000_000), 3L, 500_000_000},
+
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 30, 65_000_000), -1L, 0},
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), 0L, 0},
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 32, 65_000_000), 1L, 0},
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 33, 65_000_000), 2L, 0},
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 34, 65_000_000), 3L, 0},
+
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2813, 3, 24, 0, 44, 30, 565_000_000), 2 * CYCLE_SECS - 1L, 500_000_000},
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2813, 3, 24, 0, 44, 31, 565_000_000), 2 * CYCLE_SECS + 0L, 500_000_000},
+                {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2813, 3, 24, 0, 44, 32, 565_000_000), 2 * CYCLE_SECS + 1L, 500_000_000},
+        };
+    }
+
+    @Test(dataProvider="durationBetweenLocalDateTime")
+    public void factory_between_TemporalTemporal_LDT(LocalDateTime start, LocalDateTime end, long expectedSeconds, int expectedNanoOfSecond) {
+        Duration t = Duration.between(start, end);
+        assertEquals(t.getSeconds(), expectedSeconds);
+        assertEquals(t.getNano(), expectedNanoOfSecond);
+    }
+
+    @Test(dataProvider="durationBetweenLocalDateTime")
+    public void factory_between_TemporalTemporal_LDT_negated(LocalDateTime start, LocalDateTime end, long expectedSeconds, int expectedNanoOfSecond) {
+        assertEquals(Duration.between(end, start), Duration.between(start, end).negated());
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void factory_between_TemporalTemporal_mixedTypes() {
+        Instant start = Instant.ofEpochSecond(1);
+        ZonedDateTime end = Instant.ofEpochSecond(4).atZone(ZoneOffset.UTC);
+        Duration.between(start, end);
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void factory_between__TemporalTemporal_startNull() {
+        Instant end = Instant.ofEpochSecond(1);
+        Duration.between(null, end);
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void factory_between__TemporalTemporal_endNull() {
+        Instant start = Instant.ofEpochSecond(1);
+        Duration.between(start, null);
     }
 
     //-----------------------------------------------------------------------
@@ -977,27 +1097,27 @@
        };
     }
 
-    @Test(dataProvider="Plus", groups={"tck"})
+    @Test(dataProvider="Plus")
     public void plus(long seconds, int nanos, long otherSeconds, int otherNanos, long expectedSeconds, int expectedNanoOfSecond) {
        Duration t = Duration.ofSeconds(seconds, nanos).plus(Duration.ofSeconds(otherSeconds, otherNanos));
        assertEquals(t.getSeconds(), expectedSeconds);
        assertEquals(t.getNano(), expectedNanoOfSecond);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void plusOverflowTooBig() {
        Duration t = Duration.ofSeconds(Long.MAX_VALUE, 999999999);
        t.plus(Duration.ofSeconds(0, 1));
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void plusOverflowTooSmall() {
        Duration t = Duration.ofSeconds(Long.MIN_VALUE);
        t.plus(Duration.ofSeconds(-1, 999999999));
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void plus_longTemporalUnit_seconds() {
         Duration t = Duration.ofSeconds(1);
         t = t.plus(1, SECONDS);
@@ -1005,7 +1125,7 @@
         assertEquals(0, t.getNano());
      }
 
-    @Test(groups={"tck"})
+    @Test
     public void plus_longTemporalUnit_millis() {
         Duration t = Duration.ofSeconds(1);
         t = t.plus(1, MILLIS);
@@ -1013,7 +1133,7 @@
         assertEquals(1000000, t.getNano());
      }
 
-    @Test(groups={"tck"})
+    @Test
     public void plus_longTemporalUnit_micros() {
         Duration t = Duration.ofSeconds(1);
         t = t.plus(1, MICROS);
@@ -1021,7 +1141,7 @@
         assertEquals(1000, t.getNano());
      }
 
-    @Test(groups={"tck"})
+    @Test
     public void plus_longTemporalUnit_nanos() {
         Duration t = Duration.ofSeconds(1);
         t = t.plus(1, NANOS);
@@ -1029,13 +1149,139 @@
         assertEquals(1, t.getNano());
      }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void plus_longTemporalUnit_null() {
        Duration t = Duration.ofSeconds(1);
        t.plus(1, (TemporalUnit) null);
     }
 
     //-----------------------------------------------------------------------
+    @DataProvider(name="PlusDays")
+    Object[][] provider_plusDays_long() {
+        return new Object[][] {
+            {0, 0, 0},
+            {0, 1, 1},
+            {0, -1, -1},
+            {Long.MAX_VALUE/3600/24, 0, Long.MAX_VALUE/3600/24},
+            {Long.MIN_VALUE/3600/24, 0, Long.MIN_VALUE/3600/24},
+            {1, 0, 1},
+            {1, 1, 2},
+            {1, -1, 0},
+            {1, Long.MIN_VALUE/3600/24, Long.MIN_VALUE/3600/24 + 1},
+            {1, 0, 1},
+            {1, 1, 2},
+            {1, -1, 0},
+            {-1, 0, -1},
+            {-1, 1, 0},
+            {-1, -1, -2},
+            {-1, Long.MAX_VALUE/3600/24, Long.MAX_VALUE/3600/24 - 1},
+        };
+    }
+
+    @Test(dataProvider="PlusDays")
+    public void plusDays_long(long days, long amount, long expectedDays) {
+        Duration t = Duration.ofDays(days);
+        t = t.plusDays(amount);
+        assertEquals(t.toDays(), expectedDays);
+    }
+
+    @Test(expectedExceptions = {ArithmeticException.class})
+    public void plusDays_long_overflowTooBig() {
+        Duration t = Duration.ofDays(1);
+        t.plusDays(Long.MAX_VALUE/3600/24);
+    }
+
+    @Test(expectedExceptions = {ArithmeticException.class})
+    public void plusDays_long_overflowTooSmall() {
+        Duration t = Duration.ofDays(-1);
+        t.plusDays(Long.MIN_VALUE/3600/24);
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="PlusHours")
+    Object[][] provider_plusHours_long() {
+        return new Object[][] {
+            {0, 0, 0},
+            {0, 1, 1},
+            {0, -1, -1},
+            {Long.MAX_VALUE/3600, 0, Long.MAX_VALUE/3600},
+            {Long.MIN_VALUE/3600, 0, Long.MIN_VALUE/3600},
+            {1, 0, 1},
+            {1, 1, 2},
+            {1, -1, 0},
+            {1, Long.MIN_VALUE/3600, Long.MIN_VALUE/3600 + 1},
+            {1, 0, 1},
+            {1, 1, 2},
+            {1, -1, 0},
+            {-1, 0, -1},
+            {-1, 1, 0},
+            {-1, -1, -2},
+            {-1, Long.MAX_VALUE/3600, Long.MAX_VALUE/3600 - 1},
+        };
+    }
+
+    @Test(dataProvider="PlusHours")
+    public void plusHours_long(long hours, long amount, long expectedHours) {
+        Duration t = Duration.ofHours(hours);
+        t = t.plusHours(amount);
+        assertEquals(t.toHours(), expectedHours);
+    }
+
+    @Test(expectedExceptions = {ArithmeticException.class})
+    public void plusHours_long_overflowTooBig() {
+        Duration t = Duration.ofHours(1);
+        t.plusHours(Long.MAX_VALUE/3600);
+    }
+
+    @Test(expectedExceptions = {ArithmeticException.class})
+    public void plusHours_long_overflowTooSmall() {
+        Duration t = Duration.ofHours(-1);
+        t.plusHours(Long.MIN_VALUE/3600);
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="PlusMinutes")
+    Object[][] provider_plusMinutes_long() {
+        return new Object[][] {
+            {0, 0, 0},
+            {0, 1, 1},
+            {0, -1, -1},
+            {Long.MAX_VALUE/60, 0, Long.MAX_VALUE/60},
+            {Long.MIN_VALUE/60, 0, Long.MIN_VALUE/60},
+            {1, 0, 1},
+            {1, 1, 2},
+            {1, -1, 0},
+            {1, Long.MIN_VALUE/60, Long.MIN_VALUE/60 + 1},
+            {1, 0, 1},
+            {1, 1, 2},
+            {1, -1, 0},
+            {-1, 0, -1},
+            {-1, 1, 0},
+            {-1, -1, -2},
+            {-1, Long.MAX_VALUE/60, Long.MAX_VALUE/60 - 1},
+        };
+    }
+
+    @Test(dataProvider="PlusMinutes")
+    public void plusMinutes_long(long minutes, long amount, long expectedMinutes) {
+        Duration t = Duration.ofMinutes(minutes);
+        t = t.plusMinutes(amount);
+        assertEquals(t.toMinutes(), expectedMinutes);
+    }
+
+    @Test(expectedExceptions = {ArithmeticException.class})
+    public void plusMinutes_long_overflowTooBig() {
+        Duration t = Duration.ofMinutes(1);
+        t.plusMinutes(Long.MAX_VALUE/60);
+    }
+
+    @Test(expectedExceptions = {ArithmeticException.class})
+    public void plusMinutes_long_overflowTooSmall() {
+        Duration t = Duration.ofMinutes(-1);
+        t.plusMinutes(Long.MIN_VALUE/60);
+    }
+
+    //-----------------------------------------------------------------------
     @DataProvider(name="PlusSeconds")
     Object[][] provider_plusSeconds_long() {
         return new Object[][] {
@@ -1062,7 +1308,7 @@
         };
     }
 
-    @Test(dataProvider="PlusSeconds", groups={"tck"})
+    @Test(dataProvider="PlusSeconds")
     public void plusSeconds_long(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) {
         Duration t = Duration.ofSeconds(seconds, nanos);
         t = t.plusSeconds(amount);
@@ -1070,13 +1316,13 @@
         assertEquals(t.getNano(), expectedNanoOfSecond);
     }
 
-    @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions = {ArithmeticException.class})
     public void plusSeconds_long_overflowTooBig() {
         Duration t = Duration.ofSeconds(1, 0);
         t.plusSeconds(Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions = {ArithmeticException.class})
     public void plusSeconds_long_overflowTooSmall() {
         Duration t = Duration.ofSeconds(-1, 0);
         t.plusSeconds(Long.MIN_VALUE);
@@ -1138,21 +1384,21 @@
         };
     }
 
-    @Test(dataProvider="PlusMillis", groups={"tck"})
+    @Test(dataProvider="PlusMillis")
     public void plusMillis_long(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) {
         Duration t = Duration.ofSeconds(seconds, nanos);
         t = t.plusMillis(amount);
         assertEquals(t.getSeconds(), expectedSeconds);
         assertEquals(t.getNano(), expectedNanoOfSecond);
     }
-    @Test(dataProvider="PlusMillis", groups={"tck"})
+    @Test(dataProvider="PlusMillis")
     public void plusMillis_long_oneMore(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) {
         Duration t = Duration.ofSeconds(seconds + 1, nanos);
         t = t.plusMillis(amount);
         assertEquals(t.getSeconds(), expectedSeconds + 1);
         assertEquals(t.getNano(), expectedNanoOfSecond);
     }
-    @Test(dataProvider="PlusMillis", groups={"tck"})
+    @Test(dataProvider="PlusMillis")
     public void plusMillis_long_minusOneLess(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) {
         Duration t = Duration.ofSeconds(seconds - 1, nanos);
         t = t.plusMillis(amount);
@@ -1160,7 +1406,7 @@
         assertEquals(t.getNano(), expectedNanoOfSecond);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void plusMillis_long_max() {
         Duration t = Duration.ofSeconds(Long.MAX_VALUE, 998999999);
         t = t.plusMillis(1);
@@ -1168,13 +1414,13 @@
         assertEquals(t.getNano(), 999999999);
     }
 
-    @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions = {ArithmeticException.class})
     public void plusMillis_long_overflowTooBig() {
         Duration t = Duration.ofSeconds(Long.MAX_VALUE, 999000000);
         t.plusMillis(1);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void plusMillis_long_min() {
         Duration t = Duration.ofSeconds(Long.MIN_VALUE, 1000000);
         t = t.plusMillis(-1);
@@ -1182,7 +1428,7 @@
         assertEquals(t.getNano(), 0);
     }
 
-    @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions = {ArithmeticException.class})
     public void plusMillis_long_overflowTooSmall() {
         Duration t = Duration.ofSeconds(Long.MIN_VALUE, 0);
         t.plusMillis(-1);
@@ -1264,7 +1510,7 @@
         };
     }
 
-    @Test(dataProvider="PlusNanos", groups={"tck"})
+    @Test(dataProvider="PlusNanos")
     public void plusNanos_long(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) {
         Duration t = Duration.ofSeconds(seconds, nanos);
         t = t.plusNanos(amount);
@@ -1272,13 +1518,13 @@
         assertEquals(t.getNano(), expectedNanoOfSecond);
     }
 
-    @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions = {ArithmeticException.class})
     public void plusNanos_long_overflowTooBig() {
         Duration t = Duration.ofSeconds(Long.MAX_VALUE, 999999999);
         t.plusNanos(1);
     }
 
-    @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions = {ArithmeticException.class})
     public void plusNanos_long_overflowTooSmall() {
         Duration t = Duration.ofSeconds(Long.MIN_VALUE, 0);
         t.plusNanos(-1);
@@ -1470,27 +1716,27 @@
        };
     }
 
-    @Test(dataProvider="Minus", groups={"tck"})
+    @Test(dataProvider="Minus")
     public void minus(long seconds, int nanos, long otherSeconds, int otherNanos, long expectedSeconds, int expectedNanoOfSecond) {
        Duration t = Duration.ofSeconds(seconds, nanos).minus(Duration.ofSeconds(otherSeconds, otherNanos));
        assertEquals(t.getSeconds(), expectedSeconds);
        assertEquals(t.getNano(), expectedNanoOfSecond);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void minusOverflowTooSmall() {
        Duration t = Duration.ofSeconds(Long.MIN_VALUE);
        t.minus(Duration.ofSeconds(0, 1));
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void minusOverflowTooBig() {
        Duration t = Duration.ofSeconds(Long.MAX_VALUE, 999999999);
        t.minus(Duration.ofSeconds(-1, 999999999));
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void minus_longTemporalUnit_seconds() {
         Duration t = Duration.ofSeconds(1);
         t = t.minus(1, SECONDS);
@@ -1498,7 +1744,7 @@
         assertEquals(0, t.getNano());
      }
 
-    @Test(groups={"tck"})
+    @Test
     public void minus_longTemporalUnit_millis() {
         Duration t = Duration.ofSeconds(1);
         t = t.minus(1, MILLIS);
@@ -1506,7 +1752,7 @@
         assertEquals(999000000, t.getNano());
      }
 
-    @Test(groups={"tck"})
+    @Test
     public void minus_longTemporalUnit_micros() {
         Duration t = Duration.ofSeconds(1);
         t = t.minus(1, MICROS);
@@ -1514,7 +1760,7 @@
         assertEquals(999999000, t.getNano());
      }
 
-    @Test(groups={"tck"})
+    @Test
     public void minus_longTemporalUnit_nanos() {
         Duration t = Duration.ofSeconds(1);
         t = t.minus(1, NANOS);
@@ -1522,13 +1768,139 @@
         assertEquals(999999999, t.getNano());
      }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void minus_longTemporalUnit_null() {
        Duration t = Duration.ofSeconds(1);
        t.minus(1, (TemporalUnit) null);
     }
 
     //-----------------------------------------------------------------------
+    @DataProvider(name="MinusDays")
+    Object[][] provider_minusDays_long() {
+        return new Object[][] {
+            {0, 0, 0},
+            {0, 1, -1},
+            {0, -1, 1},
+            {Long.MAX_VALUE/3600/24, 0, Long.MAX_VALUE/3600/24},
+            {Long.MIN_VALUE/3600/24, 0, Long.MIN_VALUE/3600/24},
+            {1, 0, 1},
+            {1, 1, 0},
+            {1, -1, 2},
+            {Long.MAX_VALUE/3600/24, 1, Long.MAX_VALUE/3600/24 - 1},
+            {Long.MIN_VALUE/3600/24, -1, Long.MIN_VALUE/3600/24 + 1},
+            {1, 0, 1},
+            {1, 1, 0},
+            {1, -1, 2},
+            {-1, 0, -1},
+            {-1, 1, -2},
+            {-1, -1, 0},
+        };
+    }
+
+    @Test(dataProvider="MinusDays")
+    public void minusDays_long(long days, long amount, long expectedDays) {
+        Duration t = Duration.ofDays(days);
+        t = t.minusDays(amount);
+        assertEquals(t.toDays(), expectedDays);
+    }
+
+    @Test(expectedExceptions = {ArithmeticException.class})
+    public void minusDays_long_overflowTooBig() {
+        Duration t = Duration.ofDays(Long.MAX_VALUE/3600/24);
+        t.minusDays(-1);
+    }
+
+    @Test(expectedExceptions = {ArithmeticException.class})
+    public void minusDays_long_overflowTooSmall() {
+        Duration t = Duration.ofDays(Long.MIN_VALUE/3600/24);
+        t.minusDays(1);
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="MinusHours")
+    Object[][] provider_minusHours_long() {
+        return new Object[][] {
+            {0, 0, 0},
+            {0, 1, -1},
+            {0, -1, 1},
+            {Long.MAX_VALUE/3600, 0, Long.MAX_VALUE/3600},
+            {Long.MIN_VALUE/3600, 0, Long.MIN_VALUE/3600},
+            {1, 0, 1},
+            {1, 1, 0},
+            {1, -1, 2},
+            {Long.MAX_VALUE/3600, 1, Long.MAX_VALUE/3600 - 1},
+            {Long.MIN_VALUE/3600, -1, Long.MIN_VALUE/3600 + 1},
+            {1, 0, 1},
+            {1, 1, 0},
+            {1, -1, 2},
+            {-1, 0, -1},
+            {-1, 1, -2},
+            {-1, -1, 0},
+        };
+    }
+
+    @Test(dataProvider="MinusHours")
+    public void minusHours_long(long hours, long amount, long expectedHours) {
+        Duration t = Duration.ofHours(hours);
+        t = t.minusHours(amount);
+        assertEquals(t.toHours(), expectedHours);
+    }
+
+    @Test(expectedExceptions = {ArithmeticException.class})
+    public void minusHours_long_overflowTooBig() {
+        Duration t = Duration.ofHours(Long.MAX_VALUE/3600);
+        t.minusHours(-1);
+    }
+
+    @Test(expectedExceptions = {ArithmeticException.class})
+    public void minusHours_long_overflowTooSmall() {
+        Duration t = Duration.ofHours(Long.MIN_VALUE/3600);
+        t.minusHours(1);
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="MinusMinutes")
+    Object[][] provider_minusminutes_long() {
+        return new Object[][] {
+            {0, 0, 0},
+            {0, 1, -1},
+            {0, -1, 1},
+            {Long.MAX_VALUE/60, 0, Long.MAX_VALUE/60},
+            {Long.MIN_VALUE/60, 0, Long.MIN_VALUE/60},
+            {1, 0, 1},
+            {1, 1, 0},
+            {1, -1, 2},
+            {Long.MAX_VALUE/60, 1, Long.MAX_VALUE/60 - 1},
+            {Long.MIN_VALUE/60, -1, Long.MIN_VALUE/60 + 1},
+            {1, 0, 1},
+            {1, 1, 0},
+            {1, -1, 2},
+            {-1, 0, -1},
+            {-1, 1, -2},
+            {-1, -1, 0},
+        };
+    }
+
+    @Test(dataProvider="MinusMinutes")
+    public void minusMinutes_long(long minutes, long amount, long expectedMinutes) {
+        Duration t = Duration.ofMinutes(minutes);
+        t = t.minusMinutes(amount);
+        assertEquals(t.toMinutes(), expectedMinutes);
+    }
+
+    @Test(expectedExceptions = {ArithmeticException.class})
+    public void minusMinutes_long_overflowTooBig() {
+        Duration t = Duration.ofMinutes(Long.MAX_VALUE/60);
+        t.minusMinutes(-1);
+    }
+
+    @Test(expectedExceptions = {ArithmeticException.class})
+    public void minusMinutes_long_overflowTooSmall() {
+        Duration t = Duration.ofMinutes(Long.MIN_VALUE/60);
+        t.minusMinutes(1);
+    }
+
+    //-----------------------------------------------------------------------
     @DataProvider(name="MinusSeconds")
     Object[][] provider_minusSeconds_long() {
         return new Object[][] {
@@ -1555,7 +1927,7 @@
         };
     }
 
-    @Test(dataProvider="MinusSeconds", groups={"tck"})
+    @Test(dataProvider="MinusSeconds")
     public void minusSeconds_long(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) {
         Duration t = Duration.ofSeconds(seconds, nanos);
         t = t.minusSeconds(amount);
@@ -1563,13 +1935,13 @@
         assertEquals(t.getNano(), expectedNanoOfSecond);
     }
 
-    @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions = {ArithmeticException.class})
     public void minusSeconds_long_overflowTooBig() {
         Duration t = Duration.ofSeconds(1, 0);
         t.minusSeconds(Long.MIN_VALUE + 1);
     }
 
-    @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions = {ArithmeticException.class})
     public void minusSeconds_long_overflowTooSmall() {
         Duration t = Duration.ofSeconds(-2, 0);
         t.minusSeconds(Long.MAX_VALUE);
@@ -1631,21 +2003,21 @@
         };
     }
 
-    @Test(dataProvider="MinusMillis", groups={"tck"})
+    @Test(dataProvider="MinusMillis")
     public void minusMillis_long(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) {
         Duration t = Duration.ofSeconds(seconds, nanos);
         t = t.minusMillis(amount);
         assertEquals(t.getSeconds(), expectedSeconds);
         assertEquals(t.getNano(), expectedNanoOfSecond);
     }
-    @Test(dataProvider="MinusMillis", groups={"tck"})
+    @Test(dataProvider="MinusMillis")
     public void minusMillis_long_oneMore(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) {
         Duration t = Duration.ofSeconds(seconds + 1, nanos);
         t = t.minusMillis(amount);
         assertEquals(t.getSeconds(), expectedSeconds + 1);
         assertEquals(t.getNano(), expectedNanoOfSecond);
     }
-    @Test(dataProvider="MinusMillis", groups={"tck"})
+    @Test(dataProvider="MinusMillis")
     public void minusMillis_long_minusOneLess(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) {
         Duration t = Duration.ofSeconds(seconds - 1, nanos);
         t = t.minusMillis(amount);
@@ -1653,7 +2025,7 @@
         assertEquals(t.getNano(), expectedNanoOfSecond);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void minusMillis_long_max() {
         Duration t = Duration.ofSeconds(Long.MAX_VALUE, 998999999);
         t = t.minusMillis(-1);
@@ -1661,13 +2033,13 @@
         assertEquals(t.getNano(), 999999999);
     }
 
-    @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions = {ArithmeticException.class})
     public void minusMillis_long_overflowTooBig() {
         Duration t = Duration.ofSeconds(Long.MAX_VALUE, 999000000);
         t.minusMillis(-1);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void minusMillis_long_min() {
         Duration t = Duration.ofSeconds(Long.MIN_VALUE, 1000000);
         t = t.minusMillis(1);
@@ -1675,7 +2047,7 @@
         assertEquals(t.getNano(), 0);
     }
 
-    @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions = {ArithmeticException.class})
     public void minusMillis_long_overflowTooSmall() {
         Duration t = Duration.ofSeconds(Long.MIN_VALUE, 0);
         t.minusMillis(1);
@@ -1757,7 +2129,7 @@
         };
     }
 
-    @Test(dataProvider="MinusNanos", groups={"tck"})
+    @Test(dataProvider="MinusNanos")
     public void minusNanos_long(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) {
         Duration t = Duration.ofSeconds(seconds, nanos);
         t = t.minusNanos(amount);
@@ -1765,13 +2137,13 @@
         assertEquals(t.getNano(), expectedNanoOfSecond);
     }
 
-    @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions = {ArithmeticException.class})
     public void minusNanos_long_overflowTooBig() {
         Duration t = Duration.ofSeconds(Long.MAX_VALUE, 999999999);
         t.minusNanos(-1);
     }
 
-    @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions = {ArithmeticException.class})
     public void minusNanos_long_overflowTooSmall() {
         Duration t = Duration.ofSeconds(Long.MIN_VALUE, 0);
         t.minusNanos(1);
@@ -1873,7 +2245,7 @@
        };
     }
 
-    @Test(dataProvider="MultipliedBy", groups={"tck"})
+    @Test(dataProvider="MultipliedBy")
     public void multipliedBy(long seconds, int nanos, int multiplicand, long expectedSeconds, int expectedNanos) {
         Duration t = Duration.ofSeconds(seconds, nanos);
         t = t.multipliedBy(multiplicand);
@@ -1881,25 +2253,25 @@
         assertEquals(t.getNano(), expectedNanos);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void multipliedBy_max() {
         Duration test = Duration.ofSeconds(1);
         assertEquals(test.multipliedBy(Long.MAX_VALUE), Duration.ofSeconds(Long.MAX_VALUE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void multipliedBy_min() {
         Duration test = Duration.ofSeconds(1);
         assertEquals(test.multipliedBy(Long.MIN_VALUE), Duration.ofSeconds(Long.MIN_VALUE));
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void multipliedBy_tooBig() {
         Duration test = Duration.ofSeconds(1, 1);
         test.multipliedBy(Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void multipliedBy_tooBig_negative() {
         Duration test = Duration.ofSeconds(1, 1);
         test.multipliedBy(Long.MIN_VALUE);
@@ -1990,7 +2362,7 @@
        };
     }
 
-    @Test(dataProvider="DividedBy", groups={"tck"})
+    @Test(dataProvider="DividedBy")
     public void dividedBy(long seconds, int nanos, int divisor, long expectedSeconds, int expectedNanos) {
         Duration t = Duration.ofSeconds(seconds, nanos);
         t = t.dividedBy(divisor);
@@ -1998,14 +2370,14 @@
         assertEquals(t.getNano(), expectedNanos);
     }
 
-    @Test(dataProvider="DividedBy", expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(dataProvider="DividedBy", expectedExceptions=ArithmeticException.class)
     public void dividedByZero(long seconds, int nanos, int divisor, long expectedSeconds, int expectedNanos) {
        Duration t = Duration.ofSeconds(seconds, nanos);
        t.dividedBy(0);
        fail(t + " divided by zero did not throw ArithmeticException");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void dividedBy_max() {
         Duration test = Duration.ofSeconds(Long.MAX_VALUE);
         assertEquals(test.dividedBy(Long.MAX_VALUE), Duration.ofSeconds(1));
@@ -2014,7 +2386,7 @@
     //-----------------------------------------------------------------------
     // negated()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_negated() {
         assertEquals(Duration.ofSeconds(0).negated(), Duration.ofSeconds(0));
         assertEquals(Duration.ofSeconds(12).negated(), Duration.ofSeconds(-12));
@@ -2026,7 +2398,7 @@
         assertEquals(Duration.ofSeconds(Long.MAX_VALUE).negated(), Duration.ofSeconds(-Long.MAX_VALUE));
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void test_negated_overflow() {
         Duration.ofSeconds(Long.MIN_VALUE).negated();
     }
@@ -2034,7 +2406,7 @@
     //-----------------------------------------------------------------------
     // abs()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_abs() {
         assertEquals(Duration.ofSeconds(0).abs(), Duration.ofSeconds(0));
         assertEquals(Duration.ofSeconds(12).abs(), Duration.ofSeconds(12));
@@ -2046,7 +2418,7 @@
         assertEquals(Duration.ofSeconds(Long.MAX_VALUE).abs(), Duration.ofSeconds(Long.MAX_VALUE));
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void test_abs_overflow() {
         Duration.ofSeconds(Long.MIN_VALUE).abs();
     }
@@ -2054,19 +2426,19 @@
     //-----------------------------------------------------------------------
     // toNanos()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toNanos() {
         Duration test = Duration.ofSeconds(321, 123456789);
         assertEquals(test.toNanos(), 321123456789L);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_toNanos_max() {
         Duration test = Duration.ofSeconds(0, Long.MAX_VALUE);
         assertEquals(test.toNanos(), Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void test_toNanos_tooBig() {
         Duration test = Duration.ofSeconds(0, Long.MAX_VALUE).plusNanos(1);
         test.toNanos();
@@ -2075,19 +2447,19 @@
     //-----------------------------------------------------------------------
     // toMillis()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toMillis() {
         Duration test = Duration.ofSeconds(321, 123456789);
         assertEquals(test.toMillis(), 321000 + 123);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_toMillis_max() {
         Duration test = Duration.ofSeconds(Long.MAX_VALUE / 1000, (Long.MAX_VALUE % 1000) * 1000000);
         assertEquals(test.toMillis(), Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void test_toMillis_tooBig() {
         Duration test = Duration.ofSeconds(Long.MAX_VALUE / 1000, ((Long.MAX_VALUE % 1000) + 1) * 1000000);
         test.toMillis();
@@ -2096,7 +2468,7 @@
     //-----------------------------------------------------------------------
     // compareTo()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_comparisons() {
         doTest_comparisons_Duration(
             Duration.ofSeconds(-2L, 0),
@@ -2134,13 +2506,13 @@
         }
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_compareTo_ObjectNull() {
         Duration a = Duration.ofSeconds(0L, 0);
         a.compareTo(null);
     }
 
-    @Test(expectedExceptions=ClassCastException.class, groups={"tck"})
+    @Test(expectedExceptions=ClassCastException.class)
     @SuppressWarnings({ "unchecked", "rawtypes" })
     public void compareToNonDuration() {
        Comparable c = Duration.ofSeconds(0L);
@@ -2150,7 +2522,7 @@
     //-----------------------------------------------------------------------
     // equals()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_equals() {
         Duration test5a = Duration.ofSeconds(5L, 20);
         Duration test5b = Duration.ofSeconds(5L, 20);
@@ -2178,13 +2550,13 @@
         assertEquals(test6.equals(test6), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_null() {
         Duration test5 = Duration.ofSeconds(5L, 20);
         assertEquals(test5.equals(null), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_otherClass() {
         Duration test5 = Duration.ofSeconds(5L, 20);
         assertEquals(test5.equals(""), false);
@@ -2193,7 +2565,7 @@
     //-----------------------------------------------------------------------
     // hashCode()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_hashCode() {
         Duration test5a = Duration.ofSeconds(5L, 20);
         Duration test5b = Duration.ofSeconds(5L, 20);
@@ -2209,6 +2581,71 @@
     }
 
     //-----------------------------------------------------------------------
+    @DataProvider(name="withNanos")
+    Object[][] provider_withNanos_int() {
+        return new Object[][] {
+            {0, 0, 0,           0, 0},
+            {0, 0, 1,           0, 1},
+            {0, 0, 999999999,   0, 999999999},
+
+            {1, 0, 0,           1, 0},
+            {1, 0, 1,           1, 1},
+            {1, 0, 999999999,   1, 999999999},
+
+            {-1, 0, 0,           -1, 0},
+            {-1, 0, 1,           -1, 1},
+            {-1, 0, 999999999,   -1, 999999999},
+
+            {1, 999999999, 0,           1, 0},
+            {1, 999999999, 1,           1, 1},
+            {1, 999999998, 2,           1, 2},
+
+            {Long.MAX_VALUE, 0, 999999999, Long.MAX_VALUE, 999999999},
+            {Long.MIN_VALUE, 0, 999999999, Long.MIN_VALUE, 999999999},
+        };
+    }
+
+    @Test(dataProvider="withNanos")
+    public void withNanos_long(long seconds, int nanos, int amount, long expectedSeconds, int expectedNanoOfSecond) {
+        Duration t = Duration.ofSeconds(seconds, nanos);
+        t = t.withNanos(amount);
+        assertEquals(t.getSeconds(), expectedSeconds);
+        assertEquals(t.getNano(), expectedNanoOfSecond);
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="withSeconds")
+    Object[][] provider_withSeconds_long() {
+        return new Object[][] {
+            {0, 0, 0, 0, 0},
+            {0, 0, 1, 1, 0},
+            {0, 0, -1, -1, 0},
+            {0, 0, Long.MAX_VALUE, Long.MAX_VALUE, 0},
+            {0, 0, Long.MIN_VALUE, Long.MIN_VALUE, 0},
+
+            {1, 0, 0, 0, 0},
+            {1, 0, 2, 2, 0},
+            {1, 0, -1, -1, 0},
+            {1, 0, Long.MAX_VALUE, Long.MAX_VALUE, 0},
+            {1, 0, Long.MIN_VALUE, Long.MIN_VALUE, 0},
+
+            {-1, 1, 0, 0, 1},
+            {-1, 1, 1, 1, 1},
+            {-1, 1, -1, -1, 1},
+            {-1, 1, Long.MAX_VALUE, Long.MAX_VALUE, 1},
+            {-1, 1, Long.MIN_VALUE, Long.MIN_VALUE, 1},
+        };
+    }
+
+    @Test(dataProvider="withSeconds")
+    public void withSeconds_long(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) {
+        Duration t = Duration.ofSeconds(seconds, nanos);
+        t = t.withSeconds(amount);
+        assertEquals(t.getSeconds(), expectedSeconds);
+        assertEquals(t.getNano(), expectedNanoOfSecond);
+    }
+
+    //-----------------------------------------------------------------------
     // toString()
     //-----------------------------------------------------------------------
     @DataProvider(name="toString")
@@ -2299,6 +2736,6 @@
     @Test(dataProvider="BadTemporalUnit", expectedExceptions=DateTimeException.class)
     public void test_bad_getUnit(long amount, TemporalUnit unit) {
         Duration t = Duration.of(amount, unit);
-        long actual = t.get(unit);
+        t.get(unit);
     }
 }
--- a/test/java/time/tck/java/time/TCKInstant.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKInstant.java	Wed Apr 17 21:48:04 2013 -0700
@@ -75,6 +75,7 @@
 import static java.time.temporal.ChronoUnit.YEARS;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
 
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
@@ -84,18 +85,20 @@
 import java.time.Instant;
 import java.time.LocalDateTime;
 import java.time.OffsetDateTime;
+import java.time.ZoneId;
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoField;
 import java.time.temporal.JulianFields;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -113,6 +116,8 @@
 
     private static final long MIN_SECOND = Instant.MIN.getEpochSecond();
     private static final long MAX_SECOND = Instant.MAX.getEpochSecond();
+    private static final ZoneId ZONE_PARIS = ZoneId.of("Europe/Paris");
+    private static final ZoneOffset OFFSET_PTWO = ZoneOffset.ofHours(2);
 
     private Instant TEST_12345_123456789;
 
@@ -411,13 +416,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {TEST_12345_123456789, Queries.chronology(), null},
-                {TEST_12345_123456789, Queries.zoneId(), null},
-                {TEST_12345_123456789, Queries.precision(), NANOS},
-                {TEST_12345_123456789, Queries.zone(), null},
-                {TEST_12345_123456789, Queries.offset(), null},
-                {TEST_12345_123456789, Queries.localDate(), null},
-                {TEST_12345_123456789, Queries.localTime(), null},
+                {TEST_12345_123456789, TemporalQuery.chronology(), null},
+                {TEST_12345_123456789, TemporalQuery.zoneId(), null},
+                {TEST_12345_123456789, TemporalQuery.precision(), NANOS},
+                {TEST_12345_123456789, TemporalQuery.zone(), null},
+                {TEST_12345_123456789, TemporalQuery.offset(), null},
+                {TEST_12345_123456789, TemporalQuery.localDate(), null},
+                {TEST_12345_123456789, TemporalQuery.localTime(), null},
         };
     }
 
@@ -437,6 +442,128 @@
     }
 
     //-----------------------------------------------------------------------
+    // adjustInto(Temporal)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="adjustInto")
+    Object[][] data_adjustInto() {
+        return new Object[][]{
+                {Instant.ofEpochSecond(10, 200), Instant.ofEpochSecond(20), Instant.ofEpochSecond(10, 200), null},
+                {Instant.ofEpochSecond(10, -200), Instant.now(), Instant.ofEpochSecond(10, -200), null},
+                {Instant.ofEpochSecond(-10), Instant.EPOCH, Instant.ofEpochSecond(-10), null},
+                {Instant.ofEpochSecond(10), Instant.MIN, Instant.ofEpochSecond(10), null},
+                {Instant.ofEpochSecond(10), Instant.MAX, Instant.ofEpochSecond(10), null},
+
+                {Instant.ofEpochSecond(10, 200), LocalDateTime.of(1970, 1, 1, 0, 0, 20).toInstant(ZoneOffset.UTC), Instant.ofEpochSecond(10, 200), null},
+                {Instant.ofEpochSecond(10, 200), OffsetDateTime.of(1970, 1, 1, 0, 0, 20, 10, ZoneOffset.UTC), OffsetDateTime.of(1970, 1, 1, 0, 0, 10, 200, ZoneOffset.UTC), null},
+                {Instant.ofEpochSecond(10, 200), OffsetDateTime.of(1970, 1, 1, 0, 0, 20, 10, OFFSET_PTWO), OffsetDateTime.of(1970, 1, 1, 2, 0, 10, 200, OFFSET_PTWO), null},
+                {Instant.ofEpochSecond(10, 200), ZonedDateTime.of(1970, 1, 1, 0, 0, 20, 10, ZONE_PARIS), ZonedDateTime.of(1970, 1, 1, 1, 0, 10, 200, ZONE_PARIS), null},
+
+                {Instant.ofEpochSecond(10, 200), LocalDateTime.of(1970, 1, 1, 0, 0, 20), null, DateTimeException.class},
+                {Instant.ofEpochSecond(10, 200), null, null, NullPointerException.class},
+
+        };
+    }
+
+    @Test(dataProvider="adjustInto")
+    public void test_adjustInto(Instant test, Temporal temporal, Temporal expected, Class<?> expectedEx) {
+        if (expectedEx == null) {
+            Temporal result = test.adjustInto(temporal);
+            assertEquals(result, expected);
+        } else {
+            try {
+                Temporal result = test.adjustInto(temporal);
+                fail();
+            } catch (Exception ex) {
+                assertTrue(expectedEx.isInstance(ex));
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // with(TemporalAdjuster)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="with")
+    Object[][] data_with() {
+        return new Object[][]{
+                {Instant.ofEpochSecond(10, 200), Instant.ofEpochSecond(20), Instant.ofEpochSecond(20), null},
+                {Instant.ofEpochSecond(10), Instant.ofEpochSecond(20, -100), Instant.ofEpochSecond(20, -100), null},
+                {Instant.ofEpochSecond(-10), Instant.EPOCH, Instant.ofEpochSecond(0), null},
+                {Instant.ofEpochSecond(10), Instant.MIN, Instant.MIN, null},
+                {Instant.ofEpochSecond(10), Instant.MAX, Instant.MAX, null},
+
+                {Instant.ofEpochSecond(10, 200), LocalDateTime.of(1970, 1, 1, 0, 0, 20).toInstant(ZoneOffset.UTC), Instant.ofEpochSecond(20), null},
+
+                {Instant.ofEpochSecond(10, 200), LocalDateTime.of(1970, 1, 1, 0, 0, 20), null, DateTimeException.class},
+                {Instant.ofEpochSecond(10, 200), null, null, NullPointerException.class},
+
+        };
+    }
+
+
+    @Test(dataProvider="with")
+    public void test_with_temporalAdjuster(Instant test, TemporalAdjuster adjuster, Instant expected, Class<?> expectedEx) {
+        if (expectedEx == null) {
+            Instant result = test.with(adjuster);
+            assertEquals(result, expected);
+        } else {
+            try {
+                Instant result = test.with(adjuster);
+                fail();
+            } catch (Exception ex) {
+                assertTrue(expectedEx.isInstance(ex));
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // with(TemporalField, long)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="with_longTemporalField")
+    Object[][] data_with_longTemporalField() {
+        return new Object[][]{
+                {Instant.ofEpochSecond(10, 200), ChronoField.INSTANT_SECONDS, 100, Instant.ofEpochSecond(100, 200), null},
+                {Instant.ofEpochSecond(10, 200), ChronoField.INSTANT_SECONDS, 0, Instant.ofEpochSecond(0, 200), null},
+                {Instant.ofEpochSecond(10, 200), ChronoField.INSTANT_SECONDS, -100, Instant.ofEpochSecond(-100, 200), null},
+                {Instant.ofEpochSecond(10, 200), ChronoField.NANO_OF_SECOND, 100, Instant.ofEpochSecond(10, 100), null},
+                {Instant.ofEpochSecond(10, 200), ChronoField.NANO_OF_SECOND, 0, Instant.ofEpochSecond(10), null},
+                {Instant.ofEpochSecond(10, 200), ChronoField.MICRO_OF_SECOND, 100, Instant.ofEpochSecond(10, 100*1000), null},
+                {Instant.ofEpochSecond(10, 200), ChronoField.MICRO_OF_SECOND, 0, Instant.ofEpochSecond(10), null},
+                {Instant.ofEpochSecond(10, 200), ChronoField.MILLI_OF_SECOND, 100, Instant.ofEpochSecond(10, 100*1000*1000), null},
+                {Instant.ofEpochSecond(10, 200), ChronoField.MILLI_OF_SECOND, 0, Instant.ofEpochSecond(10), null},
+
+                {Instant.ofEpochSecond(10, 200), ChronoField.NANO_OF_SECOND, 1000000000L, null, DateTimeException.class},
+                {Instant.ofEpochSecond(10, 200), ChronoField.MICRO_OF_SECOND, 1000000, null, DateTimeException.class},
+                {Instant.ofEpochSecond(10, 200), ChronoField.MILLI_OF_SECOND, 1000, null, DateTimeException.class},
+
+                {Instant.ofEpochSecond(10, 200), ChronoField.SECOND_OF_MINUTE, 1, null, DateTimeException.class},
+                {Instant.ofEpochSecond(10, 200), ChronoField.SECOND_OF_DAY, 1, null, DateTimeException.class},
+                {Instant.ofEpochSecond(10, 200), ChronoField.OFFSET_SECONDS, 1, null, DateTimeException.class},
+                {Instant.ofEpochSecond(10, 200), ChronoField.NANO_OF_DAY, 1, null, DateTimeException.class},
+                {Instant.ofEpochSecond(10, 200), ChronoField.MINUTE_OF_HOUR, 1, null, DateTimeException.class},
+                {Instant.ofEpochSecond(10, 200), ChronoField.MINUTE_OF_DAY, 1, null, DateTimeException.class},
+                {Instant.ofEpochSecond(10, 200), ChronoField.MILLI_OF_DAY, 1, null, DateTimeException.class},
+                {Instant.ofEpochSecond(10, 200), ChronoField.MICRO_OF_DAY, 1, null, DateTimeException.class},
+
+
+        };
+    }
+
+    @Test(dataProvider="with_longTemporalField")
+    public void test_with_longTemporalField(Instant test, TemporalField field, long value, Instant expected, Class<?> expectedEx) {
+        if (expectedEx == null) {
+            Instant result = test.with(field, value);
+            assertEquals(result, expected);
+        } else {
+            try {
+                Instant result = test.with(field, value);
+                fail();
+            } catch (Exception ex) {
+                assertTrue(expectedEx.isInstance(ex));
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
     // truncated(TemporalUnit)
     //-----------------------------------------------------------------------
     TemporalUnit NINETY_MINS = new TemporalUnit() {
@@ -509,7 +636,7 @@
                 {Instant.ofEpochSecond(86400 + 10800 + 60 + 1, 123_456_789), NINETY_MINS, Instant.ofEpochSecond(86400 + 10800, 0)},
         };
     }
-    @Test(groups={"tck"}, dataProvider="truncatedToValid")
+    @Test(dataProvider="truncatedToValid")
     public void test_truncatedTo_valid(Instant input, TemporalUnit unit, Instant expected) {
         assertEquals(input.truncatedTo(unit), expected);
     }
@@ -524,12 +651,12 @@
         };
     }
 
-    @Test(groups={"tck"}, dataProvider="truncatedToInvalid", expectedExceptions=DateTimeException.class)
+    @Test(dataProvider="truncatedToInvalid", expectedExceptions=DateTimeException.class)
     public void test_truncatedTo_invalid(Instant input, TemporalUnit unit) {
         input.truncatedTo(unit);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_truncatedTo_null() {
         TEST_12345_123456789.truncatedTo(null);
     }
@@ -1580,6 +1707,130 @@
     }
 
     //-----------------------------------------------------------------------
+    // periodUntil(Temporal, TemporalUnit)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="periodUntilUnit")
+    Object[][] data_periodUntilUnit() {
+        return new Object[][] {
+                {5, 650, -1, 650, SECONDS, -6},
+                {5, 650, 0, 650, SECONDS, -5},
+                {5, 650, 3, 650, SECONDS, -2},
+                {5, 650, 4, 650, SECONDS, -1},
+                {5, 650, 5, 650, SECONDS, 0},
+                {5, 650, 6, 650, SECONDS, 1},
+                {5, 650, 7, 650, SECONDS, 2},
+
+                {5, 650, -1, 0, SECONDS, -6},
+                {5, 650, 0, 0, SECONDS, -5},
+                {5, 650, 3, 0, SECONDS, -2},
+                {5, 650, 4, 0, SECONDS, -1},
+                {5, 650, 5, 0, SECONDS, 0},
+                {5, 650, 6, 0, SECONDS, 0},
+                {5, 650, 7, 0, SECONDS, 1},
+
+                {5, 650, -1, 950, SECONDS, -5},
+                {5, 650, 0, 950, SECONDS, -4},
+                {5, 650, 3, 950, SECONDS, -1},
+                {5, 650, 4, 950, SECONDS, 0},
+                {5, 650, 5, 950, SECONDS, 0},
+                {5, 650, 6, 950, SECONDS, 1},
+                {5, 650, 7, 950, SECONDS, 2},
+
+                {5, 650, -1, 50, SECONDS, -6},
+                {5, 650, 0, 50, SECONDS, -5},
+                {5, 650, 4, 50, SECONDS, -1},
+                {5, 650, 5, 50, SECONDS, 0},
+                {5, 650, 6, 50, SECONDS, 0},
+                {5, 650, 7, 50, SECONDS, 1},
+                {5, 650, 8, 50, SECONDS, 2},
+
+                {5, 650_000_000, -1, 650_000_000, NANOS, -6_000_000_000L},
+                {5, 650_000_000, 0, 650_000_000, NANOS, -5_000_000_000L},
+                {5, 650_000_000, 3, 650_000_000, NANOS, -2_000_000_000L},
+                {5, 650_000_000, 4, 650_000_000, NANOS, -1_000_000_000L},
+                {5, 650_000_000, 5, 650_000_000, NANOS, 0},
+                {5, 650_000_000, 6, 650_000_000, NANOS, 1_000_000_000L},
+                {5, 650_000_000, 7, 650_000_000, NANOS, 2_000_000_000L},
+
+                {5, 650_000_000, -1, 0, NANOS, -6_650_000_000L},
+                {5, 650_000_000, 0, 0, NANOS, -5_650_000_000L},
+                {5, 650_000_000, 3, 0, NANOS, -2_650_000_000L},
+                {5, 650_000_000, 4, 0, NANOS, -1_650_000_000L},
+                {5, 650_000_000, 5, 0, NANOS, -650_000_000L},
+                {5, 650_000_000, 6, 0, NANOS, 350_000_000L},
+                {5, 650_000_000, 7, 0, NANOS, 1_350_000_000L},
+
+                {5, 650_000_000, -1, 950_000_000, NANOS, -5_700_000_000L},
+                {5, 650_000_000, 0, 950_000_000, NANOS, -4_700_000_000L},
+                {5, 650_000_000, 3, 950_000_000, NANOS, -1_700_000_000L},
+                {5, 650_000_000, 4, 950_000_000, NANOS, -700_000_000L},
+                {5, 650_000_000, 5, 950_000_000, NANOS, 300_000_000L},
+                {5, 650_000_000, 6, 950_000_000, NANOS, 1_300_000_000L},
+                {5, 650_000_000, 7, 950_000_000, NANOS, 2_300_000_000L},
+
+                {5, 650_000_000, -1, 50_000_000, NANOS, -6_600_000_000L},
+                {5, 650_000_000, 0, 50_000_000, NANOS, -5_600_000_000L},
+                {5, 650_000_000, 4, 50_000_000, NANOS, -1_600_000_000L},
+                {5, 650_000_000, 5, 50_000_000, NANOS, -600_000_000L},
+                {5, 650_000_000, 6, 50_000_000, NANOS, 400_000_000L},
+                {5, 650_000_000, 7, 50_000_000, NANOS, 1_400_000_000L},
+                {5, 650_000_000, 8, 50_000_000, NANOS, 2_400_000_000L},
+
+                {0, 0, -60, 0, MINUTES, -1L},
+                {0, 0, -1, 999_999_999, MINUTES, 0L},
+                {0, 0, 59, 0, MINUTES, 0L},
+                {0, 0, 59, 999_999_999, MINUTES, 0L},
+                {0, 0, 60, 0, MINUTES, 1L},
+                {0, 0, 61, 0, MINUTES, 1L},
+
+                {0, 0, -3600, 0, HOURS, -1L},
+                {0, 0, -1, 999_999_999, HOURS, 0L},
+                {0, 0, 3599, 0, HOURS, 0L},
+                {0, 0, 3599, 999_999_999, HOURS, 0L},
+                {0, 0, 3600, 0, HOURS, 1L},
+                {0, 0, 3601, 0, HOURS, 1L},
+
+                {0, 0, -86400, 0, DAYS, -1L},
+                {0, 0, -1, 999_999_999, DAYS, 0L},
+                {0, 0, 86399, 0, DAYS, 0L},
+                {0, 0, 86399, 999_999_999, DAYS, 0L},
+                {0, 0, 86400, 0, DAYS, 1L},
+                {0, 0, 86401, 0, DAYS, 1L},
+        };
+    }
+
+    @Test(dataProvider="periodUntilUnit")
+    public void test_periodUntil_TemporalUnit(long seconds1, int nanos1, long seconds2, long nanos2, TemporalUnit unit, long expected) {
+        Instant i1 = Instant.ofEpochSecond(seconds1, nanos1);
+        Instant i2 = Instant.ofEpochSecond(seconds2, nanos2);
+        long amount = i1.periodUntil(i2, unit);
+        assertEquals(amount, expected);
+    }
+
+    @Test(dataProvider="periodUntilUnit")
+    public void test_periodUntil_TemporalUnit_negated(long seconds1, int nanos1, long seconds2, long nanos2, TemporalUnit unit, long expected) {
+        Instant i1 = Instant.ofEpochSecond(seconds1, nanos1);
+        Instant i2 = Instant.ofEpochSecond(seconds2, nanos2);
+        long amount = i2.periodUntil(i1, unit);
+        assertEquals(amount, -expected);
+    }
+
+    @Test(expectedExceptions = UnsupportedTemporalTypeException.class)
+    public void test_periodUntil_TemporalUnit_unsupportedUnit() {
+        TEST_12345_123456789.periodUntil(TEST_12345_123456789, MONTHS);
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_periodUntil_TemporalUnit_nullEnd() {
+        TEST_12345_123456789.periodUntil(null, HOURS);
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_periodUntil_TemporalUnit_nullUnit() {
+        TEST_12345_123456789.periodUntil(TEST_12345_123456789, null);
+    }
+
+    //-----------------------------------------------------------------------
     // atOffset()
     //-----------------------------------------------------------------------
     @Test
--- a/test/java/time/tck/java/time/TCKLocalDate.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKLocalDate.java	Wed Apr 17 21:48:04 2013 -0700
@@ -67,11 +67,19 @@
 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
 import static java.time.temporal.ChronoField.DAY_OF_YEAR;
 import static java.time.temporal.ChronoField.EPOCH_DAY;
-import static java.time.temporal.ChronoField.EPOCH_MONTH;
 import static java.time.temporal.ChronoField.ERA;
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
 import static java.time.temporal.ChronoField.YEAR;
 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
+import static java.time.temporal.ChronoUnit.CENTURIES;
+import static java.time.temporal.ChronoUnit.DAYS;
+import static java.time.temporal.ChronoUnit.DECADES;
+import static java.time.temporal.ChronoUnit.HOURS;
+import static java.time.temporal.ChronoUnit.MILLENNIA;
+import static java.time.temporal.ChronoUnit.MONTHS;
+import static java.time.temporal.ChronoUnit.WEEKS;
+import static java.time.temporal.ChronoUnit.YEARS;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertNotNull;
@@ -101,13 +109,13 @@
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.JulianFields;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -137,7 +145,7 @@
     private Instant MAX_INSTANT;
     private Instant MIN_INSTANT;
 
-    @BeforeMethod(groups={"tck", "implementation"})
+    @BeforeMethod
     public void setUp() {
         TEST_2007_07_15 = LocalDate.of(2007, 7, 15);
 
@@ -170,7 +178,7 @@
             ALIGNED_WEEK_OF_MONTH,
             ALIGNED_WEEK_OF_YEAR,
             MONTH_OF_YEAR,
-            EPOCH_MONTH,
+            PROLEPTIC_MONTH,
             YEAR_OF_ERA,
             YEAR,
             ERA,
@@ -236,7 +244,7 @@
     //-----------------------------------------------------------------------
     // now()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now() {
         LocalDate expected = LocalDate.now(Clock.systemDefaultZone());
         LocalDate test = LocalDate.now();
@@ -253,12 +261,12 @@
     //-----------------------------------------------------------------------
     // now(ZoneId)
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_ZoneId_nullZoneId() {
         LocalDate.now((ZoneId) null);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_ZoneId() {
         ZoneId zone = ZoneId.of("UTC+01:02:03");
         LocalDate expected = LocalDate.now(Clock.system(zone));
@@ -276,12 +284,12 @@
     //-----------------------------------------------------------------------
     // now(Clock)
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_Clock_nullClock() {
         LocalDate.now((Clock) null);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_allSecsInDay_utc() {
         for (int i = 0; i < (2 * 24 * 60 * 60); i++) {
             Instant instant = Instant.ofEpochSecond(i);
@@ -293,7 +301,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_allSecsInDay_offset() {
         for (int i = 0; i < (2 * 24 * 60 * 60); i++) {
             Instant instant = Instant.ofEpochSecond(i);
@@ -305,7 +313,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_allSecsInDay_beforeEpoch() {
         for (int i =-1; i >= -(2 * 24 * 60 * 60); i--) {
             Instant instant = Instant.ofEpochSecond(i);
@@ -318,27 +326,27 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_maxYear() {
         Clock clock = Clock.fixed(MAX_INSTANT, ZoneOffset.UTC);
         LocalDate test = LocalDate.now(clock);
         assertEquals(test, MAX_DATE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void now_Clock_tooBig() {
         Clock clock = Clock.fixed(MAX_INSTANT.plusSeconds(24 * 60 * 60), ZoneOffset.UTC);
         LocalDate.now(clock);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_minYear() {
         Clock clock = Clock.fixed(MIN_INSTANT, ZoneOffset.UTC);
         LocalDate test = LocalDate.now(clock);
         assertEquals(test, MIN_DATE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void now_Clock_tooLow() {
         Clock clock = Clock.fixed(MIN_INSTANT.minusNanos(1), ZoneOffset.UTC);
         LocalDate.now(clock);
@@ -347,84 +355,84 @@
     //-----------------------------------------------------------------------
     // of() factories
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_intsMonth() {
         assertEquals(TEST_2007_07_15, LocalDate.of(2007, Month.JULY, 15));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_intsMonth_29febNonLeap() {
         LocalDate.of(2007, Month.FEBRUARY, 29);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_intsMonth_31apr() {
         LocalDate.of(2007, Month.APRIL, 31);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_intsMonth_dayTooLow() {
         LocalDate.of(2007, Month.JANUARY, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_intsMonth_dayTooHigh() {
         LocalDate.of(2007, Month.JANUARY, 32);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_intsMonth_nullMonth() {
         LocalDate.of(2007, null, 30);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_intsMonth_yearTooLow() {
         LocalDate.of(Integer.MIN_VALUE, Month.JANUARY, 1);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_ints() {
         check(TEST_2007_07_15, 2007, 7, 15);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_ints_29febNonLeap() {
         LocalDate.of(2007, 2, 29);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_ints_31apr() {
         LocalDate.of(2007, 4, 31);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_ints_dayTooLow() {
         LocalDate.of(2007, 1, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_ints_dayTooHigh() {
         LocalDate.of(2007, 1, 32);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_ints_monthTooLow() {
         LocalDate.of(2007, 0, 1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_ints_monthTooHigh() {
         LocalDate.of(2007, 13, 1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_ints_yearTooLow() {
         LocalDate.of(Integer.MIN_VALUE, 1, 1);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofYearDay_ints_nonLeap() {
         LocalDate date = LocalDate.of(2007, 1, 1);
         for (int i = 1; i < 365; i++) {
@@ -433,7 +441,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofYearDay_ints_leap() {
         LocalDate date = LocalDate.of(2008, 1, 1);
         for (int i = 1; i < 366; i++) {
@@ -442,22 +450,22 @@
         }
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofYearDay_ints_366nonLeap() {
         LocalDate.ofYearDay(2007, 366);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofYearDay_ints_dayTooLow() {
         LocalDate.ofYearDay(2007, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofYearDay_ints_dayTooHigh() {
         LocalDate.ofYearDay(2007, 367);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofYearDay_ints_yearTooLow() {
         LocalDate.ofYearDay(Integer.MIN_VALUE, 1);
     }
@@ -491,7 +499,7 @@
     //-----------------------------------------------------------------------
     // ofEpochDay()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofEpochDay() {
         long date_0000_01_01 = -678941 - 40587;
         assertEquals(LocalDate.ofEpochDay(0), LocalDate.of(1970, 1, 1));
@@ -512,12 +520,12 @@
         }
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofEpochDay_aboveMax() {
         LocalDate.ofEpochDay(MAX_VALID_EPOCHDAYS + 1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofEpochDay_belowMin() {
         LocalDate.ofEpochDay(MIN_VALID_EPOCHDAYS - 1);
     }
@@ -525,18 +533,18 @@
     //-----------------------------------------------------------------------
     // from()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_from_TemporalAccessor() {
         assertEquals(LocalDate.from(LocalDate.of(2007, 7, 15)), LocalDate.of(2007, 7, 15));
         assertEquals(LocalDate.from(LocalDateTime.of(2007, 7, 15, 12, 30)), LocalDate.of(2007, 7, 15));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_from_TemporalAccessor_invalid_noDerive() {
         LocalDate.from(LocalTime.of(12, 30));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_from_TemporalAccessor_null() {
         LocalDate.from((TemporalAccessor) null);
     }
@@ -544,7 +552,7 @@
     //-----------------------------------------------------------------------
     // parse()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleToString", groups={"tck"})
+    @Test(dataProvider="sampleToString")
     public void factory_parse_validText(int y, int m, int d, String parsable) {
         LocalDate t = LocalDate.parse(parsable);
         assertNotNull(t, parsable);
@@ -570,22 +578,22 @@
         };
     }
 
-    @Test(dataProvider="sampleBadParse", expectedExceptions={DateTimeParseException.class}, groups={"tck"})
+    @Test(dataProvider="sampleBadParse", expectedExceptions={DateTimeParseException.class})
     public void factory_parse_invalidText(String unparsable) {
         LocalDate.parse(unparsable);
     }
 
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void factory_parse_illegalValue() {
         LocalDate.parse("2008-06-32");
     }
 
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void factory_parse_invalidValue() {
         LocalDate.parse("2008-06-31");
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_nullText() {
         LocalDate.parse((String) null);
     }
@@ -593,20 +601,20 @@
     //-----------------------------------------------------------------------
     // parse(DateTimeFormatter)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_parse_formatter() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d");
         LocalDate test = LocalDate.parse("2010 12 3", f);
         assertEquals(test, LocalDate.of(2010, 12, 3));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullText() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d");
         LocalDate.parse((String) null, f);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullFormatter() {
         LocalDate.parse("ANY", null);
     }
@@ -617,21 +625,26 @@
     @Test
     public void test_get_TemporalField() {
         LocalDate test = LocalDate.of(2008, 6, 30);
-        assertEquals(test.get(ChronoField.YEAR), 2008);
-        assertEquals(test.get(ChronoField.MONTH_OF_YEAR), 6);
-        assertEquals(test.get(ChronoField.DAY_OF_MONTH), 30);
-        assertEquals(test.get(ChronoField.DAY_OF_WEEK), 1);
-        assertEquals(test.get(ChronoField.DAY_OF_YEAR), 182);
+        assertEquals(test.get(YEAR), 2008);
+        assertEquals(test.get(MONTH_OF_YEAR), 6);
+        assertEquals(test.get(YEAR_OF_ERA), 2008);
+        assertEquals(test.get(ERA), 1);
+        assertEquals(test.get(DAY_OF_MONTH), 30);
+        assertEquals(test.get(DAY_OF_WEEK), 1);
+        assertEquals(test.get(DAY_OF_YEAR), 182);
     }
 
     @Test
     public void test_getLong_TemporalField() {
         LocalDate test = LocalDate.of(2008, 6, 30);
-        assertEquals(test.getLong(ChronoField.YEAR), 2008);
-        assertEquals(test.getLong(ChronoField.MONTH_OF_YEAR), 6);
-        assertEquals(test.getLong(ChronoField.DAY_OF_MONTH), 30);
-        assertEquals(test.getLong(ChronoField.DAY_OF_WEEK), 1);
-        assertEquals(test.getLong(ChronoField.DAY_OF_YEAR), 182);
+        assertEquals(test.getLong(YEAR), 2008);
+        assertEquals(test.getLong(MONTH_OF_YEAR), 6);
+        assertEquals(test.getLong(YEAR_OF_ERA), 2008);
+        assertEquals(test.getLong(ERA), 1);
+        assertEquals(test.getLong(PROLEPTIC_MONTH), 2008 * 12 + 6 - 1);
+        assertEquals(test.getLong(DAY_OF_MONTH), 30);
+        assertEquals(test.getLong(DAY_OF_WEEK), 1);
+        assertEquals(test.getLong(DAY_OF_YEAR), 182);
     }
 
     //-----------------------------------------------------------------------
@@ -640,13 +653,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {TEST_2007_07_15, Queries.chronology(), IsoChronology.INSTANCE},
-                {TEST_2007_07_15, Queries.zoneId(), null},
-                {TEST_2007_07_15, Queries.precision(), ChronoUnit.DAYS},
-                {TEST_2007_07_15, Queries.zone(), null},
-                {TEST_2007_07_15, Queries.offset(), null},
-                {TEST_2007_07_15, Queries.localDate(), TEST_2007_07_15},
-                {TEST_2007_07_15, Queries.localTime(), null},
+                {TEST_2007_07_15, TemporalQuery.chronology(), IsoChronology.INSTANCE},
+                {TEST_2007_07_15, TemporalQuery.zoneId(), null},
+                {TEST_2007_07_15, TemporalQuery.precision(), ChronoUnit.DAYS},
+                {TEST_2007_07_15, TemporalQuery.zone(), null},
+                {TEST_2007_07_15, TemporalQuery.offset(), null},
+                {TEST_2007_07_15, TemporalQuery.localDate(), TEST_2007_07_15},
+                {TEST_2007_07_15, TemporalQuery.localTime(), null},
         };
     }
 
@@ -681,7 +694,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleDates", groups={"tck"})
+    @Test(dataProvider="sampleDates")
     public void test_get(int y, int m, int d) {
         LocalDate a = LocalDate.of(y, m, d);
         assertEquals(a.getYear(), y);
@@ -689,7 +702,7 @@
         assertEquals(a.getDayOfMonth(), d);
     }
 
-    @Test(dataProvider="sampleDates", groups={"tck"})
+    @Test(dataProvider="sampleDates")
     public void test_getDOY(int y, int m, int d) {
         LocalDate a = LocalDate.of(y, m, d);
         int total = 0;
@@ -700,7 +713,7 @@
         assertEquals(a.getDayOfYear(), doy);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_getDayOfWeek() {
         DayOfWeek dow = DayOfWeek.MONDAY;
         for (Month month : Month.values()) {
@@ -716,7 +729,7 @@
     //-----------------------------------------------------------------------
     // isLeapYear()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_isLeapYear() {
         assertEquals(LocalDate.of(1999, 1, 1).isLeapYear(), false);
         assertEquals(LocalDate.of(2000, 1, 1).isLeapYear(), true);
@@ -736,7 +749,7 @@
     //-----------------------------------------------------------------------
     // lengthOfMonth()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_lengthOfMonth_notLeapYear() {
         assertEquals(LocalDate.of(2007, 1, 1).lengthOfMonth(), 31);
         assertEquals(LocalDate.of(2007, 2, 1).lengthOfMonth(), 28);
@@ -752,7 +765,7 @@
         assertEquals(LocalDate.of(2007, 12, 1).lengthOfMonth(), 31);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_lengthOfMonth_leapYear() {
         assertEquals(LocalDate.of(2008, 1, 1).lengthOfMonth(), 31);
         assertEquals(LocalDate.of(2008, 2, 1).lengthOfMonth(), 29);
@@ -771,7 +784,7 @@
     //-----------------------------------------------------------------------
     // lengthOfYear()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_lengthOfYear() {
         assertEquals(LocalDate.of(2007, 1, 1).lengthOfYear(), 365);
         assertEquals(LocalDate.of(2008, 1, 1).lengthOfYear(), 366);
@@ -780,7 +793,7 @@
     //-----------------------------------------------------------------------
     // with()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment() {
         final LocalDate sample = LocalDate.of(2012, 3, 4);
         TemporalAdjuster adjuster = new TemporalAdjuster() {
@@ -792,7 +805,7 @@
         assertEquals(TEST_2007_07_15.with(adjuster), sample);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_with_adjustment_null() {
         TEST_2007_07_15.with((TemporalAdjuster) null);
     }
@@ -800,28 +813,28 @@
     //-----------------------------------------------------------------------
     // with(TemporalField,long)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_with_TemporalField_long_normal() {
         LocalDate t = TEST_2007_07_15.with(YEAR, 2008);
         assertEquals(t, LocalDate.of(2008, 7, 15));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"} )
+    @Test(expectedExceptions=NullPointerException.class )
     public void test_with_TemporalField_long_null() {
         TEST_2007_07_15.with((TemporalField) null, 1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"} )
+    @Test(expectedExceptions=DateTimeException.class )
     public void test_with_TemporalField_long_invalidField() {
         TEST_2007_07_15.with(MockFieldNoValue.INSTANCE, 1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"} )
+    @Test(expectedExceptions=DateTimeException.class )
     public void test_with_TemporalField_long_timeField() {
         TEST_2007_07_15.with(ChronoField.AMPM_OF_DAY, 1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"} )
+    @Test(expectedExceptions=DateTimeException.class )
     public void test_with_TemporalField_long_invalidValue() {
         TEST_2007_07_15.with(ChronoField.DAY_OF_WEEK, -1);
     }
@@ -829,18 +842,18 @@
     //-----------------------------------------------------------------------
     // withYear()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withYear_int_normal() {
         LocalDate t = TEST_2007_07_15.withYear(2008);
         assertEquals(t, LocalDate.of(2008, 7, 15));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withYear_int_invalid() {
         TEST_2007_07_15.withYear(Year.MIN_VALUE - 1);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withYear_int_adjustDay() {
         LocalDate t = LocalDate.of(2008, 2, 29).withYear(2007);
         LocalDate expected = LocalDate.of(2007, 2, 28);
@@ -850,18 +863,18 @@
     //-----------------------------------------------------------------------
     // withMonth()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withMonth_int_normal() {
         LocalDate t = TEST_2007_07_15.withMonth(1);
         assertEquals(t, LocalDate.of(2007, 1, 15));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withMonth_int_invalid() {
         TEST_2007_07_15.withMonth(13);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withMonth_int_adjustDay() {
         LocalDate t = LocalDate.of(2007, 12, 31).withMonth(11);
         LocalDate expected = LocalDate.of(2007, 11, 30);
@@ -871,18 +884,18 @@
     //-----------------------------------------------------------------------
     // withDayOfMonth()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withDayOfMonth_normal() {
         LocalDate t = TEST_2007_07_15.withDayOfMonth(1);
         assertEquals(t, LocalDate.of(2007, 7, 1));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfMonth_illegal() {
         TEST_2007_07_15.withDayOfMonth(32);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfMonth_invalid() {
         LocalDate.of(2007, 11, 30).withDayOfMonth(31);
     }
@@ -890,18 +903,18 @@
     //-----------------------------------------------------------------------
     // withDayOfYear(int)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withDayOfYear_normal() {
         LocalDate t = TEST_2007_07_15.withDayOfYear(33);
         assertEquals(t, LocalDate.of(2007, 2, 2));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfYear_illegal() {
         TEST_2007_07_15.withDayOfYear(367);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfYear_invalid() {
         TEST_2007_07_15.withDayOfYear(366);
     }
@@ -909,38 +922,38 @@
     //-----------------------------------------------------------------------
     // plus(Period)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_Period_positiveMonths() {
         MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS);
         LocalDate t = TEST_2007_07_15.plus(period);
         assertEquals(t, LocalDate.of(2008, 2, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_Period_negativeDays() {
         MockSimplePeriod period = MockSimplePeriod.of(-25, ChronoUnit.DAYS);
         LocalDate t = TEST_2007_07_15.plus(period);
         assertEquals(t, LocalDate.of(2007, 6, 20));
     }
 
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plus_Period_timeNotAllowed() {
         MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.HOURS);
         TEST_2007_07_15.plus(period);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_plus_Period_null() {
         TEST_2007_07_15.plus((MockSimplePeriod) null);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plus_Period_invalidTooLarge() {
         MockSimplePeriod period = MockSimplePeriod.of(1, ChronoUnit.YEARS);
         LocalDate.of(Year.MAX_VALUE, 1, 1).plus(period);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plus_Period_invalidTooSmall() {
         MockSimplePeriod period = MockSimplePeriod.of(-1, ChronoUnit.YEARS);
         LocalDate.of(Year.MIN_VALUE, 1, 1).plus(period);
@@ -949,34 +962,34 @@
     //-----------------------------------------------------------------------
     // plus(long,TemporalUnit)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_longTemporalUnit_positiveMonths() {
         LocalDate t = TEST_2007_07_15.plus(7, ChronoUnit.MONTHS);
         assertEquals(t, LocalDate.of(2008, 2, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_longTemporalUnit_negativeDays() {
         LocalDate t = TEST_2007_07_15.plus(-25, ChronoUnit.DAYS);
         assertEquals(t, LocalDate.of(2007, 6, 20));
     }
 
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plus_longTemporalUnit_timeNotAllowed() {
         TEST_2007_07_15.plus(7, ChronoUnit.HOURS);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_plus_longTemporalUnit_null() {
         TEST_2007_07_15.plus(1, (TemporalUnit) null);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plus_longTemporalUnit_invalidTooLarge() {
         LocalDate.of(Year.MAX_VALUE, 1, 1).plus(1, ChronoUnit.YEARS);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plus_longTemporalUnit_invalidTooSmall() {
         LocalDate.of(Year.MIN_VALUE, 1, 1).plus(-1, ChronoUnit.YEARS);
     }
@@ -984,56 +997,56 @@
     //-----------------------------------------------------------------------
     // plusYears()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears_long_normal() {
         LocalDate t = TEST_2007_07_15.plusYears(1);
         assertEquals(t, LocalDate.of(2008, 7, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears_long_negative() {
         LocalDate t = TEST_2007_07_15.plusYears(-1);
         assertEquals(t, LocalDate.of(2006, 7, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears_long_adjustDay() {
         LocalDate t = LocalDate.of(2008, 2, 29).plusYears(1);
         LocalDate expected = LocalDate.of(2009, 2, 28);
         assertEquals(t, expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears_long_big() {
         long years = 20L + Year.MAX_VALUE;
         LocalDate test = LocalDate.of(-40, 6, 1).plusYears(years);
         assertEquals(test, LocalDate.of((int) (-40L + years), 6, 1));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusYears_long_invalidTooLarge() {
         LocalDate test = LocalDate.of(Year.MAX_VALUE, 6, 1);
         test.plusYears(1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusYears_long_invalidTooLargeMaxAddMax() {
         LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1);
         test.plusYears(Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusYears_long_invalidTooLargeMaxAddMin() {
         LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1);
         test.plusYears(Long.MIN_VALUE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusYears_long_invalidTooSmall_validInt() {
         LocalDate.of(Year.MIN_VALUE, 1, 1).plusYears(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusYears_long_invalidTooSmall_invalidInt() {
         LocalDate.of(Year.MIN_VALUE, 1, 1).plusYears(-10);
     }
@@ -1041,227 +1054,227 @@
     //-----------------------------------------------------------------------
     // plusMonths()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_long_normal() {
         LocalDate t = TEST_2007_07_15.plusMonths(1);
         assertEquals(t, LocalDate.of(2007, 8, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_long_overYears() {
         LocalDate t = TEST_2007_07_15.plusMonths(25);
         assertEquals(t, LocalDate.of(2009, 8, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_long_negative() {
         LocalDate t = TEST_2007_07_15.plusMonths(-1);
         assertEquals(t, LocalDate.of(2007, 6, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_long_negativeAcrossYear() {
         LocalDate t = TEST_2007_07_15.plusMonths(-7);
         assertEquals(t, LocalDate.of(2006, 12, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_long_negativeOverYears() {
         LocalDate t = TEST_2007_07_15.plusMonths(-31);
         assertEquals(t, LocalDate.of(2004, 12, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_long_adjustDayFromLeapYear() {
         LocalDate t = LocalDate.of(2008, 2, 29).plusMonths(12);
         LocalDate expected = LocalDate.of(2009, 2, 28);
         assertEquals(t, expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_long_adjustDayFromMonthLength() {
         LocalDate t = LocalDate.of(2007, 3, 31).plusMonths(1);
         LocalDate expected = LocalDate.of(2007, 4, 30);
         assertEquals(t, expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_long_big() {
         long months = 20L + Integer.MAX_VALUE;
         LocalDate test = LocalDate.of(-40, 6, 1).plusMonths(months);
         assertEquals(test, LocalDate.of((int) (-40L + months / 12), 6 + (int) (months % 12), 1));
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_plusMonths_long_invalidTooLarge() {
         LocalDate.of(Year.MAX_VALUE, 12, 1).plusMonths(1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusMonths_long_invalidTooLargeMaxAddMax() {
         LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1);
         test.plusMonths(Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusMonths_long_invalidTooLargeMaxAddMin() {
         LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1);
         test.plusMonths(Long.MIN_VALUE);
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_plusMonths_long_invalidTooSmall() {
         LocalDate.of(Year.MIN_VALUE, 1, 1).plusMonths(-1);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_normal() {
         LocalDate t = TEST_2007_07_15.plusWeeks(1);
         assertEquals(t, LocalDate.of(2007, 7, 22));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_overMonths() {
         LocalDate t = TEST_2007_07_15.plusWeeks(9);
         assertEquals(t, LocalDate.of(2007, 9, 16));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_overYears() {
         LocalDate t = LocalDate.of(2006, 7, 16).plusWeeks(52);
         assertEquals(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_overLeapYears() {
         LocalDate t = TEST_2007_07_15.plusYears(-1).plusWeeks(104);
         assertEquals(t, LocalDate.of(2008, 7, 12));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_negative() {
         LocalDate t = TEST_2007_07_15.plusWeeks(-1);
         assertEquals(t, LocalDate.of(2007, 7, 8));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_negativeAcrossYear() {
         LocalDate t = TEST_2007_07_15.plusWeeks(-28);
         assertEquals(t, LocalDate.of(2006, 12, 31));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_negativeOverYears() {
         LocalDate t = TEST_2007_07_15.plusWeeks(-104);
         assertEquals(t, LocalDate.of(2005, 7, 17));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_maximum() {
         LocalDate t = LocalDate.of(Year.MAX_VALUE, 12, 24).plusWeeks(1);
         LocalDate expected = LocalDate.of(Year.MAX_VALUE, 12, 31);
         assertEquals(t, expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_minimum() {
         LocalDate t = LocalDate.of(Year.MIN_VALUE, 1, 8).plusWeeks(-1);
         LocalDate expected = LocalDate.of(Year.MIN_VALUE, 1, 1);
         assertEquals(t, expected);
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_plusWeeks_invalidTooLarge() {
         LocalDate.of(Year.MAX_VALUE, 12, 25).plusWeeks(1);
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_plusWeeks_invalidTooSmall() {
         LocalDate.of(Year.MIN_VALUE, 1, 7).plusWeeks(-1);
     }
 
-    @Test(expectedExceptions={ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions={ArithmeticException.class})
     public void test_plusWeeks_invalidMaxMinusMax() {
         LocalDate.of(Year.MAX_VALUE, 12, 25).plusWeeks(Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions={ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions={ArithmeticException.class})
     public void test_plusWeeks_invalidMaxMinusMin() {
         LocalDate.of(Year.MAX_VALUE, 12, 25).plusWeeks(Long.MIN_VALUE);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_normal() {
         LocalDate t = TEST_2007_07_15.plusDays(1);
         assertEquals(t, LocalDate.of(2007, 7, 16));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_overMonths() {
         LocalDate t = TEST_2007_07_15.plusDays(62);
         assertEquals(t, LocalDate.of(2007, 9, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_overYears() {
         LocalDate t = LocalDate.of(2006, 7, 14).plusDays(366);
         assertEquals(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_overLeapYears() {
         LocalDate t = TEST_2007_07_15.plusYears(-1).plusDays(365 + 366);
         assertEquals(t, LocalDate.of(2008, 7, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_negative() {
         LocalDate t = TEST_2007_07_15.plusDays(-1);
         assertEquals(t, LocalDate.of(2007, 7, 14));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_negativeAcrossYear() {
         LocalDate t = TEST_2007_07_15.plusDays(-196);
         assertEquals(t, LocalDate.of(2006, 12, 31));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_negativeOverYears() {
         LocalDate t = TEST_2007_07_15.plusDays(-730);
         assertEquals(t, LocalDate.of(2005, 7, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_maximum() {
         LocalDate t = LocalDate.of(Year.MAX_VALUE, 12, 30).plusDays(1);
         LocalDate expected = LocalDate.of(Year.MAX_VALUE, 12, 31);
         assertEquals(t, expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_minimum() {
         LocalDate t = LocalDate.of(Year.MIN_VALUE, 1, 2).plusDays(-1);
         LocalDate expected = LocalDate.of(Year.MIN_VALUE, 1, 1);
         assertEquals(t, expected);
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_plusDays_invalidTooLarge() {
         LocalDate.of(Year.MAX_VALUE, 12, 31).plusDays(1);
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_plusDays_invalidTooSmall() {
         LocalDate.of(Year.MIN_VALUE, 1, 1).plusDays(-1);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void test_plusDays_overflowTooLarge() {
         LocalDate.of(Year.MAX_VALUE, 12, 31).plusDays(Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void test_plusDays_overflowTooSmall() {
         LocalDate.of(Year.MIN_VALUE, 1, 1).plusDays(Long.MIN_VALUE);
     }
@@ -1269,38 +1282,38 @@
     //-----------------------------------------------------------------------
     // minus(Period)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_Period_positiveMonths() {
         MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS);
         LocalDate t = TEST_2007_07_15.minus(period);
         assertEquals(t, LocalDate.of(2006, 12, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_Period_negativeDays() {
         MockSimplePeriod period = MockSimplePeriod.of(-25, ChronoUnit.DAYS);
         LocalDate t = TEST_2007_07_15.minus(period);
         assertEquals(t, LocalDate.of(2007, 8, 9));
     }
 
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minus_Period_timeNotAllowed() {
         MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.HOURS);
         TEST_2007_07_15.minus(period);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_minus_Period_null() {
         TEST_2007_07_15.minus((MockSimplePeriod) null);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minus_Period_invalidTooLarge() {
         MockSimplePeriod period = MockSimplePeriod.of(-1, ChronoUnit.YEARS);
         LocalDate.of(Year.MAX_VALUE, 1, 1).minus(period);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minus_Period_invalidTooSmall() {
         MockSimplePeriod period = MockSimplePeriod.of(1, ChronoUnit.YEARS);
         LocalDate.of(Year.MIN_VALUE, 1, 1).minus(period);
@@ -1309,34 +1322,34 @@
     //-----------------------------------------------------------------------
     // minus(long,TemporalUnit)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_longTemporalUnit_positiveMonths() {
         LocalDate t = TEST_2007_07_15.minus(7, ChronoUnit.MONTHS);
         assertEquals(t, LocalDate.of(2006, 12, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_longTemporalUnit_negativeDays() {
         LocalDate t = TEST_2007_07_15.minus(-25, ChronoUnit.DAYS);
         assertEquals(t, LocalDate.of(2007, 8, 9));
     }
 
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minus_longTemporalUnit_timeNotAllowed() {
         TEST_2007_07_15.minus(7, ChronoUnit.HOURS);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_minus_longTemporalUnit_null() {
         TEST_2007_07_15.minus(1, (TemporalUnit) null);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minus_longTemporalUnit_invalidTooLarge() {
         LocalDate.of(Year.MAX_VALUE, 1, 1).minus(-1, ChronoUnit.YEARS);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minus_longTemporalUnit_invalidTooSmall() {
         LocalDate.of(Year.MIN_VALUE, 1, 1).minus(1, ChronoUnit.YEARS);
     }
@@ -1344,51 +1357,51 @@
     //-----------------------------------------------------------------------
     // minusYears()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears_long_normal() {
         LocalDate t = TEST_2007_07_15.minusYears(1);
         assertEquals(t, LocalDate.of(2006, 7, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears_long_negative() {
         LocalDate t = TEST_2007_07_15.minusYears(-1);
         assertEquals(t, LocalDate.of(2008, 7, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears_long_adjustDay() {
         LocalDate t = LocalDate.of(2008, 2, 29).minusYears(1);
         LocalDate expected = LocalDate.of(2007, 2, 28);
         assertEquals(t, expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears_long_big() {
         long years = 20L + Year.MAX_VALUE;
         LocalDate test = LocalDate.of(40, 6, 1).minusYears(years);
         assertEquals(test, LocalDate.of((int) (40L - years), 6, 1));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusYears_long_invalidTooLarge() {
         LocalDate test = LocalDate.of(Year.MAX_VALUE, 6, 1);
         test.minusYears(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusYears_long_invalidTooLargeMaxAddMax() {
         LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1);
         test.minusYears(Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusYears_long_invalidTooLargeMaxAddMin() {
         LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1);
         test.minusYears(Long.MIN_VALUE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusYears_long_invalidTooSmall() {
         LocalDate.of(Year.MIN_VALUE, 1, 1).minusYears(1);
     }
@@ -1396,232 +1409,307 @@
     //-----------------------------------------------------------------------
     // minusMonths()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_long_normal() {
         LocalDate t = TEST_2007_07_15.minusMonths(1);
         assertEquals(t, LocalDate.of(2007, 6, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_long_overYears() {
         LocalDate t = TEST_2007_07_15.minusMonths(25);
         assertEquals(t, LocalDate.of(2005, 6, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_long_negative() {
         LocalDate t = TEST_2007_07_15.minusMonths(-1);
         assertEquals(t, LocalDate.of(2007, 8, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_long_negativeAcrossYear() {
         LocalDate t = TEST_2007_07_15.minusMonths(-7);
         assertEquals(t, LocalDate.of(2008, 2, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_long_negativeOverYears() {
         LocalDate t = TEST_2007_07_15.minusMonths(-31);
         assertEquals(t, LocalDate.of(2010, 2, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_long_adjustDayFromLeapYear() {
         LocalDate t = LocalDate.of(2008, 2, 29).minusMonths(12);
         LocalDate expected = LocalDate.of(2007, 2, 28);
         assertEquals(t, expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_long_adjustDayFromMonthLength() {
         LocalDate t = LocalDate.of(2007, 3, 31).minusMonths(1);
         LocalDate expected = LocalDate.of(2007, 2, 28);
         assertEquals(t, expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_long_big() {
         long months = 20L + Integer.MAX_VALUE;
         LocalDate test = LocalDate.of(40, 6, 1).minusMonths(months);
         assertEquals(test, LocalDate.of((int) (40L - months / 12), 6 - (int) (months % 12), 1));
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_minusMonths_long_invalidTooLarge() {
         LocalDate.of(Year.MAX_VALUE, 12, 1).minusMonths(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusMonths_long_invalidTooLargeMaxAddMax() {
         LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1);
         test.minusMonths(Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusMonths_long_invalidTooLargeMaxAddMin() {
         LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1);
         test.minusMonths(Long.MIN_VALUE);
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_minusMonths_long_invalidTooSmall() {
         LocalDate.of(Year.MIN_VALUE, 1, 1).minusMonths(1);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_normal() {
         LocalDate t = TEST_2007_07_15.minusWeeks(1);
         assertEquals(t, LocalDate.of(2007, 7, 8));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_overMonths() {
         LocalDate t = TEST_2007_07_15.minusWeeks(9);
         assertEquals(t, LocalDate.of(2007, 5, 13));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_overYears() {
         LocalDate t = LocalDate.of(2008, 7, 13).minusWeeks(52);
         assertEquals(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_overLeapYears() {
         LocalDate t = TEST_2007_07_15.minusYears(-1).minusWeeks(104);
         assertEquals(t, LocalDate.of(2006, 7, 18));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_negative() {
         LocalDate t = TEST_2007_07_15.minusWeeks(-1);
         assertEquals(t, LocalDate.of(2007, 7, 22));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_negativeAcrossYear() {
         LocalDate t = TEST_2007_07_15.minusWeeks(-28);
         assertEquals(t, LocalDate.of(2008, 1, 27));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_negativeOverYears() {
         LocalDate t = TEST_2007_07_15.minusWeeks(-104);
         assertEquals(t, LocalDate.of(2009, 7, 12));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_maximum() {
         LocalDate t = LocalDate.of(Year.MAX_VALUE, 12, 24).minusWeeks(-1);
         LocalDate expected = LocalDate.of(Year.MAX_VALUE, 12, 31);
         assertEquals(t, expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_minimum() {
         LocalDate t = LocalDate.of(Year.MIN_VALUE, 1, 8).minusWeeks(1);
         LocalDate expected = LocalDate.of(Year.MIN_VALUE, 1, 1);
         assertEquals(t, expected);
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_minusWeeks_invalidTooLarge() {
         LocalDate.of(Year.MAX_VALUE, 12, 25).minusWeeks(-1);
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_minusWeeks_invalidTooSmall() {
         LocalDate.of(Year.MIN_VALUE, 1, 7).minusWeeks(1);
     }
 
-    @Test(expectedExceptions={ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions={ArithmeticException.class})
     public void test_minusWeeks_invalidMaxMinusMax() {
         LocalDate.of(Year.MAX_VALUE, 12, 25).minusWeeks(Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions={ArithmeticException.class}, groups={"tck"})
+    @Test(expectedExceptions={ArithmeticException.class})
     public void test_minusWeeks_invalidMaxMinusMin() {
         LocalDate.of(Year.MAX_VALUE, 12, 25).minusWeeks(Long.MIN_VALUE);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_normal() {
         LocalDate t = TEST_2007_07_15.minusDays(1);
         assertEquals(t, LocalDate.of(2007, 7, 14));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_overMonths() {
         LocalDate t = TEST_2007_07_15.minusDays(62);
         assertEquals(t, LocalDate.of(2007, 5, 14));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_overYears() {
         LocalDate t = LocalDate.of(2008, 7, 16).minusDays(367);
         assertEquals(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_overLeapYears() {
         LocalDate t = TEST_2007_07_15.plusYears(2).minusDays(365 + 366);
         assertEquals(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_negative() {
         LocalDate t = TEST_2007_07_15.minusDays(-1);
         assertEquals(t, LocalDate.of(2007, 7, 16));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_negativeAcrossYear() {
         LocalDate t = TEST_2007_07_15.minusDays(-169);
         assertEquals(t, LocalDate.of(2007, 12, 31));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_negativeOverYears() {
         LocalDate t = TEST_2007_07_15.minusDays(-731);
         assertEquals(t, LocalDate.of(2009, 7, 15));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_maximum() {
         LocalDate t = LocalDate.of(Year.MAX_VALUE, 12, 30).minusDays(-1);
         LocalDate expected = LocalDate.of(Year.MAX_VALUE, 12, 31);
         assertEquals(t, expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_minimum() {
         LocalDate t = LocalDate.of(Year.MIN_VALUE, 1, 2).minusDays(1);
         LocalDate expected = LocalDate.of(Year.MIN_VALUE, 1, 1);
         assertEquals(t, expected);
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_minusDays_invalidTooLarge() {
         LocalDate.of(Year.MAX_VALUE, 12, 31).minusDays(-1);
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_minusDays_invalidTooSmall() {
         LocalDate.of(Year.MIN_VALUE, 1, 1).minusDays(1);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void test_minusDays_overflowTooLarge() {
         LocalDate.of(Year.MAX_VALUE, 12, 31).minusDays(Long.MIN_VALUE);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void test_minusDays_overflowTooSmall() {
         LocalDate.of(Year.MIN_VALUE, 1, 1).minusDays(Long.MAX_VALUE);
     }
 
     //-----------------------------------------------------------------------
+    // periodUntil(Temporal, TemporalUnit)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="periodUntilUnit")
+    Object[][] data_periodUntilUnit() {
+        return new Object[][] {
+                {date(2000, 1, 1), date(2000, 1, 1), DAYS, 0},
+                {date(2000, 1, 1), date(2000, 1, 1), WEEKS, 0},
+                {date(2000, 1, 1), date(2000, 1, 1), MONTHS, 0},
+                {date(2000, 1, 1), date(2000, 1, 1), YEARS, 0},
+                {date(2000, 1, 1), date(2000, 1, 1), DECADES, 0},
+                {date(2000, 1, 1), date(2000, 1, 1), CENTURIES, 0},
+                {date(2000, 1, 1), date(2000, 1, 1), MILLENNIA, 0},
+
+                {date(2000, 1, 15), date(2000, 2, 14), DAYS, 30},
+                {date(2000, 1, 15), date(2000, 2, 15), DAYS, 31},
+                {date(2000, 1, 15), date(2000, 2, 16), DAYS, 32},
+
+                {date(2000, 1, 15), date(2000, 2, 17), WEEKS, 4},
+                {date(2000, 1, 15), date(2000, 2, 18), WEEKS, 4},
+                {date(2000, 1, 15), date(2000, 2, 19), WEEKS, 5},
+                {date(2000, 1, 15), date(2000, 2, 20), WEEKS, 5},
+
+                {date(2000, 1, 15), date(2000, 2, 14), MONTHS, 0},
+                {date(2000, 1, 15), date(2000, 2, 15), MONTHS, 1},
+                {date(2000, 1, 15), date(2000, 2, 16), MONTHS, 1},
+                {date(2000, 1, 15), date(2000, 3, 14), MONTHS, 1},
+                {date(2000, 1, 15), date(2000, 3, 15), MONTHS, 2},
+                {date(2000, 1, 15), date(2000, 3, 16), MONTHS, 2},
+
+                {date(2000, 1, 15), date(2001, 1, 14), YEARS, 0},
+                {date(2000, 1, 15), date(2001, 1, 15), YEARS, 1},
+                {date(2000, 1, 15), date(2001, 1, 16), YEARS, 1},
+                {date(2000, 1, 15), date(2004, 1, 14), YEARS, 3},
+                {date(2000, 1, 15), date(2004, 1, 15), YEARS, 4},
+                {date(2000, 1, 15), date(2004, 1, 16), YEARS, 4},
+
+                {date(2000, 1, 15), date(2010, 1, 14), DECADES, 0},
+                {date(2000, 1, 15), date(2010, 1, 15), DECADES, 1},
+
+                {date(2000, 1, 15), date(2100, 1, 14), CENTURIES, 0},
+                {date(2000, 1, 15), date(2100, 1, 15), CENTURIES, 1},
+
+                {date(2000, 1, 15), date(3000, 1, 14), MILLENNIA, 0},
+                {date(2000, 1, 15), date(3000, 1, 15), MILLENNIA, 1},
+        };
+    }
+
+    @Test(dataProvider="periodUntilUnit")
+    public void test_periodUntil_TemporalUnit(LocalDate date1, LocalDate date2, TemporalUnit unit, long expected) {
+        long amount = date1.periodUntil(date2, unit);
+        assertEquals(amount, expected);
+    }
+
+    @Test(dataProvider="periodUntilUnit")
+    public void test_periodUntil_TemporalUnit_negated(LocalDate date1, LocalDate date2, TemporalUnit unit, long expected) {
+        long amount = date2.periodUntil(date1, unit);
+        assertEquals(amount, -expected);
+    }
+
+    @Test(expectedExceptions = UnsupportedTemporalTypeException.class)
+    public void test_periodUntil_TemporalUnit_unsupportedUnit() {
+        TEST_2007_07_15.periodUntil(TEST_2007_07_15, HOURS);
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_periodUntil_TemporalUnit_nullEnd() {
+        TEST_2007_07_15.periodUntil(null, DAYS);
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_periodUntil_TemporalUnit_nullUnit() {
+        TEST_2007_07_15.periodUntil(TEST_2007_07_15, null);
+    }
+
+    //-----------------------------------------------------------------------
     // periodUntil(ChronoLocalDate)
     //-----------------------------------------------------------------------
     @DataProvider(name="periodUntil")
@@ -1733,155 +1821,170 @@
     }
 
     //-----------------------------------------------------------------------
+    // format(DateTimeFormatter)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_format_formatter() {
+        DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d");
+        String t = LocalDate.of(2010, 12, 3).format(f);
+        assertEquals(t, "2010 12 3");
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_format_formatter_null() {
+        LocalDate.of(2010, 12, 3).format(null);
+    }
+
+    //-----------------------------------------------------------------------
     // atTime()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_atTime_LocalTime() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         assertEquals(t.atTime(LocalTime.of(11, 30)), LocalDateTime.of(2008, 6, 30, 11, 30));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_atTime_LocalTime_null() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime((LocalTime) null);
     }
 
     //-------------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_atTime_int_int() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         assertEquals(t.atTime(11, 30), LocalDateTime.of(2008, 6, 30, 11, 30));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_hourTooSmall() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(-1, 30);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_hourTooBig() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(24, 30);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_minuteTooSmall() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(11, -1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_minuteTooBig() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(11, 60);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_atTime_int_int_int() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         assertEquals(t.atTime(11, 30, 40), LocalDateTime.of(2008, 6, 30, 11, 30, 40));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_int_hourTooSmall() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(-1, 30, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_int_hourTooBig() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(24, 30, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_int_minuteTooSmall() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(11, -1, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_int_minuteTooBig() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(11, 60, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_int_secondTooSmall() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(11, 30, -1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_int_secondTooBig() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(11, 30, 60);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_atTime_int_int_int_int() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         assertEquals(t.atTime(11, 30, 40, 50), LocalDateTime.of(2008, 6, 30, 11, 30, 40, 50));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_int_int_hourTooSmall() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(-1, 30, 40, 50);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_int_int_hourTooBig() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(24, 30, 40, 50);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_int_int_minuteTooSmall() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(11, -1, 40, 50);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_int_int_minuteTooBig() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(11, 60, 40, 50);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_int_int_secondTooSmall() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(11, 30, -1, 50);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_int_int_secondTooBig() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(11, 30, 60, 50);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_int_int_nanoTooSmall() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(11, 30, 40, -1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atTime_int_int_int_int_nanoTooBig() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime(11, 30, 40, 1000000000);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_atTime_OffsetTime() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         assertEquals(t.atTime(OffsetTime.of(11, 30, 0, 0, OFFSET_PONE)), OffsetDateTime.of(2008, 6, 30, 11, 30, 0, 0, OFFSET_PONE));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_atTime_OffsetTime_null() {
         LocalDate t = LocalDate.of(2008, 6, 30);
         t.atTime((OffsetTime) null);
@@ -1929,7 +2032,7 @@
     //-----------------------------------------------------------------------
     // toEpochDay()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toEpochDay() {
         long date_0000_01_01 = -678941 - 40587;
 
@@ -1954,7 +2057,7 @@
     //-----------------------------------------------------------------------
     // compareTo()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_comparisons() {
         doTest_comparisons_LocalDate(
             LocalDate.of(Year.MIN_VALUE, 1, 1),
@@ -2002,36 +2105,36 @@
         }
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_compareTo_ObjectNull() {
         TEST_2007_07_15.compareTo(null);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_isBefore() {
         assertTrue(TEST_2007_07_15.isBefore(LocalDate.of(2007, 07, 16)));
         assertFalse(TEST_2007_07_15.isBefore(LocalDate.of(2007, 07, 14)));
         assertFalse(TEST_2007_07_15.isBefore(TEST_2007_07_15));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isBefore_ObjectNull() {
         TEST_2007_07_15.isBefore(null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isAfter_ObjectNull() {
         TEST_2007_07_15.isAfter(null);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_isAfter() {
         assertTrue(TEST_2007_07_15.isAfter(LocalDate.of(2007, 07, 14)));
         assertFalse(TEST_2007_07_15.isAfter(LocalDate.of(2007, 07, 16)));
         assertFalse(TEST_2007_07_15.isAfter(TEST_2007_07_15));
     }
 
-    @Test(expectedExceptions=ClassCastException.class, groups={"tck"})
+    @Test(expectedExceptions=ClassCastException.class)
     @SuppressWarnings({"unchecked", "rawtypes"})
     public void compareToNonLocalDate() {
        Comparable c = TEST_2007_07_15;
@@ -2041,42 +2144,42 @@
     //-----------------------------------------------------------------------
     // equals()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleDates" , groups={"tck"})
+    @Test(dataProvider="sampleDates" )
     public void test_equals_true(int y, int m, int d) {
         LocalDate a = LocalDate.of(y, m, d);
         LocalDate b = LocalDate.of(y, m, d);
         assertEquals(a.equals(b), true);
     }
-    @Test(dataProvider="sampleDates", groups={"tck"})
+    @Test(dataProvider="sampleDates")
     public void test_equals_false_year_differs(int y, int m, int d) {
         LocalDate a = LocalDate.of(y, m, d);
         LocalDate b = LocalDate.of(y + 1, m, d);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleDates", groups={"tck"})
+    @Test(dataProvider="sampleDates")
     public void test_equals_false_month_differs(int y, int m, int d) {
         LocalDate a = LocalDate.of(y, m, d);
         LocalDate b = LocalDate.of(y, m + 1, d);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleDates", groups={"tck"})
+    @Test(dataProvider="sampleDates")
     public void test_equals_false_day_differs(int y, int m, int d) {
         LocalDate a = LocalDate.of(y, m, d);
         LocalDate b = LocalDate.of(y, m, d + 1);
         assertEquals(a.equals(b), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_itself_true() {
         assertEquals(TEST_2007_07_15.equals(TEST_2007_07_15), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_string_false() {
         assertEquals(TEST_2007_07_15.equals("2007-07-15"), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_null_false() {
         assertEquals(TEST_2007_07_15.equals(null), false);
     }
@@ -2084,7 +2187,7 @@
     //-----------------------------------------------------------------------
     // hashCode()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleDates", groups={"tck"})
+    @Test(dataProvider="sampleDates")
     public void test_hashCode(int y, int m, int d) {
         LocalDate a = LocalDate.of(y, m, d);
         assertEquals(a.hashCode(), a.hashCode());
@@ -2111,26 +2214,15 @@
         };
     }
 
-    @Test(dataProvider="sampleToString", groups={"tck"})
+    @Test(dataProvider="sampleToString")
     public void test_toString(int y, int m, int d, String expected) {
         LocalDate t = LocalDate.of(y, m, d);
         String str = t.toString();
         assertEquals(str, expected);
     }
 
-    //-----------------------------------------------------------------------
-    // toString(DateTimeFormatter)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_toString_formatter() {
-        DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d");
-        String t = LocalDate.of(2010, 12, 3).toString(f);
-        assertEquals(t, "2010 12 3");
-    }
-
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
-    public void test_toString_formatter_null() {
-        LocalDate.of(2010, 12, 3).toString(null);
+    private LocalDate date(int year, int month, int day) {
+        return LocalDate.of(year, month, day);
     }
 
 }
--- a/test/java/time/tck/java/time/TCKLocalDateTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKLocalDateTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -70,7 +70,6 @@
 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
 import static java.time.temporal.ChronoField.DAY_OF_YEAR;
 import static java.time.temporal.ChronoField.EPOCH_DAY;
-import static java.time.temporal.ChronoField.EPOCH_MONTH;
 import static java.time.temporal.ChronoField.ERA;
 import static java.time.temporal.ChronoField.HOUR_OF_AMPM;
 import static java.time.temporal.ChronoField.HOUR_OF_DAY;
@@ -83,19 +82,30 @@
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
 import static java.time.temporal.ChronoField.NANO_OF_DAY;
 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
+import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
 import static java.time.temporal.ChronoField.SECOND_OF_DAY;
 import static java.time.temporal.ChronoField.SECOND_OF_MINUTE;
 import static java.time.temporal.ChronoField.YEAR;
 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
+import static java.time.temporal.ChronoUnit.CENTURIES;
 import static java.time.temporal.ChronoUnit.DAYS;
+import static java.time.temporal.ChronoUnit.DECADES;
+import static java.time.temporal.ChronoUnit.HALF_DAYS;
+import static java.time.temporal.ChronoUnit.HOURS;
+import static java.time.temporal.ChronoUnit.MICROS;
+import static java.time.temporal.ChronoUnit.MILLENNIA;
+import static java.time.temporal.ChronoUnit.MILLIS;
+import static java.time.temporal.ChronoUnit.MINUTES;
 import static java.time.temporal.ChronoUnit.MONTHS;
 import static java.time.temporal.ChronoUnit.NANOS;
 import static java.time.temporal.ChronoUnit.SECONDS;
+import static java.time.temporal.ChronoUnit.WEEKS;
 import static java.time.temporal.ChronoUnit.YEARS;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertSame;
 import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
 
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
@@ -108,6 +118,7 @@
 import java.time.LocalTime;
 import java.time.Month;
 import java.time.OffsetDateTime;
+import java.time.OffsetTime;
 import java.time.Year;
 import java.time.ZoneId;
 import java.time.ZoneOffset;
@@ -118,7 +129,6 @@
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.JulianFields;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -153,7 +163,7 @@
     private Instant MAX_INSTANT;
     private Instant MIN_INSTANT;
 
-    @BeforeMethod(groups={"implementation","tck"})
+    @BeforeMethod
     public void setUp() {
         MAX_DATE_TIME = LocalDateTime.MAX;
         MIN_DATE_TIME = LocalDateTime.MIN;
@@ -195,7 +205,7 @@
             ALIGNED_WEEK_OF_MONTH,
             ALIGNED_WEEK_OF_YEAR,
             MONTH_OF_YEAR,
-            EPOCH_MONTH,
+            PROLEPTIC_MONTH,
             YEAR_OF_ERA,
             YEAR,
             ERA,
@@ -272,7 +282,7 @@
     //-----------------------------------------------------------------------
     // now()
     //-----------------------------------------------------------------------
-    @Test(timeOut=30000, groups={"tck"})  // TODO: remove when time zone loading is faster
+    @Test(timeOut=30000)  // TODO: remove when time zone loading is faster
     public void now() {
         LocalDateTime expected = LocalDateTime.now(Clock.systemDefaultZone());
         LocalDateTime test = LocalDateTime.now();
@@ -289,12 +299,12 @@
     //-----------------------------------------------------------------------
     // now(ZoneId)
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_ZoneId_nullZoneId() {
         LocalDateTime.now((ZoneId) null);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_ZoneId() {
         ZoneId zone = ZoneId.of("UTC+01:02:03");
         LocalDateTime expected = LocalDateTime.now(Clock.system(zone));
@@ -312,12 +322,12 @@
     //-----------------------------------------------------------------------
     // now(Clock)
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_Clock_nullClock() {
         LocalDateTime.now((Clock) null);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_allSecsInDay_utc() {
         for (int i = 0; i < (2 * 24 * 60 * 60); i++) {
             Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
@@ -333,7 +343,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_allSecsInDay_offset() {
         for (int i = 0; i < (2 * 24 * 60 * 60); i++) {
             Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
@@ -349,7 +359,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_allSecsInDay_beforeEpoch() {
         LocalTime expected = LocalTime.MIDNIGHT.plusNanos(123456789L);
         for (int i =-1; i >= -(24 * 60 * 60); i--) {
@@ -365,27 +375,27 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_maxYear() {
         Clock clock = Clock.fixed(MAX_INSTANT, ZoneOffset.UTC);
         LocalDateTime test = LocalDateTime.now(clock);
         assertEquals(test, MAX_DATE_TIME);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void now_Clock_tooBig() {
         Clock clock = Clock.fixed(MAX_INSTANT.plusSeconds(24 * 60 * 60), ZoneOffset.UTC);
         LocalDateTime.now(clock);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_minYear() {
         Clock clock = Clock.fixed(MIN_INSTANT, ZoneOffset.UTC);
         LocalDateTime test = LocalDateTime.now(clock);
         assertEquals(test, MIN_DATE_TIME);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void now_Clock_tooLow() {
         Clock clock = Clock.fixed(MIN_INSTANT.minusNanos(1), ZoneOffset.UTC);
         LocalDateTime.now(clock);
@@ -395,375 +405,375 @@
     // of() factories
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_4intsMonth() {
         LocalDateTime dateTime = LocalDateTime.of(2007, Month.JULY, 15, 12, 30);
         check(dateTime, 2007, 7, 15, 12, 30, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_4intsMonth_yearTooLow() {
         LocalDateTime.of(Integer.MIN_VALUE, Month.JULY, 15, 12, 30);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_4intsMonth_nullMonth() {
         LocalDateTime.of(2007, null, 15, 12, 30);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_4intsMonth_dayTooLow() {
         LocalDateTime.of(2007, Month.JULY, -1, 12, 30);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_4intsMonth_dayTooHigh() {
         LocalDateTime.of(2007, Month.JULY, 32, 12, 30);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_4intsMonth_hourTooLow() {
         LocalDateTime.of(2007, Month.JULY, 15, -1, 30);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_4intsMonth_hourTooHigh() {
         LocalDateTime.of(2007, Month.JULY, 15, 24, 30);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_4intsMonth_minuteTooLow() {
         LocalDateTime.of(2007, Month.JULY, 15, 12, -1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_4intsMonth_minuteTooHigh() {
         LocalDateTime.of(2007, Month.JULY, 15, 12, 60);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_5intsMonth() {
         LocalDateTime dateTime = LocalDateTime.of(2007, Month.JULY, 15, 12, 30, 40);
         check(dateTime, 2007, 7, 15, 12, 30, 40, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5intsMonth_yearTooLow() {
         LocalDateTime.of(Integer.MIN_VALUE, Month.JULY, 15, 12, 30, 40);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_5intsMonth_nullMonth() {
         LocalDateTime.of(2007, null, 15, 12, 30, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5intsMonth_dayTooLow() {
         LocalDateTime.of(2007, Month.JULY, -1, 12, 30, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5intsMonth_dayTooHigh() {
         LocalDateTime.of(2007, Month.JULY, 32, 12, 30, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5intsMonth_hourTooLow() {
         LocalDateTime.of(2007, Month.JULY, 15, -1, 30, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5intsMonth_hourTooHigh() {
         LocalDateTime.of(2007, Month.JULY, 15, 24, 30, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5intsMonth_minuteTooLow() {
         LocalDateTime.of(2007, Month.JULY, 15, 12, -1, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5intsMonth_minuteTooHigh() {
         LocalDateTime.of(2007, Month.JULY, 15, 12, 60, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5intsMonth_secondTooLow() {
         LocalDateTime.of(2007, Month.JULY, 15, 12, 30, -1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5intsMonth_secondTooHigh() {
         LocalDateTime.of(2007, Month.JULY, 15, 12, 30, 60);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_6intsMonth() {
         LocalDateTime dateTime = LocalDateTime.of(2007, Month.JULY, 15, 12, 30, 40, 987654321);
         check(dateTime, 2007, 7, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6intsMonth_yearTooLow() {
         LocalDateTime.of(Integer.MIN_VALUE, Month.JULY, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_6intsMonth_nullMonth() {
         LocalDateTime.of(2007, null, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6intsMonth_dayTooLow() {
         LocalDateTime.of(2007, Month.JULY, -1, 12, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6intsMonth_dayTooHigh() {
         LocalDateTime.of(2007, Month.JULY, 32, 12, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6intsMonth_hourTooLow() {
         LocalDateTime.of(2007, Month.JULY, 15, -1, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6intsMonth_hourTooHigh() {
         LocalDateTime.of(2007, Month.JULY, 15, 24, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6intsMonth_minuteTooLow() {
         LocalDateTime.of(2007, Month.JULY, 15, 12, -1, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6intsMonth_minuteTooHigh() {
         LocalDateTime.of(2007, Month.JULY, 15, 12, 60, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6intsMonth_secondTooLow() {
         LocalDateTime.of(2007, Month.JULY, 15, 12, 30, -1, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6intsMonth_secondTooHigh() {
         LocalDateTime.of(2007, Month.JULY, 15, 12, 30, 60, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6intsMonth_nanoTooLow() {
         LocalDateTime.of(2007, Month.JULY, 15, 12, 30, 40, -1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6intsMonth_nanoTooHigh() {
         LocalDateTime.of(2007, Month.JULY, 15, 12, 30, 40, 1000000000);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_5ints() {
         LocalDateTime dateTime = LocalDateTime.of(2007, 7, 15, 12, 30);
         check(dateTime, 2007, 7, 15, 12, 30, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5ints_yearTooLow() {
         LocalDateTime.of(Integer.MIN_VALUE, 7, 15, 12, 30);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5ints_monthTooLow() {
         LocalDateTime.of(2007, 0, 15, 12, 30);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5ints_monthTooHigh() {
         LocalDateTime.of(2007, 13, 15, 12, 30);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5ints_dayTooLow() {
         LocalDateTime.of(2007, 7, -1, 12, 30);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5ints_dayTooHigh() {
         LocalDateTime.of(2007, 7, 32, 12, 30);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5ints_hourTooLow() {
         LocalDateTime.of(2007, 7, 15, -1, 30);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5ints_hourTooHigh() {
         LocalDateTime.of(2007, 7, 15, 24, 30);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5ints_minuteTooLow() {
         LocalDateTime.of(2007, 7, 15, 12, -1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_5ints_minuteTooHigh() {
         LocalDateTime.of(2007, 7, 15, 12, 60);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_6ints() {
         LocalDateTime dateTime = LocalDateTime.of(2007, 7, 15, 12, 30, 40);
         check(dateTime, 2007, 7, 15, 12, 30, 40, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6ints_yearTooLow() {
         LocalDateTime.of(Integer.MIN_VALUE, 7, 15, 12, 30, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6ints_monthTooLow() {
         LocalDateTime.of(2007, 0, 15, 12, 30, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6ints_monthTooHigh() {
         LocalDateTime.of(2007, 13, 15, 12, 30, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6ints_dayTooLow() {
         LocalDateTime.of(2007, 7, -1, 12, 30, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6ints_dayTooHigh() {
         LocalDateTime.of(2007, 7, 32, 12, 30, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6ints_hourTooLow() {
         LocalDateTime.of(2007, 7, 15, -1, 30, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6ints_hourTooHigh() {
         LocalDateTime.of(2007, 7, 15, 24, 30, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6ints_minuteTooLow() {
         LocalDateTime.of(2007, 7, 15, 12, -1, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6ints_minuteTooHigh() {
         LocalDateTime.of(2007, 7, 15, 12, 60, 40);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6ints_secondTooLow() {
         LocalDateTime.of(2007, 7, 15, 12, 30, -1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_6ints_secondTooHigh() {
         LocalDateTime.of(2007, 7, 15, 12, 30, 60);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_7ints() {
         LocalDateTime dateTime = LocalDateTime.of(2007, 7, 15, 12, 30, 40, 987654321);
         check(dateTime, 2007, 7, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_7ints_yearTooLow() {
         LocalDateTime.of(Integer.MIN_VALUE, 7, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_7ints_monthTooLow() {
         LocalDateTime.of(2007, 0, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_7ints_monthTooHigh() {
         LocalDateTime.of(2007, 13, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_7ints_dayTooLow() {
         LocalDateTime.of(2007, 7, -1, 12, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_7ints_dayTooHigh() {
         LocalDateTime.of(2007, 7, 32, 12, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_7ints_hourTooLow() {
         LocalDateTime.of(2007, 7, 15, -1, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_7ints_hourTooHigh() {
         LocalDateTime.of(2007, 7, 15, 24, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_7ints_minuteTooLow() {
         LocalDateTime.of(2007, 7, 15, 12, -1, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_7ints_minuteTooHigh() {
         LocalDateTime.of(2007, 7, 15, 12, 60, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_7ints_secondTooLow() {
         LocalDateTime.of(2007, 7, 15, 12, 30, -1, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_7ints_secondTooHigh() {
         LocalDateTime.of(2007, 7, 15, 12, 30, 60, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_7ints_nanoTooLow() {
         LocalDateTime.of(2007, 7, 15, 12, 30, 40, -1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_of_7ints_nanoTooHigh() {
         LocalDateTime.of(2007, 7, 15, 12, 30, 40, 1000000000);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_LocalDate_LocalTime() {
         LocalDateTime dateTime = LocalDateTime.of(LocalDate.of(2007, 7, 15), LocalTime.of(12, 30, 40, 987654321));
         check(dateTime, 2007, 7, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_LocalDate_LocalTime_nullLocalDate() {
         LocalDateTime.of(null, LocalTime.of(12, 30, 40, 987654321));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_LocalDate_LocalTime_nullLocalTime() {
         LocalDateTime.of(LocalDate.of(2007, 7, 15), null);
     }
@@ -790,22 +800,22 @@
         assertEquals(test, expected);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofInstant_instantTooBig() {
         LocalDateTime.ofInstant(Instant.MAX, OFFSET_PONE) ;
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofInstant_instantTooSmall() {
         LocalDateTime.ofInstant(Instant.MIN, OFFSET_PONE) ;
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_ofInstant_nullInstant() {
         LocalDateTime.ofInstant((Instant) null, ZONE_GAZA);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_ofInstant_nullZone() {
         LocalDateTime.ofInstant(Instant.EPOCH, (ZoneId) null);
     }
@@ -813,7 +823,7 @@
     //-----------------------------------------------------------------------
     // ofEpochSecond()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofEpochSecond_longOffset_afterEpoch() {
         LocalDateTime base = LocalDateTime.of(1970, 1, 1, 2, 0, 0, 500);
         for (int i = 0; i < 100000; i++) {
@@ -822,7 +832,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofEpochSecond_longOffset_beforeEpoch() {
         LocalDateTime base = LocalDateTime.of(1970, 1, 1, 2, 0, 0, 500);
         for (int i = 0; i < 100000; i++) {
@@ -831,27 +841,27 @@
         }
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofEpochSecond_longOffset_tooBig() {
         LocalDateTime.ofEpochSecond(Long.MAX_VALUE, 500, OFFSET_PONE);  // TODO: better test
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofEpochSecond_longOffset_tooSmall() {
         LocalDateTime.ofEpochSecond(Long.MIN_VALUE, 500, OFFSET_PONE);  // TODO: better test
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofEpochSecond_badNanos_toBig() {
         LocalDateTime.ofEpochSecond(0, 1_000_000_000, OFFSET_PONE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofEpochSecond_badNanos_toSmall() {
         LocalDateTime.ofEpochSecond(0, -1, OFFSET_PONE);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_ofEpochSecond_longOffset_nullOffset() {
         LocalDateTime.ofEpochSecond(0L, 500, null);
     }
@@ -859,19 +869,19 @@
     //-----------------------------------------------------------------------
     // from()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_from_TemporalAccessor() {
         LocalDateTime base = LocalDateTime.of(2007, 7, 15, 17, 30);
         assertEquals(LocalDateTime.from(base), base);
         assertEquals(LocalDateTime.from(ZonedDateTime.of(base, ZoneOffset.ofHours(2))), base);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_from_TemporalAccessor_invalid_noDerive() {
         LocalDateTime.from(LocalTime.of(12, 30));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_from_TemporalAccessor_null() {
         LocalDateTime.from((TemporalAccessor) null);
     }
@@ -879,7 +889,7 @@
     //-----------------------------------------------------------------------
     // parse()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleToString", groups={"tck"})
+    @Test(dataProvider="sampleToString")
     public void test_parse(int y, int month, int d, int h, int m, int s, int n, String text) {
         LocalDateTime t = LocalDateTime.parse(text);
         assertEquals(t.getYear(), y);
@@ -891,17 +901,17 @@
         assertEquals(t.getNano(), n);
     }
 
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void factory_parse_illegalValue() {
         LocalDateTime.parse("2008-06-32T11:15");
     }
 
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void factory_parse_invalidValue() {
         LocalDateTime.parse("2008-06-31T11:15");
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_nullText() {
         LocalDateTime.parse((String) null);
     }
@@ -909,20 +919,20 @@
     //-----------------------------------------------------------------------
     // parse(DateTimeFormatter)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_parse_formatter() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s");
         LocalDateTime test = LocalDateTime.parse("2010 12 3 11 30 45", f);
         assertEquals(test, LocalDateTime.of(2010, 12, 3, 11, 30, 45));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullText() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s");
         LocalDateTime.parse((String) null, f);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullFormatter() {
         LocalDateTime.parse("ANY", null);
     }
@@ -970,13 +980,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {TEST_2007_07_15_12_30_40_987654321, Queries.chronology(), IsoChronology.INSTANCE},
-                {TEST_2007_07_15_12_30_40_987654321, Queries.zoneId(), null},
-                {TEST_2007_07_15_12_30_40_987654321, Queries.precision(), ChronoUnit.NANOS},
-                {TEST_2007_07_15_12_30_40_987654321, Queries.zone(), null},
-                {TEST_2007_07_15_12_30_40_987654321, Queries.offset(), null},
-                {TEST_2007_07_15_12_30_40_987654321, Queries.localDate(), LocalDate.of(2007, 7, 15)},
-                {TEST_2007_07_15_12_30_40_987654321, Queries.localTime(), LocalTime.of(12, 30, 40, 987654321)},
+                {TEST_2007_07_15_12_30_40_987654321, TemporalQuery.chronology(), IsoChronology.INSTANCE},
+                {TEST_2007_07_15_12_30_40_987654321, TemporalQuery.zoneId(), null},
+                {TEST_2007_07_15_12_30_40_987654321, TemporalQuery.precision(), ChronoUnit.NANOS},
+                {TEST_2007_07_15_12_30_40_987654321, TemporalQuery.zone(), null},
+                {TEST_2007_07_15_12_30_40_987654321, TemporalQuery.offset(), null},
+                {TEST_2007_07_15_12_30_40_987654321, TemporalQuery.localDate(), LocalDate.of(2007, 7, 15)},
+                {TEST_2007_07_15_12_30_40_987654321, TemporalQuery.localTime(), LocalTime.of(12, 30, 40, 987654321)},
         };
     }
 
@@ -1033,7 +1043,7 @@
     //-----------------------------------------------------------------------
     // get*()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleDates", groups={"tck"})
+    @Test(dataProvider="sampleDates")
     public void test_get_dates(int y, int m, int d) {
         LocalDateTime a = LocalDateTime.of(y, m, d, 12, 30);
         assertEquals(a.getYear(), y);
@@ -1041,7 +1051,7 @@
         assertEquals(a.getDayOfMonth(), d);
     }
 
-    @Test(dataProvider="sampleDates", groups={"tck"})
+    @Test(dataProvider="sampleDates")
     public void test_getDOY(int y, int m, int d) {
         LocalDateTime a = LocalDateTime.of(y, m, d, 12 ,30);
         int total = 0;
@@ -1052,7 +1062,7 @@
         assertEquals(a.getDayOfYear(), doy);
     }
 
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_get_times(int h, int m, int s, int ns) {
         LocalDateTime a = LocalDateTime.of(TEST_2007_07_15_12_30_40_987654321.toLocalDate(), LocalTime.of(h, m, s, ns));
         assertEquals(a.getHour(), h);
@@ -1064,7 +1074,7 @@
     //-----------------------------------------------------------------------
     // getDayOfWeek()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_getDayOfWeek() {
         DayOfWeek dow = DayOfWeek.MONDAY;
         for (Month month : Month.values()) {
@@ -1079,9 +1089,49 @@
     }
 
     //-----------------------------------------------------------------------
+    // adjustInto(Temporal)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="adjustInto")
+    Object[][] data_adjustInto() {
+        return new Object[][]{
+                {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), LocalDateTime.of(2012, 3, 4, 23, 5, 0, 0), null},
+                {LocalDateTime.of(2012, Month.MARCH, 4, 0, 0), LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), LocalDateTime.of(2012, 3, 4, 0, 0), null},
+                {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MAX, LocalDateTime.of(2012, 3, 4, 23, 5), null},
+                {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MIN, LocalDateTime.of(2012, 3, 4, 23, 5), null},
+                {LocalDateTime.MAX, LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MAX, null},
+                {LocalDateTime.MIN, LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MIN, null},
+
+                {LocalDateTime.of(2012, 3, 4, 23, 5), OffsetDateTime.of(2210, 2, 2, 0, 0, 0, 0, ZoneOffset.UTC), OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, ZoneOffset.UTC), null},
+                {LocalDateTime.of(2012, 3, 4, 23, 5), OffsetDateTime.of(2210, 2, 2, 0, 0, 0, 0, OFFSET_PONE), OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), null},
+                {LocalDateTime.of(2012, 3, 4, 23, 5), ZonedDateTime.of(2210, 2, 2, 0, 0, 0, 0, ZONE_PARIS), ZonedDateTime.of(2012, 3, 4, 23, 5, 0, 0, ZONE_PARIS), null},
+
+                {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDate.of(2210, 2, 2), null, DateTimeException.class},
+                {LocalDateTime.of(2012, 3, 4, 23, 5), LocalTime.of(22, 3, 0), null, DateTimeException.class},
+                {LocalDateTime.of(2012, 3, 4, 23, 5), OffsetTime.of(22, 3, 0, 0, ZoneOffset.UTC), null, DateTimeException.class},
+                {LocalDateTime.of(2012, 3, 4, 23, 5), null, null, NullPointerException.class},
+
+        };
+    }
+
+    @Test(dataProvider="adjustInto")
+    public void test_adjustInto(LocalDateTime test, Temporal temporal, Temporal expected, Class<?> expectedEx) {
+        if (expectedEx == null) {
+            Temporal result = test.adjustInto(temporal);
+            assertEquals(result, expected);
+        } else {
+            try {
+                Temporal result = test.adjustInto(temporal);
+                fail();
+            } catch (Exception ex) {
+                assertTrue(expectedEx.isInstance(ex));
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
     // with()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment() {
         final LocalDateTime sample = LocalDateTime.of(2012, 3, 4, 23, 5);
         TemporalAdjuster adjuster = new TemporalAdjuster() {
@@ -1093,7 +1143,7 @@
         assertEquals(TEST_2007_07_15_12_30_40_987654321.with(adjuster), sample);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_with_adjustment_null() {
         TEST_2007_07_15_12_30_40_987654321.with((TemporalAdjuster) null);
     }
@@ -1101,18 +1151,18 @@
     //-----------------------------------------------------------------------
     // withYear()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withYear_int_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withYear(2008);
         check(t, 2008, 7, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withYear_int_invalid() {
         TEST_2007_07_15_12_30_40_987654321.withYear(Year.MIN_VALUE - 1);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withYear_int_adjustDay() {
         LocalDateTime t = LocalDateTime.of(2008, 2, 29, 12, 30).withYear(2007);
         LocalDateTime expected = LocalDateTime.of(2007, 2, 28, 12, 30);
@@ -1122,18 +1172,18 @@
     //-----------------------------------------------------------------------
     // withMonth()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withMonth_int_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withMonth(1);
         check(t, 2007, 1, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withMonth_int_invalid() {
         TEST_2007_07_15_12_30_40_987654321.withMonth(13);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withMonth_int_adjustDay() {
         LocalDateTime t = LocalDateTime.of(2007, 12, 31, 12, 30).withMonth(11);
         LocalDateTime expected = LocalDateTime.of(2007, 11, 30, 12, 30);
@@ -1143,18 +1193,18 @@
     //-----------------------------------------------------------------------
     // withDayOfMonth()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withDayOfMonth_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withDayOfMonth(1);
         check(t, 2007, 7, 1, 12, 30, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfMonth_invalid() {
         LocalDateTime.of(2007, 11, 30, 12, 30).withDayOfMonth(32);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfMonth_invalidCombination() {
         LocalDateTime.of(2007, 11, 30, 12, 30).withDayOfMonth(31);
     }
@@ -1162,18 +1212,18 @@
     //-----------------------------------------------------------------------
     // withDayOfYear(int)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withDayOfYear_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withDayOfYear(33);
         assertEquals(t, LocalDateTime.of(2007, 2, 2, 12, 30, 40, 987654321));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfYear_illegal() {
         TEST_2007_07_15_12_30_40_987654321.withDayOfYear(367);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfYear_invalid() {
         TEST_2007_07_15_12_30_40_987654321.withDayOfYear(366);
     }
@@ -1181,7 +1231,7 @@
     //-----------------------------------------------------------------------
     // withHour()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withHour_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321;
         for (int i = 0; i < 24; i++) {
@@ -1190,12 +1240,12 @@
         }
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withHour_hourTooLow() {
         TEST_2007_07_15_12_30_40_987654321.withHour(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withHour_hourTooHigh() {
         TEST_2007_07_15_12_30_40_987654321.withHour(24);
     }
@@ -1203,7 +1253,7 @@
     //-----------------------------------------------------------------------
     // withMinute()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withMinute_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321;
         for (int i = 0; i < 60; i++) {
@@ -1212,12 +1262,12 @@
         }
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withMinute_minuteTooLow() {
         TEST_2007_07_15_12_30_40_987654321.withMinute(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withMinute_minuteTooHigh() {
         TEST_2007_07_15_12_30_40_987654321.withMinute(60);
     }
@@ -1225,7 +1275,7 @@
     //-----------------------------------------------------------------------
     // withSecond()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withSecond_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321;
         for (int i = 0; i < 60; i++) {
@@ -1234,12 +1284,12 @@
         }
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withSecond_secondTooLow() {
         TEST_2007_07_15_12_30_40_987654321.withSecond(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withSecond_secondTooHigh() {
         TEST_2007_07_15_12_30_40_987654321.withSecond(60);
     }
@@ -1247,7 +1297,7 @@
     //-----------------------------------------------------------------------
     // withNano()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withNanoOfSecond_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321;
         t = t.withNano(1);
@@ -1260,12 +1310,12 @@
         assertEquals(t.getNano(), 999999999);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withNanoOfSecond_nanoTooLow() {
         TEST_2007_07_15_12_30_40_987654321.withNano(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withNanoOfSecond_nanoTooHigh() {
         TEST_2007_07_15_12_30_40_987654321.withNano(1000000000);
     }
@@ -1273,14 +1323,14 @@
     //-----------------------------------------------------------------------
     // truncatedTo(TemporalUnit)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_truncatedTo_normal() {
         assertEquals(TEST_2007_07_15_12_30_40_987654321.truncatedTo(NANOS), TEST_2007_07_15_12_30_40_987654321);
         assertEquals(TEST_2007_07_15_12_30_40_987654321.truncatedTo(SECONDS), TEST_2007_07_15_12_30_40_987654321.withNano(0));
         assertEquals(TEST_2007_07_15_12_30_40_987654321.truncatedTo(DAYS), TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_truncatedTo_null() {
         TEST_2007_07_15_12_30_40_987654321.truncatedTo(null);
     }
@@ -1322,29 +1372,29 @@
     //-----------------------------------------------------------------------
     // plus(long,TemporalUnit)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_longTemporalUnit_positiveMonths() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plus(7, ChronoUnit.MONTHS);
         assertEquals(t, LocalDateTime.of(2008, 2, 15, 12, 30, 40, 987654321));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_longTemporalUnit_negativeDays() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plus(-25, ChronoUnit.DAYS);
         assertEquals(t, LocalDateTime.of(2007, 6, 20, 12, 30, 40, 987654321));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_plus_longTemporalUnit_null() {
         TEST_2007_07_15_12_30_40_987654321.plus(1, (TemporalUnit) null);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plus_longTemporalUnit_invalidTooLarge() {
         LocalDateTime.of(Year.MAX_VALUE, 1, 1, 0, 0).plus(1, ChronoUnit.YEARS);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plus_longTemporalUnit_invalidTooSmall() {
         LocalDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0).plus(-1, ChronoUnit.YEARS);
     }
@@ -1352,30 +1402,30 @@
     //-----------------------------------------------------------------------
     // plusYears()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears_int_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(1);
         check(t, 2008, 7, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears_int_negative() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(-1);
         check(t, 2006, 7, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears_int_adjustDay() {
         LocalDateTime t = createDateMidnight(2008, 2, 29).plusYears(1);
         check(t, 2009, 2, 28, 0, 0, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusYears_int_invalidTooLarge() {
         createDateMidnight(Year.MAX_VALUE, 1, 1).plusYears(1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusYears_int_invalidTooSmall() {
         LocalDate.of(Year.MIN_VALUE, 1, 1).plusYears(-1);
     }
@@ -1383,54 +1433,54 @@
     //-----------------------------------------------------------------------
     // plusMonths()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_int_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMonths(1);
         check(t, 2007, 8, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_int_overYears() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMonths(25);
         check(t, 2009, 8, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_int_negative() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMonths(-1);
         check(t, 2007, 6, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_int_negativeAcrossYear() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMonths(-7);
         check(t, 2006, 12, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_int_negativeOverYears() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMonths(-31);
         check(t, 2004, 12, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_int_adjustDayFromLeapYear() {
         LocalDateTime t = createDateMidnight(2008, 2, 29).plusMonths(12);
         check(t, 2009, 2, 28, 0, 0, 0, 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_int_adjustDayFromMonthLength() {
         LocalDateTime t = createDateMidnight(2007, 3, 31).plusMonths(1);
         check(t, 2007, 4, 30, 0, 0, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusMonths_int_invalidTooLarge() {
         createDateMidnight(Year.MAX_VALUE, 12, 1).plusMonths(1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusMonths_int_invalidTooSmall() {
         createDateMidnight(Year.MIN_VALUE, 1, 1).plusMonths(-1);
     }
@@ -1470,7 +1520,7 @@
         };
     }
 
-    @Test(dataProvider="samplePlusWeeksSymmetry", groups={"tck"})
+    @Test(dataProvider="samplePlusWeeksSymmetry")
     public void test_plusWeeks_symmetry(LocalDateTime reference) {
         for (int weeks = 0; weeks < 365 * 8; weeks++) {
             LocalDateTime t = reference.plusWeeks(weeks).plusWeeks(-weeks);
@@ -1481,66 +1531,66 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusWeeks(1);
         check(t, 2007, 7, 22, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_overMonths() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusWeeks(9);
         check(t, 2007, 9, 16, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_overYears() {
         LocalDateTime t = LocalDateTime.of(2006, 7, 16, 12, 30, 40, 987654321).plusWeeks(52);
         assertEquals(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_overLeapYears() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(-1).plusWeeks(104);
         check(t, 2008, 7, 12, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_negative() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusWeeks(-1);
         check(t, 2007, 7, 8, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_negativeAcrossYear() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusWeeks(-28);
         check(t, 2006, 12, 31, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_negativeOverYears() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusWeeks(-104);
         check(t, 2005, 7, 17, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_maximum() {
         LocalDateTime t = createDateMidnight(Year.MAX_VALUE, 12, 24).plusWeeks(1);
         check(t, Year.MAX_VALUE, 12, 31, 0, 0, 0, 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_minimum() {
         LocalDateTime t = createDateMidnight(Year.MIN_VALUE, 1, 8).plusWeeks(-1);
         check(t, Year.MIN_VALUE, 1, 1, 0, 0, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusWeeks_invalidTooLarge() {
         createDateMidnight(Year.MAX_VALUE, 12, 25).plusWeeks(1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusWeeks_invalidTooSmall() {
         createDateMidnight(Year.MIN_VALUE, 1, 7).plusWeeks(-1);
     }
@@ -1580,7 +1630,7 @@
         };
     }
 
-    @Test(dataProvider="samplePlusDaysSymmetry", groups={"tck"})
+    @Test(dataProvider="samplePlusDaysSymmetry")
     public void test_plusDays_symmetry(LocalDateTime reference) {
         for (int days = 0; days < 365 * 8; days++) {
             LocalDateTime t = reference.plusDays(days).plusDays(-days);
@@ -1591,76 +1641,76 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusDays(1);
         check(t, 2007, 7, 16, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_overMonths() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusDays(62);
         check(t, 2007, 9, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_overYears() {
         LocalDateTime t = LocalDateTime.of(2006, 7, 14, 12, 30, 40, 987654321).plusDays(366);
         assertEquals(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_overLeapYears() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(-1).plusDays(365 + 366);
         check(t, 2008, 7, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_negative() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusDays(-1);
         check(t, 2007, 7, 14, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_negativeAcrossYear() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusDays(-196);
         check(t, 2006, 12, 31, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_negativeOverYears() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusDays(-730);
         check(t, 2005, 7, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_maximum() {
         LocalDateTime t = createDateMidnight(Year.MAX_VALUE, 12, 30).plusDays(1);
         check(t, Year.MAX_VALUE, 12, 31, 0, 0, 0, 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays_minimum() {
         LocalDateTime t = createDateMidnight(Year.MIN_VALUE, 1, 2).plusDays(-1);
         check(t, Year.MIN_VALUE, 1, 1, 0, 0, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusDays_invalidTooLarge() {
         createDateMidnight(Year.MAX_VALUE, 12, 31).plusDays(1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusDays_invalidTooSmall() {
         createDateMidnight(Year.MIN_VALUE, 1, 1).plusDays(-1);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void test_plusDays_overflowTooLarge() {
         createDateMidnight(Year.MAX_VALUE, 12, 31).plusDays(Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void test_plusDays_overflowTooSmall() {
         createDateMidnight(Year.MIN_VALUE, 1, 1).plusDays(Long.MIN_VALUE);
     }
@@ -1668,7 +1718,7 @@
     //-----------------------------------------------------------------------
     // plusHours()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusHours_one() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDate d = t.toLocalDate();
@@ -1685,7 +1735,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusHours_fromZero() {
         LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDate d = base.toLocalDate().minusDays(3);
@@ -1704,7 +1754,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusHours_fromOne() {
         LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(1, 0));
         LocalDate d = base.toLocalDate().minusDays(3);
@@ -1727,7 +1777,7 @@
     //-----------------------------------------------------------------------
     // plusMinutes()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMinutes_one() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDate d = t.toLocalDate();
@@ -1749,7 +1799,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMinutes_fromZero() {
         LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDate d = base.toLocalDate().minusDays(1);
@@ -1768,7 +1818,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMinutes_noChange_oneDay() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMinutes(24 * 60);
         assertEquals(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate().plusDays(1));
@@ -1777,7 +1827,7 @@
     //-----------------------------------------------------------------------
     // plusSeconds()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusSeconds_one() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDate d = t.toLocalDate();
@@ -1852,7 +1902,7 @@
         };
     }
 
-    @Test(dataProvider="plusSeconds_fromZero", groups={"tck"})
+    @Test(dataProvider="plusSeconds_fromZero")
     public void test_plusSeconds_fromZero(int seconds, LocalDate date, int hour, int min, int sec) {
         LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDateTime t = base.plusSeconds(seconds);
@@ -1863,7 +1913,7 @@
         assertEquals(sec, t.getSecond());
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusSeconds_noChange_oneDay() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusSeconds(24 * 60 * 60);
         assertEquals(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate().plusDays(1));
@@ -1872,7 +1922,7 @@
     //-----------------------------------------------------------------------
     // plusNanos()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusNanos_halfABillion() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDate d = t.toLocalDate();
@@ -1956,7 +2006,7 @@
         };
     }
 
-    @Test(dataProvider="plusNanos_fromZero", groups={"tck"})
+    @Test(dataProvider="plusNanos_fromZero")
     public void test_plusNanos_fromZero(long nanoseconds, LocalDate date, int hour, int min, int sec, int nanos) {
         LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDateTime t = base.plusNanos(nanoseconds);
@@ -1968,7 +2018,7 @@
         assertEquals(nanos, t.getNano());
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusNanos_noChange_oneDay() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusNanos(24 * 60 * 60 * 1000000000L);
         assertEquals(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate().plusDays(1));
@@ -2011,29 +2061,29 @@
     //-----------------------------------------------------------------------
     // minus(long,TemporalUnit)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_longTemporalUnit_positiveMonths() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minus(7, ChronoUnit.MONTHS);
         assertEquals(t, LocalDateTime.of(2006, 12, 15, 12, 30, 40, 987654321));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_longTemporalUnit_negativeDays() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minus(-25, ChronoUnit.DAYS);
         assertEquals(t, LocalDateTime.of(2007, 8, 9, 12, 30, 40, 987654321));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_minus_longTemporalUnit_null() {
         TEST_2007_07_15_12_30_40_987654321.minus(1, (TemporalUnit) null);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minus_longTemporalUnit_invalidTooLarge() {
         LocalDateTime.of(Year.MAX_VALUE, 1, 1, 0, 0).minus(-1, ChronoUnit.YEARS);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minus_longTemporalUnit_invalidTooSmall() {
         LocalDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0).minus(1, ChronoUnit.YEARS);
     }
@@ -2041,30 +2091,30 @@
     //-----------------------------------------------------------------------
     // minusYears()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears_int_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusYears(1);
         check(t, 2006, 7, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears_int_negative() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusYears(-1);
         check(t, 2008, 7, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears_int_adjustDay() {
         LocalDateTime t = createDateMidnight(2008, 2, 29).minusYears(1);
         check(t, 2007, 2, 28, 0, 0, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusYears_int_invalidTooLarge() {
         createDateMidnight(Year.MAX_VALUE, 1, 1).minusYears(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusYears_int_invalidTooSmall() {
         createDateMidnight(Year.MIN_VALUE, 1, 1).minusYears(1);
     }
@@ -2072,54 +2122,54 @@
     //-----------------------------------------------------------------------
     // minusMonths()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_int_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMonths(1);
         check(t, 2007, 6, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_int_overYears() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMonths(25);
         check(t, 2005, 6, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_int_negative() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMonths(-1);
         check(t, 2007, 8, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_int_negativeAcrossYear() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMonths(-7);
         check(t, 2008, 2, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_int_negativeOverYears() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMonths(-31);
         check(t, 2010, 2, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_int_adjustDayFromLeapYear() {
         LocalDateTime t = createDateMidnight(2008, 2, 29).minusMonths(12);
         check(t, 2007, 2, 28, 0, 0, 0, 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_int_adjustDayFromMonthLength() {
         LocalDateTime t = createDateMidnight(2007, 3, 31).minusMonths(1);
         check(t, 2007, 2, 28, 0, 0, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusMonths_int_invalidTooLarge() {
         createDateMidnight(Year.MAX_VALUE, 12, 1).minusMonths(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusMonths_int_invalidTooSmall() {
         createDateMidnight(Year.MIN_VALUE, 1, 1).minusMonths(1);
     }
@@ -2159,7 +2209,7 @@
         };
     }
 
-    @Test(dataProvider="sampleMinusWeeksSymmetry", groups={"tck"})
+    @Test(dataProvider="sampleMinusWeeksSymmetry")
     public void test_minusWeeks_symmetry(LocalDateTime reference) {
         for (int weeks = 0; weeks < 365 * 8; weeks++) {
             LocalDateTime t = reference.minusWeeks(weeks).minusWeeks(-weeks);
@@ -2170,66 +2220,66 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusWeeks(1);
         check(t, 2007, 7, 8, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_overMonths() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusWeeks(9);
         check(t, 2007, 5, 13, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_overYears() {
         LocalDateTime t = LocalDateTime.of(2008, 7, 13, 12, 30, 40, 987654321).minusWeeks(52);
         assertEquals(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_overLeapYears() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusYears(-1).minusWeeks(104);
         check(t, 2006, 7, 18, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_negative() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusWeeks(-1);
         check(t, 2007, 7, 22, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_negativeAcrossYear() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusWeeks(-28);
         check(t, 2008, 1, 27, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_negativeOverYears() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusWeeks(-104);
         check(t, 2009, 7, 12, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_maximum() {
         LocalDateTime t = createDateMidnight(Year.MAX_VALUE, 12, 24).minusWeeks(-1);
         check(t, Year.MAX_VALUE, 12, 31, 0, 0, 0, 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_minimum() {
         LocalDateTime t = createDateMidnight(Year.MIN_VALUE, 1, 8).minusWeeks(1);
         check(t, Year.MIN_VALUE, 1, 1, 0, 0, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusWeeks_invalidTooLarge() {
         createDateMidnight(Year.MAX_VALUE, 12, 25).minusWeeks(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusWeeks_invalidTooSmall() {
         createDateMidnight(Year.MIN_VALUE, 1, 7).minusWeeks(1);
     }
@@ -2269,7 +2319,7 @@
         };
     }
 
-    @Test(dataProvider="sampleMinusDaysSymmetry", groups={"tck"})
+    @Test(dataProvider="sampleMinusDaysSymmetry")
     public void test_minusDays_symmetry(LocalDateTime reference) {
         for (int days = 0; days < 365 * 8; days++) {
             LocalDateTime t = reference.minusDays(days).minusDays(-days);
@@ -2280,76 +2330,76 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_normal() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusDays(1);
         check(t, 2007, 7, 14, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_overMonths() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusDays(62);
         check(t, 2007, 5, 14, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_overYears() {
         LocalDateTime t = LocalDateTime.of(2008, 7, 16, 12, 30, 40, 987654321).minusDays(367);
         assertEquals(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_overLeapYears() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(2).minusDays(365 + 366);
         assertEquals(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_negative() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusDays(-1);
         check(t, 2007, 7, 16, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_negativeAcrossYear() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusDays(-169);
         check(t, 2007, 12, 31, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_negativeOverYears() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusDays(-731);
         check(t, 2009, 7, 15, 12, 30, 40, 987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_maximum() {
         LocalDateTime t = createDateMidnight(Year.MAX_VALUE, 12, 30).minusDays(-1);
         check(t, Year.MAX_VALUE, 12, 31, 0, 0, 0, 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays_minimum() {
         LocalDateTime t = createDateMidnight(Year.MIN_VALUE, 1, 2).minusDays(1);
         check(t, Year.MIN_VALUE, 1, 1, 0, 0, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusDays_invalidTooLarge() {
         createDateMidnight(Year.MAX_VALUE, 12, 31).minusDays(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusDays_invalidTooSmall() {
         createDateMidnight(Year.MIN_VALUE, 1, 1).minusDays(1);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void test_minusDays_overflowTooLarge() {
         createDateMidnight(Year.MAX_VALUE, 12, 31).minusDays(Long.MIN_VALUE);
     }
 
-    @Test(expectedExceptions=ArithmeticException.class, groups={"tck"})
+    @Test(expectedExceptions=ArithmeticException.class)
     public void test_minusDays_overflowTooSmall() {
         createDateMidnight(Year.MIN_VALUE, 1, 1).minusDays(Long.MAX_VALUE);
     }
@@ -2357,7 +2407,7 @@
     //-----------------------------------------------------------------------
     // minusHours()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusHours_one() {
         LocalDateTime t =TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDate d = t.toLocalDate();
@@ -2374,7 +2424,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusHours_fromZero() {
         LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDate d = base.toLocalDate().plusDays(2);
@@ -2393,7 +2443,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusHours_fromOne() {
         LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(1, 0));
         LocalDate d = base.toLocalDate().plusDays(2);
@@ -2416,7 +2466,7 @@
     //-----------------------------------------------------------------------
     // minusMinutes()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMinutes_one() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDate d = t.toLocalDate().minusDays(1);
@@ -2441,7 +2491,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMinutes_fromZero() {
         LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDate d = base.toLocalDate().minusDays(1);
@@ -2460,7 +2510,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMinutes_noChange_oneDay() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMinutes(24 * 60);
         assertEquals(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate().minusDays(1));
@@ -2469,7 +2519,7 @@
     //-----------------------------------------------------------------------
     // minusSeconds()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusSeconds_one() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDate d = t.toLocalDate().minusDays(1);
@@ -2549,7 +2599,7 @@
         };
     }
 
-    @Test(dataProvider="minusSeconds_fromZero", groups={"tck"})
+    @Test(dataProvider="minusSeconds_fromZero")
     public void test_minusSeconds_fromZero(int seconds, LocalDate date, int hour, int min, int sec) {
         LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDateTime t = base.minusSeconds(seconds);
@@ -2563,7 +2613,7 @@
     //-----------------------------------------------------------------------
     // minusNanos()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusNanos_halfABillion() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDate d = t.toLocalDate().minusDays(1);
@@ -2654,7 +2704,7 @@
         };
     }
 
-    @Test(dataProvider="minusNanos_fromZero", groups={"tck"})
+    @Test(dataProvider="minusNanos_fromZero")
     public void test_minusNanos_fromZero(long nanoseconds, LocalDate date, int hour, int min, int sec, int nanos) {
         LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT);
         LocalDateTime t = base.minusNanos(nanoseconds);
@@ -2667,15 +2717,193 @@
     }
 
     //-----------------------------------------------------------------------
+    // periodUntil(Temporal, TemporalUnit)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="periodUntilUnit")
+    Object[][] data_periodUntilUnit() {
+        return new Object[][] {
+                // date only
+                {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), DAYS, 0},
+                {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), WEEKS, 0},
+                {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), MONTHS, 0},
+                {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), YEARS, 0},
+                {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), DECADES, 0},
+                {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), CENTURIES, 0},
+                {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), MILLENNIA, 0},
+
+                {dtNoon(2000, 1, 15), dtNoon(2000, 2, 14), DAYS, 30},
+                {dtNoon(2000, 1, 15), dtNoon(2000, 2, 15), DAYS, 31},
+                {dtNoon(2000, 1, 15), dtNoon(2000, 2, 16), DAYS, 32},
+
+                {dtNoon(2000, 1, 15), dtNoon(2000, 2, 17), WEEKS, 4},
+                {dtNoon(2000, 1, 15), dtNoon(2000, 2, 18), WEEKS, 4},
+                {dtNoon(2000, 1, 15), dtNoon(2000, 2, 19), WEEKS, 5},
+                {dtNoon(2000, 1, 15), dtNoon(2000, 2, 20), WEEKS, 5},
+
+                {dtNoon(2000, 1, 15), dtNoon(2000, 2, 14), MONTHS, 0},
+                {dtNoon(2000, 1, 15), dtNoon(2000, 2, 15), MONTHS, 1},
+                {dtNoon(2000, 1, 15), dtNoon(2000, 2, 16), MONTHS, 1},
+                {dtNoon(2000, 1, 15), dtNoon(2000, 3, 14), MONTHS, 1},
+                {dtNoon(2000, 1, 15), dtNoon(2000, 3, 15), MONTHS, 2},
+                {dtNoon(2000, 1, 15), dtNoon(2000, 3, 16), MONTHS, 2},
+
+                {dtNoon(2000, 1, 15), dtNoon(2001, 1, 14), YEARS, 0},
+                {dtNoon(2000, 1, 15), dtNoon(2001, 1, 15), YEARS, 1},
+                {dtNoon(2000, 1, 15), dtNoon(2001, 1, 16), YEARS, 1},
+                {dtNoon(2000, 1, 15), dtNoon(2004, 1, 14), YEARS, 3},
+                {dtNoon(2000, 1, 15), dtNoon(2004, 1, 15), YEARS, 4},
+                {dtNoon(2000, 1, 15), dtNoon(2004, 1, 16), YEARS, 4},
+
+                {dtNoon(2000, 1, 15), dtNoon(2010, 1, 14), DECADES, 0},
+                {dtNoon(2000, 1, 15), dtNoon(2010, 1, 15), DECADES, 1},
+
+                {dtNoon(2000, 1, 15), dtNoon(2100, 1, 14), CENTURIES, 0},
+                {dtNoon(2000, 1, 15), dtNoon(2100, 1, 15), CENTURIES, 1},
+
+                {dtNoon(2000, 1, 15), dtNoon(3000, 1, 14), MILLENNIA, 0},
+                {dtNoon(2000, 1, 15), dtNoon(3000, 1, 15), MILLENNIA, 1},
+
+                // time only
+                {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), NANOS, 0},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), MICROS, 0},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), MILLIS, 0},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), SECONDS, 0},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), MINUTES, 0},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), HOURS, 0},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), HALF_DAYS, 0},
+
+                {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), NANOS, 2 * 3600 * 1_000_000_000L},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), MICROS, 2 * 3600 * 1_000_000L},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), MILLIS, 2 * 3600 * 1_000L},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), SECONDS, 2 * 3600},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), MINUTES, 2 * 60},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), HOURS, 2},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), HALF_DAYS, 0},
+
+                {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), NANOS, 14 * 3600 * 1_000_000_000L},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), MICROS, 14 * 3600 * 1_000_000L},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), MILLIS, 14 * 3600 * 1_000L},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), SECONDS, 14 * 3600},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), MINUTES, 14 * 60},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), HOURS, 14},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), HALF_DAYS, 1},
+
+                {dtEpoch(0, 0, 0, 0), dtEpoch(2, 30, 40, 1500), NANOS, (2 * 3600 + 30 * 60 + 40) * 1_000_000_000L + 1500},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(2, 30, 40, 1500), MICROS, (2 * 3600 + 30 * 60 + 40) * 1_000_000L + 1},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(2, 30, 40, 1500), MILLIS, (2 * 3600 + 30 * 60 + 40) * 1_000L},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(2, 30, 40, 1500), SECONDS, 2 * 3600 + 30 * 60 + 40},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(2, 30, 40, 1500), MINUTES, 2 * 60 + 30},
+                {dtEpoch(0, 0, 0, 0), dtEpoch(2, 30, 40, 1500), HOURS, 2},
+
+                // combinations
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 499), NANOS, -1},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 500), NANOS, 0},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 501), NANOS, 1},
+
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 39, 500), SECONDS, -1},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 39, 501), SECONDS, 0},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 499), SECONDS, 0},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 500), SECONDS, 0},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 501), SECONDS, 0},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 41, 499), SECONDS, 0},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 41, 500), SECONDS, 1},
+
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 499), NANOS, -1 + 86400_000_000_000L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 500), NANOS, 0 + 86400_000_000_000L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 501), NANOS, 1 + 86400_000_000_000L},
+
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 39, 499), SECONDS, -2 + 86400L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 39, 500), SECONDS, -1 + 86400L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 39, 501), SECONDS, -1 + 86400L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 499), SECONDS, -1 + 86400L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 500), SECONDS, 0 + 86400L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 501), SECONDS, 0 + 86400L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 41, 499), SECONDS, 0 + 86400L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 41, 500), SECONDS, 1 + 86400L},
+
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 29, 40, 499), MINUTES, -2 + 24 * 60L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 29, 40, 500), MINUTES, -1 + 24 * 60L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 29, 40, 501), MINUTES, -1 + 24 * 60L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 499), MINUTES, -1 + 24 * 60L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 500), MINUTES, 0 + 24 * 60L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 501), MINUTES, 0 + 24 * 60L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 31, 40, 499), MINUTES, 0 + 24 * 60L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 31, 40, 500), MINUTES, 1 + 24 * 60L},
+
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 11, 30, 40, 499), HOURS, -2 + 24L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 11, 30, 40, 500), HOURS, -1 + 24L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 11, 30, 40, 501), HOURS, -1 + 24L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 499), HOURS, -1 + 24L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 500), HOURS, 0 + 24L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 501), HOURS, 0 + 24L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 13, 30, 40, 499), HOURS, 0 + 24L},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 13, 30, 40, 500), HOURS, 1 + 24L},
+
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 13, 12, 30, 40, 499), DAYS, -2},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 13, 12, 30, 40, 500), DAYS, -2},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 13, 12, 30, 40, 501), DAYS, -1},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 14, 12, 30, 40, 499), DAYS, -1},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 14, 12, 30, 40, 500), DAYS, -1},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 14, 12, 30, 40, 501), DAYS, 0},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 499), DAYS, 0},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 500), DAYS, 0},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 501), DAYS, 0},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 499), DAYS, 0},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 500), DAYS, 1},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 501), DAYS, 1},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 17, 12, 30, 40, 499), DAYS, 1},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 17, 12, 30, 40, 500), DAYS, 2},
+                {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 17, 12, 30, 40, 501), DAYS, 2},
+        };
+    }
+
+    @Test(dataProvider="periodUntilUnit")
+    public void test_periodUntil_TemporalUnit(LocalDateTime dt1, LocalDateTime dt2, TemporalUnit unit, long expected) {
+        long amount = dt1.periodUntil(dt2, unit);
+        assertEquals(amount, expected);
+    }
+
+    @Test(dataProvider="periodUntilUnit")
+    public void test_periodUntil_TemporalUnit_negated(LocalDateTime dt1, LocalDateTime dt2, TemporalUnit unit, long expected) {
+        long amount = dt2.periodUntil(dt1, unit);
+        assertEquals(amount, -expected);
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_periodUntil_TemporalUnit_nullEnd() {
+        TEST_2007_07_15_12_30_40_987654321.periodUntil(null, HOURS);
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_periodUntil_TemporalUnit_nullUnit() {
+        TEST_2007_07_15_12_30_40_987654321.periodUntil(TEST_2007_07_15_12_30_40_987654321, null);
+    }
+
+    //-----------------------------------------------------------------------
+    // format(DateTimeFormatter)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_format_formatter() {
+        DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s");
+        String t = LocalDateTime.of(2010, 12, 3, 11, 30, 45).format(f);
+        assertEquals(t, "2010 12 3 11 30 45");
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_format_formatter_null() {
+        LocalDateTime.of(2010, 12, 3, 11, 30, 45).format(null);
+    }
+
+    //-----------------------------------------------------------------------
     // atOffset()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_atOffset() {
         LocalDateTime t = LocalDateTime.of(2008, 6, 30, 11, 30);
         assertEquals(t.atOffset(OFFSET_PTWO), OffsetDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), OFFSET_PTWO));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_atOffset_nullZoneOffset() {
         LocalDateTime t = LocalDateTime.of(2008, 6, 30, 11, 30);
         t.atOffset((ZoneOffset) null);
@@ -2684,34 +2912,34 @@
     //-----------------------------------------------------------------------
     // atZone()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_atZone() {
         LocalDateTime t = LocalDateTime.of(2008, 6, 30, 11, 30);
         assertEquals(t.atZone(ZONE_PARIS),
                 ZonedDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), ZONE_PARIS));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_atZone_Offset() {
         LocalDateTime t = LocalDateTime.of(2008, 6, 30, 11, 30);
         assertEquals(t.atZone(OFFSET_PTWO), ZonedDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), OFFSET_PTWO));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_atZone_dstGap() {
         LocalDateTime t = LocalDateTime.of(2007, 4, 1, 0, 0);
         assertEquals(t.atZone(ZONE_GAZA),
                 ZonedDateTime.of(LocalDateTime.of(2007, 4, 1, 1, 0), ZONE_GAZA));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_atZone_dstOverlap() {
         LocalDateTime t = LocalDateTime.of(2007, 10, 28, 2, 30);
         assertEquals(t.atZone(ZONE_PARIS),
                 ZonedDateTime.ofStrict(LocalDateTime.of(2007, 10, 28, 2, 30), OFFSET_PTWO, ZONE_PARIS));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_atZone_nullTimeZone() {
         LocalDateTime t = LocalDateTime.of(2008, 6, 30, 11, 30);
         t.atZone((ZoneId) null);
@@ -2720,7 +2948,7 @@
     //-----------------------------------------------------------------------
     // toEpochSecond()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toEpochSecond_afterEpoch() {
         for (int i = -5; i < 5; i++) {
             ZoneOffset offset = ZoneOffset.ofHours(i);
@@ -2731,7 +2959,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_toEpochSecond_beforeEpoch() {
         for (int i = 0; i < 100000; i++) {
             LocalDateTime a = LocalDateTime.of(1970, 1, 1, 0, 0).minusSeconds(i);
@@ -2742,22 +2970,22 @@
     //-----------------------------------------------------------------------
     // compareTo()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_comparisons() {
         test_comparisons_LocalDateTime(
-            LocalDate.of(Year.MIN_VALUE, 1, 1),
-            LocalDate.of(Year.MIN_VALUE, 12, 31),
-            LocalDate.of(-1, 1, 1),
-            LocalDate.of(-1, 12, 31),
-            LocalDate.of(0, 1, 1),
-            LocalDate.of(0, 12, 31),
-            LocalDate.of(1, 1, 1),
-            LocalDate.of(1, 12, 31),
-            LocalDate.of(2008, 1, 1),
-            LocalDate.of(2008, 2, 29),
-            LocalDate.of(2008, 12, 31),
-            LocalDate.of(Year.MAX_VALUE, 1, 1),
-            LocalDate.of(Year.MAX_VALUE, 12, 31)
+                LocalDate.of(Year.MIN_VALUE, 1, 1),
+                LocalDate.of(Year.MIN_VALUE, 12, 31),
+                LocalDate.of(-1, 1, 1),
+                LocalDate.of(-1, 12, 31),
+                LocalDate.of(0, 1, 1),
+                LocalDate.of(0, 12, 31),
+                LocalDate.of(1, 1, 1),
+                LocalDate.of(1, 12, 31),
+                LocalDate.of(2008, 1, 1),
+                LocalDate.of(2008, 2, 29),
+                LocalDate.of(2008, 12, 31),
+                LocalDate.of(Year.MAX_VALUE, 1, 1),
+                LocalDate.of(Year.MAX_VALUE, 12, 31)
         );
     }
 
@@ -2823,22 +3051,22 @@
         }
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_compareTo_ObjectNull() {
         TEST_2007_07_15_12_30_40_987654321.compareTo(null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isBefore_ObjectNull() {
         TEST_2007_07_15_12_30_40_987654321.isBefore(null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isAfter_ObjectNull() {
         TEST_2007_07_15_12_30_40_987654321.isAfter(null);
     }
 
-    @Test(expectedExceptions=ClassCastException.class, groups={"tck"})
+    @Test(expectedExceptions=ClassCastException.class)
     @SuppressWarnings({"unchecked", "rawtypes"})
     public void compareToNonLocalDateTime() {
        Comparable c = TEST_2007_07_15_12_30_40_987654321;
@@ -2883,73 +3111,73 @@
         };
     }
 
-    @Test(dataProvider="sampleDateTimes", groups={"tck"})
+    @Test(dataProvider="sampleDateTimes")
     public void test_equals_true(int y, int m, int d, int h, int mi, int s, int n) {
         LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n);
         LocalDateTime b = LocalDateTime.of(y, m, d, h, mi, s, n);
         assertTrue(a.equals(b));
     }
 
-    @Test(dataProvider="sampleDateTimes", groups={"tck"})
+    @Test(dataProvider="sampleDateTimes")
     public void test_equals_false_year_differs(int y, int m, int d, int h, int mi, int s, int n) {
         LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n);
         LocalDateTime b = LocalDateTime.of(y + 1, m, d, h, mi, s, n);
         assertFalse(a.equals(b));
     }
 
-    @Test(dataProvider="sampleDateTimes", groups={"tck"})
+    @Test(dataProvider="sampleDateTimes")
     public void test_equals_false_month_differs(int y, int m, int d, int h, int mi, int s, int n) {
         LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n);
         LocalDateTime b = LocalDateTime.of(y, m + 1, d, h, mi, s, n);
         assertFalse(a.equals(b));
     }
 
-    @Test(dataProvider="sampleDateTimes", groups={"tck"})
+    @Test(dataProvider="sampleDateTimes")
     public void test_equals_false_day_differs(int y, int m, int d, int h, int mi, int s, int n) {
         LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n);
         LocalDateTime b = LocalDateTime.of(y, m, d + 1, h, mi, s, n);
         assertFalse(a.equals(b));
     }
 
-    @Test(dataProvider="sampleDateTimes", groups={"tck"})
+    @Test(dataProvider="sampleDateTimes")
     public void test_equals_false_hour_differs(int y, int m, int d, int h, int mi, int s, int n) {
         LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n);
         LocalDateTime b = LocalDateTime.of(y, m, d, h + 1, mi, s, n);
         assertFalse(a.equals(b));
     }
 
-    @Test(dataProvider="sampleDateTimes", groups={"tck"})
+    @Test(dataProvider="sampleDateTimes")
     public void test_equals_false_minute_differs(int y, int m, int d, int h, int mi, int s, int n) {
         LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n);
         LocalDateTime b = LocalDateTime.of(y, m, d, h, mi + 1, s, n);
         assertFalse(a.equals(b));
     }
 
-    @Test(dataProvider="sampleDateTimes", groups={"tck"})
+    @Test(dataProvider="sampleDateTimes")
     public void test_equals_false_second_differs(int y, int m, int d, int h, int mi, int s, int n) {
         LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n);
         LocalDateTime b = LocalDateTime.of(y, m, d, h, mi, s + 1, n);
         assertFalse(a.equals(b));
     }
 
-    @Test(dataProvider="sampleDateTimes", groups={"tck"})
+    @Test(dataProvider="sampleDateTimes")
     public void test_equals_false_nano_differs(int y, int m, int d, int h, int mi, int s, int n) {
         LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n);
         LocalDateTime b = LocalDateTime.of(y, m, d, h, mi, s, n + 1);
         assertFalse(a.equals(b));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_itself_true() {
         assertEquals(TEST_2007_07_15_12_30_40_987654321.equals(TEST_2007_07_15_12_30_40_987654321), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_string_false() {
         assertEquals(TEST_2007_07_15_12_30_40_987654321.equals("2007-07-15T12:30:40.987654321"), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_null_false() {
         assertEquals(TEST_2007_07_15_12_30_40_987654321.equals(null), false);
     }
@@ -2957,7 +3185,7 @@
     //-----------------------------------------------------------------------
     // hashCode()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleDateTimes", groups={"tck"})
+    @Test(dataProvider="sampleDateTimes")
     public void test_hashCode(int y, int m, int d, int h, int mi, int s, int n) {
         LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n);
         assertEquals(a.hashCode(), a.hashCode());
@@ -2979,26 +3207,23 @@
         };
     }
 
-    @Test(dataProvider="sampleToString", groups={"tck"})
+    @Test(dataProvider="sampleToString")
     public void test_toString(int y, int m, int d, int h, int mi, int s, int n, String expected) {
         LocalDateTime t = LocalDateTime.of(y, m, d, h, mi, s, n);
         String str = t.toString();
         assertEquals(str, expected);
     }
 
-    //-----------------------------------------------------------------------
-    // toString(DateTimeFormatter)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_toString_formatter() {
-        DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s");
-        String t = LocalDateTime.of(2010, 12, 3, 11, 30, 45).toString(f);
-        assertEquals(t, "2010 12 3 11 30 45");
-    }
-
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
-    public void test_toString_formatter_null() {
-        LocalDateTime.of(2010, 12, 3, 11, 30, 45).toString(null);
+    private LocalDateTime dtNoon(int year, int month, int day) {
+        return LocalDateTime.of(year, month, day, 12, 0);
+    }
+
+    private LocalDateTime dtEpoch(int hour, int min, int sec, int nano) {
+        return LocalDateTime.of(1970, 1, 1, hour, min, sec, nano);
+    }
+
+    private LocalDateTime dt(int year, int month, int day, int hour, int min, int sec, int nano) {
+        return LocalDateTime.of(year, month, day, hour, min, sec, nano);
     }
 
 }
--- a/test/java/time/tck/java/time/TCKLocalTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKLocalTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -76,6 +76,7 @@
 import static java.time.temporal.ChronoField.SECOND_OF_MINUTE;
 import static java.time.temporal.ChronoUnit.DAYS;
 import static java.time.temporal.ChronoUnit.FOREVER;
+import static java.time.temporal.ChronoUnit.HALF_DAYS;
 import static java.time.temporal.ChronoUnit.HOURS;
 import static java.time.temporal.ChronoUnit.MICROS;
 import static java.time.temporal.ChronoUnit.MILLIS;
@@ -99,16 +100,17 @@
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
+import java.time.OffsetDateTime;
 import java.time.OffsetTime;
 import java.time.Period;
 import java.time.ZoneId;
 import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.JulianFields;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -116,6 +118,7 @@
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.EnumSet;
@@ -133,6 +136,7 @@
 public class TCKLocalTime extends AbstractDateTimeTest {
 
     private static final ZoneOffset OFFSET_PTWO = ZoneOffset.ofHours(2);
+    private static final ZoneId ZONE_PARIS = ZoneId.of("Europe/Paris");
 
     private LocalTime TEST_12_30_40_987654321;
 
@@ -142,7 +146,7 @@
         INVALID_UNITS = (TemporalUnit[]) set.toArray(new TemporalUnit[set.size()]);
     }
 
-    @BeforeMethod(groups={"tck","implementation"})
+    @BeforeMethod
     public void setUp() {
         TEST_12_30_40_987654321 = LocalTime.of(12, 30, 40, 987654321);
     }
@@ -258,7 +262,7 @@
     //-----------------------------------------------------------------------
     // constants
     //-----------------------------------------------------------------------
-    @Test(groups={"tck","implementation"})
+    @Test
     public void constant_MIDNIGHT() {
         check(LocalTime.MIDNIGHT, 0, 0, 0, 0);
     }
@@ -281,7 +285,7 @@
     //-----------------------------------------------------------------------
     // now()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now() {
         LocalTime expected = LocalTime.now(Clock.systemDefaultZone());
         LocalTime test = LocalTime.now();
@@ -292,12 +296,12 @@
     //-----------------------------------------------------------------------
     // now(ZoneId)
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_ZoneId_nullZoneId() {
         LocalTime.now((ZoneId) null);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_ZoneId() {
         ZoneId zone = ZoneId.of("UTC+01:02:03");
         LocalTime expected = LocalTime.now(Clock.system(zone));
@@ -315,12 +319,12 @@
     //-----------------------------------------------------------------------
     // now(Clock)
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_Clock_nullClock() {
         LocalTime.now((Clock) null);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_allSecsInDay() {
         for (int i = 0; i < (2 * 24 * 60 * 60); i++) {
             Instant instant = Instant.ofEpochSecond(i, 8);
@@ -333,7 +337,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_beforeEpoch() {
         for (int i =-1; i >= -(24 * 60 * 60); i--) {
             Instant instant = Instant.ofEpochSecond(i, 8);
@@ -347,7 +351,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_max() {
         Clock clock = Clock.fixed(Instant.MAX, ZoneOffset.UTC);
         LocalTime test = LocalTime.now(clock);
@@ -357,7 +361,7 @@
         assertEquals(test.getNano(), 999_999_999);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_min() {
         Clock clock = Clock.fixed(Instant.MIN, ZoneOffset.UTC);
         LocalTime test = LocalTime.now(clock);
@@ -370,71 +374,71 @@
     //-----------------------------------------------------------------------
     // of() factories
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_time_2ints() {
         LocalTime test = LocalTime.of(12, 30);
         check(test, 12, 30, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_2ints_hourTooLow() {
         LocalTime.of(-1, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_2ints_hourTooHigh() {
         LocalTime.of(24, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_2ints_minuteTooLow() {
         LocalTime.of(0, -1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_2ints_minuteTooHigh() {
         LocalTime.of(0, 60);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_time_3ints() {
         LocalTime test = LocalTime.of(12, 30, 40);
         check(test, 12, 30, 40, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_3ints_hourTooLow() {
         LocalTime.of(-1, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_3ints_hourTooHigh() {
         LocalTime.of(24, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_3ints_minuteTooLow() {
         LocalTime.of(0, -1, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_3ints_minuteTooHigh() {
         LocalTime.of(0, 60, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_3ints_secondTooLow() {
         LocalTime.of(0, 0, -1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_3ints_secondTooHigh() {
         LocalTime.of(0, 0, 60);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_time_4ints() {
         LocalTime test = LocalTime.of(12, 30, 40, 987654321);
         check(test, 12, 30, 40, 987654321);
@@ -442,42 +446,42 @@
         check(test, 12, 0, 40, 987654321);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_4ints_hourTooLow() {
         LocalTime.of(-1, 0, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_4ints_hourTooHigh() {
         LocalTime.of(24, 0, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_4ints_minuteTooLow() {
         LocalTime.of(0, -1, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_4ints_minuteTooHigh() {
         LocalTime.of(0, 60, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_4ints_secondTooLow() {
         LocalTime.of(0, 0, -1, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_4ints_secondTooHigh() {
         LocalTime.of(0, 0, 60, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_4ints_nanoTooLow() {
         LocalTime.of(0, 0, 0, -1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_time_4ints_nanoTooHigh() {
         LocalTime.of(0, 0, 0, 1000000000);
     }
@@ -485,18 +489,18 @@
     //-----------------------------------------------------------------------
     // ofSecondOfDay(long)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofSecondOfDay() {
         LocalTime localTime = LocalTime.ofSecondOfDay(2 * 60 * 60 + 17 * 60 + 23);
         check(localTime, 2, 17, 23, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofSecondOfDay_tooLow() {
         LocalTime.ofSecondOfDay(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofSecondOfDay_tooHigh() {
         LocalTime.ofSecondOfDay(24 * 60 * 60);
     }
@@ -504,18 +508,18 @@
     //-----------------------------------------------------------------------
     // ofNanoOfDay(long)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofNanoOfDay() {
         LocalTime localTime = LocalTime.ofNanoOfDay(60 * 60 * 1000000000L + 17);
         check(localTime, 1, 0, 0, 17);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofNanoOfDay_tooLow() {
         LocalTime.ofNanoOfDay(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofNanoOfDay_tooHigh() {
         LocalTime.ofNanoOfDay(24 * 60 * 60 * 1000000000L);
     }
@@ -523,18 +527,18 @@
     //-----------------------------------------------------------------------
     // from()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_from_TemporalAccessor() {
         assertEquals(LocalTime.from(LocalTime.of(17, 30)), LocalTime.of(17, 30));
         assertEquals(LocalTime.from(LocalDateTime.of(2012, 5, 1, 17, 30)), LocalTime.of(17, 30));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_from_TemporalAccessor_invalid_noDerive() {
         LocalTime.from(LocalDate.of(2007, 7, 15));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_from_TemporalAccessor_null() {
         LocalTime.from((TemporalAccessor) null);
     }
@@ -542,7 +546,7 @@
     //-----------------------------------------------------------------------
     // parse()
     //-----------------------------------------------------------------------
-    @Test(dataProvider = "sampleToString", groups={"tck"})
+    @Test(dataProvider = "sampleToString")
     public void factory_parse_validText(int h, int m, int s, int n, String parsable) {
         LocalTime t = LocalTime.parse(parsable);
         assertNotNull(t, parsable);
@@ -567,29 +571,29 @@
         };
     }
 
-    @Test(dataProvider = "sampleBadParse", expectedExceptions={DateTimeParseException.class}, groups={"tck"})
+    @Test(dataProvider = "sampleBadParse", expectedExceptions={DateTimeParseException.class})
     public void factory_parse_invalidText(String unparsable) {
         LocalTime.parse(unparsable);
     }
 
     //-----------------------------------------------------------------------s
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void factory_parse_illegalHour() {
         LocalTime.parse("25:00");
     }
 
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void factory_parse_illegalMinute() {
         LocalTime.parse("12:60");
     }
 
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void factory_parse_illegalSecond() {
         LocalTime.parse("12:12:60");
     }
 
     //-----------------------------------------------------------------------s
-    @Test(expectedExceptions = {NullPointerException.class}, groups={"tck"})
+    @Test(expectedExceptions = {NullPointerException.class})
     public void factory_parse_nullTest() {
         LocalTime.parse((String) null);
     }
@@ -597,20 +601,20 @@
     //-----------------------------------------------------------------------
     // parse(DateTimeFormatter)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_parse_formatter() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("H m s");
         LocalTime test = LocalTime.parse("14 30 40", f);
         assertEquals(test, LocalTime.of(14, 30, 40));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullText() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("H m s");
         LocalTime.parse((String) null, f);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullFormatter() {
         LocalTime.parse("ANY", null);
     }
@@ -656,13 +660,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {TEST_12_30_40_987654321, Queries.chronology(), null},
-                {TEST_12_30_40_987654321, Queries.zoneId(), null},
-                {TEST_12_30_40_987654321, Queries.precision(), ChronoUnit.NANOS},
-                {TEST_12_30_40_987654321, Queries.zone(), null},
-                {TEST_12_30_40_987654321, Queries.offset(), null},
-                {TEST_12_30_40_987654321, Queries.localDate(), null},
-                {TEST_12_30_40_987654321, Queries.localTime(), TEST_12_30_40_987654321},
+                {TEST_12_30_40_987654321, TemporalQuery.chronology(), null},
+                {TEST_12_30_40_987654321, TemporalQuery.zoneId(), null},
+                {TEST_12_30_40_987654321, TemporalQuery.precision(), ChronoUnit.NANOS},
+                {TEST_12_30_40_987654321, TemporalQuery.zone(), null},
+                {TEST_12_30_40_987654321, TemporalQuery.offset(), null},
+                {TEST_12_30_40_987654321, TemporalQuery.localDate(), null},
+                {TEST_12_30_40_987654321, TemporalQuery.localTime(), TEST_12_30_40_987654321},
         };
     }
 
@@ -707,7 +711,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_get(int h, int m, int s, int ns) {
         LocalTime a = LocalTime.of(h, m, s, ns);
         assertEquals(a.getHour(), h);
@@ -717,9 +721,53 @@
     }
 
     //-----------------------------------------------------------------------
+    // adjustInto(Temporal)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="adjustInto")
+    Object[][] data_adjustInto() {
+        return new Object[][]{
+                {LocalTime.of(23, 5), LocalTime.of(4, 1, 1, 100), LocalTime.of(23, 5, 0, 0), null},
+                {LocalTime.of(23, 5, 20), LocalTime.of(4, 1, 1, 100), LocalTime.of(23, 5, 20, 0), null},
+                {LocalTime.of(23, 5, 20, 1000), LocalTime.of(4, 1, 1, 100), LocalTime.of(23, 5, 20, 1000), null},
+                {LocalTime.of(23, 5, 20, 1000), LocalTime.MAX, LocalTime.of(23, 5, 20, 1000), null},
+                {LocalTime.of(23, 5, 20, 1000), LocalTime.MIN, LocalTime.of(23, 5, 20, 1000), null},
+                {LocalTime.of(23, 5, 20, 1000), LocalTime.NOON, LocalTime.of(23, 5, 20, 1000), null},
+                {LocalTime.of(23, 5, 20, 1000), LocalTime.MIDNIGHT, LocalTime.of(23, 5, 20, 1000), null},
+                {LocalTime.MAX, LocalTime.of(23, 5, 20, 1000), LocalTime.of(23, 59, 59, 999999999), null},
+                {LocalTime.MIN, LocalTime.of(23, 5, 20, 1000), LocalTime.of(0, 0, 0), null},
+                {LocalTime.NOON, LocalTime.of(23, 5, 20, 1000), LocalTime.of(12, 0, 0), null},
+                {LocalTime.MIDNIGHT, LocalTime.of(23, 5, 20, 1000), LocalTime.of(0, 0, 0), null},
+
+                {LocalTime.of(23, 5), LocalDateTime.of(2210, 2, 2, 1, 1), LocalDateTime.of(2210, 2, 2, 23, 5), null},
+                {LocalTime.of(23, 5), OffsetTime.of(1, 1, 0, 0, OFFSET_PTWO), OffsetTime.of(23, 5, 0, 0, OFFSET_PTWO), null},
+                {LocalTime.of(23, 5), OffsetDateTime.of(2210, 2, 2, 1, 1, 0, 0, OFFSET_PTWO), OffsetDateTime.of(2210, 2, 2, 23, 5, 0, 0, OFFSET_PTWO), null},
+                {LocalTime.of(23, 5), ZonedDateTime.of(2210, 2, 2, 1, 1, 0, 0, ZONE_PARIS), ZonedDateTime.of(2210, 2, 2, 23, 5, 0, 0, ZONE_PARIS), null},
+
+                {LocalTime.of(23, 5), LocalDate.of(2210, 2, 2), null, DateTimeException.class},
+                {LocalTime.of(23, 5), null, null, NullPointerException.class},
+
+        };
+    }
+
+    @Test(dataProvider="adjustInto")
+    public void test_adjustInto(LocalTime test, Temporal temporal, Temporal expected, Class<?> expectedEx) {
+        if (expectedEx == null) {
+            Temporal result = test.adjustInto(temporal);
+            assertEquals(result, expected);
+        } else {
+            try {
+                Temporal result = test.adjustInto(temporal);
+                fail();
+            } catch (Exception ex) {
+                assertTrue(expectedEx.isInstance(ex));
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
     // with()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment() {
         final LocalTime sample = LocalTime.of(23, 5);
         TemporalAdjuster adjuster = new TemporalAdjuster() {
@@ -731,7 +779,7 @@
         assertEquals(TEST_12_30_40_987654321.with(adjuster), sample);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_with_adjustment_null() {
         TEST_12_30_40_987654321.with((TemporalAdjuster) null);
     }
@@ -739,7 +787,7 @@
     //-----------------------------------------------------------------------
     // withHour()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withHour_normal() {
         LocalTime t = TEST_12_30_40_987654321;
         for (int i = 0; i < 24; i++) {
@@ -748,30 +796,30 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withHour_noChange_equal() {
         LocalTime t = TEST_12_30_40_987654321.withHour(12);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withHour_toMidnight_equal() {
         LocalTime t = LocalTime.of(1, 0).withHour(0);
         assertEquals(t, LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withHour_toMidday_equal() {
         LocalTime t = LocalTime.of(1, 0).withHour(12);
         assertEquals(t, LocalTime.NOON);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withHour_hourTooLow() {
         TEST_12_30_40_987654321.withHour(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withHour_hourTooHigh() {
         TEST_12_30_40_987654321.withHour(24);
     }
@@ -779,7 +827,7 @@
     //-----------------------------------------------------------------------
     // withMinute()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withMinute_normal() {
         LocalTime t = TEST_12_30_40_987654321;
         for (int i = 0; i < 60; i++) {
@@ -788,30 +836,30 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withMinute_noChange_equal() {
         LocalTime t = TEST_12_30_40_987654321.withMinute(30);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withMinute_toMidnight_equal() {
         LocalTime t = LocalTime.of(0, 1).withMinute(0);
         assertEquals(t, LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withMinute_toMidday_equals() {
         LocalTime t = LocalTime.of(12, 1).withMinute(0);
         assertEquals(t, LocalTime.NOON);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withMinute_minuteTooLow() {
         TEST_12_30_40_987654321.withMinute(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withMinute_minuteTooHigh() {
         TEST_12_30_40_987654321.withMinute(60);
     }
@@ -819,7 +867,7 @@
     //-----------------------------------------------------------------------
     // withSecond()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withSecond_normal() {
         LocalTime t = TEST_12_30_40_987654321;
         for (int i = 0; i < 60; i++) {
@@ -828,30 +876,30 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withSecond_noChange_equal() {
         LocalTime t = TEST_12_30_40_987654321.withSecond(40);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withSecond_toMidnight_equal() {
         LocalTime t = LocalTime.of(0, 0, 1).withSecond(0);
         assertEquals(t, LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withSecond_toMidday_equal() {
         LocalTime t = LocalTime.of(12, 0, 1).withSecond(0);
         assertEquals(t, LocalTime.NOON);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withSecond_secondTooLow() {
         TEST_12_30_40_987654321.withSecond(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withSecond_secondTooHigh() {
         TEST_12_30_40_987654321.withSecond(60);
     }
@@ -859,7 +907,7 @@
     //-----------------------------------------------------------------------
     // withNano()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withNanoOfSecond_normal() {
         LocalTime t = TEST_12_30_40_987654321;
         t = t.withNano(1);
@@ -872,30 +920,30 @@
         assertEquals(t.getNano(), 999999999);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withNanoOfSecond_noChange_equal() {
         LocalTime t = TEST_12_30_40_987654321.withNano(987654321);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withNanoOfSecond_toMidnight_equal() {
         LocalTime t = LocalTime.of(0, 0, 0, 1).withNano(0);
         assertEquals(t, LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withNanoOfSecond_toMidday_equal() {
         LocalTime t = LocalTime.of(12, 0, 0, 1).withNano(0);
         assertEquals(t, LocalTime.NOON);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withNanoOfSecond_nanoTooLow() {
         TEST_12_30_40_987654321.withNano(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withNanoOfSecond_nanoTooHigh() {
         TEST_12_30_40_987654321.withNano(1000000000);
     }
@@ -974,7 +1022,7 @@
         };
     }
 
-    @Test(groups={"tck"}, dataProvider="truncatedToValid")
+    @Test(dataProvider="truncatedToValid")
     public void test_truncatedTo_valid(LocalTime input, TemporalUnit unit, LocalTime expected) {
         assertEquals(input.truncatedTo(unit), expected);
     }
@@ -989,12 +1037,12 @@
         };
     }
 
-    @Test(groups={"tck"}, dataProvider="truncatedToInvalid", expectedExceptions=DateTimeException.class)
+    @Test(dataProvider="truncatedToInvalid", expectedExceptions=DateTimeException.class)
     public void test_truncatedTo_invalid(LocalTime input, TemporalUnit unit) {
         input.truncatedTo(unit);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_truncatedTo_null() {
         TEST_12_30_40_987654321.truncatedTo(null);
     }
@@ -1044,25 +1092,25 @@
     //-----------------------------------------------------------------------
     // plus(long,TemporalUnit)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_longTemporalUnit_positiveHours() {
         LocalTime t = TEST_12_30_40_987654321.plus(7, ChronoUnit.HOURS);
         assertEquals(t, LocalTime.of(19, 30, 40, 987654321));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_longTemporalUnit_negativeMinutes() {
         LocalTime t = TEST_12_30_40_987654321.plus(-25, ChronoUnit.MINUTES);
         assertEquals(t, LocalTime.of(12, 5, 40, 987654321));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_longTemporalUnit_zero() {
         LocalTime t = TEST_12_30_40_987654321.plus(0, ChronoUnit.MINUTES);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_longTemporalUnit_invalidUnit() {
         for (TemporalUnit unit : INVALID_UNITS) {
             try {
@@ -1074,7 +1122,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_longTemporalUnit_multiples() {
         assertEquals(TEST_12_30_40_987654321.plus(0, DAYS), TEST_12_30_40_987654321);
         assertEquals(TEST_12_30_40_987654321.plus(1, DAYS), TEST_12_30_40_987654321);
@@ -1082,7 +1130,7 @@
         assertEquals(TEST_12_30_40_987654321.plus(-3, DAYS), TEST_12_30_40_987654321);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_plus_longTemporalUnit_null() {
         TEST_12_30_40_987654321.plus(1, (TemporalUnit) null);
     }
@@ -1090,7 +1138,7 @@
     //-----------------------------------------------------------------------
     // plusHours()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusHours_one() {
         LocalTime t = LocalTime.MIDNIGHT;
         for (int i = 0; i < 50; i++) {
@@ -1099,7 +1147,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusHours_fromZero() {
         LocalTime base = LocalTime.MIDNIGHT;
         for (int i = -50; i < 50; i++) {
@@ -1108,7 +1156,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusHours_fromOne() {
         LocalTime base = LocalTime.of(1, 0);
         for (int i = -50; i < 50; i++) {
@@ -1117,25 +1165,25 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusHours_noChange_equal() {
         LocalTime t = TEST_12_30_40_987654321.plusHours(0);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusHours_toMidnight_equal() {
         LocalTime t = LocalTime.of(23, 0).plusHours(1);
         assertEquals(t, LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusHours_toMidday_equal() {
         LocalTime t = LocalTime.of(11, 0).plusHours(1);
         assertEquals(t, LocalTime.NOON);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusHours_big() {
         LocalTime t = LocalTime.of(2, 30).plusHours(Long.MAX_VALUE);
         int hours = (int) (Long.MAX_VALUE % 24L);
@@ -1145,7 +1193,7 @@
     //-----------------------------------------------------------------------
     // plusMinutes()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMinutes_one() {
         LocalTime t = LocalTime.MIDNIGHT;
         int hour = 0;
@@ -1162,7 +1210,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMinutes_fromZero() {
         LocalTime base = LocalTime.MIDNIGHT;
         int hour;
@@ -1187,31 +1235,31 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMinutes_noChange_equal() {
         LocalTime t = TEST_12_30_40_987654321.plusMinutes(0);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMinutes_noChange_oneDay_equal() {
         LocalTime t = TEST_12_30_40_987654321.plusMinutes(24 * 60);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMinutes_toMidnight_equal() {
         LocalTime t = LocalTime.of(23, 59).plusMinutes(1);
         assertEquals(t, LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMinutes_toMidday_equal() {
         LocalTime t = LocalTime.of(11, 59).plusMinutes(1);
         assertEquals(t, LocalTime.NOON);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMinutes_big() {
         LocalTime t = LocalTime.of(2, 30).plusMinutes(Long.MAX_VALUE);
         int mins = (int) (Long.MAX_VALUE % (24L * 60L));
@@ -1221,7 +1269,7 @@
     //-----------------------------------------------------------------------
     // plusSeconds()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusSeconds_one() {
         LocalTime t = LocalTime.MIDNIGHT;
         int hour = 0;
@@ -1285,7 +1333,7 @@
         };
     }
 
-    @Test(dataProvider="plusSeconds_fromZero", groups={"tck"})
+    @Test(dataProvider="plusSeconds_fromZero")
     public void test_plusSeconds_fromZero(int seconds, int hour, int min, int sec) {
         LocalTime base = LocalTime.MIDNIGHT;
         LocalTime t = base.plusSeconds(seconds);
@@ -1295,25 +1343,25 @@
         assertEquals(sec, t.getSecond());
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusSeconds_noChange_equal() {
         LocalTime t = TEST_12_30_40_987654321.plusSeconds(0);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusSeconds_noChange_oneDay_equal() {
         LocalTime t = TEST_12_30_40_987654321.plusSeconds(24 * 60 * 60);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusSeconds_toMidnight_equal() {
         LocalTime t = LocalTime.of(23, 59, 59).plusSeconds(1);
         assertEquals(t, LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusSeconds_toMidday_equal() {
         LocalTime t = LocalTime.of(11, 59, 59).plusSeconds(1);
         assertEquals(t, LocalTime.NOON);
@@ -1322,7 +1370,7 @@
     //-----------------------------------------------------------------------
     // plusNanos()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusNanos_halfABillion() {
         LocalTime t = LocalTime.MIDNIGHT;
         int hour = 0;
@@ -1398,7 +1446,7 @@
         };
     }
 
-    @Test(dataProvider="plusNanos_fromZero", groups={"tck"})
+    @Test(dataProvider="plusNanos_fromZero")
     public void test_plusNanos_fromZero(long nanoseconds, int hour, int min, int sec, int nanos) {
         LocalTime base = LocalTime.MIDNIGHT;
         LocalTime t = base.plusNanos(nanoseconds);
@@ -1409,25 +1457,25 @@
         assertEquals(nanos, t.getNano());
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusNanos_noChange_equal() {
         LocalTime t = TEST_12_30_40_987654321.plusNanos(0);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusNanos_noChange_oneDay_equal() {
         LocalTime t = TEST_12_30_40_987654321.plusNanos(24 * 60 * 60 * 1000000000L);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusNanos_toMidnight_equal() {
         LocalTime t = LocalTime.of(23, 59, 59, 999999999).plusNanos(1);
         assertEquals(t, LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusNanos_toMidday_equal() {
         LocalTime t = LocalTime.of(11, 59, 59, 999999999).plusNanos(1);
         assertEquals(t, LocalTime.NOON);
@@ -1478,25 +1526,25 @@
     //-----------------------------------------------------------------------
     // minus(long,TemporalUnit)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_longTemporalUnit_positiveHours() {
         LocalTime t = TEST_12_30_40_987654321.minus(7, ChronoUnit.HOURS);
         assertEquals(t, LocalTime.of(5, 30, 40, 987654321));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_longTemporalUnit_negativeMinutes() {
         LocalTime t = TEST_12_30_40_987654321.minus(-25, ChronoUnit.MINUTES);
         assertEquals(t, LocalTime.of(12, 55, 40, 987654321));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_longTemporalUnit_zero() {
         LocalTime t = TEST_12_30_40_987654321.minus(0, ChronoUnit.MINUTES);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_longTemporalUnit_invalidUnit() {
         for (TemporalUnit unit : INVALID_UNITS) {
             try {
@@ -1508,7 +1556,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_longTemporalUnit_long_multiples() {
         assertEquals(TEST_12_30_40_987654321.minus(0, DAYS), TEST_12_30_40_987654321);
         assertEquals(TEST_12_30_40_987654321.minus(1, DAYS), TEST_12_30_40_987654321);
@@ -1516,7 +1564,7 @@
         assertEquals(TEST_12_30_40_987654321.minus(-3, DAYS), TEST_12_30_40_987654321);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_minus_longTemporalUnit_null() {
         TEST_12_30_40_987654321.minus(1, (TemporalUnit) null);
     }
@@ -1524,7 +1572,7 @@
     //-----------------------------------------------------------------------
     // minusHours()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusHours_one() {
         LocalTime t = LocalTime.MIDNIGHT;
         for (int i = 0; i < 50; i++) {
@@ -1533,7 +1581,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusHours_fromZero() {
         LocalTime base = LocalTime.MIDNIGHT;
         for (int i = -50; i < 50; i++) {
@@ -1542,7 +1590,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusHours_fromOne() {
         LocalTime base = LocalTime.of(1, 0);
         for (int i = -50; i < 50; i++) {
@@ -1551,25 +1599,25 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusHours_noChange_equal() {
         LocalTime t = TEST_12_30_40_987654321.minusHours(0);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusHours_toMidnight_equal() {
         LocalTime t = LocalTime.of(1, 0).minusHours(1);
         assertEquals(t, LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusHours_toMidday_equal() {
         LocalTime t = LocalTime.of(13, 0).minusHours(1);
         assertEquals(t, LocalTime.NOON);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusHours_big() {
         LocalTime t = LocalTime.of(2, 30).minusHours(Long.MAX_VALUE);
         int hours = (int) (Long.MAX_VALUE % 24L);
@@ -1579,7 +1627,7 @@
     //-----------------------------------------------------------------------
     // minusMinutes()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMinutes_one() {
         LocalTime t = LocalTime.MIDNIGHT;
         int hour = 0;
@@ -1600,7 +1648,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMinutes_fromZero() {
         LocalTime base = LocalTime.MIDNIGHT;
         int hour = 22;
@@ -1623,31 +1671,31 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMinutes_noChange_equal() {
         LocalTime t = TEST_12_30_40_987654321.minusMinutes(0);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMinutes_noChange_oneDay_equal() {
         LocalTime t = TEST_12_30_40_987654321.minusMinutes(24 * 60);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMinutes_toMidnight_equal() {
         LocalTime t = LocalTime.of(0, 1).minusMinutes(1);
         assertEquals(t, LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMinutes_toMidday_equals() {
         LocalTime t = LocalTime.of(12, 1).minusMinutes(1);
         assertEquals(t, LocalTime.NOON);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMinutes_big() {
         LocalTime t = LocalTime.of(2, 30).minusMinutes(Long.MAX_VALUE);
         int mins = (int) (Long.MAX_VALUE % (24L * 60L));
@@ -1657,7 +1705,7 @@
     //-----------------------------------------------------------------------
     // minusSeconds()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusSeconds_one() {
         LocalTime t = LocalTime.MIDNIGHT;
         int hour = 0;
@@ -1726,7 +1774,7 @@
         };
     }
 
-    @Test(dataProvider="minusSeconds_fromZero", groups={"tck"})
+    @Test(dataProvider="minusSeconds_fromZero")
     public void test_minusSeconds_fromZero(int seconds, int hour, int min, int sec) {
         LocalTime base = LocalTime.MIDNIGHT;
         LocalTime t = base.minusSeconds(seconds);
@@ -1736,31 +1784,31 @@
         assertEquals(t.getSecond(), sec);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusSeconds_noChange_equal() {
         LocalTime t = TEST_12_30_40_987654321.minusSeconds(0);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusSeconds_noChange_oneDay_equal() {
         LocalTime t = TEST_12_30_40_987654321.minusSeconds(24 * 60 * 60);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusSeconds_toMidnight_equal() {
         LocalTime t = LocalTime.of(0, 0, 1).minusSeconds(1);
         assertEquals(t, LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusSeconds_toMidday_equal() {
         LocalTime t = LocalTime.of(12, 0, 1).minusSeconds(1);
         assertEquals(t, LocalTime.NOON);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusSeconds_big() {
         LocalTime t = LocalTime.of(2, 30).minusSeconds(Long.MAX_VALUE);
         int secs = (int) (Long.MAX_VALUE % (24L * 60L * 60L));
@@ -1770,7 +1818,7 @@
     //-----------------------------------------------------------------------
     // minusNanos()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusNanos_halfABillion() {
         LocalTime t = LocalTime.MIDNIGHT;
         int hour = 0;
@@ -1854,7 +1902,7 @@
         };
     }
 
-    @Test(dataProvider="minusNanos_fromZero", groups={"tck"})
+    @Test(dataProvider="minusNanos_fromZero")
     public void test_minusNanos_fromZero(long nanoseconds, int hour, int min, int sec, int nanos) {
         LocalTime base = LocalTime.MIDNIGHT;
         LocalTime t = base.minusNanos(nanoseconds);
@@ -1865,40 +1913,121 @@
         assertEquals(nanos, t.getNano());
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusNanos_noChange_equal() {
         LocalTime t = TEST_12_30_40_987654321.minusNanos(0);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusNanos_noChange_oneDay_equal() {
         LocalTime t = TEST_12_30_40_987654321.minusNanos(24 * 60 * 60 * 1000000000L);
         assertEquals(t, TEST_12_30_40_987654321);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusNanos_toMidnight_equal() {
         LocalTime t = LocalTime.of(0, 0, 0, 1).minusNanos(1);
         assertEquals(t, LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusNanos_toMidday_equal() {
         LocalTime t = LocalTime.of(12, 0, 0, 1).minusNanos(1);
         assertEquals(t, LocalTime.NOON);
     }
 
     //-----------------------------------------------------------------------
+    // periodUntil(Temporal, TemporalUnit)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="periodUntilUnit")
+    Object[][] data_periodUntilUnit() {
+        return new Object[][] {
+                {time(0, 0, 0, 0), time(0, 0, 0, 0), NANOS, 0},
+                {time(0, 0, 0, 0), time(0, 0, 0, 0), MICROS, 0},
+                {time(0, 0, 0, 0), time(0, 0, 0, 0), MILLIS, 0},
+                {time(0, 0, 0, 0), time(0, 0, 0, 0), SECONDS, 0},
+                {time(0, 0, 0, 0), time(0, 0, 0, 0), MINUTES, 0},
+                {time(0, 0, 0, 0), time(0, 0, 0, 0), HOURS, 0},
+                {time(0, 0, 0, 0), time(0, 0, 0, 0), HALF_DAYS, 0},
+
+                {time(0, 0, 0, 0), time(2, 0, 0, 0), NANOS, 2 * 3600 * 1_000_000_000L},
+                {time(0, 0, 0, 0), time(2, 0, 0, 0), MICROS, 2 * 3600 * 1_000_000L},
+                {time(0, 0, 0, 0), time(2, 0, 0, 0), MILLIS, 2 * 3600 * 1_000L},
+                {time(0, 0, 0, 0), time(2, 0, 0, 0), SECONDS, 2 * 3600},
+                {time(0, 0, 0, 0), time(2, 0, 0, 0), MINUTES, 2 * 60},
+                {time(0, 0, 0, 0), time(2, 0, 0, 0), HOURS, 2},
+                {time(0, 0, 0, 0), time(2, 0, 0, 0), HALF_DAYS, 0},
+
+                {time(0, 0, 0, 0), time(14, 0, 0, 0), NANOS, 14 * 3600 * 1_000_000_000L},
+                {time(0, 0, 0, 0), time(14, 0, 0, 0), MICROS, 14 * 3600 * 1_000_000L},
+                {time(0, 0, 0, 0), time(14, 0, 0, 0), MILLIS, 14 * 3600 * 1_000L},
+                {time(0, 0, 0, 0), time(14, 0, 0, 0), SECONDS, 14 * 3600},
+                {time(0, 0, 0, 0), time(14, 0, 0, 0), MINUTES, 14 * 60},
+                {time(0, 0, 0, 0), time(14, 0, 0, 0), HOURS, 14},
+                {time(0, 0, 0, 0), time(14, 0, 0, 0), HALF_DAYS, 1},
+
+                {time(0, 0, 0, 0), time(2, 30, 40, 1500), NANOS, (2 * 3600 + 30 * 60 + 40) * 1_000_000_000L + 1500},
+                {time(0, 0, 0, 0), time(2, 30, 40, 1500), MICROS, (2 * 3600 + 30 * 60 + 40) * 1_000_000L + 1},
+                {time(0, 0, 0, 0), time(2, 30, 40, 1500), MILLIS, (2 * 3600 + 30 * 60 + 40) * 1_000L},
+                {time(0, 0, 0, 0), time(2, 30, 40, 1500), SECONDS, 2 * 3600 + 30 * 60 + 40},
+                {time(0, 0, 0, 0), time(2, 30, 40, 1500), MINUTES, 2 * 60 + 30},
+                {time(0, 0, 0, 0), time(2, 30, 40, 1500), HOURS, 2},
+        };
+    }
+
+    @Test(dataProvider="periodUntilUnit")
+    public void test_periodUntil_TemporalUnit(LocalTime time1, LocalTime time2, TemporalUnit unit, long expected) {
+        long amount = time1.periodUntil(time2, unit);
+        assertEquals(amount, expected);
+    }
+
+    @Test(dataProvider="periodUntilUnit")
+    public void test_periodUntil_TemporalUnit_negated(LocalTime time1, LocalTime time2, TemporalUnit unit, long expected) {
+        long amount = time2.periodUntil(time1, unit);
+        assertEquals(amount, -expected);
+    }
+
+    @Test(expectedExceptions = UnsupportedTemporalTypeException.class)
+    public void test_periodUntil_TemporalUnit_unsupportedUnit() {
+        TEST_12_30_40_987654321.periodUntil(TEST_12_30_40_987654321, DAYS);
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_periodUntil_TemporalUnit_nullEnd() {
+        TEST_12_30_40_987654321.periodUntil(null, HOURS);
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_periodUntil_TemporalUnit_nullUnit() {
+        TEST_12_30_40_987654321.periodUntil(TEST_12_30_40_987654321, null);
+    }
+
+    //-----------------------------------------------------------------------
+    // format(DateTimeFormatter)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_format_formatter() {
+        DateTimeFormatter f = DateTimeFormatter.ofPattern("H m s");
+        String t = LocalTime.of(11, 30, 45).format(f);
+        assertEquals(t, "11 30 45");
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_format_formatter_null() {
+        LocalTime.of(11, 30, 45).format(null);
+    }
+
+    //-----------------------------------------------------------------------
     // atDate()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_atDate() {
         LocalTime t = LocalTime.of(11, 30);
         assertEquals(t.atDate(LocalDate.of(2012, 6, 30)), LocalDateTime.of(2012, 6, 30, 11, 30));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_atDate_nullDate() {
         TEST_12_30_40_987654321.atDate((LocalDate) null);
     }
@@ -1906,13 +2035,13 @@
     //-----------------------------------------------------------------------
     // atOffset()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_atOffset() {
         LocalTime t = LocalTime.of(11, 30);
         assertEquals(t.atOffset(OFFSET_PTWO), OffsetTime.of(LocalTime.of(11, 30), OFFSET_PTWO));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_atOffset_nullZoneOffset() {
         LocalTime t = LocalTime.of(11, 30);
         t.atOffset((ZoneOffset) null);
@@ -1921,7 +2050,7 @@
     //-----------------------------------------------------------------------
     // toSecondOfDay()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toSecondOfDay() {
         LocalTime t = LocalTime.of(0, 0);
         for (int i = 0; i < 24 * 60 * 60; i++) {
@@ -1930,7 +2059,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_toSecondOfDay_fromNanoOfDay_symmetry() {
         LocalTime t = LocalTime.of(0, 0);
         for (int i = 0; i < 24 * 60 * 60; i++) {
@@ -1942,7 +2071,7 @@
     //-----------------------------------------------------------------------
     // toNanoOfDay()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toNanoOfDay() {
         LocalTime t = LocalTime.of(0, 0);
         for (int i = 0; i < 1000000; i++) {
@@ -1956,7 +2085,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_toNanoOfDay_fromNanoOfDay_symmetry() {
         LocalTime t = LocalTime.of(0, 0);
         for (int i = 0; i < 1000000; i++) {
@@ -1973,7 +2102,7 @@
     //-----------------------------------------------------------------------
     // compareTo()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_comparisons() {
         doTest_comparisons_LocalTime(
             LocalTime.MIDNIGHT,
@@ -2028,22 +2157,22 @@
         }
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_compareTo_ObjectNull() {
         TEST_12_30_40_987654321.compareTo(null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isBefore_ObjectNull() {
         TEST_12_30_40_987654321.isBefore(null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isAfter_ObjectNull() {
         TEST_12_30_40_987654321.isAfter(null);
     }
 
-    @Test(expectedExceptions=ClassCastException.class, groups={"tck"})
+    @Test(expectedExceptions=ClassCastException.class)
     @SuppressWarnings({"unchecked", "rawtypes"})
     public void compareToNonLocalTime() {
        Comparable c = TEST_12_30_40_987654321;
@@ -2053,48 +2182,48 @@
     //-----------------------------------------------------------------------
     // equals()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_true(int h, int m, int s, int n) {
         LocalTime a = LocalTime.of(h, m, s, n);
         LocalTime b = LocalTime.of(h, m, s, n);
         assertEquals(a.equals(b), true);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_hour_differs(int h, int m, int s, int n) {
         LocalTime a = LocalTime.of(h, m, s, n);
         LocalTime b = LocalTime.of(h + 1, m, s, n);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_minute_differs(int h, int m, int s, int n) {
         LocalTime a = LocalTime.of(h, m, s, n);
         LocalTime b = LocalTime.of(h, m + 1, s, n);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_second_differs(int h, int m, int s, int n) {
         LocalTime a = LocalTime.of(h, m, s, n);
         LocalTime b = LocalTime.of(h, m, s + 1, n);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_nano_differs(int h, int m, int s, int n) {
         LocalTime a = LocalTime.of(h, m, s, n);
         LocalTime b = LocalTime.of(h, m, s, n + 1);
         assertEquals(a.equals(b), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_itself_true() {
         assertEquals(TEST_12_30_40_987654321.equals(TEST_12_30_40_987654321), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_string_false() {
         assertEquals(TEST_12_30_40_987654321.equals("2007-07-15"), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_null_false() {
         assertEquals(TEST_12_30_40_987654321.equals(null), false);
     }
@@ -2102,35 +2231,35 @@
     //-----------------------------------------------------------------------
     // hashCode()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_hashCode_same(int h, int m, int s, int n) {
         LocalTime a = LocalTime.of(h, m, s, n);
         LocalTime b = LocalTime.of(h, m, s, n);
         assertEquals(a.hashCode(), b.hashCode());
     }
 
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_hashCode_hour_differs(int h, int m, int s, int n) {
         LocalTime a = LocalTime.of(h, m, s, n);
         LocalTime b = LocalTime.of(h + 1, m, s, n);
         assertEquals(a.hashCode() == b.hashCode(), false);
     }
 
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_hashCode_minute_differs(int h, int m, int s, int n) {
         LocalTime a = LocalTime.of(h, m, s, n);
         LocalTime b = LocalTime.of(h, m + 1, s, n);
         assertEquals(a.hashCode() == b.hashCode(), false);
     }
 
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_hashCode_second_differs(int h, int m, int s, int n) {
         LocalTime a = LocalTime.of(h, m, s, n);
         LocalTime b = LocalTime.of(h, m, s + 1, n);
         assertEquals(a.hashCode() == b.hashCode(), false);
     }
 
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_hashCode_nano_differs(int h, int m, int s, int n) {
         LocalTime a = LocalTime.of(h, m, s, n);
         LocalTime b = LocalTime.of(h, m, s, n + 1);
@@ -2172,26 +2301,14 @@
         };
     }
 
-    @Test(dataProvider="sampleToString", groups={"tck"})
+    @Test(dataProvider="sampleToString")
     public void test_toString(int h, int m, int s, int n, String expected) {
         LocalTime t = LocalTime.of(h, m, s, n);
         String str = t.toString();
         assertEquals(str, expected);
     }
 
-    //-----------------------------------------------------------------------
-    // toString(DateTimeFormatter)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_toString_formatter() {
-        DateTimeFormatter f = DateTimeFormatter.ofPattern("H m s");
-        String t = LocalTime.of(11, 30, 45).toString(f);
-        assertEquals(t, "11 30 45");
+    private LocalTime time(int hour, int min, int sec, int nano) {
+        return LocalTime.of(hour, min, sec, nano);
     }
-
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
-    public void test_toString_formatter_null() {
-        LocalTime.of(11, 30, 45).toString(null);
-    }
-
 }
--- a/test/java/time/tck/java/time/TCKMonth.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKMonth.java	Wed Apr 17 21:48:04 2013 -0700
@@ -71,7 +71,6 @@
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.JulianFields;
-import java.time.temporal.Queries;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
@@ -117,7 +116,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_int_singleton() {
         for (int i = 1; i <= MAX_LENGTH; i++) {
             Month test = Month.of(i);
@@ -125,28 +124,28 @@
         }
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_tooLow() {
         Month.of(0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_tooHigh() {
         Month.of(13);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_CalendricalObject() {
         assertEquals(Month.from(LocalDate.of(2011, 6, 6)), Month.JUNE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_CalendricalObject_invalid_noDerive() {
         Month.from(LocalTime.of(12, 30));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_CalendricalObject_null() {
         Month.from((TemporalAccessor) null);
     }
@@ -170,13 +169,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {Month.JUNE, Queries.chronology(), IsoChronology.INSTANCE},
-                {Month.JUNE, Queries.zoneId(), null},
-                {Month.JUNE, Queries.precision(), ChronoUnit.MONTHS},
-                {Month.JUNE, Queries.zone(), null},
-                {Month.JUNE, Queries.offset(), null},
-                {Month.JUNE, Queries.localDate(), null},
-                {Month.JUNE, Queries.localTime(), null},
+                {Month.JUNE, TemporalQuery.chronology(), IsoChronology.INSTANCE},
+                {Month.JUNE, TemporalQuery.zoneId(), null},
+                {Month.JUNE, TemporalQuery.precision(), ChronoUnit.MONTHS},
+                {Month.JUNE, TemporalQuery.zone(), null},
+                {Month.JUNE, TemporalQuery.offset(), null},
+                {Month.JUNE, TemporalQuery.localDate(), null},
+                {Month.JUNE, TemporalQuery.localTime(), null},
         };
     }
 
@@ -198,17 +197,17 @@
     //-----------------------------------------------------------------------
     // getText()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_getText() {
         assertEquals(Month.JANUARY.getDisplayName(TextStyle.SHORT, Locale.US), "Jan");
     }
 
-    @Test(expectedExceptions = NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions = NullPointerException.class)
     public void test_getText_nullStyle() {
         Month.JANUARY.getDisplayName(null, Locale.US);
     }
 
-    @Test(expectedExceptions = NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions = NullPointerException.class)
     public void test_getText_nullLocale() {
         Month.JANUARY.getDisplayName(TextStyle.FULL, null);
     }
@@ -275,7 +274,7 @@
         };
     }
 
-    @Test(dataProvider="plus", groups={"tck"})
+    @Test(dataProvider="plus")
     public void test_plus_long(int base, long amount, int expected) {
         assertEquals(Month.of(base).plus(amount), Month.of(expected));
     }
@@ -316,7 +315,7 @@
         };
     }
 
-    @Test(dataProvider="minus", groups={"tck"})
+    @Test(dataProvider="minus")
     public void test_minus_long(int base, long amount, int expected) {
         assertEquals(Month.of(base).minus(amount), Month.of(expected));
     }
@@ -324,7 +323,7 @@
     //-----------------------------------------------------------------------
     // length(boolean)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_length_boolean_notLeapYear() {
         assertEquals(Month.JANUARY.length(false), 31);
         assertEquals(Month.FEBRUARY.length(false), 28);
@@ -340,7 +339,7 @@
         assertEquals(Month.DECEMBER.length(false), 31);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_length_boolean_leapYear() {
         assertEquals(Month.JANUARY.length(true), 31);
         assertEquals(Month.FEBRUARY.length(true), 29);
@@ -359,7 +358,7 @@
     //-----------------------------------------------------------------------
     // minLength()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minLength() {
         assertEquals(Month.JANUARY.minLength(), 31);
         assertEquals(Month.FEBRUARY.minLength(), 28);
@@ -378,7 +377,7 @@
     //-----------------------------------------------------------------------
     // maxLength()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_maxLength() {
         assertEquals(Month.JANUARY.maxLength(), 31);
         assertEquals(Month.FEBRUARY.maxLength(), 29);
@@ -397,7 +396,7 @@
     //-----------------------------------------------------------------------
     // firstDayOfYear(boolean)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_firstDayOfYear_notLeapYear() {
         assertEquals(Month.JANUARY.firstDayOfYear(false), 1);
         assertEquals(Month.FEBRUARY.firstDayOfYear(false), 1 + 31);
@@ -413,7 +412,7 @@
         assertEquals(Month.DECEMBER.firstDayOfYear(false), 1 + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_firstDayOfYear_leapYear() {
         assertEquals(Month.JANUARY.firstDayOfYear(true), 1);
         assertEquals(Month.FEBRUARY.firstDayOfYear(true), 1 + 31);
@@ -432,7 +431,7 @@
     //-----------------------------------------------------------------------
     // firstMonthOfQuarter()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_firstMonthOfQuarter() {
         assertEquals(Month.JANUARY.firstMonthOfQuarter(), Month.JANUARY);
         assertEquals(Month.FEBRUARY.firstMonthOfQuarter(), Month.JANUARY);
@@ -451,7 +450,7 @@
     //-----------------------------------------------------------------------
     // toString()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toString() {
         assertEquals(Month.JANUARY.toString(), "JANUARY");
         assertEquals(Month.FEBRUARY.toString(), "FEBRUARY");
@@ -470,7 +469,7 @@
     //-----------------------------------------------------------------------
     // generated methods
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_enum() {
         assertEquals(Month.valueOf("JANUARY"), Month.JANUARY);
         assertEquals(Month.values()[0], Month.JANUARY);
--- a/test/java/time/tck/java/time/TCKMonthDay.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKMonthDay.java	Wed Apr 17 21:48:04 2013 -0700
@@ -84,7 +84,6 @@
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoField;
 import java.time.temporal.JulianFields;
-import java.time.temporal.Queries;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
@@ -106,7 +105,7 @@
 
     private MonthDay TEST_07_15;
 
-    @BeforeMethod(groups={"tck","implementation"})
+    @BeforeMethod
     public void setUp() {
         TEST_07_15 = MonthDay.of(7, 15);
     }
@@ -164,7 +163,7 @@
     //-----------------------------------------------------------------------
     // now()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now() {
         MonthDay expected = MonthDay.now(Clock.systemDefaultZone());
         MonthDay test = MonthDay.now();
@@ -181,12 +180,12 @@
     //-----------------------------------------------------------------------
     // now(ZoneId)
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_ZoneId_nullZoneId() {
         MonthDay.now((ZoneId) null);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_ZoneId() {
         ZoneId zone = ZoneId.of("UTC+01:02:03");
         MonthDay expected = MonthDay.now(Clock.system(zone));
@@ -204,7 +203,7 @@
     //-----------------------------------------------------------------------
     // now(Clock)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock() {
         Instant instant = LocalDateTime.of(2010, 12, 31, 0, 0).toInstant(ZoneOffset.UTC);
         Clock clock = Clock.fixed(instant, ZoneOffset.UTC);
@@ -213,71 +212,71 @@
         assertEquals(test.getDayOfMonth(), 31);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_Clock_nullClock() {
         MonthDay.now((Clock) null);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_intMonth() {
         assertEquals(TEST_07_15, MonthDay.of(Month.JULY, 15));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_intMonth_dayTooLow() {
         MonthDay.of(Month.JANUARY, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_intMonth_dayTooHigh() {
         MonthDay.of(Month.JANUARY, 32);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_intMonth_nullMonth() {
         MonthDay.of(null, 15);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_ints() {
         check(TEST_07_15, 7, 15);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_ints_dayTooLow() {
         MonthDay.of(1, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_ints_dayTooHigh() {
         MonthDay.of(1, 32);
     }
 
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_ints_monthTooLow() {
         MonthDay.of(0, 1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_ints_monthTooHigh() {
         MonthDay.of(13, 1);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_CalendricalObject() {
         assertEquals(MonthDay.from(LocalDate.of(2007, 7, 15)), TEST_07_15);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_CalendricalObject_invalid_noDerive() {
         MonthDay.from(LocalTime.of(12, 30));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_CalendricalObject_null() {
         MonthDay.from((TemporalAccessor) null);
     }
@@ -315,7 +314,7 @@
         };
     }
 
-    @Test(dataProvider="goodParseData", groups={"tck"})
+    @Test(dataProvider="goodParseData")
     public void factory_parse_success(String text, MonthDay expected) {
         MonthDay monthDay = MonthDay.parse(text);
         assertEquals(monthDay, expected);
@@ -333,7 +332,7 @@
         };
     }
 
-    @Test(dataProvider="badParseData", expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(dataProvider="badParseData", expectedExceptions=DateTimeParseException.class)
     public void factory_parse_fail(String text, int pos) {
         try {
             MonthDay.parse(text);
@@ -347,22 +346,22 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void factory_parse_illegalValue_Day() {
         MonthDay.parse("--06-32");
     }
 
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void factory_parse_invalidValue_Day() {
         MonthDay.parse("--06-31");
     }
 
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void factory_parse_illegalValue_Month() {
         MonthDay.parse("--13-25");
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_nullText() {
         MonthDay.parse(null);
     }
@@ -370,20 +369,20 @@
     //-----------------------------------------------------------------------
     // parse(DateTimeFormatter)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_parse_formatter() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("M d");
         MonthDay test = MonthDay.parse("12 3", f);
         assertEquals(test, MonthDay.of(12, 3));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullText() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("M d");
         MonthDay.parse((String) null, f);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullFormatter() {
         MonthDay.parse("ANY", null);
     }
@@ -409,13 +408,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {TEST_07_15, Queries.chronology(), IsoChronology.INSTANCE},
-                {TEST_07_15, Queries.zoneId(), null},
-                {TEST_07_15, Queries.precision(), null},
-                {TEST_07_15, Queries.zone(), null},
-                {TEST_07_15, Queries.offset(), null},
-                {TEST_07_15, Queries.localDate(), null},
-                {TEST_07_15, Queries.localTime(), null},
+                {TEST_07_15, TemporalQuery.chronology(), IsoChronology.INSTANCE},
+                {TEST_07_15, TemporalQuery.zoneId(), null},
+                {TEST_07_15, TemporalQuery.precision(), null},
+                {TEST_07_15, TemporalQuery.zone(), null},
+                {TEST_07_15, TemporalQuery.offset(), null},
+                {TEST_07_15, TemporalQuery.localDate(), null},
+                {TEST_07_15, TemporalQuery.localTime(), null},
         };
     }
 
@@ -461,28 +460,28 @@
     //-----------------------------------------------------------------------
     // with(Month)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_with_Month() {
         assertEquals(MonthDay.of(6, 30).with(Month.JANUARY), MonthDay.of(1, 30));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_Month_adjustToValid() {
         assertEquals(MonthDay.of(7, 31).with(Month.JUNE), MonthDay.of(6, 30));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_Month_adjustToValidFeb() {
         assertEquals(MonthDay.of(7, 31).with(Month.FEBRUARY), MonthDay.of(2, 29));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_Month_noChangeEqual() {
         MonthDay test = MonthDay.of(6, 30);
         assertEquals(test.with(Month.JUNE), test);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_with_Month_null() {
         MonthDay.of(6, 30).with((Month) null);
     }
@@ -490,33 +489,33 @@
     //-----------------------------------------------------------------------
     // withMonth()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withMonth() {
         assertEquals(MonthDay.of(6, 30).withMonth(1), MonthDay.of(1, 30));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withMonth_adjustToValid() {
         assertEquals(MonthDay.of(7, 31).withMonth(6), MonthDay.of(6, 30));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withMonth_adjustToValidFeb() {
         assertEquals(MonthDay.of(7, 31).withMonth(2), MonthDay.of(2, 29));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withMonth_int_noChangeEqual() {
         MonthDay test = MonthDay.of(6, 30);
         assertEquals(test.withMonth(6), test);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withMonth_tooLow() {
         MonthDay.of(6, 30).withMonth(0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withMonth_tooHigh() {
         MonthDay.of(6, 30).withMonth(13);
     }
@@ -524,33 +523,33 @@
     //-----------------------------------------------------------------------
     // withDayOfMonth()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withDayOfMonth() {
         assertEquals(MonthDay.of(6, 30).withDayOfMonth(1), MonthDay.of(6, 1));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfMonth_invalid() {
         MonthDay.of(6, 30).withDayOfMonth(31);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withDayOfMonth_adjustToValidFeb() {
         assertEquals(MonthDay.of(2, 1).withDayOfMonth(29), MonthDay.of(2, 29));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withDayOfMonth_noChangeEqual() {
         MonthDay test = MonthDay.of(6, 30);
         assertEquals(test.withDayOfMonth(30), test);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfMonth_tooLow() {
         MonthDay.of(6, 30).withDayOfMonth(0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfMonth_tooHigh() {
         MonthDay.of(6, 30).withDayOfMonth(32);
     }
@@ -558,28 +557,28 @@
     //-----------------------------------------------------------------------
     // adjustInto()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_adjustDate() {
         MonthDay test = MonthDay.of(6, 30);
         LocalDate date = LocalDate.of(2007, 1, 1);
         assertEquals(test.adjustInto(date), LocalDate.of(2007, 6, 30));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_adjustDate_resolve() {
         MonthDay test = MonthDay.of(2, 29);
         LocalDate date = LocalDate.of(2007, 6, 30);
         assertEquals(test.adjustInto(date), LocalDate.of(2007, 2, 28));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_adjustDate_equal() {
         MonthDay test = MonthDay.of(6, 30);
         LocalDate date = LocalDate.of(2007, 6, 30);
         assertEquals(test.adjustInto(date), date);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_adjustDate_null() {
         TEST_07_15.adjustInto((LocalDate) null);
     }
@@ -587,40 +586,55 @@
     //-----------------------------------------------------------------------
     // isValidYear(int)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_isValidYear_june() {
         MonthDay test = MonthDay.of(6, 30);
         assertEquals(test.isValidYear(2007), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_isValidYear_febNonLeap() {
         MonthDay test = MonthDay.of(2, 29);
         assertEquals(test.isValidYear(2007), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_isValidYear_febLeap() {
         MonthDay test = MonthDay.of(2, 29);
         assertEquals(test.isValidYear(2008), true);
     }
 
     //-----------------------------------------------------------------------
+    // format(DateTimeFormatter)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_format_formatter() {
+        DateTimeFormatter f = DateTimeFormatter.ofPattern("M d");
+        String t = MonthDay.of(12, 3).format(f);
+        assertEquals(t, "12 3");
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_format_formatter_null() {
+        MonthDay.of(12, 3).format(null);
+    }
+
+    //-----------------------------------------------------------------------
     // atYear(int)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_atYear_int() {
         MonthDay test = MonthDay.of(6, 30);
         assertEquals(test.atYear(2008), LocalDate.of(2008, 6, 30));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_atYear_int_leapYearAdjust() {
         MonthDay test = MonthDay.of(2, 29);
         assertEquals(test.atYear(2005), LocalDate.of(2005, 2, 28));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atYear_int_invalidYear() {
         MonthDay test = MonthDay.of(6, 30);
         test.atYear(Integer.MIN_VALUE);
@@ -629,7 +643,7 @@
     //-----------------------------------------------------------------------
     // compareTo()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_comparisons() {
         doTest_comparisons_MonthDay(
             MonthDay.of(1, 1),
@@ -666,17 +680,17 @@
         }
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_compareTo_ObjectNull() {
         TEST_07_15.compareTo(null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isBefore_ObjectNull() {
         TEST_07_15.isBefore(null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isAfter_ObjectNull() {
         TEST_07_15.isAfter(null);
     }
@@ -684,7 +698,7 @@
     //-----------------------------------------------------------------------
     // equals()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_equals() {
         MonthDay a = MonthDay.of(1, 1);
         MonthDay b = MonthDay.of(1, 1);
@@ -712,17 +726,17 @@
         assertEquals(d.equals(d), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_itself_true() {
         assertEquals(TEST_07_15.equals(TEST_07_15), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_string_false() {
         assertEquals(TEST_07_15.equals("2007-07-15"), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_null_false() {
         assertEquals(TEST_07_15.equals(null), false);
     }
@@ -730,7 +744,7 @@
     //-----------------------------------------------------------------------
     // hashCode()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleDates", groups={"tck"})
+    @Test(dataProvider="sampleDates")
     public void test_hashCode(int m, int d) {
         MonthDay a = MonthDay.of(m, d);
         assertEquals(a.hashCode(), a.hashCode());
@@ -738,7 +752,7 @@
         assertEquals(a.hashCode(), b.hashCode());
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_hashCode_unique() {
         int leapYear = 2008;
         Set<Integer> uniques = new HashSet<Integer>(366);
@@ -763,26 +777,11 @@
         };
     }
 
-    @Test(dataProvider="sampleToString", groups={"tck"})
+    @Test(dataProvider="sampleToString")
     public void test_toString(int m, int d, String expected) {
         MonthDay test = MonthDay.of(m, d);
         String str = test.toString();
         assertEquals(str, expected);
     }
 
-    //-----------------------------------------------------------------------
-    // toString(DateTimeFormatter)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_toString_formatter() {
-        DateTimeFormatter f = DateTimeFormatter.ofPattern("M d");
-        String t = MonthDay.of(12, 3).toString(f);
-        assertEquals(t, "12 3");
-    }
-
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
-    public void test_toString_formatter_null() {
-        MonthDay.of(12, 3).toString(null);
-    }
-
 }
--- a/test/java/time/tck/java/time/TCKOffsetDateTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKOffsetDateTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -71,7 +71,6 @@
 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
 import static java.time.temporal.ChronoField.DAY_OF_YEAR;
 import static java.time.temporal.ChronoField.EPOCH_DAY;
-import static java.time.temporal.ChronoField.EPOCH_MONTH;
 import static java.time.temporal.ChronoField.ERA;
 import static java.time.temporal.ChronoField.HOUR_OF_AMPM;
 import static java.time.temporal.ChronoField.HOUR_OF_DAY;
@@ -86,6 +85,7 @@
 import static java.time.temporal.ChronoField.NANO_OF_DAY;
 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
 import static java.time.temporal.ChronoField.OFFSET_SECONDS;
+import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
 import static java.time.temporal.ChronoField.SECOND_OF_DAY;
 import static java.time.temporal.ChronoField.SECOND_OF_MINUTE;
 import static java.time.temporal.ChronoField.YEAR;
@@ -95,6 +95,7 @@
 import static java.time.temporal.ChronoUnit.SECONDS;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
 
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
@@ -120,7 +121,6 @@
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.JulianFields;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -149,9 +149,9 @@
     private static final ZoneOffset OFFSET_MTWO = ZoneOffset.ofHours(-2);
     private OffsetDateTime TEST_2008_6_30_11_30_59_000000500;
 
-    @BeforeMethod(groups={"tck","implementation"})
+    @BeforeMethod
     public void setUp() {
-        TEST_2008_6_30_11_30_59_000000500 = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59, 500), OFFSET_PONE);
+        TEST_2008_6_30_11_30_59_000000500 = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 500, OFFSET_PONE);
     }
 
     //-----------------------------------------------------------------------
@@ -188,7 +188,7 @@
             ALIGNED_WEEK_OF_MONTH,
             ALIGNED_WEEK_OF_YEAR,
             MONTH_OF_YEAR,
-            EPOCH_MONTH,
+            PROLEPTIC_MONTH,
             YEAR_OF_ERA,
             YEAR,
             ERA,
@@ -261,7 +261,7 @@
     //-----------------------------------------------------------------------
     // now()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now() {
         OffsetDateTime expected = OffsetDateTime.now(Clock.systemDefaultZone());
         OffsetDateTime test = OffsetDateTime.now();
@@ -278,7 +278,7 @@
     //-----------------------------------------------------------------------
     // now(Clock)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_allSecsInDay_utc() {
         for (int i = 0; i < (2 * 24 * 60 * 60); i++) {
             Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
@@ -295,7 +295,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_allSecsInDay_offset() {
         for (int i = 0; i < (2 * 24 * 60 * 60); i++) {
             Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
@@ -312,7 +312,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_allSecsInDay_beforeEpoch() {
         LocalTime expected = LocalTime.MIDNIGHT.plusNanos(123456789L);
         for (int i =-1; i >= -(24 * 60 * 60); i--) {
@@ -328,7 +328,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_offsets() {
         OffsetDateTime base = OffsetDateTime.of(1970, 1, 1, 12, 0, 0, 0, ZoneOffset.UTC);
         for (int i = -9; i < 15; i++) {
@@ -343,12 +343,12 @@
         }
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_Clock_nullZoneId() {
         OffsetDateTime.now((ZoneId) null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_Clock_nullClock() {
         OffsetDateTime.now((Clock) null);
     }
@@ -371,14 +371,14 @@
     //-----------------------------------------------------------------------
     // factories
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_intsHMSN() {
         OffsetDateTime test = OffsetDateTime.of(2008, 6, 30, 11, 30, 10, 500, OFFSET_PONE);
         check(test, 2008, 6, 30, 11, 30, 10, 500, OFFSET_PONE);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_LocalDateLocalTimeZoneOffset() {
         LocalDate date = LocalDate.of(2008, 6, 30);
         LocalTime time = LocalTime.of(11, 30, 10, 500);
@@ -386,19 +386,19 @@
         check(test, 2008, 6, 30, 11, 30, 10, 500, OFFSET_PONE);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_LocalDateLocalTimeZoneOffset_nullLocalDate() {
         LocalTime time = LocalTime.of(11, 30, 10, 500);
         OffsetDateTime.of((LocalDate) null, time, OFFSET_PONE);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_LocalDateLocalTimeZoneOffset_nullLocalTime() {
         LocalDate date = LocalDate.of(2008, 6, 30);
         OffsetDateTime.of(date, (LocalTime) null, OFFSET_PONE);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_LocalDateLocalTimeZoneOffset_nullOffset() {
         LocalDate date = LocalDate.of(2008, 6, 30);
         LocalTime time = LocalTime.of(11, 30, 10, 500);
@@ -406,19 +406,19 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_LocalDateTimeZoneOffset() {
         LocalDateTime dt = LocalDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 10, 500));
         OffsetDateTime test = OffsetDateTime.of(dt, OFFSET_PONE);
         check(test, 2008, 6, 30, 11, 30, 10, 500, OFFSET_PONE);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_LocalDateTimeZoneOffset_nullProvider() {
         OffsetDateTime.of((LocalDateTime) null, OFFSET_PONE);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_LocalDateTimeZoneOffset_nullOffset() {
         LocalDateTime dt = LocalDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 10, 500));
         OffsetDateTime.of(dt, (ZoneOffset) null);
@@ -427,19 +427,19 @@
     //-----------------------------------------------------------------------
     // from()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_CalendricalObject() {
         assertEquals(OffsetDateTime.from(
                 OffsetDateTime.of(LocalDate.of(2007, 7, 15), LocalTime.of(17, 30), OFFSET_PONE)),
                 OffsetDateTime.of(LocalDate.of(2007, 7, 15), LocalTime.of(17, 30), OFFSET_PONE));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_CalendricalObject_invalid_noDerive() {
         OffsetDateTime.from(LocalTime.of(12, 30));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_Calendricals_null() {
         OffsetDateTime.from((TemporalAccessor) null);
     }
@@ -447,7 +447,7 @@
     //-----------------------------------------------------------------------
     // parse()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleToString", groups={"tck"})
+    @Test(dataProvider="sampleToString")
     public void test_parse(int y, int month, int d, int h, int m, int s, int n, String offsetId, String text) {
         OffsetDateTime t = OffsetDateTime.parse(text);
         assertEquals(t.getYear(), y);
@@ -460,17 +460,17 @@
         assertEquals(t.getOffset().getId(), offsetId);
     }
 
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void factory_parse_illegalValue() {
         OffsetDateTime.parse("2008-06-32T11:15+01:00");
     }
 
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void factory_parse_invalidValue() {
         OffsetDateTime.parse("2008-06-31T11:15+01:00");
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_nullText() {
         OffsetDateTime.parse((String) null);
     }
@@ -478,26 +478,26 @@
     //-----------------------------------------------------------------------
     // parse(DateTimeFormatter)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_parse_formatter() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s XXX");
         OffsetDateTime test = OffsetDateTime.parse("2010 12 3 11 30 0 +01:00", f);
         assertEquals(test, OffsetDateTime.of(LocalDate.of(2010, 12, 3), LocalTime.of(11, 30), ZoneOffset.ofHours(1)));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullText() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s");
         OffsetDateTime.parse((String) null, f);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullFormatter() {
         OffsetDateTime.parse("ANY", null);
     }
 
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void constructor_nullTime() throws Throwable  {
         Constructor<OffsetDateTime> con = OffsetDateTime.class.getDeclaredConstructor(LocalDateTime.class, ZoneOffset.class);
         con.setAccessible(true);
@@ -508,7 +508,7 @@
         }
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void constructor_nullOffset() throws Throwable  {
         Constructor<OffsetDateTime> con = OffsetDateTime.class.getDeclaredConstructor(LocalDateTime.class, ZoneOffset.class);
         con.setAccessible(true);
@@ -532,7 +532,7 @@
         };
     }
 
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_get(int y, int o, int d, int h, int m, int s, int n, ZoneOffset offset) {
         LocalDate localDate = LocalDate.of(y, o, d);
         LocalTime localTime = LocalTime.of(h, m, s, n);
@@ -602,13 +602,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {TEST_2008_6_30_11_30_59_000000500, Queries.chronology(), IsoChronology.INSTANCE},
-                {TEST_2008_6_30_11_30_59_000000500, Queries.zoneId(), null},
-                {TEST_2008_6_30_11_30_59_000000500, Queries.precision(), ChronoUnit.NANOS},
-                {TEST_2008_6_30_11_30_59_000000500, Queries.zone(), OFFSET_PONE},
-                {TEST_2008_6_30_11_30_59_000000500, Queries.offset(), OFFSET_PONE},
-                {TEST_2008_6_30_11_30_59_000000500, Queries.localDate(), LocalDate.of(2008, 6, 30)},
-                {TEST_2008_6_30_11_30_59_000000500, Queries.localTime(), LocalTime.of(11, 30, 59, 500)},
+                {TEST_2008_6_30_11_30_59_000000500, TemporalQuery.chronology(), IsoChronology.INSTANCE},
+                {TEST_2008_6_30_11_30_59_000000500, TemporalQuery.zoneId(), null},
+                {TEST_2008_6_30_11_30_59_000000500, TemporalQuery.precision(), ChronoUnit.NANOS},
+                {TEST_2008_6_30_11_30_59_000000500, TemporalQuery.zone(), OFFSET_PONE},
+                {TEST_2008_6_30_11_30_59_000000500, TemporalQuery.offset(), OFFSET_PONE},
+                {TEST_2008_6_30_11_30_59_000000500, TemporalQuery.localDate(), LocalDate.of(2008, 6, 30)},
+                {TEST_2008_6_30_11_30_59_000000500, TemporalQuery.localTime(), LocalTime.of(11, 30, 59, 500)},
         };
     }
 
@@ -628,9 +628,49 @@
     }
 
     //-----------------------------------------------------------------------
+    // adjustInto(Temporal)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="adjustInto")
+    Object[][] data_adjustInto() {
+        return new Object[][]{
+                {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), OffsetDateTime.of(2012, 3, 4, 1, 1, 1, 100, ZoneOffset.UTC), OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), null},
+                {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), OffsetDateTime.MAX, OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), null},
+                {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), OffsetDateTime.MIN, OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), null},
+                {OffsetDateTime.MAX, OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), OffsetDateTime.of(OffsetDateTime.MAX.toLocalDateTime(), ZoneOffset.ofHours(-18)), null},
+                {OffsetDateTime.MIN, OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), OffsetDateTime.of(OffsetDateTime.MIN.toLocalDateTime(), ZoneOffset.ofHours(18)), null},
+
+
+                {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE),
+                        ZonedDateTime.of(2012, 3, 4, 1, 1, 1, 100, ZONE_GAZA), ZonedDateTime.of(2012, 3, 4, 23, 5, 0, 0, ZONE_GAZA), null},
+
+                {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), null, DateTimeException.class},
+                {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), LocalDate.of(2210, 2, 2), null, DateTimeException.class},
+                {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), LocalTime.of(22, 3, 0), null, DateTimeException.class},
+                {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), OffsetTime.of(22, 3, 0, 0, ZoneOffset.UTC), null, DateTimeException.class},
+                {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), null, null, NullPointerException.class},
+
+        };
+    }
+
+    @Test(dataProvider="adjustInto")
+    public void test_adjustInto(OffsetDateTime test, Temporal temporal, Temporal expected, Class<?> expectedEx) {
+        if (expectedEx == null) {
+            Temporal result = test.adjustInto(temporal);
+            assertEquals(result, expected);
+        } else {
+            try {
+                Temporal result = test.adjustInto(temporal);
+                fail();
+            } catch (Exception ex) {
+                assertTrue(expectedEx.isInstance(ex));
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
     // with(WithAdjuster)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment() {
         final OffsetDateTime sample = OffsetDateTime.of(LocalDate.of(2012, 3, 4), LocalTime.of(23, 5), OFFSET_PONE);
         TemporalAdjuster adjuster = new TemporalAdjuster() {
@@ -642,54 +682,54 @@
         assertEquals(TEST_2008_6_30_11_30_59_000000500.with(adjuster), sample);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment_LocalDate() {
         OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with(LocalDate.of(2012, 9, 3));
         assertEquals(test, OffsetDateTime.of(LocalDate.of(2012, 9, 3), LocalTime.of(11, 30, 59, 500), OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment_LocalTime() {
         OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with(LocalTime.of(19, 15));
         assertEquals(test, OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(19, 15), OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment_LocalDateTime() {
         OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with(LocalDateTime.of(LocalDate.of(2012, 9, 3), LocalTime.of(19, 15)));
         assertEquals(test, OffsetDateTime.of(LocalDate.of(2012, 9, 3), LocalTime.of(19, 15), OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment_OffsetTime() {
         OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with(OffsetTime.of(LocalTime.of(19, 15), OFFSET_PTWO));
         assertEquals(test, OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(19, 15), OFFSET_PTWO));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment_OffsetDateTime() {
         OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with(OffsetDateTime.of(LocalDate.of(2012, 9, 3), LocalTime.of(19, 15), OFFSET_PTWO));
         assertEquals(test, OffsetDateTime.of(LocalDate.of(2012, 9, 3), LocalTime.of(19, 15), OFFSET_PTWO));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment_Month() {
         OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with(DECEMBER);
         assertEquals(test, OffsetDateTime.of(LocalDate.of(2008, 12, 30),LocalTime.of(11, 30, 59, 500), OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment_ZoneOffset() {
         OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with(OFFSET_PTWO);
         assertEquals(test, OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59, 500), OFFSET_PTWO));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_with_adjustment_null() {
         TEST_2008_6_30_11_30_59_000000500.with((TemporalAdjuster) null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_withOffsetSameLocal_null() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         base.withOffsetSameLocal(null);
@@ -698,7 +738,7 @@
     //-----------------------------------------------------------------------
     // withOffsetSameInstant()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withOffsetSameInstant() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withOffsetSameInstant(OFFSET_PTWO);
@@ -706,16 +746,40 @@
         assertEquals(test, expected);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_withOffsetSameInstant_null() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         base.withOffsetSameInstant(null);
     }
 
     //-----------------------------------------------------------------------
+    // with(long,TemporalUnit)
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "withFieldLong")
+    Object[][] data_withFieldLong() {
+        return new Object[][] {
+                {TEST_2008_6_30_11_30_59_000000500, YEAR, 2009,
+                        OffsetDateTime.of(2009, 6, 30, 11, 30, 59, 500, OFFSET_PONE)},
+                {TEST_2008_6_30_11_30_59_000000500, MONTH_OF_YEAR, 7,
+                        OffsetDateTime.of(2008, 7, 30, 11, 30, 59, 500, OFFSET_PONE)},
+                {TEST_2008_6_30_11_30_59_000000500, DAY_OF_MONTH, 15,
+                        OffsetDateTime.of(2008, 6, 15, 11, 30, 59, 500, OFFSET_PONE)},
+                {TEST_2008_6_30_11_30_59_000000500, HOUR_OF_DAY, 14,
+                        OffsetDateTime.of(2008, 6, 30, 14, 30, 59, 500, OFFSET_PONE)},
+                {TEST_2008_6_30_11_30_59_000000500, OFFSET_SECONDS, -3600,
+                        OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 500, OFFSET_MONE)},
+        };
+    };
+
+    @Test(dataProvider = "withFieldLong")
+    public void test_with_fieldLong(OffsetDateTime base, TemporalField setField, long setValue, OffsetDateTime expected) {
+        assertEquals(base.with(setField, setValue), expected);
+    }
+
+    //-----------------------------------------------------------------------
     // withYear()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withYear_normal() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withYear(2007);
@@ -725,7 +789,7 @@
     //-----------------------------------------------------------------------
     // withMonth()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withMonth_normal() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withMonth(1);
@@ -735,7 +799,7 @@
     //-----------------------------------------------------------------------
     // withDayOfMonth()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withDayOfMonth_normal() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withDayOfMonth(15);
@@ -745,18 +809,18 @@
     //-----------------------------------------------------------------------
     // withDayOfYear(int)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withDayOfYear_normal() {
         OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.withDayOfYear(33);
         assertEquals(t, OffsetDateTime.of(LocalDate.of(2008, 2, 2), LocalTime.of(11, 30, 59, 500), OFFSET_PONE));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfYear_illegal() {
         TEST_2008_6_30_11_30_59_000000500.withDayOfYear(367);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfYear_invalid() {
         OffsetDateTime.of(LocalDate.of(2007, 2, 2), LocalTime.of(11, 30), OFFSET_PONE).withDayOfYear(366);
     }
@@ -764,7 +828,7 @@
     //-----------------------------------------------------------------------
     // withHour()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withHour_normal() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withHour(15);
@@ -774,7 +838,7 @@
     //-----------------------------------------------------------------------
     // withMinute()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withMinute_normal() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withMinute(15);
@@ -784,7 +848,7 @@
     //-----------------------------------------------------------------------
     // withSecond()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withSecond_normal() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withSecond(15);
@@ -794,7 +858,7 @@
     //-----------------------------------------------------------------------
     // withNano()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withNanoOfSecond_normal() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59, 1), OFFSET_PONE);
         OffsetDateTime test = base.withNano(15);
@@ -804,14 +868,14 @@
     //-----------------------------------------------------------------------
     // truncatedTo(TemporalUnit)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_truncatedTo_normal() {
         assertEquals(TEST_2008_6_30_11_30_59_000000500.truncatedTo(NANOS), TEST_2008_6_30_11_30_59_000000500);
         assertEquals(TEST_2008_6_30_11_30_59_000000500.truncatedTo(SECONDS), TEST_2008_6_30_11_30_59_000000500.withNano(0));
         assertEquals(TEST_2008_6_30_11_30_59_000000500.truncatedTo(DAYS), TEST_2008_6_30_11_30_59_000000500.with(LocalTime.MIDNIGHT));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_truncatedTo_null() {
         TEST_2008_6_30_11_30_59_000000500.truncatedTo(null);
     }
@@ -819,7 +883,7 @@
     //-----------------------------------------------------------------------
     // plus(Period)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_Period() {
         MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS);
         OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.plus(period);
@@ -829,20 +893,20 @@
     //-----------------------------------------------------------------------
     // plus(Duration)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_Duration() {
         Duration dur = Duration.ofSeconds(62, 3);
         OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.plus(dur);
         assertEquals(t, OffsetDateTime.of(2008, 6, 30, 11, 32, 1, 503, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_Duration_zero() {
         OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.plus(Duration.ZERO);
         assertEquals(t, TEST_2008_6_30_11_30_59_000000500);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_plus_Duration_null() {
         TEST_2008_6_30_11_30_59_000000500.plus((Duration) null);
     }
@@ -850,7 +914,7 @@
     //-----------------------------------------------------------------------
     // plusYears()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.plusYears(1);
@@ -860,7 +924,7 @@
     //-----------------------------------------------------------------------
     // plusMonths()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.plusMonths(1);
@@ -870,7 +934,7 @@
     //-----------------------------------------------------------------------
     // plusWeeks()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.plusWeeks(1);
@@ -880,7 +944,7 @@
     //-----------------------------------------------------------------------
     // plusDays()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusDays() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.plusDays(1);
@@ -890,7 +954,7 @@
     //-----------------------------------------------------------------------
     // plusHours()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusHours() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.plusHours(13);
@@ -900,7 +964,7 @@
     //-----------------------------------------------------------------------
     // plusMinutes()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMinutes() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.plusMinutes(30);
@@ -910,7 +974,7 @@
     //-----------------------------------------------------------------------
     // plusSeconds()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusSeconds() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.plusSeconds(1);
@@ -920,7 +984,7 @@
     //-----------------------------------------------------------------------
     // plusNanos()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusNanos() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.plusNanos(1);
@@ -930,7 +994,7 @@
     //-----------------------------------------------------------------------
     // minus(Period)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_Period() {
         MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS);
         OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.minus(period);
@@ -940,20 +1004,20 @@
     //-----------------------------------------------------------------------
     // minus(Duration)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_Duration() {
         Duration dur = Duration.ofSeconds(62, 3);
         OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.minus(dur);
         assertEquals(t, OffsetDateTime.of(2008, 6, 30, 11, 29, 57, 497, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_Duration_zero() {
         OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.minus(Duration.ZERO);
         assertEquals(t, TEST_2008_6_30_11_30_59_000000500);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_minus_Duration_null() {
         TEST_2008_6_30_11_30_59_000000500.minus((Duration) null);
     }
@@ -961,7 +1025,7 @@
     //-----------------------------------------------------------------------
     // minusYears()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.minusYears(1);
@@ -971,7 +1035,7 @@
     //-----------------------------------------------------------------------
     // minusMonths()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.minusMonths(1);
@@ -981,7 +1045,7 @@
     //-----------------------------------------------------------------------
     // minusWeeks()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.minusWeeks(1);
@@ -991,7 +1055,7 @@
     //-----------------------------------------------------------------------
     // minusDays()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusDays() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.minusDays(1);
@@ -1001,7 +1065,7 @@
     //-----------------------------------------------------------------------
     // minusHours()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusHours() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.minusHours(13);
@@ -1011,7 +1075,7 @@
     //-----------------------------------------------------------------------
     // minusMinutes()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMinutes() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.minusMinutes(30);
@@ -1021,7 +1085,7 @@
     //-----------------------------------------------------------------------
     // minusSeconds()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusSeconds() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.minusSeconds(1);
@@ -1031,7 +1095,7 @@
     //-----------------------------------------------------------------------
     // minusNanos()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusNanos() {
         OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         OffsetDateTime test = base.minusNanos(1);
@@ -1039,16 +1103,31 @@
     }
 
     //-----------------------------------------------------------------------
+    // format(DateTimeFormatter)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_format_formatter() {
+        DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s");
+        String t = OffsetDateTime.of(2010, 12, 3, 11, 30, 0, 0, OFFSET_PONE).format(f);
+        assertEquals(t, "2010 12 3 11 30 0");
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_format_formatter_null() {
+        OffsetDateTime.of(2010, 12, 3, 11, 30, 0, 0, OFFSET_PONE).format(null);
+    }
+
+    //-----------------------------------------------------------------------
     // atZoneSameInstant()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_atZone() {
         OffsetDateTime t = OffsetDateTime.of(2008, 6, 30, 11, 30, 0, 0, OFFSET_MTWO);
         assertEquals(t.atZoneSameInstant(ZONE_PARIS),
                 ZonedDateTime.of(2008, 6, 30, 15, 30, 0, 0, ZONE_PARIS));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_atZone_nullTimeZone() {
         OffsetDateTime t = OffsetDateTime.of(2008, 6, 30, 11, 30, 0, 0, OFFSET_PTWO);
         t.atZoneSameInstant((ZoneId) null);
@@ -1057,21 +1136,21 @@
     //-----------------------------------------------------------------------
     // atZoneSimilarLocal()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_atZoneSimilarLocal() {
         OffsetDateTime t = OffsetDateTime.of(2008, 6, 30, 11, 30, 0, 0, OFFSET_MTWO);
         assertEquals(t.atZoneSimilarLocal(ZONE_PARIS),
                 ZonedDateTime.of(2008, 6, 30, 11, 30, 0, 0, ZONE_PARIS));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_atZoneSimilarLocal_dstGap() {
         OffsetDateTime t = OffsetDateTime.of(2007, 4, 1, 0, 0, 0, 0, OFFSET_MTWO);
         assertEquals(t.atZoneSimilarLocal(ZONE_GAZA),
                 ZonedDateTime.of(2007, 4, 1, 1, 0, 0, 0, ZONE_GAZA));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_atZone_dstOverlapSummer() {
         OffsetDateTime t = OffsetDateTime.of(2007, 10, 28, 2, 30, 0, 0, OFFSET_PTWO);
         assertEquals(t.atZoneSimilarLocal(ZONE_PARIS).toLocalDateTime(), t.toLocalDateTime());
@@ -1079,7 +1158,7 @@
         assertEquals(t.atZoneSimilarLocal(ZONE_PARIS).getZone(), ZONE_PARIS);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_atZone_dstOverlapWinter() {
         OffsetDateTime t = OffsetDateTime.of(2007, 10, 28, 2, 30, 0, 0, OFFSET_PONE);
         assertEquals(t.atZoneSimilarLocal(ZONE_PARIS).toLocalDateTime(), t.toLocalDateTime());
@@ -1087,7 +1166,7 @@
         assertEquals(t.atZoneSimilarLocal(ZONE_PARIS).getZone(), ZONE_PARIS);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_atZoneSimilarLocal_nullTimeZone() {
         OffsetDateTime t = OffsetDateTime.of(2008, 6, 30, 11, 30, 0, 0, OFFSET_PTWO);
         t.atZoneSimilarLocal((ZoneId) null);
@@ -1096,7 +1175,7 @@
     //-----------------------------------------------------------------------
     // toEpochSecond()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toEpochSecond_afterEpoch() {
         for (int i = 0; i < 100000; i++) {
             OffsetDateTime a = OffsetDateTime.of(1970, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC).plusSeconds(i);
@@ -1104,7 +1183,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_toEpochSecond_beforeEpoch() {
         for (int i = 0; i < 100000; i++) {
             OffsetDateTime a = OffsetDateTime.of(1970, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC).minusSeconds(i);
@@ -1115,7 +1194,7 @@
     //-----------------------------------------------------------------------
     // compareTo()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_timeMins() {
         OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 29, 3, 0, OFFSET_PONE);
         OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 30, 2, 0, OFFSET_PONE);  // a is before b due to time
@@ -1126,7 +1205,7 @@
         assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_timeSecs() {
         OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 29, 2, 0, OFFSET_PONE);
         OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 29, 3, 0, OFFSET_PONE);  // a is before b due to time
@@ -1137,7 +1216,7 @@
         assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_timeNanos() {
         OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 29, 40, 4, OFFSET_PONE);
         OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 29, 40, 5, OFFSET_PONE);  // a is before b due to time
@@ -1148,7 +1227,7 @@
         assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_offset() {
         OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 0, 0, OFFSET_PTWO);
         OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 30, 0, 0, OFFSET_PONE);  // a is before b due to offset
@@ -1159,7 +1238,7 @@
         assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_offsetNanos() {
         OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 40, 6, OFFSET_PTWO);
         OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 30, 40, 5, OFFSET_PONE);  // a is before b due to offset
@@ -1170,7 +1249,7 @@
         assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_both() {
         OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 50, 0, 0, OFFSET_PTWO);
         OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 20, 0, 0, OFFSET_PONE);  // a is before b on instant scale
@@ -1181,7 +1260,7 @@
         assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_bothNanos() {
         OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 20, 40, 4, OFFSET_PTWO);
         OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 10, 20, 40, 5, OFFSET_PONE);  // a is before b on instant scale
@@ -1192,7 +1271,7 @@
         assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_hourDifference() {
         OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 10, 0, 0, 0, OFFSET_PONE);
         OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 0, 0, 0, OFFSET_PTWO);  // a is before b despite being same time-line time
@@ -1203,7 +1282,7 @@
         assertEquals(a.toInstant().compareTo(b.toInstant()) == 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_max() {
         OffsetDateTime a = OffsetDateTime.of(Year.MAX_VALUE, 12, 31, 23, 59, 0, 0, OFFSET_MONE);
         OffsetDateTime b = OffsetDateTime.of(Year.MAX_VALUE, 12, 31, 23, 59, 0, 0, OFFSET_MTWO);  // a is before b due to offset
@@ -1213,7 +1292,7 @@
         assertEquals(b.compareTo(b) == 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_min() {
         OffsetDateTime a = OffsetDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0, 0, 0, OFFSET_PTWO);
         OffsetDateTime b = OffsetDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0, 0, 0, OFFSET_PONE);  // a is before b due to offset
@@ -1223,13 +1302,13 @@
         assertEquals(b.compareTo(b) == 0, true);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_compareTo_null() {
         OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         a.compareTo(null);
     }
 
-    @Test(expectedExceptions=ClassCastException.class, groups={"tck"})
+    @Test(expectedExceptions=ClassCastException.class)
     @SuppressWarnings({"unchecked", "rawtypes"})
     public void compareToNonOffsetDateTime() {
        Comparable c = TEST_2008_6_30_11_30_59_000000500;
@@ -1239,7 +1318,7 @@
     //-----------------------------------------------------------------------
     // isAfter() / isBefore() / isEqual()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_isBeforeIsAfterIsEqual1() {
         OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 58, 3, OFFSET_PONE);
         OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 2, OFFSET_PONE);  // a is before b due to time
@@ -1261,7 +1340,7 @@
         assertEquals(b.isAfter(b), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_isBeforeIsAfterIsEqual2() {
         OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 2, OFFSET_PONE);
         OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 3, OFFSET_PONE);  // a is before b due to time
@@ -1283,7 +1362,7 @@
         assertEquals(b.isAfter(b), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_isBeforeIsAfterIsEqual_instantComparison() {
         OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 10, 0, 0, 0, OFFSET_PONE);
         OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 0, 0, 0, OFFSET_PTWO);  // a is same instant as b
@@ -1305,19 +1384,19 @@
         assertEquals(b.isAfter(b), false);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isBefore_null() {
         OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         a.isBefore(null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isEqual_null() {
         OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         a.isEqual(null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isAfter_null() {
         OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE);
         a.isAfter(null);
@@ -1326,65 +1405,65 @@
     //-----------------------------------------------------------------------
     // equals() / hashCode()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_true(int y, int o, int d, int h, int m, int s, int n, ZoneOffset ignored) {
         OffsetDateTime a = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE);
         OffsetDateTime b = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE);
         assertEquals(a.equals(b), true);
         assertEquals(a.hashCode() == b.hashCode(), true);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_year_differs(int y, int o, int d, int h, int m, int s, int n, ZoneOffset ignored) {
         OffsetDateTime a = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE);
         OffsetDateTime b = OffsetDateTime.of(y + 1, o, d, h, m, s, n, OFFSET_PONE);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_hour_differs(int y, int o, int d, int h, int m, int s, int n, ZoneOffset ignored) {
         h = (h == 23 ? 22 : h);
         OffsetDateTime a = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE);
         OffsetDateTime b = OffsetDateTime.of(y, o, d, h + 1, m, s, n, OFFSET_PONE);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_minute_differs(int y, int o, int d, int h, int m, int s, int n, ZoneOffset ignored) {
         m = (m == 59 ? 58 : m);
         OffsetDateTime a = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE);
         OffsetDateTime b = OffsetDateTime.of(y, o, d, h, m + 1, s, n, OFFSET_PONE);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_second_differs(int y, int o, int d, int h, int m, int s, int n, ZoneOffset ignored) {
         s = (s == 59 ? 58 : s);
         OffsetDateTime a = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE);
         OffsetDateTime b = OffsetDateTime.of(y, o, d, h, m, s + 1, n, OFFSET_PONE);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_nano_differs(int y, int o, int d, int h, int m, int s, int n, ZoneOffset ignored) {
         n = (n == 999999999 ? 999999998 : n);
         OffsetDateTime a = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE);
         OffsetDateTime b = OffsetDateTime.of(y, o, d, h, m, s, n + 1, OFFSET_PONE);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_offset_differs(int y, int o, int d, int h, int m, int s, int n, ZoneOffset ignored) {
         OffsetDateTime a = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE);
         OffsetDateTime b = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PTWO);
         assertEquals(a.equals(b), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_itself_true() {
         assertEquals(TEST_2008_6_30_11_30_59_000000500.equals(TEST_2008_6_30_11_30_59_000000500), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_string_false() {
         assertEquals(TEST_2008_6_30_11_30_59_000000500.equals("2007-07-15"), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_null_false() {
         assertEquals(TEST_2008_6_30_11_30_59_000000500.equals(null), false);
     }
@@ -1406,26 +1485,11 @@
         };
     }
 
-    @Test(dataProvider="sampleToString", groups={"tck"})
+    @Test(dataProvider="sampleToString")
     public void test_toString(int y, int o, int d, int h, int m, int s, int n, String offsetId, String expected) {
         OffsetDateTime t = OffsetDateTime.of(y, o, d, h, m, s, n, ZoneOffset.of(offsetId));
         String str = t.toString();
         assertEquals(str, expected);
     }
 
-    //-----------------------------------------------------------------------
-    // toString(DateTimeFormatter)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_toString_formatter() {
-        DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s");
-        String t = OffsetDateTime.of(2010, 12, 3, 11, 30, 0, 0, OFFSET_PONE).toString(f);
-        assertEquals(t, "2010 12 3 11 30 0");
-    }
-
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
-    public void test_toString_formatter_null() {
-        OffsetDateTime.of(2010, 12, 3, 11, 30, 0, 0, OFFSET_PONE).toString(null);
-    }
-
 }
--- a/test/java/time/tck/java/time/TCKOffsetTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKOffsetTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -81,6 +81,7 @@
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNotNull;
 import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
 
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
@@ -92,6 +93,7 @@
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
+import java.time.OffsetDateTime;
 import java.time.OffsetTime;
 import java.time.Period;
 import java.time.ZoneId;
@@ -102,7 +104,6 @@
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.JulianFields;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAdjuster;
@@ -124,12 +125,13 @@
 @Test
 public class TCKOffsetTime extends AbstractDateTimeTest {
 
+    private static final ZoneId ZONE_GAZA = ZoneId.of("Asia/Gaza");
     private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
     private static final ZoneOffset OFFSET_PTWO = ZoneOffset.ofHours(2);
     private static final LocalDate DATE = LocalDate.of(2008, 12, 3);
     private OffsetTime TEST_11_30_59_500_PONE;
 
-    @BeforeMethod(groups={"tck","implementation"})
+    @BeforeMethod
     public void setUp() {
         TEST_11_30_59_500_PONE = OffsetTime.of(11, 30, 59, 500, OFFSET_PONE);
     }
@@ -224,7 +226,7 @@
     //-----------------------------------------------------------------------
     // now()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now() {
         ZonedDateTime nowDT = ZonedDateTime.now();
 
@@ -238,7 +240,7 @@
     //-----------------------------------------------------------------------
     // now(Clock)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_allSecsInDay() {
         for (int i = 0; i < (2 * 24 * 60 * 60); i++) {
             Instant instant = Instant.ofEpochSecond(i, 8);
@@ -252,7 +254,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_beforeEpoch() {
         for (int i =-1; i >= -(24 * 60 * 60); i--) {
             Instant instant = Instant.ofEpochSecond(i, 8);
@@ -266,7 +268,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_offsets() {
         Instant base = LocalDateTime.of(1970, 1, 1, 12, 0).toInstant(ZoneOffset.UTC);
         for (int i = -9; i < 15; i++) {
@@ -281,12 +283,12 @@
         }
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_Clock_nullZoneId() {
         OffsetTime.now((ZoneId) null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_Clock_nullClock() {
         OffsetTime.now((Clock) null);
     }
@@ -309,26 +311,26 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_intsHMSN() {
         OffsetTime test = OffsetTime.of(11, 30, 10, 500, OFFSET_PONE);
         check(test, 11, 30, 10, 500, OFFSET_PONE);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_LocalTimeZoneOffset() {
         LocalTime localTime = LocalTime.of(11, 30, 10, 500);
         OffsetTime test = OffsetTime.of(localTime, OFFSET_PONE);
         check(test, 11, 30, 10, 500, OFFSET_PONE);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_LocalTimeZoneOffset_nullTime() {
         OffsetTime.of((LocalTime) null, OFFSET_PONE);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_LocalTimeZoneOffset_nullOffset() {
         LocalTime localTime = LocalTime.of(11, 30, 10, 500);
         OffsetTime.of(localTime, (ZoneOffset) null);
@@ -337,18 +339,18 @@
     //-----------------------------------------------------------------------
     // ofInstant()
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_ofInstant_nullInstant() {
         OffsetTime.ofInstant((Instant) null, ZoneOffset.UTC);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_ofInstant_nullOffset() {
         Instant instant = Instant.ofEpochSecond(0L);
         OffsetTime.ofInstant(instant, (ZoneOffset) null);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_allSecsInDay() {
         for (int i = 0; i < (2 * 24 * 60 * 60); i++) {
             Instant instant = Instant.ofEpochSecond(i, 8);
@@ -360,7 +362,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_beforeEpoch() {
         for (int i =-1; i >= -(24 * 60 * 60); i--) {
             Instant instant = Instant.ofEpochSecond(i, 8);
@@ -373,7 +375,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_maxYear() {
         OffsetTime test = OffsetTime.ofInstant(Instant.MAX, ZoneOffset.UTC);
         assertEquals(test.getHour(), 23);
@@ -382,7 +384,7 @@
         assertEquals(test.getNano(), 999_999_999);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_minYear() {
         OffsetTime test = OffsetTime.ofInstant(Instant.MIN, ZoneOffset.UTC);
         assertEquals(test.getHour(), 0);
@@ -394,23 +396,23 @@
     //-----------------------------------------------------------------------
     // from(TemporalAccessor)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_from_TemporalAccessor_OT() {
         assertEquals(OffsetTime.from(OffsetTime.of(17, 30, 0, 0, OFFSET_PONE)), OffsetTime.of(17, 30, 0, 0, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_from_TemporalAccessor_ZDT() {
         ZonedDateTime base = LocalDateTime.of(2007, 7, 15, 11, 30, 59, 500).atZone(OFFSET_PONE);
         assertEquals(OffsetTime.from(base), TEST_11_30_59_500_PONE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_from_TemporalAccessor_invalid_noDerive() {
         OffsetTime.from(LocalDate.of(2007, 7, 15));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_from_TemporalAccessor_null() {
         OffsetTime.from((TemporalAccessor) null);
     }
@@ -418,7 +420,7 @@
     //-----------------------------------------------------------------------
     // parse()
     //-----------------------------------------------------------------------
-    @Test(dataProvider = "sampleToString", groups={"tck"})
+    @Test(dataProvider = "sampleToString")
     public void factory_parse_validText(int h, int m, int s, int n, String offsetId, String parsable) {
         OffsetTime t = OffsetTime.parse(parsable);
         assertNotNull(t, parsable);
@@ -440,23 +442,23 @@
         };
     }
 
-    @Test(dataProvider = "sampleBadParse", expectedExceptions={DateTimeParseException.class}, groups={"tck"})
+    @Test(dataProvider = "sampleBadParse", expectedExceptions={DateTimeParseException.class})
     public void factory_parse_invalidText(String unparsable) {
         OffsetTime.parse(unparsable);
     }
 
     //-----------------------------------------------------------------------s
-    @Test(expectedExceptions={DateTimeParseException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeParseException.class})
     public void factory_parse_illegalHour() {
         OffsetTime.parse("25:00+01:00");
     }
 
-    @Test(expectedExceptions={DateTimeParseException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeParseException.class})
     public void factory_parse_illegalMinute() {
         OffsetTime.parse("12:60+01:00");
     }
 
-    @Test(expectedExceptions={DateTimeParseException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeParseException.class})
     public void factory_parse_illegalSecond() {
         OffsetTime.parse("12:12:60+01:00");
     }
@@ -464,20 +466,20 @@
     //-----------------------------------------------------------------------
     // parse(DateTimeFormatter)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_parse_formatter() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("H m s XXX");
         OffsetTime test = OffsetTime.parse("11 30 0 +01:00", f);
         assertEquals(test, OffsetTime.of(11, 30, 0, 0, ZoneOffset.ofHours(1)));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullText() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s");
         OffsetTime.parse((String) null, f);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullFormatter() {
         OffsetTime.parse("ANY", null);
     }
@@ -485,7 +487,7 @@
     //-----------------------------------------------------------------------
     // constructor
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void constructor_nullTime() throws Throwable  {
         Constructor<OffsetTime> con = OffsetTime.class.getDeclaredConstructor(LocalTime.class, ZoneOffset.class);
         con.setAccessible(true);
@@ -496,7 +498,7 @@
         }
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void constructor_nullOffset() throws Throwable  {
         Constructor<OffsetTime> con = OffsetTime.class.getDeclaredConstructor(LocalTime.class, ZoneOffset.class);
         con.setAccessible(true);
@@ -519,7 +521,7 @@
         };
     }
 
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_get(int h, int m, int s, int n, ZoneOffset offset) {
         LocalTime localTime = LocalTime.of(h, m, s, n);
         OffsetTime a = OffsetTime.of(localTime, offset);
@@ -568,13 +570,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {TEST_11_30_59_500_PONE, Queries.chronology(), null},
-                {TEST_11_30_59_500_PONE, Queries.zoneId(), null},
-                {TEST_11_30_59_500_PONE, Queries.precision(), ChronoUnit.NANOS},
-                {TEST_11_30_59_500_PONE, Queries.zone(), OFFSET_PONE},
-                {TEST_11_30_59_500_PONE, Queries.offset(), OFFSET_PONE},
-                {TEST_11_30_59_500_PONE, Queries.localDate(), null},
-                {TEST_11_30_59_500_PONE, Queries.localTime(), LocalTime.of(11, 30, 59, 500)},
+                {TEST_11_30_59_500_PONE, TemporalQuery.chronology(), null},
+                {TEST_11_30_59_500_PONE, TemporalQuery.zoneId(), null},
+                {TEST_11_30_59_500_PONE, TemporalQuery.precision(), ChronoUnit.NANOS},
+                {TEST_11_30_59_500_PONE, TemporalQuery.zone(), OFFSET_PONE},
+                {TEST_11_30_59_500_PONE, TemporalQuery.offset(), OFFSET_PONE},
+                {TEST_11_30_59_500_PONE, TemporalQuery.localDate(), null},
+                {TEST_11_30_59_500_PONE, TemporalQuery.localTime(), LocalTime.of(11, 30, 59, 500)},
         };
     }
 
@@ -596,7 +598,7 @@
     //-----------------------------------------------------------------------
     // withOffsetSameLocal()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withOffsetSameLocal() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.withOffsetSameLocal(OFFSET_PTWO);
@@ -604,14 +606,14 @@
         assertEquals(test.getOffset(), OFFSET_PTWO);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withOffsetSameLocal_noChange() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.withOffsetSameLocal(OFFSET_PONE);
         assertEquals(test, base);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_withOffsetSameLocal_null() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         base.withOffsetSameLocal(null);
@@ -620,7 +622,7 @@
     //-----------------------------------------------------------------------
     // withOffsetSameInstant()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withOffsetSameInstant() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.withOffsetSameInstant(OFFSET_PTWO);
@@ -628,23 +630,62 @@
         assertEquals(test, expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withOffsetSameInstant_noChange() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.withOffsetSameInstant(OFFSET_PONE);
         assertEquals(test, base);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_withOffsetSameInstant_null() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         base.withOffsetSameInstant(null);
     }
 
     //-----------------------------------------------------------------------
+    // adjustInto(Temporal)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="adjustInto")
+    Object[][] data_adjustInto() {
+        return new Object[][]{
+                {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), OffsetTime.of(LocalTime.of(1, 1, 1, 100), ZoneOffset.UTC), OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), null},
+                {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), OffsetTime.MAX, OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), null},
+                {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), OffsetTime.MIN, OffsetTime.of(LocalTime.of(23 , 5), OFFSET_PONE), null},
+                {OffsetTime.MAX, OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), OffsetTime.of(OffsetTime.MAX.toLocalTime(), ZoneOffset.ofHours(-18)), null},
+                {OffsetTime.MIN, OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), OffsetTime.of(OffsetTime.MIN.toLocalTime(), ZoneOffset.ofHours(18)), null},
+
+
+                {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), ZonedDateTime.of(LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), ZONE_GAZA), ZonedDateTime.of(LocalDateTime.of(2012, 3, 4, 23, 5), ZONE_GAZA), null},
+                {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), OffsetDateTime.of(LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), ZoneOffset.UTC), OffsetDateTime.of(LocalDateTime.of(2012, 3, 4, 23, 5), OFFSET_PONE), null},
+
+                {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), null, DateTimeException.class},
+                {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), LocalDate.of(2210, 2, 2), null, DateTimeException.class},
+                {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), LocalTime.of(22, 3, 0), null, DateTimeException.class},
+                {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), null, null, NullPointerException.class},
+
+        };
+    }
+
+    @Test(dataProvider="adjustInto")
+    public void test_adjustInto(OffsetTime test, Temporal temporal, Temporal expected, Class<?> expectedEx) {
+        if (expectedEx == null) {
+            Temporal result = test.adjustInto(temporal);
+            assertEquals(result, expected);
+        } else {
+            try {
+                Temporal result = test.adjustInto(temporal);
+                fail();
+            } catch (Exception ex) {
+                assertTrue(expectedEx.isInstance(ex));
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
     // with(WithAdjuster)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment() {
         final OffsetTime sample = OffsetTime.of(23, 5, 0, 0, OFFSET_PONE);
         TemporalAdjuster adjuster = new TemporalAdjuster() {
@@ -656,25 +697,25 @@
         assertEquals(TEST_11_30_59_500_PONE.with(adjuster), sample);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment_LocalTime() {
         OffsetTime test = TEST_11_30_59_500_PONE.with(LocalTime.of(13, 30));
         assertEquals(test, OffsetTime.of(13, 30, 0, 0, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment_OffsetTime() {
         OffsetTime test = TEST_11_30_59_500_PONE.with(OffsetTime.of(13, 35, 0, 0, OFFSET_PTWO));
         assertEquals(test, OffsetTime.of(13, 35, 0, 0, OFFSET_PTWO));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment_ZoneOffset() {
         OffsetTime test = TEST_11_30_59_500_PONE.with(OFFSET_PTWO);
         assertEquals(test, OffsetTime.of(11, 30, 59, 500, OFFSET_PTWO));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_adjustment_AmPm() {
         OffsetTime test = TEST_11_30_59_500_PONE.with(new TemporalAdjuster() {
             @Override
@@ -685,7 +726,7 @@
         assertEquals(test, OffsetTime.of(23, 30, 59, 500, OFFSET_PONE));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_with_adjustment_null() {
         TEST_11_30_59_500_PONE.with((TemporalAdjuster) null);
     }
@@ -693,7 +734,7 @@
     //-----------------------------------------------------------------------
     // with(TemporalField, long)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_with_TemporalField() {
         OffsetTime test = OffsetTime.of(12, 30, 40, 987654321, OFFSET_PONE);
         assertEquals(test.with(ChronoField.HOUR_OF_DAY, 15), OffsetTime.of(15, 30, 40, 987654321, OFFSET_PONE));
@@ -706,12 +747,12 @@
         assertEquals(test.with(ChronoField.OFFSET_SECONDS, 7205), OffsetTime.of(12, 30, 40, 987654321, ZoneOffset.ofHoursMinutesSeconds(2, 0, 5)));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"} )
+    @Test(expectedExceptions=NullPointerException.class )
     public void test_with_TemporalField_null() {
         TEST_11_30_59_500_PONE.with((TemporalField) null, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"} )
+    @Test(expectedExceptions=DateTimeException.class )
     public void test_with_TemporalField_invalidField() {
         TEST_11_30_59_500_PONE.with(ChronoField.YEAR, 0);
     }
@@ -719,14 +760,14 @@
     //-----------------------------------------------------------------------
     // withHour()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withHour_normal() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.withHour(15);
         assertEquals(test, OffsetTime.of(15, 30, 59, 0, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withHour_noChange() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.withHour(11);
@@ -736,14 +777,14 @@
     //-----------------------------------------------------------------------
     // withMinute()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withMinute_normal() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.withMinute(15);
         assertEquals(test, OffsetTime.of(11, 15, 59, 0, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withMinute_noChange() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.withMinute(30);
@@ -753,14 +794,14 @@
     //-----------------------------------------------------------------------
     // withSecond()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withSecond_normal() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.withSecond(15);
         assertEquals(test, OffsetTime.of(11, 30, 15, 0, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withSecond_noChange() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.withSecond(59);
@@ -770,14 +811,14 @@
     //-----------------------------------------------------------------------
     // withNano()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withNanoOfSecond_normal() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 1, OFFSET_PONE);
         OffsetTime test = base.withNano(15);
         assertEquals(test, OffsetTime.of(11, 30, 59, 15, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withNanoOfSecond_noChange() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 1, OFFSET_PONE);
         OffsetTime test = base.withNano(1);
@@ -787,14 +828,14 @@
     //-----------------------------------------------------------------------
     // truncatedTo(TemporalUnit)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_truncatedTo_normal() {
         assertEquals(TEST_11_30_59_500_PONE.truncatedTo(NANOS), TEST_11_30_59_500_PONE);
         assertEquals(TEST_11_30_59_500_PONE.truncatedTo(SECONDS), TEST_11_30_59_500_PONE.withNano(0));
         assertEquals(TEST_11_30_59_500_PONE.truncatedTo(DAYS), TEST_11_30_59_500_PONE.with(LocalTime.MIDNIGHT));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_truncatedTo_null() {
         TEST_11_30_59_500_PONE.truncatedTo(null);
     }
@@ -802,26 +843,26 @@
     //-----------------------------------------------------------------------
     // plus(PlusAdjuster)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_PlusAdjuster() {
         MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MINUTES);
         OffsetTime t = TEST_11_30_59_500_PONE.plus(period);
         assertEquals(t, OffsetTime.of(11, 37, 59, 500, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_PlusAdjuster_noChange() {
         OffsetTime t = TEST_11_30_59_500_PONE.plus(MockSimplePeriod.of(0, SECONDS));
         assertEquals(t, TEST_11_30_59_500_PONE);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_PlusAdjuster_zero() {
         OffsetTime t = TEST_11_30_59_500_PONE.plus(Period.ZERO);
         assertEquals(t, TEST_11_30_59_500_PONE);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_plus_PlusAdjuster_null() {
         TEST_11_30_59_500_PONE.plus((TemporalAmount) null);
     }
@@ -829,14 +870,14 @@
     //-----------------------------------------------------------------------
     // plusHours()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusHours() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.plusHours(13);
         assertEquals(test, OffsetTime.of(0, 30, 59, 0, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusHours_zero() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.plusHours(0);
@@ -846,14 +887,14 @@
     //-----------------------------------------------------------------------
     // plusMinutes()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMinutes() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.plusMinutes(30);
         assertEquals(test, OffsetTime.of(12, 0, 59, 0, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMinutes_zero() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.plusMinutes(0);
@@ -863,14 +904,14 @@
     //-----------------------------------------------------------------------
     // plusSeconds()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusSeconds() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.plusSeconds(1);
         assertEquals(test, OffsetTime.of(11, 31, 0, 0, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusSeconds_zero() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.plusSeconds(0);
@@ -880,14 +921,14 @@
     //-----------------------------------------------------------------------
     // plusNanos()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusNanos() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.plusNanos(1);
         assertEquals(test, OffsetTime.of(11, 30, 59, 1, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusNanos_zero() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.plusNanos(0);
@@ -897,26 +938,26 @@
     //-----------------------------------------------------------------------
     // minus(MinusAdjuster)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_MinusAdjuster() {
         MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MINUTES);
         OffsetTime t = TEST_11_30_59_500_PONE.minus(period);
         assertEquals(t, OffsetTime.of(11, 23, 59, 500, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_MinusAdjuster_noChange() {
         OffsetTime t = TEST_11_30_59_500_PONE.minus(MockSimplePeriod.of(0, SECONDS));
         assertEquals(t, TEST_11_30_59_500_PONE);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_MinusAdjuster_zero() {
         OffsetTime t = TEST_11_30_59_500_PONE.minus(Period.ZERO);
         assertEquals(t, TEST_11_30_59_500_PONE);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_minus_MinusAdjuster_null() {
         TEST_11_30_59_500_PONE.minus((TemporalAmount) null);
     }
@@ -924,14 +965,14 @@
     //-----------------------------------------------------------------------
     // minusHours()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusHours() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.minusHours(-13);
         assertEquals(test, OffsetTime.of(0, 30, 59, 0, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusHours_zero() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.minusHours(0);
@@ -941,14 +982,14 @@
     //-----------------------------------------------------------------------
     // minusMinutes()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMinutes() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.minusMinutes(50);
         assertEquals(test, OffsetTime.of(10, 40, 59, 0, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMinutes_zero() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.minusMinutes(0);
@@ -958,14 +999,14 @@
     //-----------------------------------------------------------------------
     // minusSeconds()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusSeconds() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.minusSeconds(60);
         assertEquals(test, OffsetTime.of(11, 29, 59, 0, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusSeconds_zero() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.minusSeconds(0);
@@ -975,14 +1016,14 @@
     //-----------------------------------------------------------------------
     // minusNanos()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusNanos() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.minusNanos(1);
         assertEquals(test, OffsetTime.of(11, 30, 58, 999999999, OFFSET_PONE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusNanos_zero() {
         OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         OffsetTime test = base.minusNanos(0);
@@ -990,9 +1031,24 @@
     }
 
     //-----------------------------------------------------------------------
+    // format(DateTimeFormatter)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_format_formatter() {
+        DateTimeFormatter f = DateTimeFormatter.ofPattern("H m s");
+        String t = OffsetTime.of(11, 30, 0, 0, OFFSET_PONE).format(f);
+        assertEquals(t, "11 30 0");
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_format_formatter_null() {
+        OffsetTime.of(11, 30, 0, 0, OFFSET_PONE).format(null);
+    }
+
+    //-----------------------------------------------------------------------
     // compareTo()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_time() {
         OffsetTime a = OffsetTime.of(11, 29, 0, 0, OFFSET_PONE);
         OffsetTime b = OffsetTime.of(11, 30, 0, 0, OFFSET_PONE);  // a is before b due to time
@@ -1003,7 +1059,7 @@
         assertEquals(convertInstant(a).compareTo(convertInstant(b)) < 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_offset() {
         OffsetTime a = OffsetTime.of(11, 30, 0, 0, OFFSET_PTWO);
         OffsetTime b = OffsetTime.of(11, 30, 0, 0, OFFSET_PONE);  // a is before b due to offset
@@ -1014,7 +1070,7 @@
         assertEquals(convertInstant(a).compareTo(convertInstant(b)) < 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_both() {
         OffsetTime a = OffsetTime.of(11, 50, 0, 0, OFFSET_PTWO);
         OffsetTime b = OffsetTime.of(11, 20, 0, 0, OFFSET_PONE);  // a is before b on instant scale
@@ -1025,7 +1081,7 @@
         assertEquals(convertInstant(a).compareTo(convertInstant(b)) < 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_bothNearStartOfDay() {
         OffsetTime a = OffsetTime.of(0, 10, 0, 0, OFFSET_PONE);
         OffsetTime b = OffsetTime.of(2, 30, 0, 0, OFFSET_PTWO);  // a is before b on instant scale
@@ -1036,7 +1092,7 @@
         assertEquals(convertInstant(a).compareTo(convertInstant(b)) < 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_hourDifference() {
         OffsetTime a = OffsetTime.of(10, 0, 0, 0, OFFSET_PONE);
         OffsetTime b = OffsetTime.of(11, 0, 0, 0, OFFSET_PTWO);  // a is before b despite being same time-line time
@@ -1047,13 +1103,13 @@
         assertEquals(convertInstant(a).compareTo(convertInstant(b)) == 0, true);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_compareTo_null() {
         OffsetTime a = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         a.compareTo(null);
     }
 
-    @Test(expectedExceptions=ClassCastException.class, groups={"tck"})
+    @Test(expectedExceptions=ClassCastException.class)
     @SuppressWarnings({"unchecked", "rawtypes"})
     public void compareToNonOffsetTime() {
        Comparable c = TEST_11_30_59_500_PONE;
@@ -1067,7 +1123,7 @@
     //-----------------------------------------------------------------------
     // isAfter() / isBefore() / isEqual()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_isBeforeIsAfterIsEqual1() {
         OffsetTime a = OffsetTime.of(11, 30, 58, 0, OFFSET_PONE);
         OffsetTime b = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);  // a is before b due to time
@@ -1089,7 +1145,7 @@
         assertEquals(b.isAfter(b), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_isBeforeIsAfterIsEqual1nanos() {
         OffsetTime a = OffsetTime.of(11, 30, 59, 3, OFFSET_PONE);
         OffsetTime b = OffsetTime.of(11, 30, 59, 4, OFFSET_PONE);  // a is before b due to time
@@ -1111,7 +1167,7 @@
         assertEquals(b.isAfter(b), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_isBeforeIsAfterIsEqual2() {
         OffsetTime a = OffsetTime.of(11, 30, 59, 0, OFFSET_PTWO);
         OffsetTime b = OffsetTime.of(11, 30, 58, 0, OFFSET_PONE);  // a is before b due to offset
@@ -1133,7 +1189,7 @@
         assertEquals(b.isAfter(b), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_isBeforeIsAfterIsEqual2nanos() {
         OffsetTime a = OffsetTime.of(11, 30, 59, 4, ZoneOffset.ofTotalSeconds(OFFSET_PONE.getTotalSeconds() + 1));
         OffsetTime b = OffsetTime.of(11, 30, 59, 3, OFFSET_PONE);  // a is before b due to offset
@@ -1155,7 +1211,7 @@
         assertEquals(b.isAfter(b), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_isBeforeIsAfterIsEqual_instantComparison() {
         OffsetTime a = OffsetTime.of(11, 30, 59, 0, OFFSET_PTWO);
         OffsetTime b = OffsetTime.of(10, 30, 59, 0, OFFSET_PONE);  // a is same instant as b
@@ -1177,19 +1233,19 @@
         assertEquals(b.isAfter(b), false);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isBefore_null() {
         OffsetTime a = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         a.isBefore(null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isAfter_null() {
         OffsetTime a = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         a.isAfter(null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isEqual_null() {
         OffsetTime a = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE);
         a.isEqual(null);
@@ -1198,59 +1254,59 @@
     //-----------------------------------------------------------------------
     // equals() / hashCode()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_true(int h, int m, int s, int n, ZoneOffset ignored) {
         OffsetTime a = OffsetTime.of(h, m, s, n, OFFSET_PONE);
         OffsetTime b = OffsetTime.of(h, m, s, n, OFFSET_PONE);
         assertEquals(a.equals(b), true);
         assertEquals(a.hashCode() == b.hashCode(), true);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_hour_differs(int h, int m, int s, int n, ZoneOffset ignored) {
         h = (h == 23 ? 22 : h);
         OffsetTime a = OffsetTime.of(h, m, s, n, OFFSET_PONE);
         OffsetTime b = OffsetTime.of(h + 1, m, s, n, OFFSET_PONE);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_minute_differs(int h, int m, int s, int n, ZoneOffset ignored) {
         m = (m == 59 ? 58 : m);
         OffsetTime a = OffsetTime.of(h, m, s, n, OFFSET_PONE);
         OffsetTime b = OffsetTime.of(h, m + 1, s, n, OFFSET_PONE);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_second_differs(int h, int m, int s, int n, ZoneOffset ignored) {
         s = (s == 59 ? 58 : s);
         OffsetTime a = OffsetTime.of(h, m, s, n, OFFSET_PONE);
         OffsetTime b = OffsetTime.of(h, m, s + 1, n, OFFSET_PONE);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_nano_differs(int h, int m, int s, int n, ZoneOffset ignored) {
         n = (n == 999999999 ? 999999998 : n);
         OffsetTime a = OffsetTime.of(h, m, s, n, OFFSET_PONE);
         OffsetTime b = OffsetTime.of(h, m, s, n + 1, OFFSET_PONE);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_offset_differs(int h, int m, int s, int n, ZoneOffset ignored) {
         OffsetTime a = OffsetTime.of(h, m, s, n, OFFSET_PONE);
         OffsetTime b = OffsetTime.of(h, m, s, n, OFFSET_PTWO);
         assertEquals(a.equals(b), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_itself_true() {
         assertEquals(TEST_11_30_59_500_PONE.equals(TEST_11_30_59_500_PONE), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_string_false() {
         assertEquals(TEST_11_30_59_500_PONE.equals("2007-07-15"), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_null_false() {
         assertEquals(TEST_11_30_59_500_PONE.equals(null), false);
     }
@@ -1272,26 +1328,11 @@
         };
     }
 
-    @Test(dataProvider="sampleToString", groups={"tck"})
+    @Test(dataProvider="sampleToString")
     public void test_toString(int h, int m, int s, int n, String offsetId, String expected) {
         OffsetTime t = OffsetTime.of(h, m, s, n, ZoneOffset.of(offsetId));
         String str = t.toString();
         assertEquals(str, expected);
     }
 
-    //-----------------------------------------------------------------------
-    // toString(DateTimeFormatter)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_toString_formatter() {
-        DateTimeFormatter f = DateTimeFormatter.ofPattern("H m s");
-        String t = OffsetTime.of(11, 30, 0, 0, OFFSET_PONE).toString(f);
-        assertEquals(t, "11 30 0");
-    }
-
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
-    public void test_toString_formatter_null() {
-        OffsetTime.of(11, 30, 0, 0, OFFSET_PONE).toString(null);
-    }
-
 }
--- a/test/java/time/tck/java/time/TCKPeriod.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKPeriod.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,14 +59,21 @@
  */
 package tck.java.time;
 
+import static java.time.temporal.ChronoUnit.DAYS;
+import static java.time.temporal.ChronoUnit.YEARS;
 import static org.testng.Assert.assertEquals;
 
 import java.time.DateTimeException;
+import java.time.Duration;
 import java.time.LocalDate;
 import java.time.Period;
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoUnit;
+import java.time.temporal.Temporal;
+import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalUnit;
+import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.Locale;
 
@@ -139,6 +146,78 @@
     }
 
     //-----------------------------------------------------------------------
+    // from(TemporalAmount)
+    //-----------------------------------------------------------------------
+    @Test
+    public void factory_from_TemporalAmount_Period() {
+        TemporalAmount amount = Period.of(1, 2, 3);
+        assertPeriod(Period.from(amount), 1, 2, 3);
+    }
+
+    @Test
+    public void factory_from_TemporalAmount_YearsDays() {
+        TemporalAmount amount = new TemporalAmount() {
+            @Override
+            public long get(TemporalUnit unit) {
+                if (unit == YEARS) {
+                    return 23;
+                } else {
+                    return 45;
+                }
+            }
+            @Override
+            public List<TemporalUnit> getUnits() {
+                List<TemporalUnit> list = new ArrayList<>();
+                list.add(YEARS);
+                list.add(DAYS);
+                return list;
+            }
+            @Override
+            public Temporal addTo(Temporal temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public Temporal subtractFrom(Temporal temporal) {
+                throw new UnsupportedOperationException();
+            }
+        };
+        assertPeriod(Period.from(amount), 23, 0, 45);
+    }
+
+    @Test(expectedExceptions = ArithmeticException.class)
+    public void factory_from_TemporalAmount_Years_tooBig() {
+        TemporalAmount amount = new TemporalAmount() {
+            @Override
+            public long get(TemporalUnit unit) {
+                return ((long) (Integer.MAX_VALUE)) + 1;
+            }
+            @Override
+            public List<TemporalUnit> getUnits() {
+                return Collections.<TemporalUnit>singletonList(YEARS);
+            }
+            @Override
+            public Temporal addTo(Temporal temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public Temporal subtractFrom(Temporal temporal) {
+                throw new UnsupportedOperationException();
+            }
+        };
+        Period.from(amount);
+    }
+
+    @Test(expectedExceptions = DateTimeException.class)
+    public void factory_from_TemporalAmount_Duration() {
+        Period.from(Duration.ZERO);
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void factory_from_TemporalAmount_null() {
+        Period.from(null);
+    }
+
+    //-----------------------------------------------------------------------
     // parse(String)
     //-----------------------------------------------------------------------
     @DataProvider(name="parseSuccess")
@@ -466,6 +545,32 @@
     }
 
     //-----------------------------------------------------------------------
+    // plus(Period)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="plus")
+    Object[][] data_plus() {
+        return new Object[][] {
+                {pymd(0, 0, 0), pymd(0, 0, 0), pymd(0, 0, 0)},
+                {pymd(0, 0, 0), pymd(5, 0, 0), pymd(5, 0, 0)},
+                {pymd(0, 0, 0), pymd(-5, 0, 0), pymd(-5, 0, 0)},
+                {pymd(0, 0, 0), pymd(0, 5, 0), pymd(0, 5, 0)},
+                {pymd(0, 0, 0), pymd(0, -5, 0), pymd(0, -5, 0)},
+                {pymd(0, 0, 0), pymd(0, 0, 5), pymd(0, 0, 5)},
+                {pymd(0, 0, 0), pymd(0, 0, -5), pymd(0, 0, -5)},
+                {pymd(0, 0, 0), pymd(2, 3, 4), pymd(2, 3, 4)},
+                {pymd(0, 0, 0), pymd(-2, -3, -4), pymd(-2, -3, -4)},
+
+                {pymd(4, 5, 6), pymd(2, 3, 4), pymd(6, 8, 10)},
+                {pymd(4, 5, 6), pymd(-2, -3, -4), pymd(2, 2, 2)},
+        };
+    }
+
+    @Test(dataProvider="plus")
+    public void test_plus(Period base, Period add, Period expected) {
+        assertEquals(base.plus(add), expected);
+    }
+
+    //-----------------------------------------------------------------------
     // plusYears()
     //-----------------------------------------------------------------------
     @Test
@@ -474,6 +579,11 @@
         assertPeriod(Period.of(1, 2, 3).plusYears(10), 11, 2, 3);
         assertPeriod(Period.of(1, 2, 3).plusYears(-10), -9, 2, 3);
         assertPeriod(Period.of(1, 2, 3).plusYears(-1), 0, 2, 3);
+
+        assertPeriod(Period.of(1, 2, 3).plus(Period.ofYears(0)), 1, 2, 3);
+        assertPeriod(Period.of(1, 2, 3).plus(Period.ofYears(10)), 11, 2, 3);
+        assertPeriod(Period.of(1, 2, 3).plus(Period.ofYears(-10)), -9, 2, 3);
+        assertPeriod(Period.of(1, 2, 3).plus(Period.ofYears(-1)), 0, 2, 3);
     }
 
     @Test(expectedExceptions=ArithmeticException.class)
@@ -497,6 +607,11 @@
         assertPeriod(Period.of(1, 2, 3).plusMonths(10), 1, 12, 3);
         assertPeriod(Period.of(1, 2, 3).plusMonths(-10), 1, -8, 3);
         assertPeriod(Period.of(1, 2, 3).plusMonths(-2), 1, 0, 3);
+
+        assertPeriod(Period.of(1, 2, 3).plus(Period.ofMonths(0)), 1, 2, 3);
+        assertPeriod(Period.of(1, 2, 3).plus(Period.ofMonths(10)), 1, 12, 3);
+        assertPeriod(Period.of(1, 2, 3).plus(Period.ofMonths(-10)), 1, -8, 3);
+        assertPeriod(Period.of(1, 2, 3).plus(Period.ofMonths(-2)), 1, 0, 3);
     }
 
     @Test(expectedExceptions=ArithmeticException.class)
@@ -520,6 +635,11 @@
         assertPeriod(Period.of(1, 2, 3).plusDays(10), 1, 2, 13);
         assertPeriod(Period.of(1, 2, 3).plusDays(-10), 1, 2, -7);
         assertPeriod(Period.of(1, 2, 3).plusDays(-3), 1, 2, 0);
+
+        assertPeriod(Period.of(1, 2, 3).plus(Period.ofDays(0)), 1, 2, 3);
+        assertPeriod(Period.of(1, 2, 3).plus(Period.ofDays(10)), 1, 2, 13);
+        assertPeriod(Period.of(1, 2, 3).plus(Period.ofDays(-10)), 1, 2, -7);
+        assertPeriod(Period.of(1, 2, 3).plus(Period.ofDays(-3)), 1, 2, 0);
     }
 
     @Test(expectedExceptions=ArithmeticException.class)
@@ -535,6 +655,116 @@
     }
 
     //-----------------------------------------------------------------------
+    // minus(Period)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="minus")
+    Object[][] data_minus() {
+        return new Object[][] {
+                {pymd(0, 0, 0), pymd(0, 0, 0), pymd(0, 0, 0)},
+                {pymd(0, 0, 0), pymd(5, 0, 0), pymd(-5, 0, 0)},
+                {pymd(0, 0, 0), pymd(-5, 0, 0), pymd(5, 0, 0)},
+                {pymd(0, 0, 0), pymd(0, 5, 0), pymd(0, -5, 0)},
+                {pymd(0, 0, 0), pymd(0, -5, 0), pymd(0, 5, 0)},
+                {pymd(0, 0, 0), pymd(0, 0, 5), pymd(0, 0, -5)},
+                {pymd(0, 0, 0), pymd(0, 0, -5), pymd(0, 0, 5)},
+                {pymd(0, 0, 0), pymd(2, 3, 4), pymd(-2, -3, -4)},
+                {pymd(0, 0, 0), pymd(-2, -3, -4), pymd(2, 3, 4)},
+
+                {pymd(4, 5, 6), pymd(2, 3, 4), pymd(2, 2, 2)},
+                {pymd(4, 5, 6), pymd(-2, -3, -4), pymd(6, 8, 10)},
+        };
+    }
+
+    @Test(dataProvider="minus")
+    public void test_minus(Period base, Period subtract, Period expected) {
+        assertEquals(base.minus(subtract), expected);
+    }
+
+    //-----------------------------------------------------------------------
+    // minusYears()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_minusYears() {
+        assertPeriod(Period.of(1, 2, 3).minusYears(0), 1, 2, 3);
+        assertPeriod(Period.of(1, 2, 3).minusYears(10), -9, 2, 3);
+        assertPeriod(Period.of(1, 2, 3).minusYears(-10), 11, 2, 3);
+        assertPeriod(Period.of(1, 2, 3).minusYears(-1), 2, 2, 3);
+
+        assertPeriod(Period.of(1, 2, 3).minus(Period.ofYears(0)), 1, 2, 3);
+        assertPeriod(Period.of(1, 2, 3).minus(Period.ofYears(10)), -9, 2, 3);
+        assertPeriod(Period.of(1, 2, 3).minus(Period.ofYears(-10)), 11, 2, 3);
+        assertPeriod(Period.of(1, 2, 3).minus(Period.ofYears(-1)), 2, 2, 3);
+    }
+
+    @Test(expectedExceptions=ArithmeticException.class)
+    public void test_minusYears_overflowTooBig() {
+        Period test = Period.ofYears(Integer.MAX_VALUE);
+        test.minusYears(-1);
+    }
+
+    @Test(expectedExceptions=ArithmeticException.class)
+    public void test_minusYears_overflowTooSmall() {
+        Period test = Period.ofYears(Integer.MIN_VALUE);
+        test.minusYears(1);
+    }
+
+    //-----------------------------------------------------------------------
+    // minusMonths()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_minusMonths() {
+        assertPeriod(Period.of(1, 2, 3).minusMonths(0), 1, 2, 3);
+        assertPeriod(Period.of(1, 2, 3).minusMonths(10), 1, -8, 3);
+        assertPeriod(Period.of(1, 2, 3).minusMonths(-10), 1, 12, 3);
+        assertPeriod(Period.of(1, 2, 3).minusMonths(-2), 1, 4, 3);
+
+        assertPeriod(Period.of(1, 2, 3).minus(Period.ofMonths(0)), 1, 2, 3);
+        assertPeriod(Period.of(1, 2, 3).minus(Period.ofMonths(10)), 1, -8, 3);
+        assertPeriod(Period.of(1, 2, 3).minus(Period.ofMonths(-10)), 1, 12, 3);
+        assertPeriod(Period.of(1, 2, 3).minus(Period.ofMonths(-2)), 1, 4, 3);
+    }
+
+    @Test(expectedExceptions=ArithmeticException.class)
+    public void test_minusMonths_overflowTooBig() {
+        Period test = Period.ofMonths(Integer.MAX_VALUE);
+        test.minusMonths(-1);
+    }
+
+    @Test(expectedExceptions=ArithmeticException.class)
+    public void test_minusMonths_overflowTooSmall() {
+        Period test = Period.ofMonths(Integer.MIN_VALUE);
+        test.minusMonths(1);
+    }
+
+    //-----------------------------------------------------------------------
+    // minusDays()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_minusDays() {
+        assertPeriod(Period.of(1, 2, 3).minusDays(0), 1, 2, 3);
+        assertPeriod(Period.of(1, 2, 3).minusDays(10), 1, 2, -7);
+        assertPeriod(Period.of(1, 2, 3).minusDays(-10), 1, 2, 13);
+        assertPeriod(Period.of(1, 2, 3).minusDays(-3), 1, 2, 6);
+
+        assertPeriod(Period.of(1, 2, 3).minus(Period.ofDays(0)), 1, 2, 3);
+        assertPeriod(Period.of(1, 2, 3).minus(Period.ofDays(10)), 1, 2, -7);
+        assertPeriod(Period.of(1, 2, 3).minus(Period.ofDays(-10)), 1, 2, 13);
+        assertPeriod(Period.of(1, 2, 3).minus(Period.ofDays(-3)), 1, 2, 6);
+    }
+
+    @Test(expectedExceptions=ArithmeticException.class)
+    public void test_minusDays_overflowTooBig() {
+        Period test = Period.ofDays(Integer.MAX_VALUE);
+        test.minusDays(-1);
+    }
+
+    @Test(expectedExceptions=ArithmeticException.class)
+    public void test_minusDays_overflowTooSmall() {
+        Period test = Period.ofDays(Integer.MIN_VALUE);
+        test.minusDays(1);
+    }
+
+    //-----------------------------------------------------------------------
     // multipliedBy()
     //-----------------------------------------------------------------------
     @Test
--- a/test/java/time/tck/java/time/TCKYear.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKYear.java	Wed Apr 17 21:48:04 2013 -0700
@@ -62,6 +62,14 @@
 import static java.time.temporal.ChronoField.ERA;
 import static java.time.temporal.ChronoField.YEAR;
 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
+import static java.time.temporal.ChronoUnit.CENTURIES;
+import static java.time.temporal.ChronoUnit.DAYS;
+import static java.time.temporal.ChronoUnit.DECADES;
+import static java.time.temporal.ChronoUnit.HOURS;
+import static java.time.temporal.ChronoUnit.MILLENNIA;
+import static java.time.temporal.ChronoUnit.MONTHS;
+import static java.time.temporal.ChronoUnit.WEEKS;
+import static java.time.temporal.ChronoUnit.YEARS;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.fail;
 
@@ -69,12 +77,14 @@
 import java.io.DataOutputStream;
 import java.time.Clock;
 import java.time.DateTimeException;
+import java.time.Duration;
 import java.time.Instant;
 import java.time.LocalDate;
 import java.time.LocalTime;
 import java.time.Month;
 import java.time.MonthDay;
 import java.time.OffsetDateTime;
+import java.time.Period;
 import java.time.Year;
 import java.time.YearMonth;
 import java.time.ZoneId;
@@ -85,11 +95,13 @@
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.JulianFields;
-import java.time.temporal.Queries;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -159,7 +171,7 @@
     //-----------------------------------------------------------------------
     // now()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now() {
         Year expected = Year.now(Clock.systemDefaultZone());
         Year test = Year.now();
@@ -176,12 +188,12 @@
     //-----------------------------------------------------------------------
     // now(ZoneId)
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_ZoneId_nullZoneId() {
         Year.now((ZoneId) null);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_ZoneId() {
         ZoneId zone = ZoneId.of("UTC+01:02:03");
         Year expected = Year.now(Clock.system(zone));
@@ -199,7 +211,7 @@
     //-----------------------------------------------------------------------
     // now(Clock)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock() {
         Instant instant = OffsetDateTime.of(LocalDate.of(2010, 12, 31), LocalTime.of(0, 0), ZoneOffset.UTC).toInstant();
         Clock clock = Clock.fixed(instant, ZoneOffset.UTC);
@@ -207,13 +219,13 @@
         assertEquals(test.getValue(), 2010);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_Clock_nullClock() {
         Year.now((Clock) null);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_int_singleton() {
         for (int i = -4; i <= 2104; i++) {
             Year test = Year.of(i);
@@ -222,28 +234,28 @@
         }
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_tooLow() {
         Year.of(Year.MIN_VALUE - 1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_tooHigh() {
         Year.of(Year.MAX_VALUE + 1);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_CalendricalObject() {
         assertEquals(Year.from(LocalDate.of(2007, 7, 15)), Year.of(2007));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_CalendricalObject_invalid_noDerive() {
         Year.from(LocalTime.of(12, 30));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_CalendricalObject_null() {
         Year.from((TemporalAccessor) null);
     }
@@ -268,7 +280,7 @@
         };
     }
 
-    @Test(dataProvider="goodParseData", groups={"tck"})
+    @Test(dataProvider="goodParseData")
     public void factory_parse_success(String text, Year expected) {
         Year year = Year.parse(text);
         assertEquals(year, expected);
@@ -295,7 +307,7 @@
         };
     }
 
-    @Test(dataProvider="badParseData", expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(dataProvider="badParseData", expectedExceptions=DateTimeParseException.class)
     public void factory_parse_fail(String text, int pos) {
         try {
             Year.parse(text);
@@ -307,7 +319,7 @@
         }
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_nullText() {
         Year.parse(null);
     }
@@ -315,20 +327,20 @@
     //-----------------------------------------------------------------------
     // parse(DateTimeFormatter)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_parse_formatter() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("y");
         Year test = Year.parse("2010", f);
         assertEquals(test, Year.of(2010));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullText() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("y");
         Year.parse((String) null, f);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullFormatter() {
         Year.parse("ANY", null);
     }
@@ -356,13 +368,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {TEST_2008, Queries.chronology(), IsoChronology.INSTANCE},
-                {TEST_2008, Queries.zoneId(), null},
-                {TEST_2008, Queries.precision(), ChronoUnit.YEARS},
-                {TEST_2008, Queries.zone(), null},
-                {TEST_2008, Queries.offset(), null},
-                {TEST_2008, Queries.localDate(), null},
-                {TEST_2008, Queries.localTime(), null},
+                {TEST_2008, TemporalQuery.chronology(), IsoChronology.INSTANCE},
+                {TEST_2008, TemporalQuery.zoneId(), null},
+                {TEST_2008, TemporalQuery.precision(), ChronoUnit.YEARS},
+                {TEST_2008, TemporalQuery.zone(), null},
+                {TEST_2008, TemporalQuery.offset(), null},
+                {TEST_2008, TemporalQuery.localDate(), null},
+                {TEST_2008, TemporalQuery.localTime(), null},
         };
     }
 
@@ -384,7 +396,7 @@
     //-----------------------------------------------------------------------
     // isLeap()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_isLeap() {
         assertEquals(Year.of(1999).isLeap(), false);
         assertEquals(Year.of(2000).isLeap(), true);
@@ -423,9 +435,51 @@
     }
 
     //-----------------------------------------------------------------------
+    // plus(Period)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="plusValid")
+    Object[][] data_plusValid() {
+        return new Object[][] {
+                {2012, Period.ofYears(0), 2012},
+                {2012, Period.ofYears(1), 2013},
+                {2012, Period.ofYears(2), 2014},
+                {2012, Period.ofYears(-2), 2010},
+        };
+    }
+
+    @Test(dataProvider="plusValid")
+    public void test_plusValid(int year, TemporalAmount amount, int expected) {
+        assertEquals(Year.of(year).plus(amount), Year.of(expected));
+    }
+
+    @DataProvider(name="plusInvalidUnit")
+    Object[][] data_plusInvalidUnit() {
+        return new Object[][] {
+                {Period.of(0, 1, 0)},
+                {Period.of(0, 0, 1)},
+                {Period.of(0, 1, 1)},
+                {Period.of(1, 1, 1)},
+                {Duration.ofDays(1)},
+                {Duration.ofHours(1)},
+                {Duration.ofMinutes(1)},
+                {Duration.ofSeconds(1)},
+        };
+    }
+
+    @Test(dataProvider="plusInvalidUnit", expectedExceptions=UnsupportedTemporalTypeException.class)
+    public void test_plusInvalidUnit(TemporalAmount amount) {
+        TEST_2008.plus(amount);
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_plus_null() {
+        TEST_2008.plus(null);
+    }
+
+    //-----------------------------------------------------------------------
     // plusYears()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears() {
         assertEquals(Year.of(2007).plusYears(-1), Year.of(2006));
         assertEquals(Year.of(2007).plusYears(0), Year.of(2007));
@@ -439,42 +493,84 @@
         assertEquals(Year.of(Year.MIN_VALUE).plusYears(0), Year.of(Year.MIN_VALUE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYear_zero_equals() {
         Year base = Year.of(2007);
         assertEquals(base.plusYears(0), base);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears_big() {
         long years = 20L + Year.MAX_VALUE;
         assertEquals(Year.of(-40).plusYears(years), Year.of((int) (-40L + years)));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusYears_max() {
         Year.of(Year.MAX_VALUE).plusYears(1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusYears_maxLots() {
         Year.of(Year.MAX_VALUE).plusYears(1000);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusYears_min() {
         Year.of(Year.MIN_VALUE).plusYears(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusYears_minLots() {
         Year.of(Year.MIN_VALUE).plusYears(-1000);
     }
 
     //-----------------------------------------------------------------------
+    // minus(Period)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="minusValid")
+    Object[][] data_minusValid() {
+        return new Object[][] {
+                {2012, Period.ofYears(0), 2012},
+                {2012, Period.ofYears(1), 2011},
+                {2012, Period.ofYears(2), 2010},
+                {2012, Period.ofYears(-2), 2014},
+        };
+    }
+
+    @Test(dataProvider="minusValid")
+    public void test_minusValid(int year, TemporalAmount amount, int expected) {
+        assertEquals(Year.of(year).minus(amount), Year.of(expected));
+    }
+
+    @DataProvider(name="minusInvalidUnit")
+    Object[][] data_minusInvalidUnit() {
+        return new Object[][] {
+                {Period.of(0, 1, 0)},
+                {Period.of(0, 0, 1)},
+                {Period.of(0, 1, 1)},
+                {Period.of(1, 1, 1)},
+                {Duration.ofDays(1)},
+                {Duration.ofHours(1)},
+                {Duration.ofMinutes(1)},
+                {Duration.ofSeconds(1)},
+        };
+    }
+
+    @Test(dataProvider="minusInvalidUnit", expectedExceptions=UnsupportedTemporalTypeException.class)
+    public void test_minusInvalidUnit(TemporalAmount amount) {
+        TEST_2008.minus(amount);
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_minus_null() {
+        TEST_2008.minus(null);
+    }
+
+    //-----------------------------------------------------------------------
     // minusYears()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears() {
         assertEquals(Year.of(2007).minusYears(-1), Year.of(2008));
         assertEquals(Year.of(2007).minusYears(0), Year.of(2007));
@@ -488,34 +584,34 @@
         assertEquals(Year.of(Year.MIN_VALUE).minusYears(0), Year.of(Year.MIN_VALUE));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYear_zero_equals() {
         Year base = Year.of(2007);
         assertEquals(base.minusYears(0), base);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears_big() {
         long years = 20L + Year.MAX_VALUE;
         assertEquals(Year.of(40).minusYears(years), Year.of((int) (40L - years)));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusYears_max() {
         Year.of(Year.MAX_VALUE).minusYears(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusYears_maxLots() {
         Year.of(Year.MAX_VALUE).minusYears(-1000);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusYears_min() {
         Year.of(Year.MIN_VALUE).minusYears(1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusYears_minLots() {
         Year.of(Year.MIN_VALUE).minusYears(1000);
     }
@@ -523,7 +619,7 @@
     //-----------------------------------------------------------------------
     // adjustInto()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_adjustDate() {
         LocalDate base = LocalDate.of(2007, 2, 12);
         for (int i = -4; i <= 2104; i++) {
@@ -532,13 +628,13 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_adjustDate_resolve() {
         Year test = Year.of(2011);
         assertEquals(test.adjustInto(LocalDate.of(2012, 2, 29)), LocalDate.of(2011, 2, 28));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_adjustDate_nullLocalDate() {
         Year test = Year.of(1);
         test.adjustInto((LocalDate) null);
@@ -547,7 +643,7 @@
     //-----------------------------------------------------------------------
     // length()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_length() {
         assertEquals(Year.of(1999).length(), 365);
         assertEquals(Year.of(2000).length(), 366);
@@ -606,6 +702,99 @@
     }
 
     //-----------------------------------------------------------------------
+    // periodUntil(Temporal, TemporalUnit)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="periodUntilUnit")
+    Object[][] data_periodUntilUnit() {
+        return new Object[][] {
+                {Year.of(2000), Year.of(-1), YEARS, -2001},
+                {Year.of(2000), Year.of(0), YEARS, -2000},
+                {Year.of(2000), Year.of(1), YEARS, -1999},
+                {Year.of(2000), Year.of(1998), YEARS, -2},
+                {Year.of(2000), Year.of(1999), YEARS, -1},
+                {Year.of(2000), Year.of(2000), YEARS, 0},
+                {Year.of(2000), Year.of(2001), YEARS, 1},
+                {Year.of(2000), Year.of(2002), YEARS, 2},
+                {Year.of(2000), Year.of(2246), YEARS, 246},
+
+                {Year.of(2000), Year.of(-1), DECADES, -200},
+                {Year.of(2000), Year.of(0), DECADES, -200},
+                {Year.of(2000), Year.of(1), DECADES, -199},
+                {Year.of(2000), Year.of(1989), DECADES, -1},
+                {Year.of(2000), Year.of(1990), DECADES, -1},
+                {Year.of(2000), Year.of(1991), DECADES, 0},
+                {Year.of(2000), Year.of(2000), DECADES, 0},
+                {Year.of(2000), Year.of(2009), DECADES, 0},
+                {Year.of(2000), Year.of(2010), DECADES, 1},
+                {Year.of(2000), Year.of(2011), DECADES, 1},
+
+                {Year.of(2000), Year.of(-1), CENTURIES, -20},
+                {Year.of(2000), Year.of(0), CENTURIES, -20},
+                {Year.of(2000), Year.of(1), CENTURIES, -19},
+                {Year.of(2000), Year.of(1899), CENTURIES, -1},
+                {Year.of(2000), Year.of(1900), CENTURIES, -1},
+                {Year.of(2000), Year.of(1901), CENTURIES, 0},
+                {Year.of(2000), Year.of(2000), CENTURIES, 0},
+                {Year.of(2000), Year.of(2099), CENTURIES, 0},
+                {Year.of(2000), Year.of(2100), CENTURIES, 1},
+                {Year.of(2000), Year.of(2101), CENTURIES, 1},
+
+                {Year.of(2000), Year.of(-1), MILLENNIA, -2},
+                {Year.of(2000), Year.of(0), MILLENNIA, -2},
+                {Year.of(2000), Year.of(1), MILLENNIA, -1},
+                {Year.of(2000), Year.of(999), MILLENNIA, -1},
+                {Year.of(2000), Year.of(1000), MILLENNIA, -1},
+                {Year.of(2000), Year.of(1001), MILLENNIA, 0},
+                {Year.of(2000), Year.of(2000), MILLENNIA, 0},
+                {Year.of(2000), Year.of(2999), MILLENNIA, 0},
+                {Year.of(2000), Year.of(3000), MILLENNIA, 1},
+                {Year.of(2000), Year.of(3001), MILLENNIA, 1},
+        };
+    }
+
+    @Test(dataProvider="periodUntilUnit")
+    public void test_periodUntil_TemporalUnit(Year year1, Year year2, TemporalUnit unit, long expected) {
+        long amount = year1.periodUntil(year2, unit);
+        assertEquals(amount, expected);
+    }
+
+    @Test(dataProvider="periodUntilUnit")
+    public void test_periodUntil_TemporalUnit_negated(Year year1, Year year2, TemporalUnit unit, long expected) {
+        long amount = year2.periodUntil(year1, unit);
+        assertEquals(amount, -expected);
+    }
+
+    @Test(expectedExceptions = UnsupportedTemporalTypeException.class)
+    public void test_periodUntil_TemporalUnit_unsupportedUnit() {
+        TEST_2008.periodUntil(TEST_2008, MONTHS);
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_periodUntil_TemporalUnit_nullEnd() {
+        TEST_2008.periodUntil(null, DAYS);
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_periodUntil_TemporalUnit_nullUnit() {
+        TEST_2008.periodUntil(TEST_2008, null);
+    }
+
+    //-----------------------------------------------------------------------
+    // format(DateTimeFormatter)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_format_formatter() {
+        DateTimeFormatter f = DateTimeFormatter.ofPattern("y");
+        String t = Year.of(2010).format(f);
+        assertEquals(t, "2010");
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_format_formatter_null() {
+        Year.of(2010).format(null);
+    }
+
+    //-----------------------------------------------------------------------
     // atMonth(Month)
     //-----------------------------------------------------------------------
     @Test
@@ -636,7 +825,7 @@
     }
 
     //-----------------------------------------------------------------------
-    // atMonthDay(Month)
+    // atMonthDay(MonthDay)
     //-----------------------------------------------------------------------
     @DataProvider(name="atMonthDay")
     Object[][] data_atMonthDay() {
@@ -661,7 +850,7 @@
     //-----------------------------------------------------------------------
     // atDay(int)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_atDay_notLeapYear() {
         Year test = Year.of(2007);
         LocalDate expected = LocalDate.of(2007, 1, 1);
@@ -671,13 +860,13 @@
         }
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atDay_notLeapYear_day366() {
         Year test = Year.of(2007);
         test.atDay(366);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_atDay_leapYear() {
         Year test = Year.of(2008);
         LocalDate expected = LocalDate.of(2008, 1, 1);
@@ -687,13 +876,13 @@
         }
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atDay_day0() {
         Year test = Year.of(2007);
         test.atDay(0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_atDay_day367() {
         Year test = Year.of(2007);
         test.atDay(367);
@@ -702,7 +891,7 @@
     //-----------------------------------------------------------------------
     // compareTo()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo() {
         for (int i = -4; i <= 2104; i++) {
             Year a = Year.of(i);
@@ -734,7 +923,7 @@
         }
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_compareTo_nullYear() {
         Year doy = null;
         Year test = Year.of(1);
@@ -744,7 +933,7 @@
     //-----------------------------------------------------------------------
     // equals() / hashCode()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_equals() {
         for (int i = -4; i <= 2104; i++) {
             Year a = Year.of(i);
@@ -756,20 +945,20 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_same() {
         Year test = Year.of(2011);
         assertEquals(test.equals(test), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_nullYear() {
         Year doy = null;
         Year test = Year.of(1);
         assertEquals(test.equals(doy), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_incorrectType() {
         Year test = Year.of(1);
         assertEquals(test.equals("Incorrect type"), false);
@@ -778,7 +967,7 @@
     //-----------------------------------------------------------------------
     // toString()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toString() {
         for (int i = -4; i <= 2104; i++) {
             Year a = Year.of(i);
@@ -786,19 +975,4 @@
         }
     }
 
-    //-----------------------------------------------------------------------
-    // toString(DateTimeFormatter)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_toString_formatter() {
-        DateTimeFormatter f = DateTimeFormatter.ofPattern("y");
-        String t = Year.of(2010).toString(f);
-        assertEquals(t, "2010");
-    }
-
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
-    public void test_toString_formatter_null() {
-        Year.of(2010).toString(null);
-    }
-
 }
--- a/test/java/time/tck/java/time/TCKYearMonth.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKYearMonth.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,11 +59,19 @@
  */
 package tck.java.time;
 
-import static java.time.temporal.ChronoField.EPOCH_MONTH;
 import static java.time.temporal.ChronoField.ERA;
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
 import static java.time.temporal.ChronoField.YEAR;
 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
+import static java.time.temporal.ChronoUnit.CENTURIES;
+import static java.time.temporal.ChronoUnit.DAYS;
+import static java.time.temporal.ChronoUnit.DECADES;
+import static java.time.temporal.ChronoUnit.HOURS;
+import static java.time.temporal.ChronoUnit.MILLENNIA;
+import static java.time.temporal.ChronoUnit.MONTHS;
+import static java.time.temporal.ChronoUnit.WEEKS;
+import static java.time.temporal.ChronoUnit.YEARS;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
@@ -78,6 +86,7 @@
 import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.time.Month;
+import java.time.Period;
 import java.time.Year;
 import java.time.YearMonth;
 import java.time.ZoneId;
@@ -88,10 +97,11 @@
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.JulianFields;
-import java.time.temporal.Queries;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashSet;
@@ -110,7 +120,7 @@
 
     private YearMonth TEST_2008_06;
 
-    @BeforeMethod(groups={"tck", "implementation"})
+    @BeforeMethod
     public void setUp() {
         TEST_2008_06 = YearMonth.of(2008, 6);
     }
@@ -126,7 +136,7 @@
     protected List<TemporalField> validFields() {
         TemporalField[] array = {
             MONTH_OF_YEAR,
-            EPOCH_MONTH,
+            PROLEPTIC_MONTH,
             YEAR_OF_ERA,
             YEAR,
             ERA,
@@ -171,7 +181,7 @@
     //-----------------------------------------------------------------------
     // now()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now() {
         YearMonth expected = YearMonth.now(Clock.systemDefaultZone());
         YearMonth test = YearMonth.now();
@@ -188,12 +198,12 @@
     //-----------------------------------------------------------------------
     // now(ZoneId)
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_ZoneId_nullZoneId() {
         YearMonth.now((ZoneId) null);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_ZoneId() {
         ZoneId zone = ZoneId.of("UTC+01:02:03");
         YearMonth expected = YearMonth.now(Clock.system(zone));
@@ -211,7 +221,7 @@
     //-----------------------------------------------------------------------
     // now(Clock)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock() {
         Instant instant = LocalDateTime.of(2010, 12, 31, 0, 0).toInstant(ZoneOffset.UTC);
         Clock clock = Clock.fixed(instant, ZoneOffset.UTC);
@@ -220,72 +230,72 @@
         assertEquals(test.getMonth(), Month.DECEMBER);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_Clock_nullClock() {
         YearMonth.now((Clock) null);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_intsMonth() {
         YearMonth test = YearMonth.of(2008, Month.FEBRUARY);
         check(test, 2008, 2);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_intsMonth_yearTooLow() {
         YearMonth.of(Year.MIN_VALUE - 1, Month.JANUARY);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_intsMonth_dayTooHigh() {
         YearMonth.of(Year.MAX_VALUE + 1, Month.JANUARY);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_intsMonth_nullMonth() {
         YearMonth.of(2008, null);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_ints() {
         YearMonth test = YearMonth.of(2008, 2);
         check(test, 2008, 2);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_ints_yearTooLow() {
         YearMonth.of(Year.MIN_VALUE - 1, 2);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_ints_dayTooHigh() {
         YearMonth.of(Year.MAX_VALUE + 1, 2);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_ints_monthTooLow() {
         YearMonth.of(2008, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_ints_monthTooHigh() {
         YearMonth.of(2008, 13);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_CalendricalObject() {
         assertEquals(YearMonth.from(LocalDate.of(2007, 7, 15)), YearMonth.of(2007, 7));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_CalendricalObject_invalid_noDerive() {
         YearMonth.from(LocalTime.of(12, 30));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_CalendricalObject_null() {
         YearMonth.from((TemporalAccessor) null);
     }
@@ -323,7 +333,7 @@
         };
     }
 
-    @Test(dataProvider="goodParseData", groups={"tck"})
+    @Test(dataProvider="goodParseData")
     public void factory_parse_success(String text, YearMonth expected) {
         YearMonth yearMonth = YearMonth.parse(text);
         assertEquals(yearMonth, expected);
@@ -351,7 +361,7 @@
         };
     }
 
-    @Test(dataProvider="badParseData", expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(dataProvider="badParseData", expectedExceptions=DateTimeParseException.class)
     public void factory_parse_fail(String text, int pos) {
         try {
             YearMonth.parse(text);
@@ -364,12 +374,12 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void factory_parse_illegalValue_Month() {
         YearMonth.parse("2008-13");
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_nullText() {
         YearMonth.parse(null);
     }
@@ -377,20 +387,20 @@
     //-----------------------------------------------------------------------
     // parse(DateTimeFormatter)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_parse_formatter() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("y M");
         YearMonth test = YearMonth.parse("2010 12", f);
         assertEquals(test, YearMonth.of(2010, 12));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullText() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("y M");
         YearMonth.parse((String) null, f);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullFormatter() {
         YearMonth.parse("ANY", null);
     }
@@ -400,19 +410,19 @@
     //-----------------------------------------------------------------------
     @Test
     public void test_get_TemporalField() {
-        assertEquals(TEST_2008_06.get(ChronoField.YEAR), 2008);
-        assertEquals(TEST_2008_06.get(ChronoField.MONTH_OF_YEAR), 6);
-        assertEquals(TEST_2008_06.get(ChronoField.YEAR_OF_ERA), 2008);
-        assertEquals(TEST_2008_06.get(ChronoField.ERA), 1);
+        assertEquals(TEST_2008_06.get(YEAR), 2008);
+        assertEquals(TEST_2008_06.get(MONTH_OF_YEAR), 6);
+        assertEquals(TEST_2008_06.get(YEAR_OF_ERA), 2008);
+        assertEquals(TEST_2008_06.get(ERA), 1);
     }
 
     @Test
     public void test_getLong_TemporalField() {
-        assertEquals(TEST_2008_06.getLong(ChronoField.YEAR), 2008);
-        assertEquals(TEST_2008_06.getLong(ChronoField.MONTH_OF_YEAR), 6);
-        assertEquals(TEST_2008_06.getLong(ChronoField.YEAR_OF_ERA), 2008);
-        assertEquals(TEST_2008_06.getLong(ChronoField.ERA), 1);
-        assertEquals(TEST_2008_06.getLong(ChronoField.EPOCH_MONTH), (2008 - 1970) * 12 + 6 - 1);
+        assertEquals(TEST_2008_06.getLong(YEAR), 2008);
+        assertEquals(TEST_2008_06.getLong(MONTH_OF_YEAR), 6);
+        assertEquals(TEST_2008_06.getLong(YEAR_OF_ERA), 2008);
+        assertEquals(TEST_2008_06.getLong(ERA), 1);
+        assertEquals(TEST_2008_06.getLong(PROLEPTIC_MONTH), 2008 * 12 + 6 - 1);
     }
 
     //-----------------------------------------------------------------------
@@ -421,13 +431,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {TEST_2008_06, Queries.chronology(), IsoChronology.INSTANCE},
-                {TEST_2008_06, Queries.zoneId(), null},
-                {TEST_2008_06, Queries.precision(), ChronoUnit.MONTHS},
-                {TEST_2008_06, Queries.zone(), null},
-                {TEST_2008_06, Queries.offset(), null},
-                {TEST_2008_06, Queries.localDate(), null},
-                {TEST_2008_06, Queries.localTime(), null},
+                {TEST_2008_06, TemporalQuery.chronology(), IsoChronology.INSTANCE},
+                {TEST_2008_06, TemporalQuery.zoneId(), null},
+                {TEST_2008_06, TemporalQuery.precision(), ChronoUnit.MONTHS},
+                {TEST_2008_06, TemporalQuery.zone(), null},
+                {TEST_2008_06, TemporalQuery.offset(), null},
+                {TEST_2008_06, TemporalQuery.localDate(), null},
+                {TEST_2008_06, TemporalQuery.localTime(), null},
         };
     }
 
@@ -470,19 +480,19 @@
     //-----------------------------------------------------------------------
     // with(Year)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_with_Year() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.with(Year.of(2000)), YearMonth.of(2000, 6));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_Year_noChange_equal() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.with(Year.of(2008)), test);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_with_Year_null() {
         YearMonth test = YearMonth.of(2008, 6);
         test.with((Year) null);
@@ -491,19 +501,19 @@
     //-----------------------------------------------------------------------
     // with(Month)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_with_Month() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.with(Month.JANUARY), YearMonth.of(2008, 1));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_with_Month_noChange_equal() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.with(Month.JUNE), test);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_with_Month_null() {
         YearMonth test = YearMonth.of(2008, 6);
         test.with((Month) null);
@@ -512,25 +522,25 @@
     //-----------------------------------------------------------------------
     // withYear()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withYear() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.withYear(1999), YearMonth.of(1999, 6));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withYear_int_noChange_equal() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.withYear(2008), test);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withYear_tooLow() {
         YearMonth test = YearMonth.of(2008, 6);
         test.withYear(Year.MIN_VALUE - 1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withYear_tooHigh() {
         YearMonth test = YearMonth.of(2008, 6);
         test.withYear(Year.MAX_VALUE + 1);
@@ -539,25 +549,25 @@
     //-----------------------------------------------------------------------
     // withMonth()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withMonth() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.withMonth(1), YearMonth.of(2008, 1));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withMonth_int_noChange_equal() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.withMonth(6), test);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withMonth_tooLow() {
         YearMonth test = YearMonth.of(2008, 6);
         test.withMonth(0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withMonth_tooHigh() {
         YearMonth test = YearMonth.of(2008, 6);
         test.withMonth(13);
@@ -566,49 +576,49 @@
     //-----------------------------------------------------------------------
     // plusYears()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears_long() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.plusYears(1), YearMonth.of(2009, 6));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears_long_noChange_equal() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.plusYears(0), test);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears_long_negative() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.plusYears(-1), YearMonth.of(2007, 6));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears_long_big() {
         YearMonth test = YearMonth.of(-40, 6);
         assertEquals(test.plusYears(20L + Year.MAX_VALUE), YearMonth.of((int) (-40L + 20L + Year.MAX_VALUE), 6));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusYears_long_invalidTooLarge() {
         YearMonth test = YearMonth.of(Year.MAX_VALUE, 6);
         test.plusYears(1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusYears_long_invalidTooLargeMaxAddMax() {
         YearMonth test = YearMonth.of(Year.MAX_VALUE, 12);
         test.plusYears(Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusYears_long_invalidTooLargeMaxAddMin() {
         YearMonth test = YearMonth.of(Year.MAX_VALUE, 12);
         test.plusYears(Long.MIN_VALUE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusYears_long_invalidTooSmall() {
         YearMonth test = YearMonth.of(Year.MIN_VALUE, 6);
         test.plusYears(-1);
@@ -617,62 +627,62 @@
     //-----------------------------------------------------------------------
     // plusMonths()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_long() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.plusMonths(1), YearMonth.of(2008, 7));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_long_noChange_equal() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.plusMonths(0), test);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_long_overYears() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.plusMonths(7), YearMonth.of(2009, 1));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_long_negative() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.plusMonths(-1), YearMonth.of(2008, 5));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_long_negativeOverYear() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.plusMonths(-6), YearMonth.of(2007, 12));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_long_big() {
         YearMonth test = YearMonth.of(-40, 6);
         long months = 20L + Integer.MAX_VALUE;
         assertEquals(test.plusMonths(months), YearMonth.of((int) (-40L + months / 12), 6 + (int) (months % 12)));
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_plusMonths_long_invalidTooLarge() {
         YearMonth test = YearMonth.of(Year.MAX_VALUE, 12);
         test.plusMonths(1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusMonths_long_invalidTooLargeMaxAddMax() {
         YearMonth test = YearMonth.of(Year.MAX_VALUE, 12);
         test.plusMonths(Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_plusMonths_long_invalidTooLargeMaxAddMin() {
         YearMonth test = YearMonth.of(Year.MAX_VALUE, 12);
         test.plusMonths(Long.MIN_VALUE);
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_plusMonths_long_invalidTooSmall() {
         YearMonth test = YearMonth.of(Year.MIN_VALUE, 1);
         test.plusMonths(-1);
@@ -681,49 +691,49 @@
     //-----------------------------------------------------------------------
     // minusYears()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears_long() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.minusYears(1), YearMonth.of(2007, 6));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears_long_noChange_equal() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.minusYears(0), test);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears_long_negative() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.minusYears(-1), YearMonth.of(2009, 6));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears_long_big() {
         YearMonth test = YearMonth.of(40, 6);
         assertEquals(test.minusYears(20L + Year.MAX_VALUE), YearMonth.of((int) (40L - 20L - Year.MAX_VALUE), 6));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusYears_long_invalidTooLarge() {
         YearMonth test = YearMonth.of(Year.MAX_VALUE, 6);
         test.minusYears(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusYears_long_invalidTooLargeMaxSubtractMax() {
         YearMonth test = YearMonth.of(Year.MIN_VALUE, 12);
         test.minusYears(Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusYears_long_invalidTooLargeMaxSubtractMin() {
         YearMonth test = YearMonth.of(Year.MIN_VALUE, 12);
         test.minusYears(Long.MIN_VALUE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusYears_long_invalidTooSmall() {
         YearMonth test = YearMonth.of(Year.MIN_VALUE, 6);
         test.minusYears(1);
@@ -732,62 +742,62 @@
     //-----------------------------------------------------------------------
     // minusMonths()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_long() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.minusMonths(1), YearMonth.of(2008, 5));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_long_noChange_equal() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.minusMonths(0), test);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_long_overYears() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.minusMonths(6), YearMonth.of(2007, 12));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_long_negative() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.minusMonths(-1), YearMonth.of(2008, 7));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_long_negativeOverYear() {
         YearMonth test = YearMonth.of(2008, 6);
         assertEquals(test.minusMonths(-7), YearMonth.of(2009, 1));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_long_big() {
         YearMonth test = YearMonth.of(40, 6);
         long months = 20L + Integer.MAX_VALUE;
         assertEquals(test.minusMonths(months), YearMonth.of((int) (40L - months / 12), 6 - (int) (months % 12)));
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_minusMonths_long_invalidTooLarge() {
         YearMonth test = YearMonth.of(Year.MAX_VALUE, 12);
         test.minusMonths(-1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusMonths_long_invalidTooLargeMaxSubtractMax() {
         YearMonth test = YearMonth.of(Year.MAX_VALUE, 12);
         test.minusMonths(Long.MAX_VALUE);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_minusMonths_long_invalidTooLargeMaxSubtractMin() {
         YearMonth test = YearMonth.of(Year.MAX_VALUE, 12);
         test.minusMonths(Long.MIN_VALUE);
     }
 
-    @Test(expectedExceptions={DateTimeException.class}, groups={"tck"})
+    @Test(expectedExceptions={DateTimeException.class})
     public void test_minusMonths_long_invalidTooSmall() {
         YearMonth test = YearMonth.of(Year.MIN_VALUE, 1);
         test.minusMonths(1);
@@ -796,35 +806,35 @@
     //-----------------------------------------------------------------------
     // adjustInto()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_adjustDate() {
         YearMonth test = YearMonth.of(2008, 6);
         LocalDate date = LocalDate.of(2007, 1, 1);
         assertEquals(test.adjustInto(date), LocalDate.of(2008, 6, 1));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_adjustDate_preserveDoM() {
         YearMonth test = YearMonth.of(2011, 3);
         LocalDate date = LocalDate.of(2008, 2, 29);
         assertEquals(test.adjustInto(date), LocalDate.of(2011, 3, 29));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_adjustDate_resolve() {
         YearMonth test = YearMonth.of(2007, 2);
         LocalDate date = LocalDate.of(2008, 3, 31);
         assertEquals(test.adjustInto(date), LocalDate.of(2007, 2, 28));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_adjustDate_equal() {
         YearMonth test = YearMonth.of(2008, 6);
         LocalDate date = LocalDate.of(2008, 6, 30);
         assertEquals(test.adjustInto(date), date);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_adjustDate_null() {
         TEST_2008_06.adjustInto((LocalDate) null);
     }
@@ -832,7 +842,7 @@
     //-----------------------------------------------------------------------
     // isLeapYear()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_isLeapYear() {
         assertEquals(YearMonth.of(2007, 6).isLeapYear(), false);
         assertEquals(YearMonth.of(2008, 6).isLeapYear(), true);
@@ -841,19 +851,19 @@
     //-----------------------------------------------------------------------
     // lengthOfMonth()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_lengthOfMonth_june() {
         YearMonth test = YearMonth.of(2007, 6);
         assertEquals(test.lengthOfMonth(), 30);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_lengthOfMonth_febNonLeap() {
         YearMonth test = YearMonth.of(2007, 2);
         assertEquals(test.lengthOfMonth(), 28);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_lengthOfMonth_febLeap() {
         YearMonth test = YearMonth.of(2008, 2);
         assertEquals(test.lengthOfMonth(), 29);
@@ -862,7 +872,7 @@
     //-----------------------------------------------------------------------
     // lengthOfYear()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_lengthOfYear() {
         assertEquals(YearMonth.of(2007, 6).lengthOfYear(), 365);
         assertEquals(YearMonth.of(2008, 6).lengthOfYear(), 366);
@@ -871,7 +881,7 @@
     //-----------------------------------------------------------------------
     // isValidDay(int)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_isValidDay_int_june() {
         YearMonth test = YearMonth.of(2007, 6);
         assertEquals(test.isValidDay(1), true);
@@ -883,7 +893,7 @@
         assertEquals(test.isValidDay(32), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_isValidDay_int_febNonLeap() {
         YearMonth test = YearMonth.of(2007, 2);
         assertEquals(test.isValidDay(1), true);
@@ -895,7 +905,7 @@
         assertEquals(test.isValidDay(32), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_isValidDay_int_febLeap() {
         YearMonth test = YearMonth.of(2008, 2);
         assertEquals(test.isValidDay(1), true);
@@ -908,6 +918,127 @@
     }
 
     //-----------------------------------------------------------------------
+    // periodUntil(Temporal, TemporalUnit)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="periodUntilUnit")
+    Object[][] data_periodUntilUnit() {
+        return new Object[][] {
+                {ym(2000, 1), ym(-1, 12), MONTHS, -2000 * 12 - 1},
+                {ym(2000, 1), ym(0, 1), MONTHS, -2000 * 12},
+                {ym(2000, 1), ym(0, 12), MONTHS, -1999 * 12 - 1},
+                {ym(2000, 1), ym(1, 1), MONTHS, -1999 * 12},
+                {ym(2000, 1), ym(1999, 12), MONTHS, -1},
+                {ym(2000, 1), ym(2000, 1), MONTHS, 0},
+                {ym(2000, 1), ym(2000, 2), MONTHS, 1},
+                {ym(2000, 1), ym(2000, 3), MONTHS, 2},
+                {ym(2000, 1), ym(2000, 12), MONTHS, 11},
+                {ym(2000, 1), ym(2001, 1), MONTHS, 12},
+                {ym(2000, 1), ym(2246, 5), MONTHS, 246 * 12 + 4},
+
+                {ym(2000, 1), ym(-1, 12), YEARS, -2000},
+                {ym(2000, 1), ym(0, 1), YEARS, -2000},
+                {ym(2000, 1), ym(0, 12), YEARS, -1999},
+                {ym(2000, 1), ym(1, 1), YEARS, -1999},
+                {ym(2000, 1), ym(1998, 12), YEARS, -1},
+                {ym(2000, 1), ym(1999, 1), YEARS, -1},
+                {ym(2000, 1), ym(1999, 2), YEARS, 0},
+                {ym(2000, 1), ym(1999, 12), YEARS, 0},
+                {ym(2000, 1), ym(2000, 1), YEARS, 0},
+                {ym(2000, 1), ym(2000, 2), YEARS, 0},
+                {ym(2000, 1), ym(2000, 12), YEARS, 0},
+                {ym(2000, 1), ym(2001, 1), YEARS, 1},
+                {ym(2000, 1), ym(2246, 5), YEARS, 246},
+
+                {ym(2000, 5), ym(-1, 5), DECADES, -200},
+                {ym(2000, 5), ym(0, 4), DECADES, -200},
+                {ym(2000, 5), ym(0, 5), DECADES, -200},
+                {ym(2000, 5), ym(0, 6), DECADES, -199},
+                {ym(2000, 5), ym(1, 5), DECADES, -199},
+                {ym(2000, 5), ym(1990, 4), DECADES, -1},
+                {ym(2000, 5), ym(1990, 5), DECADES, -1},
+                {ym(2000, 5), ym(1990, 6), DECADES, 0},
+                {ym(2000, 5), ym(2000, 4), DECADES, 0},
+                {ym(2000, 5), ym(2000, 5), DECADES, 0},
+                {ym(2000, 5), ym(2000, 6), DECADES, 0},
+                {ym(2000, 5), ym(2010, 4), DECADES, 0},
+                {ym(2000, 5), ym(2010, 5), DECADES, 1},
+                {ym(2000, 5), ym(2010, 6), DECADES, 1},
+
+                {ym(2000, 5), ym(-1, 5), CENTURIES, -20},
+                {ym(2000, 5), ym(0, 4), CENTURIES, -20},
+                {ym(2000, 5), ym(0, 5), CENTURIES, -20},
+                {ym(2000, 5), ym(0, 6), CENTURIES, -19},
+                {ym(2000, 5), ym(1, 5), CENTURIES, -19},
+                {ym(2000, 5), ym(1900, 4), CENTURIES, -1},
+                {ym(2000, 5), ym(1900, 5), CENTURIES, -1},
+                {ym(2000, 5), ym(1900, 6), CENTURIES, 0},
+                {ym(2000, 5), ym(2000, 4), CENTURIES, 0},
+                {ym(2000, 5), ym(2000, 5), CENTURIES, 0},
+                {ym(2000, 5), ym(2000, 6), CENTURIES, 0},
+                {ym(2000, 5), ym(2100, 4), CENTURIES, 0},
+                {ym(2000, 5), ym(2100, 5), CENTURIES, 1},
+                {ym(2000, 5), ym(2100, 6), CENTURIES, 1},
+
+                {ym(2000, 5), ym(-1, 5), MILLENNIA, -2},
+                {ym(2000, 5), ym(0, 4), MILLENNIA, -2},
+                {ym(2000, 5), ym(0, 5), MILLENNIA, -2},
+                {ym(2000, 5), ym(0, 6), MILLENNIA, -1},
+                {ym(2000, 5), ym(1, 5), MILLENNIA, -1},
+                {ym(2000, 5), ym(1000, 4), MILLENNIA, -1},
+                {ym(2000, 5), ym(1000, 5), MILLENNIA, -1},
+                {ym(2000, 5), ym(1000, 6), MILLENNIA, 0},
+                {ym(2000, 5), ym(2000, 4), MILLENNIA, 0},
+                {ym(2000, 5), ym(2000, 5), MILLENNIA, 0},
+                {ym(2000, 5), ym(2000, 6), MILLENNIA, 0},
+                {ym(2000, 5), ym(3000, 4), MILLENNIA, 0},
+                {ym(2000, 5), ym(3000, 5), MILLENNIA, 1},
+                {ym(2000, 5), ym(3000, 5), MILLENNIA, 1},
+        };
+    }
+
+    @Test(dataProvider="periodUntilUnit")
+    public void test_periodUntil_TemporalUnit(YearMonth ym1, YearMonth ym2, TemporalUnit unit, long expected) {
+        long amount = ym1.periodUntil(ym2, unit);
+        assertEquals(amount, expected);
+    }
+
+    @Test(dataProvider="periodUntilUnit")
+    public void test_periodUntil_TemporalUnit_negated(YearMonth ym1, YearMonth ym2, TemporalUnit unit, long expected) {
+        long amount = ym2.periodUntil(ym1, unit);
+        assertEquals(amount, -expected);
+    }
+
+    @Test(expectedExceptions = UnsupportedTemporalTypeException.class)
+    public void test_periodUntil_TemporalUnit_unsupportedUnit() {
+        TEST_2008_06.periodUntil(TEST_2008_06, HOURS);
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_periodUntil_TemporalUnit_nullEnd() {
+        TEST_2008_06.periodUntil(null, DAYS);
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_periodUntil_TemporalUnit_nullUnit() {
+        TEST_2008_06.periodUntil(TEST_2008_06, null);
+    }
+
+    //-----------------------------------------------------------------------
+    // format(DateTimeFormatter)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_format_formatter() {
+        DateTimeFormatter f = DateTimeFormatter.ofPattern("y M");
+        String t = YearMonth.of(2010, 12).format(f);
+        assertEquals(t, "2010 12");
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_format_formatter_null() {
+        YearMonth.of(2010, 12).format(null);
+    }
+
+    //-----------------------------------------------------------------------
     // atDay(int)
     //-----------------------------------------------------------------------
     @DataProvider(name="atDay")
@@ -975,7 +1106,7 @@
     //-----------------------------------------------------------------------
     // compareTo()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_comparisons() {
         doTest_comparisons_YearMonth(
             YearMonth.of(-1, 1),
@@ -1015,17 +1146,17 @@
         }
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_compareTo_ObjectNull() {
         TEST_2008_06.compareTo(null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isBefore_ObjectNull() {
         TEST_2008_06.isBefore(null);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isAfter_ObjectNull() {
         TEST_2008_06.isAfter(null);
     }
@@ -1033,7 +1164,7 @@
     //-----------------------------------------------------------------------
     // equals()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_equals() {
         YearMonth a = YearMonth.of(2008, 6);
         YearMonth b = YearMonth.of(2008, 6);
@@ -1061,17 +1192,17 @@
         assertEquals(d.equals(d), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_itself_true() {
         assertEquals(TEST_2008_06.equals(TEST_2008_06), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_string_false() {
         assertEquals(TEST_2008_06.equals("2007-07-15"), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_null_false() {
         assertEquals(TEST_2008_06.equals(null), false);
     }
@@ -1079,7 +1210,7 @@
     //-----------------------------------------------------------------------
     // hashCode()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleDates", groups={"tck"})
+    @Test(dataProvider="sampleDates")
     public void test_hashCode(int y, int m) {
         YearMonth a = YearMonth.of(y, m);
         assertEquals(a.hashCode(), a.hashCode());
@@ -1087,7 +1218,7 @@
         assertEquals(a.hashCode(), b.hashCode());
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_hashCode_unique() {
         Set<Integer> uniques = new HashSet<Integer>(201 * 12);
         for (int i = 1900; i <= 2100; i++) {
@@ -1111,26 +1242,15 @@
         };
     }
 
-    @Test(dataProvider="sampleToString", groups={"tck"})
+    @Test(dataProvider="sampleToString")
     public void test_toString(int y, int m, String expected) {
         YearMonth test = YearMonth.of(y, m);
         String str = test.toString();
         assertEquals(str, expected);
     }
 
-    //-----------------------------------------------------------------------
-    // toString(DateTimeFormatter)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_toString_formatter() {
-        DateTimeFormatter f = DateTimeFormatter.ofPattern("y M");
-        String t = YearMonth.of(2010, 12).toString(f);
-        assertEquals(t, "2010 12");
-    }
-
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
-    public void test_toString_formatter_null() {
-        YearMonth.of(2010, 12).toString(null);
+    private YearMonth ym(int year, int month) {
+        return YearMonth.of(year, month);
     }
 
 }
--- a/test/java/time/tck/java/time/TCKZoneId.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKZoneId.java	Wed Apr 17 21:48:04 2013 -0700
@@ -64,23 +64,24 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
 import java.io.DataOutputStream;
-import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectStreamConstants;
 import java.lang.reflect.Field;
 import java.time.DateTimeException;
+import java.time.Instant;
 import java.time.LocalTime;
 import java.time.ZoneId;
 import java.time.ZoneOffset;
-import java.time.temporal.Queries;
+import java.time.format.TextStyle;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
 import java.time.zone.ZoneRulesException;
 import java.util.HashMap;
+import java.util.Locale;
 import java.util.Map;
+import java.util.Set;
 
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -114,9 +115,12 @@
         // an ID can be loaded without validation during deserialization
         String id = "QWERTYUIOPASDFGHJKLZXCVBNM~/._+-";
         ZoneId deser = deserialize(id);
-        // getting the ID and string are OK
+        // getId, equals, hashCode, toString and normalized are OK
         assertEquals(deser.getId(), id);
         assertEquals(deser.toString(), id);
+        assertEquals(deser, deser);
+        assertEquals(deser.hashCode(), deser.hashCode());
+        assertEquals(deser.normalized(), deser);
         // getting the rules is not
         try {
             deser.getRules();
@@ -133,32 +137,32 @@
         deserialize("|!?");
     }
 
-    @Test(dataProvider="offsetBasedValid", expectedExceptions=DateTimeException.class)
+    @Test(dataProvider="offsetBasedValid")
     public void test_deserialization_lenient_offsetNotAllowed_noPrefix(String input, String resolvedId) throws Exception {
-        // an ID can be loaded without validation during deserialization
-        // but there is a check to ensure the ID format is valid
-        deserialize(input);
+        ZoneId deserialized = deserialize(input);
+        assertEquals(deserialized, ZoneId.of(input));
+        assertEquals(deserialized, ZoneId.of(resolvedId));
     }
 
-    @Test(dataProvider="offsetBasedValid", expectedExceptions=DateTimeException.class)
-    public void test_deserialization_lenient_offsetNotAllowed_prefixUTC(String input, String resolvedId) throws Exception {
-        // an ID can be loaded without validation during deserialization
-        // but there is a check to ensure the ID format is valid
-        deserialize("UTC" + input);
+    @Test(dataProvider="offsetBasedValidPrefix")
+    public void test_deserialization_lenient_offsetNotAllowed_prefixUTC(String input, String resolvedId, String offsetId) throws Exception {
+        ZoneId deserialized = deserialize("UTC" + input);
+        assertEquals(deserialized, ZoneId.of("UTC" + input));
+        assertEquals(deserialized, ZoneId.of("UTC" + resolvedId));
     }
 
-    @Test(dataProvider="offsetBasedValid", expectedExceptions=DateTimeException.class)
-    public void test_deserialization_lenient_offsetNotAllowed_prefixGMT(String input, String resolvedId) throws Exception {
-        // an ID can be loaded without validation during deserialization
-        // but there is a check to ensure the ID format is valid
-        deserialize("GMT" + input);
+    @Test(dataProvider="offsetBasedValidPrefix")
+    public void test_deserialization_lenient_offsetNotAllowed_prefixGMT(String input, String resolvedId, String offsetId) throws Exception {
+        ZoneId deserialized = deserialize("GMT" + input);
+        assertEquals(deserialized, ZoneId.of("GMT" + input));
+        assertEquals(deserialized, ZoneId.of("GMT" + resolvedId));
     }
 
-    @Test(dataProvider="offsetBasedValid", expectedExceptions=DateTimeException.class)
-    public void test_deserialization_lenient_offsetNotAllowed_prefixUT(String input, String resolvedId) throws Exception {
-        // an ID can be loaded without validation during deserialization
-        // but there is a check to ensure the ID format is valid
-        deserialize("UT" + input);
+    @Test(dataProvider="offsetBasedValidPrefix")
+    public void test_deserialization_lenient_offsetNotAllowed_prefixUT(String input, String resolvedId, String offsetId) throws Exception {
+        ZoneId deserialized = deserialize("UT" + input);
+        assertEquals(deserialized, ZoneId.of("UT" + input));
+        assertEquals(deserialized, ZoneId.of("UT" + resolvedId));
     }
 
     private ZoneId deserialize(String id) throws Exception {
@@ -193,10 +197,10 @@
     }
 
     //-----------------------------------------------------------------------
-    // OLD_IDS_PRE_2005
+    // OLD_SHORT_IDS
     //-----------------------------------------------------------------------
     public void test_constant_OLD_IDS_PRE_2005() {
-        Map<String, String> ids = ZoneId.OLD_IDS_PRE_2005;
+        Map<String, String> ids = ZoneId.OLD_SHORT_IDS;
         assertEquals(ids.get("EST"), "America/New_York");
         assertEquals(ids.get("MST"), "America/Denver");
         assertEquals(ids.get("HST"), "Pacific/Honolulu");
@@ -229,15 +233,15 @@
 
     @Test(expectedExceptions=UnsupportedOperationException.class)
     public void test_constant_OLD_IDS_PRE_2005_immutable() {
-        Map<String, String> ids = ZoneId.OLD_IDS_PRE_2005;
+        Map<String, String> ids = ZoneId.OLD_SHORT_IDS;
         ids.clear();
     }
 
     //-----------------------------------------------------------------------
-    // OLD_IDS_POST_2005
+    // SHORT_IDS
     //-----------------------------------------------------------------------
     public void test_constant_OLD_IDS_POST_2005() {
-        Map<String, String> ids = ZoneId.OLD_IDS_POST_2005;
+        Map<String, String> ids = ZoneId.SHORT_IDS;
         assertEquals(ids.get("EST"), "-05:00");
         assertEquals(ids.get("MST"), "-07:00");
         assertEquals(ids.get("HST"), "-10:00");
@@ -270,11 +274,24 @@
 
     @Test(expectedExceptions=UnsupportedOperationException.class)
     public void test_constant_OLD_IDS_POST_2005_immutable() {
-        Map<String, String> ids = ZoneId.OLD_IDS_POST_2005;
+        Map<String, String> ids = ZoneId.SHORT_IDS;
         ids.clear();
     }
 
     //-----------------------------------------------------------------------
+    // getAvailableZoneIds()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_getAvailableGroupIds() {
+        Set<String> zoneIds = ZoneId.getAvailableZoneIds();
+        assertEquals(zoneIds.contains("Europe/London"), true);
+        zoneIds.clear();
+        assertEquals(zoneIds.size(), 0);
+        Set<String> zoneIds2 = ZoneId.getAvailableZoneIds();
+        assertEquals(zoneIds2.contains("Europe/London"), true);
+    }
+
+    //-----------------------------------------------------------------------
     // mapped factory
     //-----------------------------------------------------------------------
     @Test
@@ -315,65 +332,41 @@
     }
 
     //-----------------------------------------------------------------------
-    // regular factory
-    //-----------------------------------------------------------------------
-    @DataProvider(name="offsetBasedZero")
-    Object[][] data_offsetBasedZero() {
-        return new Object[][] {
-                {""}, {"0"},
-                {"+00"},{"+0000"},{"+00:00"},{"+000000"},{"+00:00:00"},
-                {"-00"},{"-0000"},{"-00:00"},{"-000000"},{"-00:00:00"},
-        };
-    }
-
-    @Test(dataProvider="offsetBasedZero")
-    public void factory_of_String_offsetBasedZero_noPrefix(String id) {
-        if (id.length() > 0 && id.equals("0") == false) {
-            ZoneId test = ZoneId.of(id);
-            assertEquals(test, ZoneOffset.UTC);
-        }
-    }
-
-    @Test(dataProvider="offsetBasedZero")
-    public void factory_of_String_offsetBasedZero_prefixUTC(String id) {
-        ZoneId test = ZoneId.of("UTC" + id);
-        assertEquals(test, ZoneOffset.UTC);
-    }
-
-    @Test(dataProvider="offsetBasedZero")
-    public void factory_of_String_offsetBasedZero_prefixGMT(String id) {
-        ZoneId test = ZoneId.of("GMT" + id);
-        assertEquals(test, ZoneOffset.UTC);
-    }
-
-    @Test(dataProvider="offsetBasedZero")
-    public void factory_of_String_offsetBasedZero_prefixUT(String id) {
-        ZoneId test = ZoneId.of("UT" + id);
-        assertEquals(test, ZoneOffset.UTC);
-    }
-
-    @Test
-    public void factory_of_String_offsetBasedZero_z() {
-        ZoneId test = ZoneId.of("Z");
-        assertEquals(test, ZoneOffset.UTC);
-    }
-
+    // regular factory and .normalized()
     //-----------------------------------------------------------------------
     @DataProvider(name="offsetBasedValid")
     Object[][] data_offsetBasedValid() {
         return new Object[][] {
+                {"Z", "Z"},
                 {"+0", "Z"},
+                {"-0", "Z"},
+                {"+00", "Z"},
+                {"+0000", "Z"},
+                {"+00:00", "Z"},
+                {"+000000", "Z"},
+                {"+00:00:00", "Z"},
+                {"-00", "Z"},
+                {"-0000", "Z"},
+                {"-00:00", "Z"},
+                {"-000000", "Z"},
+                {"-00:00:00", "Z"},
                 {"+5", "+05:00"},
                 {"+01", "+01:00"},
-                {"+0100", "+01:00"},{"+01:00", "+01:00"},
-                {"+010000", "+01:00"},{"+01:00:00", "+01:00"},
+                {"+0100", "+01:00"},
+                {"+01:00", "+01:00"},
+                {"+010000", "+01:00"},
+                {"+01:00:00", "+01:00"},
                 {"+12", "+12:00"},
-                {"+1234", "+12:34"},{"+12:34", "+12:34"},
-                {"+123456", "+12:34:56"},{"+12:34:56", "+12:34:56"},
+                {"+1234", "+12:34"},
+                {"+12:34", "+12:34"},
+                {"+123456", "+12:34:56"},
+                {"+12:34:56", "+12:34:56"},
                 {"-02", "-02:00"},
                 {"-5", "-05:00"},
-                {"-0200", "-02:00"},{"-02:00", "-02:00"},
-                {"-020000", "-02:00"},{"-02:00:00", "-02:00"},
+                {"-0200", "-02:00"},
+                {"-02:00", "-02:00"},
+                {"-020000", "-02:00"},
+                {"-02:00:00", "-02:00"},
         };
     }
 
@@ -382,27 +375,126 @@
         ZoneId test = ZoneId.of(input);
         assertEquals(test.getId(), id);
         assertEquals(test, ZoneOffset.of(id));
+        assertEquals(test.normalized(), ZoneOffset.of(id));
+        assertEquals(test.getDisplayName(TextStyle.FULL, Locale.UK), id);
+        assertEquals(test.getRules().isFixedOffset(), true);
+        assertEquals(test.getRules().getOffset(Instant.EPOCH), ZoneOffset.of(id));
     }
 
-    @Test(dataProvider="offsetBasedValid")
-    public void factory_of_String_offsetBasedValid_prefixUTC(String input, String id) {
+    //-----------------------------------------------------------------------
+    @DataProvider(name="offsetBasedValidPrefix")
+    Object[][] data_offsetBasedValidPrefix() {
+        return new Object[][] {
+                {"", "", "Z"},
+                {"+0", "", "Z"},
+                {"-0", "", "Z"},
+                {"+00", "", "Z"},
+                {"+0000", "", "Z"},
+                {"+00:00", "", "Z"},
+                {"+000000", "", "Z"},
+                {"+00:00:00", "", "Z"},
+                {"-00", "", "Z"},
+                {"-0000", "", "Z"},
+                {"-00:00", "", "Z"},
+                {"-000000", "", "Z"},
+                {"-00:00:00", "", "Z"},
+                {"+5", "+05:00", "+05:00"},
+                {"+01", "+01:00", "+01:00"},
+                {"+0100", "+01:00", "+01:00"},
+                {"+01:00", "+01:00", "+01:00"},
+                {"+010000", "+01:00", "+01:00"},
+                {"+01:00:00", "+01:00", "+01:00"},
+                {"+12", "+12:00", "+12:00"},
+                {"+1234", "+12:34", "+12:34"},
+                {"+12:34", "+12:34", "+12:34"},
+                {"+123456", "+12:34:56", "+12:34:56"},
+                {"+12:34:56", "+12:34:56", "+12:34:56"},
+                {"-02", "-02:00", "-02:00"},
+                {"-5", "-05:00", "-05:00"},
+                {"-0200", "-02:00", "-02:00"},
+                {"-02:00", "-02:00", "-02:00"},
+                {"-020000", "-02:00", "-02:00"},
+                {"-02:00:00", "-02:00", "-02:00"},
+        };
+    }
+
+    @Test(dataProvider="offsetBasedValidPrefix")
+    public void factory_of_String_offsetBasedValid_prefixUTC(String input, String id, String offsetId) {
         ZoneId test = ZoneId.of("UTC" + input);
-        assertEquals(test.getId(), id);
-        assertEquals(test, ZoneOffset.of(id));
+        assertEquals(test.getId(), "UTC" + id);
+        assertEquals(test.getRules(), ZoneOffset.of(offsetId).getRules());
+        assertEquals(test.normalized(), ZoneOffset.of(offsetId));
+        assertEquals(test.getDisplayName(TextStyle.FULL, Locale.UK), displayName("UTC" + id));
+        assertEquals(test.getRules().isFixedOffset(), true);
+        assertEquals(test.getRules().getOffset(Instant.EPOCH), ZoneOffset.of(offsetId));
     }
 
-    @Test(dataProvider="offsetBasedValid")
-    public void factory_of_String_offsetBasedValid_prefixGMT(String input, String id) {
+    @Test(dataProvider="offsetBasedValidPrefix")
+    public void factory_of_String_offsetBasedValid_prefixGMT(String input, String id, String offsetId) {
         ZoneId test = ZoneId.of("GMT" + input);
-        assertEquals(test.getId(), id);
-        assertEquals(test, ZoneOffset.of(id));
+        assertEquals(test.getId(), "GMT" + id);
+        assertEquals(test.getRules(), ZoneOffset.of(offsetId).getRules());
+        assertEquals(test.normalized(), ZoneOffset.of(offsetId));
+        assertEquals(test.getDisplayName(TextStyle.FULL, Locale.UK), displayName("GMT" + id));
+        assertEquals(test.getRules().isFixedOffset(), true);
+        assertEquals(test.getRules().getOffset(Instant.EPOCH), ZoneOffset.of(offsetId));
+    }
+
+    @Test(dataProvider="offsetBasedValidPrefix")
+    public void factory_of_String_offsetBasedValid_prefixUT(String input, String id, String offsetId) {
+        ZoneId test = ZoneId.of("UT" + input);
+        assertEquals(test.getId(), "UT" + id);
+        assertEquals(test.getRules(), ZoneOffset.of(offsetId).getRules());
+        assertEquals(test.normalized(), ZoneOffset.of(offsetId));
+        assertEquals(test.getDisplayName(TextStyle.FULL, Locale.UK), displayName("UT" + id));
+        assertEquals(test.getRules().isFixedOffset(), true);
+        assertEquals(test.getRules().getOffset(Instant.EPOCH), ZoneOffset.of(offsetId));
     }
 
-    @Test(dataProvider="offsetBasedValid")
-    public void factory_of_String_offsetBasedValid_prefixUT(String input, String id) {
-        ZoneId test = ZoneId.of("UT" + input);
-        assertEquals(test.getId(), id);
-        assertEquals(test, ZoneOffset.of(id));
+    private String displayName(String id) {
+        if (id.equals("GMT")) {
+            return "Greenwich Mean Time";
+        }
+        if (id.equals("GMT0")) {
+            return "Greenwich Mean Time";
+        }
+        if (id.equals("UTC")) {
+            return "Coordinated Universal Time";
+        }
+        return id;
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="offsetBasedValidOther")
+    Object[][] data_offsetBasedValidOther() {
+        return new Object[][] {
+                {"GMT", "Z"},
+                {"GMT0", "Z"},
+                {"UCT", "Z"},
+                {"Greenwich", "Z"},
+                {"Universal", "Z"},
+                {"Zulu", "Z"},
+                {"Etc/GMT", "Z"},
+                {"Etc/GMT+0", "Z"},
+                {"Etc/GMT+1", "-01:00"},
+                {"Etc/GMT-1", "+01:00"},
+                {"Etc/GMT+9", "-09:00"},
+                {"Etc/GMT-9", "+09:00"},
+                {"Etc/GMT0", "Z"},
+                {"Etc/UCT", "Z"},
+                {"Etc/UTC", "Z"},
+                {"Etc/Greenwich", "Z"},
+                {"Etc/Universal", "Z"},
+                {"Etc/Zulu", "Z"},
+        };
+    }
+
+    @Test(dataProvider="offsetBasedValidOther")
+    public void factory_of_String_offsetBasedValidOther(String input, String offsetId) {
+        ZoneId test = ZoneId.of(input);
+        assertEquals(test.getId(), input);
+        assertEquals(test.getRules(), ZoneOffset.of(offsetId).getRules());
+        assertEquals(test.normalized(), ZoneOffset.of(offsetId));
     }
 
     //-----------------------------------------------------------------------
@@ -422,6 +514,12 @@
                 {"-19"}, {"-19:00"}, {"-18:01"}, {"-18:00:01"}, {"-1801"}, {"-180001"},
                 {"-01_00"}, {"-01;00"}, {"-01@00"}, {"-01:AA"},
                 {"@01:00"},
+                {"0"},
+                {"UT0"},
+                {"UTZ"},
+                {"UTC0"},
+                {"UTCZ"},
+                {"GMTZ"},  // GMT0 is valid in ZoneRulesProvider
         };
     }
 
@@ -440,6 +538,9 @@
 
     @Test(dataProvider="offsetBasedInvalid", expectedExceptions=DateTimeException.class)
     public void factory_of_String_offsetBasedInvalid_prefixGMT(String id) {
+        if (id.equals("0")) {
+            throw new DateTimeException("Fake exception: GMT0 is valid, not invalid");
+        }
         ZoneId.of("GMT" + id);
     }
 
@@ -479,6 +580,7 @@
         ZoneId test = ZoneId.of("Europe/London");
         assertEquals(test.getId(), "Europe/London");
         assertEquals(test.getRules().isFixedOffset(), false);
+        assertEquals(test.normalized(), test);
     }
 
     //-----------------------------------------------------------------------
@@ -514,7 +616,7 @@
             @SuppressWarnings("unchecked")
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == Queries.zoneId()) {
+                if (query == TemporalQuery.zoneId()) {
                     return (R) ZoneId.of("Europe/Paris");
                 }
                 return TemporalAccessor.super.query(query);
@@ -578,8 +680,10 @@
                 {"Europe/London", "Europe/London"},
                 {"Europe/Paris", "Europe/Paris"},
                 {"Europe/Berlin", "Europe/Berlin"},
-                {"UTC", "Z"},
-                {"UTC+01:00", "+01:00"},
+                {"Z", "Z"},
+                {"+01:00", "+01:00"},
+                {"UTC", "UTC"},
+                {"UTC+01:00", "UTC+01:00"},
         };
     }
 
--- a/test/java/time/tck/java/time/TCKZoneOffset.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKZoneOffset.java	Wed Apr 17 21:48:04 2013 -0700
@@ -77,7 +77,6 @@
 import java.time.ZonedDateTime;
 import java.time.temporal.ChronoField;
 import java.time.temporal.JulianFields;
-import java.time.temporal.Queries;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
@@ -183,7 +182,7 @@
     //-----------------------------------------------------------------------
     // of(String)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_string_UTC() {
         String[] values = new String[] {
             "Z", "+0",
@@ -196,7 +195,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_string_invalid() {
         String[] values = new String[] {
             "","A","B","C","D","E","F","G","H","I","J","K","L","M",
@@ -223,13 +222,13 @@
         }
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_string_null() {
         ZoneOffset.of((String) null);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_string_singleDigitHours() {
         for (int i = -9; i <= 9; i++) {
             String str = (i < 0 ? "-" : "+") + Math.abs(i);
@@ -238,7 +237,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_string_hours() {
         for (int i = -18; i <= 18; i++) {
             String str = (i < 0 ? "-" : "+") + Integer.toString(Math.abs(i) + 100).substring(1);
@@ -247,7 +246,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_string_hours_minutes_noColon() {
         for (int i = -17; i <= 17; i++) {
             for (int j = -59; j <= 59; j++) {
@@ -266,7 +265,7 @@
         doTestOffset(test2, 18, 0, 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_string_hours_minutes_colon() {
         for (int i = -17; i <= 17; i++) {
             for (int j = -59; j <= 59; j++) {
@@ -285,7 +284,7 @@
         doTestOffset(test2, 18, 0, 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_string_hours_minutes_seconds_noColon() {
         for (int i = -17; i <= 17; i++) {
             for (int j = -59; j <= 59; j++) {
@@ -308,7 +307,7 @@
         doTestOffset(test2, 18, 0, 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_string_hours_minutes_seconds_colon() {
         for (int i = -17; i <= 17; i++) {
             for (int j = -59; j <= 59; j++) {
@@ -332,7 +331,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_int_hours() {
         for (int i = -18; i <= 18; i++) {
             ZoneOffset test = ZoneOffset.ofHours(i);
@@ -340,18 +339,18 @@
         }
     }
 
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_tooBig() {
         ZoneOffset.ofHours(19);
     }
 
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_tooSmall() {
         ZoneOffset.ofHours(-19);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_int_hours_minutes() {
         for (int i = -17; i <= 17; i++) {
             for (int j = -59; j <= 59; j++) {
@@ -367,18 +366,18 @@
         doTestOffset(test2, 18, 0, 0);
     }
 
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_minutes_tooBig() {
         ZoneOffset.ofHoursMinutes(19, 0);
     }
 
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_minutes_tooSmall() {
         ZoneOffset.ofHoursMinutes(-19, 0);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_int_hours_minutes_seconds() {
         for (int i = -17; i <= 17; i++) {
             for (int j = -59; j <= 59; j++) {
@@ -397,80 +396,80 @@
         doTestOffset(test2, 18, 0, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_minutes_seconds_plusHoursMinusMinutes() {
         ZoneOffset.ofHoursMinutesSeconds(1, -1, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_minutes_seconds_plusHoursMinusSeconds() {
         ZoneOffset.ofHoursMinutesSeconds(1, 0, -1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_minutes_seconds_minusHoursPlusMinutes() {
         ZoneOffset.ofHoursMinutesSeconds(-1, 1, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_minutes_seconds_minusHoursPlusSeconds() {
         ZoneOffset.ofHoursMinutesSeconds(-1, 0, 1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_minutes_seconds_zeroHoursMinusMinutesPlusSeconds() {
         ZoneOffset.ofHoursMinutesSeconds(0, -1, 1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_minutes_seconds_zeroHoursPlusMinutesMinusSeconds() {
         ZoneOffset.ofHoursMinutesSeconds(0, 1, -1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_minutes_seconds_minutesTooLarge() {
         ZoneOffset.ofHoursMinutesSeconds(0, 60, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_minutes_seconds_minutesTooSmall() {
         ZoneOffset.ofHoursMinutesSeconds(0, -60, 0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_minutes_seconds_secondsTooLarge() {
         ZoneOffset.ofHoursMinutesSeconds(0, 0, 60);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_minutes_seconds_secondsTooSmall() {
         ZoneOffset.ofHoursMinutesSeconds(0, 0, 60);
     }
 
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_minutes_seconds_hoursTooBig() {
         ZoneOffset.ofHoursMinutesSeconds(19, 0, 0);
     }
 
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_int_hours_minutes_seconds_hoursTooSmall() {
         ZoneOffset.ofHoursMinutesSeconds(-19, 0, 0);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_ofTotalSeconds() {
         assertEquals(ZoneOffset.ofTotalSeconds(60 * 60 + 1), ZoneOffset.ofHoursMinutesSeconds(1, 0, 1));
         assertEquals(ZoneOffset.ofTotalSeconds(18 * 60 * 60), ZoneOffset.ofHours(18));
         assertEquals(ZoneOffset.ofTotalSeconds(-18 * 60 * 60), ZoneOffset.ofHours(-18));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_ofTotalSeconds_tooLarge() {
         ZoneOffset.ofTotalSeconds(18 * 60 * 60 + 1);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_ofTotalSeconds_tooSmall() {
         ZoneOffset.ofTotalSeconds(-18 * 60 * 60 - 1);
     }
@@ -478,18 +477,18 @@
     //-----------------------------------------------------------------------
     // from()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_factory_CalendricalObject() {
         assertEquals(ZoneOffset.from(ZonedDateTime.of(LocalDateTime.of(LocalDate.of(2007, 7, 15),
                 LocalTime.of(17, 30)), ZoneOffset.ofHours(2))), ZoneOffset.ofHours(2));
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_factory_CalendricalObject_invalid_noDerive() {
         ZoneOffset.from(LocalTime.of(12, 30));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_CalendricalObject_null() {
         ZoneOffset.from((TemporalAccessor) null);
     }
@@ -497,7 +496,7 @@
     //-----------------------------------------------------------------------
     // getTotalSeconds()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_getTotalSeconds() {
         ZoneOffset offset = ZoneOffset.ofTotalSeconds(60 * 60 + 1);
         assertEquals(offset.getTotalSeconds(), 60 * 60 + 1);
@@ -506,7 +505,7 @@
     //-----------------------------------------------------------------------
     // getId()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_getId() {
         ZoneOffset offset = ZoneOffset.ofHoursMinutesSeconds(1, 0, 0);
         assertEquals(offset.getId(), "+01:00");
@@ -519,7 +518,7 @@
     //-----------------------------------------------------------------------
     // getRules()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_getRules() {
         ZoneOffset offset = ZoneOffset.ofHoursMinutesSeconds(1, 2, 3);
         assertEquals(offset.getRules().isFixedOffset(), true);
@@ -562,13 +561,13 @@
     @DataProvider(name="query")
     Object[][] data_query() {
         return new Object[][] {
-                {ZoneOffset.UTC, Queries.chronology(), null},
-                {ZoneOffset.UTC, Queries.zoneId(), null},
-                {ZoneOffset.UTC, Queries.precision(), null},
-                {ZoneOffset.UTC, Queries.zone(), ZoneOffset.UTC},
-                {ZoneOffset.UTC, Queries.offset(), ZoneOffset.UTC},
-                {ZoneOffset.UTC, Queries.localDate(), null},
-                {ZoneOffset.UTC, Queries.localTime(), null},
+                {ZoneOffset.UTC, TemporalQuery.chronology(), null},
+                {ZoneOffset.UTC, TemporalQuery.zoneId(), null},
+                {ZoneOffset.UTC, TemporalQuery.precision(), null},
+                {ZoneOffset.UTC, TemporalQuery.zone(), ZoneOffset.UTC},
+                {ZoneOffset.UTC, TemporalQuery.offset(), ZoneOffset.UTC},
+                {ZoneOffset.UTC, TemporalQuery.localDate(), null},
+                {ZoneOffset.UTC, TemporalQuery.localTime(), null},
         };
     }
 
@@ -590,7 +589,7 @@
     //-----------------------------------------------------------------------
     // compareTo()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo() {
         ZoneOffset offset1 = ZoneOffset.ofHoursMinutesSeconds(1, 2, 3);
         ZoneOffset offset2 = ZoneOffset.ofHoursMinutesSeconds(2, 3, 4);
@@ -603,7 +602,7 @@
     //-----------------------------------------------------------------------
     // equals() / hashCode()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_equals() {
         ZoneOffset offset1 = ZoneOffset.ofHoursMinutesSeconds(1, 2, 3);
         ZoneOffset offset2 = ZoneOffset.ofHoursMinutesSeconds(2, 3, 4);
@@ -623,7 +622,7 @@
     //-----------------------------------------------------------------------
     // toString()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toString() {
         ZoneOffset offset = ZoneOffset.ofHoursMinutesSeconds(1, 0, 0);
         assertEquals(offset.toString(), "+01:00");
--- a/test/java/time/tck/java/time/TCKZonedDateTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TCKZonedDateTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,8 +59,6 @@
  */
 package tck.java.time;
 
-import java.time.*;
-
 import static java.time.Month.JANUARY;
 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH;
 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR;
@@ -73,7 +71,6 @@
 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
 import static java.time.temporal.ChronoField.DAY_OF_YEAR;
 import static java.time.temporal.ChronoField.EPOCH_DAY;
-import static java.time.temporal.ChronoField.EPOCH_MONTH;
 import static java.time.temporal.ChronoField.ERA;
 import static java.time.temporal.ChronoField.HOUR_OF_AMPM;
 import static java.time.temporal.ChronoField.HOUR_OF_DAY;
@@ -88,6 +85,7 @@
 import static java.time.temporal.ChronoField.NANO_OF_DAY;
 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
 import static java.time.temporal.ChronoField.OFFSET_SECONDS;
+import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
 import static java.time.temporal.ChronoField.SECOND_OF_DAY;
 import static java.time.temporal.ChronoField.SECOND_OF_MINUTE;
 import static java.time.temporal.ChronoField.YEAR;
@@ -103,29 +101,36 @@
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
+import java.time.Clock;
+import java.time.DateTimeException;
+import java.time.Duration;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.Month;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.Period;
+import java.time.Year;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+import java.time.chrono.IsoChronology;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeParseException;
+import java.time.temporal.ChronoField;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.JulianFields;
+import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalAdjuster;
+import java.time.temporal.TemporalAmount;
+import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQuery;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import java.time.temporal.ChronoField;
-import java.time.temporal.ChronoUnit;
-import java.time.temporal.Queries;
-import java.time.temporal.TemporalAmount;
-import java.time.temporal.TemporalAmount;
-import java.time.temporal.TemporalAdjuster;
-import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalQuery;
-import java.time.temporal.TemporalField;
-import java.time.chrono.IsoChronology;
-import java.time.temporal.JulianFields;
-import test.java.time.temporal.MockFieldNoValue;
-
-import java.time.format.DateTimeFormatter;
-import java.time.format.DateTimeFormatter;
-import java.time.format.DateTimeParseException;
-import java.time.OffsetDateTime;
-import java.time.Year;
-
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -153,7 +158,7 @@
     private ZonedDateTime TEST_DATE_TIME;
     private ZonedDateTime TEST_DATE_TIME_PARIS;
 
-    @BeforeMethod(groups={"tck","implementation"})
+    @BeforeMethod
     public void setUp() {
         TEST_LOCAL_2008_06_30_11_30_59_500 = LocalDateTime.of(2008, 6, 30, 11, 30, 59, 500);
         TEST_DATE_TIME = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
@@ -196,7 +201,7 @@
             ALIGNED_WEEK_OF_MONTH,
             ALIGNED_WEEK_OF_YEAR,
             MONTH_OF_YEAR,
-            EPOCH_MONTH,
+            PROLEPTIC_MONTH,
             YEAR_OF_ERA,
             YEAR,
             ERA,
@@ -267,7 +272,7 @@
     //-----------------------------------------------------------------------
     // now()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void now() {
         ZonedDateTime expected = ZonedDateTime.now(Clock.systemDefaultZone());
         ZonedDateTime test = ZonedDateTime.now();
@@ -284,12 +289,12 @@
     //-----------------------------------------------------------------------
     // now(ZoneId)
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_ZoneId_nullZoneId() {
         ZonedDateTime.now((ZoneId) null);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_ZoneId() {
         ZoneId zone = ZoneId.of("UTC+01:02:03");
         ZonedDateTime expected = ZonedDateTime.now(Clock.system(zone));
@@ -307,12 +312,12 @@
     //-----------------------------------------------------------------------
     // now(Clock)
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void now_Clock_nullClock() {
-        ZonedDateTime.now((Clock)null);
+        ZonedDateTime.now((Clock) null);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_allSecsInDay_utc() {
         for (int i = 0; i < (2 * 24 * 60 * 60); i++) {
             Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
@@ -330,7 +335,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_allSecsInDay_zone() {
         ZoneId zone = ZoneId.of("Europe/London");
         for (int i = 0; i < (2 * 24 * 60 * 60); i++) {
@@ -342,7 +347,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_allSecsInDay_beforeEpoch() {
         LocalTime expected = LocalTime.MIDNIGHT.plusNanos(123456789L);
         for (int i =-1; i >= -(24 * 60 * 60); i--) {
@@ -359,7 +364,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void now_Clock_offsets() {
         ZonedDateTime base = ZonedDateTime.of(LocalDateTime.of(1970, 1, 1, 12, 0), ZoneOffset.UTC);
         for (int i = -9; i < 15; i++) {
@@ -393,35 +398,35 @@
     //-----------------------------------------------------------------------
     // of(LocalDate, LocalTime, ZoneId)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_LocalDateLocalTime() {
         ZonedDateTime test = ZonedDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 10, 500), ZONE_PARIS);
         check(test, 2008, 6, 30, 11, 30, 10, 500, OFFSET_0200, ZONE_PARIS);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_LocalDateLocalTime_inGap() {
         ZonedDateTime test = ZonedDateTime.of(TEST_PARIS_GAP_2008_03_30_02_30.toLocalDate(), TEST_PARIS_GAP_2008_03_30_02_30.toLocalTime(), ZONE_PARIS);
         check(test, 2008, 3, 30, 3, 30, 0, 0, OFFSET_0200, ZONE_PARIS);  // one hour later in summer offset
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_LocalDateLocalTime_inOverlap() {
         ZonedDateTime test = ZonedDateTime.of(TEST_PARIS_OVERLAP_2008_10_26_02_30.toLocalDate(), TEST_PARIS_OVERLAP_2008_10_26_02_30.toLocalTime(), ZONE_PARIS);
         check(test, 2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS);  // same time in summer offset
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_LocalDateLocalTime_nullDate() {
         ZonedDateTime.of((LocalDate) null, LocalTime.of(11, 30, 10, 500), ZONE_PARIS);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_LocalDateLocalTime_nullTime() {
         ZonedDateTime.of(LocalDate.of(2008, 6, 30), (LocalTime) null, ZONE_PARIS);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_LocalDateLocalTime_nullZone() {
         ZonedDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 10, 500), null);
     }
@@ -429,31 +434,31 @@
     //-----------------------------------------------------------------------
     // of(LocalDateTime, ZoneId)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_LocalDateTime() {
         LocalDateTime base = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500);
         ZonedDateTime test = ZonedDateTime.of(base, ZONE_PARIS);
         check(test, 2008, 6, 30, 11, 30, 10, 500, OFFSET_0200, ZONE_PARIS);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_LocalDateTime_inGap() {
         ZonedDateTime test = ZonedDateTime.of(TEST_PARIS_GAP_2008_03_30_02_30, ZONE_PARIS);
         check(test, 2008, 3, 30, 3, 30, 0, 0, OFFSET_0200, ZONE_PARIS);  // one hour later in summer offset
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_LocalDateTime_inOverlap() {
         ZonedDateTime test = ZonedDateTime.of(TEST_PARIS_OVERLAP_2008_10_26_02_30, ZONE_PARIS);
         check(test, 2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS);  // same time in summer offset
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_LocalDateTime_nullDateTime() {
         ZonedDateTime.of((LocalDateTime) null, ZONE_PARIS);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_of_LocalDateTime_nullZone() {
         LocalDateTime base = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500);
         ZonedDateTime.of(base, null);
@@ -462,7 +467,7 @@
     //-----------------------------------------------------------------------
     // of(int..., ZoneId)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_of_ints() {
         ZonedDateTime test = ZonedDateTime.of(2008, 6, 30, 11, 30, 10, 500, ZONE_PARIS);
         check(test, 2008, 6, 30, 11, 30, 10, 500, OFFSET_0200, ZONE_PARIS);
@@ -471,49 +476,49 @@
     //-----------------------------------------------------------------------
     // ofInstant(Instant, ZoneId)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_Instant_ZR() {
         Instant instant = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 35).toInstant(OFFSET_0200);
         ZonedDateTime test = ZonedDateTime.ofInstant(instant, ZONE_PARIS);
         check(test, 2008, 6, 30, 11, 30, 10, 35, OFFSET_0200, ZONE_PARIS);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_Instant_ZO() {
         Instant instant = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 45).toInstant(OFFSET_0200);
         ZonedDateTime test = ZonedDateTime.ofInstant(instant, OFFSET_0200);
         check(test, 2008, 6, 30, 11, 30, 10, 45, OFFSET_0200, OFFSET_0200);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_Instant_inGap() {
         Instant instant = TEST_PARIS_GAP_2008_03_30_02_30.toInstant(OFFSET_0100);
         ZonedDateTime test = ZonedDateTime.ofInstant(instant, ZONE_PARIS);
         check(test, 2008, 3, 30, 3, 30, 0, 0, OFFSET_0200, ZONE_PARIS);  // one hour later in summer offset
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_Instant_inOverlap_earlier() {
         Instant instant = TEST_PARIS_OVERLAP_2008_10_26_02_30.toInstant(OFFSET_0200);
         ZonedDateTime test = ZonedDateTime.ofInstant(instant, ZONE_PARIS);
         check(test, 2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS);  // same time and offset
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_Instant_inOverlap_later() {
         Instant instant = TEST_PARIS_OVERLAP_2008_10_26_02_30.toInstant(OFFSET_0100);
         ZonedDateTime test = ZonedDateTime.ofInstant(instant, ZONE_PARIS);
         check(test, 2008, 10, 26, 2, 30, 0, 0, OFFSET_0100, ZONE_PARIS);  // same time and offset
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_Instant_invalidOffset() {
         Instant instant = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500).toInstant(OFFSET_0130);
         ZonedDateTime test = ZonedDateTime.ofInstant(instant, ZONE_PARIS);
         check(test, 2008, 6, 30, 12, 0, 10, 500, OFFSET_0200, ZONE_PARIS);  // corrected offset, thus altered time
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_allSecsInDay() {
         for (int i = 0; i < (24 * 60 * 60); i++) {
             Instant instant = Instant.ofEpochSecond(i);
@@ -527,7 +532,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_allDaysInCycle() {
         // sanity check using different algorithm
         ZonedDateTime expected = LocalDateTime.of(1970, 1, 1, 0, 0, 0, 0).atZone(ZoneOffset.UTC);
@@ -539,7 +544,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_minWithMinOffset() {
         long days_0000_to_1970 = (146097 * 5) - (30 * 365 + 7);
         int year = Year.MIN_VALUE;
@@ -556,7 +561,7 @@
         assertEquals(test.getNano(), 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_minWithMaxOffset() {
         long days_0000_to_1970 = (146097 * 5) - (30 * 365 + 7);
         int year = Year.MIN_VALUE;
@@ -573,7 +578,7 @@
         assertEquals(test.getNano(), 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_maxWithMinOffset() {
         long days_0000_to_1970 = (146097 * 5) - (30 * 365 + 7);
         int year = Year.MAX_VALUE;
@@ -590,7 +595,7 @@
         assertEquals(test.getNano(), 0);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofInstant_maxWithMaxOffset() {
         long days_0000_to_1970 = (146097 * 5) - (30 * 365 + 7);
         int year = Year.MAX_VALUE;
@@ -608,19 +613,19 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofInstant_maxInstantWithMaxOffset() {
         Instant instant = Instant.ofEpochSecond(Long.MAX_VALUE);
         ZonedDateTime.ofInstant(instant, OFFSET_MAX);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofInstant_maxInstantWithMinOffset() {
         Instant instant = Instant.ofEpochSecond(Long.MAX_VALUE);
         ZonedDateTime.ofInstant(instant, OFFSET_MIN);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofInstant_tooBig() {
         long days_0000_to_1970 = (146097 * 5) - (30 * 365 + 7);
         long year = Year.MAX_VALUE + 1L;
@@ -629,7 +634,7 @@
         ZonedDateTime.ofInstant(instant, ZoneOffset.UTC);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofInstant_tooLow() {
         long days_0000_to_1970 = (146097 * 5) - (30 * 365 + 7);
         int year = Year.MIN_VALUE - 1;
@@ -638,12 +643,12 @@
         ZonedDateTime.ofInstant(instant, ZoneOffset.UTC);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_ofInstant_Instant_nullInstant() {
         ZonedDateTime.ofInstant((Instant) null, ZONE_0100);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_ofInstant_Instant_nullZone() {
         ZonedDateTime.ofInstant(Instant.EPOCH, null);
     }
@@ -651,14 +656,14 @@
     //-----------------------------------------------------------------------
     // ofStrict(LocalDateTime, ZoneId, ZoneOffset)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_ofStrict_LDT_ZI_ZO() {
         LocalDateTime normal = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500);
         ZonedDateTime test = ZonedDateTime.ofStrict(normal, OFFSET_0200, ZONE_PARIS);
         check(test, 2008, 6, 30, 11, 30, 10, 500, OFFSET_0200, ZONE_PARIS);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofStrict_LDT_ZI_ZO_inGap() {
         try {
             ZonedDateTime.ofStrict(TEST_PARIS_GAP_2008_03_30_02_30, OFFSET_0100, ZONE_PARIS);
@@ -668,7 +673,7 @@
         }
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofStrict_LDT_ZI_ZO_inOverlap_invalidOfset() {
         try {
             ZonedDateTime.ofStrict(TEST_PARIS_OVERLAP_2008_10_26_02_30, OFFSET_0130, ZONE_PARIS);
@@ -678,7 +683,7 @@
         }
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_ofStrict_LDT_ZI_ZO_invalidOffset() {
         try {
             ZonedDateTime.ofStrict(TEST_LOCAL_2008_06_30_11_30_59_500, OFFSET_0130, ZONE_PARIS);
@@ -688,17 +693,17 @@
         }
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_ofStrict_LDT_ZI_ZO_nullLDT() {
         ZonedDateTime.ofStrict((LocalDateTime) null, OFFSET_0100, ZONE_PARIS);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_ofStrict_LDT_ZI_ZO_nullZO() {
         ZonedDateTime.ofStrict(TEST_LOCAL_2008_06_30_11_30_59_500, null, ZONE_PARIS);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_ofStrict_LDT_ZI_ZO_nullZI() {
         ZonedDateTime.ofStrict(TEST_LOCAL_2008_06_30_11_30_59_500, OFFSET_0100, null);
     }
@@ -706,12 +711,12 @@
     //-----------------------------------------------------------------------
     // from(TemporalAccessor)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_from_TemporalAccessor_ZDT() {
         assertEquals(ZonedDateTime.from(TEST_DATE_TIME_PARIS), TEST_DATE_TIME_PARIS);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_from_TemporalAccessor_LDT_ZoneId() {
         assertEquals(ZonedDateTime.from(new TemporalAccessor() {
             @Override
@@ -725,7 +730,7 @@
             @SuppressWarnings("unchecked")
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == Queries.zoneId()) {
+                if (query == TemporalQuery.zoneId()) {
                     return (R) TEST_DATE_TIME_PARIS.getZone();
                 }
                 return TemporalAccessor.super.query(query);
@@ -733,7 +738,7 @@
         }), TEST_DATE_TIME_PARIS);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void factory_from_TemporalAccessor_Instant_ZoneId() {
         assertEquals(ZonedDateTime.from(new TemporalAccessor() {
             @Override
@@ -749,7 +754,7 @@
             @SuppressWarnings("unchecked")
             @Override
             public <R> R query(TemporalQuery<R> query) {
-                if (query == Queries.zoneId()) {
+                if (query == TemporalQuery.zoneId()) {
                     return (R) TEST_DATE_TIME_PARIS.getZone();
                 }
                 return TemporalAccessor.super.query(query);
@@ -757,12 +762,12 @@
         }), TEST_DATE_TIME_PARIS);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void factory_from_TemporalAccessor_invalid_noDerive() {
         ZonedDateTime.from(LocalTime.of(12, 30));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_from_TemporalAccessor_null() {
         ZonedDateTime.from((TemporalAccessor) null);
     }
@@ -814,17 +819,17 @@
         assertEquals(t.getZone().getId(), zoneId);
     }
 
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void factory_parse_illegalValue() {
         ZonedDateTime.parse("2008-06-32T11:15+01:00[Europe/Paris]");
     }
 
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void factory_parse_invalidValue() {
         ZonedDateTime.parse("2008-06-31T11:15+01:00[Europe/Paris]");
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_nullText() {
         ZonedDateTime.parse((String) null);
     }
@@ -832,20 +837,20 @@
     //-----------------------------------------------------------------------
     // parse(DateTimeFormatter)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void factory_parse_formatter() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s VV");
         ZonedDateTime test = ZonedDateTime.parse("2010 12 3 11 30 0 Europe/London", f);
         assertEquals(test, ZonedDateTime.of(LocalDateTime.of(2010, 12, 3, 11, 30), ZoneId.of("Europe/London")));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullText() {
         DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s");
         ZonedDateTime.parse((String) null, f);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void factory_parse_formatter_nullFormatter() {
         ZonedDateTime.parse("ANY", null);
     }
@@ -865,7 +870,7 @@
         };
     }
 
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_get(int y, int o, int d, int h, int m, int s, int n, ZoneId zone) {
         LocalDate localDate = LocalDate.of(y, o, d);
         LocalTime localTime = LocalTime.of(h, m, s, n);
@@ -941,32 +946,32 @@
     //-----------------------------------------------------------------------
     @Test
     public void test_query_chrono() {
-        assertEquals(TEST_DATE_TIME.query(Queries.chronology()), IsoChronology.INSTANCE);
-        assertEquals(Queries.chronology().queryFrom(TEST_DATE_TIME), IsoChronology.INSTANCE);
+        assertEquals(TEST_DATE_TIME.query(TemporalQuery.chronology()), IsoChronology.INSTANCE);
+        assertEquals(TemporalQuery.chronology().queryFrom(TEST_DATE_TIME), IsoChronology.INSTANCE);
     }
 
     @Test
     public void test_query_zoneId() {
-        assertEquals(TEST_DATE_TIME.query(Queries.zoneId()), TEST_DATE_TIME.getZone());
-        assertEquals(Queries.zoneId().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getZone());
+        assertEquals(TEST_DATE_TIME.query(TemporalQuery.zoneId()), TEST_DATE_TIME.getZone());
+        assertEquals(TemporalQuery.zoneId().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getZone());
     }
 
     @Test
     public void test_query_precision() {
-        assertEquals(TEST_DATE_TIME.query(Queries.precision()), NANOS);
-        assertEquals(Queries.precision().queryFrom(TEST_DATE_TIME), NANOS);
+        assertEquals(TEST_DATE_TIME.query(TemporalQuery.precision()), NANOS);
+        assertEquals(TemporalQuery.precision().queryFrom(TEST_DATE_TIME), NANOS);
     }
 
     @Test
     public void test_query_offset() {
-        assertEquals(TEST_DATE_TIME.query(Queries.offset()), TEST_DATE_TIME.getOffset());
-        assertEquals(Queries.offset().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getOffset());
+        assertEquals(TEST_DATE_TIME.query(TemporalQuery.offset()), TEST_DATE_TIME.getOffset());
+        assertEquals(TemporalQuery.offset().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getOffset());
     }
 
     @Test
     public void test_query_zone() {
-        assertEquals(TEST_DATE_TIME.query(Queries.zone()), TEST_DATE_TIME.getZone());
-        assertEquals(Queries.zone().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getZone());
+        assertEquals(TEST_DATE_TIME.query(TemporalQuery.zone()), TEST_DATE_TIME.getZone());
+        assertEquals(TemporalQuery.zone().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getZone());
     }
 
     @Test(expectedExceptions=NullPointerException.class)
@@ -977,14 +982,14 @@
     //-----------------------------------------------------------------------
     // withEarlierOffsetAtOverlap()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withEarlierOffsetAtOverlap_notAtOverlap() {
         ZonedDateTime base = ZonedDateTime.ofStrict(TEST_LOCAL_2008_06_30_11_30_59_500, OFFSET_0200, ZONE_PARIS);
         ZonedDateTime test = base.withEarlierOffsetAtOverlap();
         assertEquals(test, base);  // not changed
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withEarlierOffsetAtOverlap_atOverlap() {
         ZonedDateTime base = ZonedDateTime.ofStrict(TEST_PARIS_OVERLAP_2008_10_26_02_30, OFFSET_0100, ZONE_PARIS);
         ZonedDateTime test = base.withEarlierOffsetAtOverlap();
@@ -992,7 +997,7 @@
         assertEquals(test.toLocalDateTime(), base.toLocalDateTime());  // date-time not changed
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withEarlierOffsetAtOverlap_atOverlap_noChange() {
         ZonedDateTime base = ZonedDateTime.ofStrict(TEST_PARIS_OVERLAP_2008_10_26_02_30, OFFSET_0200, ZONE_PARIS);
         ZonedDateTime test = base.withEarlierOffsetAtOverlap();
@@ -1002,14 +1007,14 @@
     //-----------------------------------------------------------------------
     // withLaterOffsetAtOverlap()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withLaterOffsetAtOverlap_notAtOverlap() {
         ZonedDateTime base = ZonedDateTime.ofStrict(TEST_LOCAL_2008_06_30_11_30_59_500, OFFSET_0200, ZONE_PARIS);
         ZonedDateTime test = base.withLaterOffsetAtOverlap();
         assertEquals(test, base);  // not changed
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withLaterOffsetAtOverlap_atOverlap() {
         ZonedDateTime base = ZonedDateTime.ofStrict(TEST_PARIS_OVERLAP_2008_10_26_02_30, OFFSET_0200, ZONE_PARIS);
         ZonedDateTime test = base.withLaterOffsetAtOverlap();
@@ -1017,7 +1022,7 @@
         assertEquals(test.toLocalDateTime(), base.toLocalDateTime());  // date-time not changed
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withLaterOffsetAtOverlap_atOverlap_noChange() {
         ZonedDateTime base = ZonedDateTime.ofStrict(TEST_PARIS_OVERLAP_2008_10_26_02_30, OFFSET_0100, ZONE_PARIS);
         ZonedDateTime test = base.withLaterOffsetAtOverlap();
@@ -1027,7 +1032,7 @@
     //-----------------------------------------------------------------------
     // withZoneSameLocal(ZoneId)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withZoneSameLocal() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1035,7 +1040,7 @@
         assertEquals(test.toLocalDateTime(), base.toLocalDateTime());
     }
 
-    @Test(groups={"tck","implementation"})
+    @Test
     public void test_withZoneSameLocal_noChange() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1043,7 +1048,7 @@
         assertEquals(test, base);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withZoneSameLocal_retainOffset1() {
         LocalDateTime ldt = LocalDateTime.of(2008, 11, 2, 1, 30, 59, 0);  // overlap
         ZonedDateTime base = ZonedDateTime.of(ldt, ZoneId.of("UTC-04:00") );
@@ -1052,7 +1057,7 @@
         assertEquals(test.getOffset(), ZoneOffset.ofHours(-4));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withZoneSameLocal_retainOffset2() {
         LocalDateTime ldt = LocalDateTime.of(2008, 11, 2, 1, 30, 59, 0);  // overlap
         ZonedDateTime base = ZonedDateTime.of(ldt, ZoneId.of("UTC-05:00") );
@@ -1061,7 +1066,7 @@
         assertEquals(test.getOffset(), ZoneOffset.ofHours(-5));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_withZoneSameLocal_null() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1071,7 +1076,7 @@
     //-----------------------------------------------------------------------
     // withZoneSameInstant()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withZoneSameInstant() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withZoneSameInstant(ZONE_0200);
@@ -1079,14 +1084,14 @@
         assertEquals(test, expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withZoneSameInstant_noChange() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withZoneSameInstant(ZONE_0100);
         assertEquals(test, base);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_withZoneSameInstant_null() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         base.withZoneSameInstant(null);
@@ -1095,7 +1100,7 @@
     //-----------------------------------------------------------------------
     // withFixedOffsetZone()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withZoneLocked() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_PARIS);
         ZonedDateTime test = base.withFixedOffsetZone();
@@ -1104,67 +1109,67 @@
     }
 
     //-----------------------------------------------------------------------
-    // with(WithAdjuster)
+    // with(TemporalAdjuster)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_with_WithAdjuster_LocalDateTime_sameOffset() {
+    @Test
+    public void test_with_adjuster_LocalDateTime_sameOffset() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_PARIS);
         ZonedDateTime test = base.with(LocalDateTime.of(2012, 7, 15, 14, 30));
         check(test, 2012, 7, 15, 14, 30, 0, 0, OFFSET_0200, ZONE_PARIS);
     }
 
-    @Test(groups={"tck"})
-    public void test_with_WithAdjuster_LocalDateTime_adjustedOffset() {
+    @Test
+    public void test_with_adjuster_LocalDateTime_adjustedOffset() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_PARIS);
         ZonedDateTime test = base.with(LocalDateTime.of(2012, 1, 15, 14, 30));
         check(test, 2012, 1, 15, 14, 30, 0, 0, OFFSET_0100, ZONE_PARIS);
     }
 
-    @Test(groups={"tck"})
-    public void test_with_WithAdjuster_LocalDate() {
+    @Test
+    public void test_with_adjuster_LocalDate() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_PARIS);
         ZonedDateTime test = base.with(LocalDate.of(2012, 7, 28));
         check(test, 2012, 7, 28, 11, 30, 59, 500, OFFSET_0200, ZONE_PARIS);
     }
 
-    @Test(groups={"tck"})
-    public void test_with_WithAdjuster_LocalTime() {
+    @Test
+    public void test_with_adjuster_LocalTime() {
         ZonedDateTime base = ZonedDateTime.of(TEST_PARIS_OVERLAP_2008_10_26_02_30, ZONE_PARIS);
         ZonedDateTime test = base.with(LocalTime.of(2, 29));
         check(test, 2008, 10, 26, 2, 29, 0, 0, OFFSET_0200, ZONE_PARIS);
     }
 
-    @Test(groups={"tck"})
-    public void test_with_WithAdjuster_Year() {
+    @Test
+    public void test_with_adjuster_Year() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
         ZonedDateTime test = base.with(Year.of(2007));
         assertEquals(test, ZonedDateTime.of(ldt.withYear(2007), ZONE_0100));
     }
 
-    @Test(groups={"tck"})
-    public void test_with_WithAdjuster_Month_adjustedDayOfMonth() {
+    @Test
+    public void test_with_adjuster_Month_adjustedDayOfMonth() {
         ZonedDateTime base = ZonedDateTime.of(LocalDateTime.of(2012, 7, 31, 0, 0), ZONE_PARIS);
         ZonedDateTime test = base.with(Month.JUNE);
         check(test, 2012, 6, 30, 0, 0, 0, 0, OFFSET_0200, ZONE_PARIS);
     }
 
-    @Test(groups={"tck"})
-    public void test_with_WithAdjuster_Offset_same() {
+    @Test
+    public void test_with_adjuster_Offset_same() {
         ZonedDateTime base = ZonedDateTime.of(LocalDateTime.of(2012, 7, 31, 0, 0), ZONE_PARIS);
         ZonedDateTime test = base.with(ZoneOffset.ofHours(2));
         check(test, 2012, 7, 31, 0, 0, 0, 0, OFFSET_0200, ZONE_PARIS);
     }
 
-    @Test(groups={"tck"})
-    public void test_with_WithAdjuster_Offset_timeAdjust() {
+    @Test
+    public void test_with_adjuster_Offset_timeAdjust() {
         ZonedDateTime base = ZonedDateTime.of(LocalDateTime.of(2012, 7, 31, 0, 0), ZONE_PARIS);
         ZonedDateTime test = base.with(ZoneOffset.ofHours(1));
-        check(test, 2012, 7, 31, 1, 0, 0, 0, OFFSET_0200, ZONE_PARIS);  // time adjusted
+        check(test, 2012, 7, 31, 0, 0, 0, 0, OFFSET_0200, ZONE_PARIS);  // invalid offset ignored
     }
 
-    @Test(groups={"tck"})
-    public void test_with_WithAdjuster_LocalDate_retainOffset1() {
+    @Test
+    public void test_with_adjuster_LocalDate_retainOffset1() {
         ZoneId newYork = ZoneId.of("America/New_York");
         LocalDateTime ldt = LocalDateTime.of(2008, 11, 1, 1, 30);
         ZonedDateTime base = ZonedDateTime.of(ldt, newYork);
@@ -1173,8 +1178,8 @@
         assertEquals(test.getOffset(), ZoneOffset.ofHours(-4));
     }
 
-    @Test(groups={"tck"})
-    public void test_with_WithAdjuster_LocalDate_retainOffset2() {
+    @Test
+    public void test_with_adjuster_LocalDate_retainOffset2() {
         ZoneId newYork = ZoneId.of("America/New_York");
         LocalDateTime ldt = LocalDateTime.of(2008, 11, 3, 1, 30);
         ZonedDateTime base = ZonedDateTime.of(ldt, newYork);
@@ -1183,23 +1188,176 @@
         assertEquals(test.getOffset(), ZoneOffset.ofHours(-5));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
-    public void test_with_WithAdjuster_null() {
+    @Test
+    public void test_with_adjuster_OffsetDateTime_validOffsetNotInOverlap() {
+        // ODT will be a valid ZDT for the zone, so must be retained exactly
+        OffsetDateTime odt = TEST_LOCAL_2008_06_30_11_30_59_500.atOffset(OFFSET_0200);
+        ZonedDateTime zdt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS);
+        ZonedDateTime test = zdt.with(odt);
+        assertEquals(test.toOffsetDateTime(), odt);
+    }
+
+    @Test
+    public void test_with_adjuster_OffsetDateTime_invalidOffsetIgnored() {
+        // ODT has invalid offset for ZDT, so only LDT is set
+        OffsetDateTime odt = TEST_LOCAL_2008_06_30_11_30_59_500.atOffset(OFFSET_0130);
+        ZonedDateTime zdt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS);
+        ZonedDateTime test = zdt.with(odt);
+        assertEquals(test.toLocalDateTime(), TEST_LOCAL_2008_06_30_11_30_59_500);
+        assertEquals(test.getOffset(), zdt.getOffset());
+    }
+
+    @Test
+    public void test_with_adjuster_OffsetDateTime_retainOffsetInOverlap1() {
+        // ODT will be a valid ZDT for the zone, so must be retained exactly
+        OffsetDateTime odt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atOffset(OFFSET_0100);
+        ZonedDateTime zdt = TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS);
+        ZonedDateTime test = zdt.with(odt);
+        assertEquals(test.toOffsetDateTime(), odt);
+    }
+
+    @Test
+    public void test_with_adjuster_OffsetDateTime_retainOffsetInOverlap2() {
+        // ODT will be a valid ZDT for the zone, so must be retained exactly
+        OffsetDateTime odt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atOffset(OFFSET_0200);
+        ZonedDateTime zdt = TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS);
+        ZonedDateTime test = zdt.with(odt);
+        assertEquals(test.toOffsetDateTime(), odt);
+    }
+
+    @Test
+    public void test_with_adjuster_OffsetTime_validOffsetNotInOverlap() {
+        // OT has valid offset for resulting time
+        OffsetTime ot = OffsetTime.of(15, 50, 30, 40, OFFSET_0100);
+        ZonedDateTime zdt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS);
+        ZonedDateTime test = zdt.with(ot);
+        assertEquals(test.toLocalDateTime(), dateTime(2008, 10, 26, 15, 50, 30, 40));
+        assertEquals(test.getOffset(), OFFSET_0100);
+    }
+
+    @Test
+    public void test_with_adjuster_OffsetTime_invalidOffsetIgnored1() {
+        // OT has invalid offset for ZDT, so only LT is set
+        OffsetTime ot = OffsetTime.of(0, 50, 30, 40, OFFSET_0130);
+        ZonedDateTime zdt = dateTime(2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS);  // earlier part of overlap
+        ZonedDateTime test = zdt.with(ot);
+        assertEquals(test.toLocalDateTime(), dateTime(2008, 10, 26, 0, 50, 30, 40));
+        assertEquals(test.getOffset(), OFFSET_0200);  // offset not adjusted
+    }
+
+    @Test
+    public void test_with_adjuster_OffsetTime_invalidOffsetIgnored2() {
+        // OT has invalid offset for ZDT, so only LT is set
+        OffsetTime ot = OffsetTime.of(15, 50, 30, 40, OFFSET_0130);
+        ZonedDateTime zdt = dateTime(2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS);  // earlier part of overlap
+        ZonedDateTime test = zdt.with(ot);
+        assertEquals(test.toLocalDateTime(), dateTime(2008, 10, 26, 15, 50, 30, 40));
+        assertEquals(test.getOffset(), OFFSET_0100);  // offset adjusted because of time change
+    }
+
+    @Test
+    public void test_with_adjuster_OffsetTime_validOffsetIntoOverlap1() {
+        // OT has valid offset for resulting time
+        OffsetTime ot = OffsetTime.of(2, 30, 30, 40, OFFSET_0100);  // valid offset in overlap
+        ZonedDateTime zdt = dateTime(2008, 10, 26, 0, 0, 0, 0, OFFSET_0200, ZONE_PARIS);  // just before overlap
+        ZonedDateTime test = zdt.with(ot);
+        assertEquals(test.toLocalDateTime(), dateTime(2008, 10, 26, 2, 30, 30, 40));
+        assertEquals(test.getOffset(), OFFSET_0100);
+    }
+
+    @Test
+    public void test_with_adjuster_OffsetTime_validOffsetIntoOverlap2() {
+        // OT has valid offset for resulting time
+        OffsetTime ot = OffsetTime.of(2, 30, 30, 40, OFFSET_0200);  // valid offset in overlap
+        ZonedDateTime zdt = dateTime(2008, 10, 26, 0, 0, 0, 0, OFFSET_0200, ZONE_PARIS);  // just before overlap
+        ZonedDateTime test = zdt.with(ot);
+        assertEquals(test.toLocalDateTime(), dateTime(2008, 10, 26, 2, 30, 30, 40));
+        assertEquals(test.getOffset(), OFFSET_0200);
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_with_adjuster_null() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         base.with((TemporalAdjuster) null);
     }
 
     //-----------------------------------------------------------------------
+    // with(long,TemporalUnit)
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "withFieldLong")
+    Object[][] data_withFieldLong() {
+        return new Object[][] {
+                // set simple fields
+                {TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS), YEAR, 2009,
+                        dateTime(2009, 6, 30, 11, 30, 59, 500, OFFSET_0200, ZONE_PARIS)},
+                {TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS), MONTH_OF_YEAR, 7,
+                        dateTime(2008, 7, 30, 11, 30, 59, 500, OFFSET_0200, ZONE_PARIS)},
+                {TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS), DAY_OF_MONTH, 15,
+                        dateTime(2008, 6, 15, 11, 30, 59, 500, OFFSET_0200, ZONE_PARIS)},
+                {TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS), HOUR_OF_DAY, 14,
+                        dateTime(2008, 6, 30, 14, 30, 59, 500, OFFSET_0200, ZONE_PARIS)},
+
+                // set around overlap
+                {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withEarlierOffsetAtOverlap(), HOUR_OF_DAY, 0,
+                        dateTime(2008, 10, 26, 0, 30, 0, 0, OFFSET_0200, ZONE_PARIS)},
+                {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withLaterOffsetAtOverlap(), HOUR_OF_DAY, 0,
+                        dateTime(2008, 10, 26, 0, 30, 0, 0, OFFSET_0200, ZONE_PARIS)},
+                {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withEarlierOffsetAtOverlap(), MINUTE_OF_HOUR, 20,
+                        dateTime(2008, 10, 26, 2, 20, 0, 0, OFFSET_0200, ZONE_PARIS)},  // offset unchanged
+                {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withLaterOffsetAtOverlap(), MINUTE_OF_HOUR, 20,
+                        dateTime(2008, 10, 26, 2, 20, 0, 0, OFFSET_0100, ZONE_PARIS)},  // offset unchanged
+                {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withEarlierOffsetAtOverlap(), HOUR_OF_DAY, 3,
+                        dateTime(2008, 10, 26, 3, 30, 0, 0, OFFSET_0100, ZONE_PARIS)},
+                {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withLaterOffsetAtOverlap(), HOUR_OF_DAY, 3,
+                        dateTime(2008, 10, 26, 3, 30, 0, 0, OFFSET_0100, ZONE_PARIS)},
+
+                // set offset
+                {TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS), OFFSET_SECONDS, 7200,
+                        dateTime(2008, 6, 30, 11, 30, 59, 500, OFFSET_0200, ZONE_PARIS)},  // offset unchanged
+                {TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS), OFFSET_SECONDS, 3600,
+                        dateTime(2008, 6, 30, 11, 30, 59, 500, OFFSET_0200, ZONE_PARIS)},  // invalid offset ignored
+                {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withEarlierOffsetAtOverlap(), OFFSET_SECONDS, 3600,
+                        dateTime(2008, 10, 26, 2, 30, 0, 0, OFFSET_0100, ZONE_PARIS)},
+                {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withLaterOffsetAtOverlap(), OFFSET_SECONDS, 3600,
+                        dateTime(2008, 10, 26, 2, 30, 0, 0, OFFSET_0100, ZONE_PARIS)},
+                {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withEarlierOffsetAtOverlap(), OFFSET_SECONDS, 7200,
+                        dateTime(2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS)},
+                {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withLaterOffsetAtOverlap(), OFFSET_SECONDS, 7200,
+                        dateTime(2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS)},
+        };
+    };
+
+    @Test(dataProvider = "withFieldLong")
+    public void test_with_fieldLong(ZonedDateTime base, TemporalField setField, int setValue, ZonedDateTime expected) {
+        assertEquals(base.with(setField, setValue), expected);
+    }
+
+    @Test(dataProvider = "withFieldLong")
+    public void test_with_adjuster_ensureZoneOffsetConsistent(ZonedDateTime base, TemporalField setField, int setValue, ZonedDateTime expected) {
+        if (setField == OFFSET_SECONDS) {
+            assertEquals(base.with(ZoneOffset.ofTotalSeconds(setValue)), expected);
+        }
+    }
+
+    @Test(dataProvider = "withFieldLong")
+    public void test_with_adjuster_ensureOffsetDateTimeConsistent(ZonedDateTime base, TemporalField setField, int setValue, ZonedDateTime expected) {
+        if (setField == OFFSET_SECONDS) {
+            OffsetDateTime odt = base.toOffsetDateTime().with(setField, setValue);
+            assertEquals(base.with(odt), expected);
+        }
+    }
+
+    //-----------------------------------------------------------------------
     // withYear()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withYear_normal() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withYear(2007);
         assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withYear(2007), ZONE_0100));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withYear_noChange() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withYear(2008);
@@ -1209,14 +1367,14 @@
     //-----------------------------------------------------------------------
     // with(Month)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withMonth_Month_normal() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.with(JANUARY);
         assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withMonth(1), ZONE_0100));
     }
 
-    @Test(expectedExceptions = NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions = NullPointerException.class)
     public void test_withMonth_Month_null() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         base.with((Month) null);
@@ -1225,26 +1383,26 @@
     //-----------------------------------------------------------------------
     // withMonth()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withMonth_normal() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withMonth(1);
         assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withMonth(1), ZONE_0100));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withMonth_noChange() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withMonth(6);
         assertEquals(test, base);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withMonth_tooBig() {
         TEST_DATE_TIME.withMonth(13);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withMonth_tooSmall() {
         TEST_DATE_TIME.withMonth(0);
     }
@@ -1252,31 +1410,31 @@
     //-----------------------------------------------------------------------
     // withDayOfMonth()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withDayOfMonth_normal() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withDayOfMonth(15);
         assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withDayOfMonth(15), ZONE_0100));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withDayOfMonth_noChange() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withDayOfMonth(30);
         assertEquals(test, base);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfMonth_tooBig() {
         LocalDateTime.of(2007, 7, 2, 11, 30).atZone(ZONE_PARIS).withDayOfMonth(32);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfMonth_tooSmall() {
         TEST_DATE_TIME.withDayOfMonth(0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfMonth_invalid31() {
         LocalDateTime.of(2007, 6, 2, 11, 30).atZone(ZONE_PARIS).withDayOfMonth(31);
     }
@@ -1284,14 +1442,14 @@
     //-----------------------------------------------------------------------
     // withDayOfYear()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withDayOfYear_normal() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withDayOfYear(33);
         assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withDayOfYear(33), ZONE_0100));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withDayOfYear_noChange() {
         LocalDateTime ldt = LocalDateTime.of(2008, 2, 5, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1299,17 +1457,17 @@
         assertEquals(test, base);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfYear_tooBig() {
         TEST_DATE_TIME.withDayOfYear(367);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfYear_tooSmall() {
         TEST_DATE_TIME.withDayOfYear(0);
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_withDayOfYear_invalid366() {
         LocalDateTime.of(2007, 2, 2, 11, 30).atZone(ZONE_PARIS).withDayOfYear(366);
     }
@@ -1317,14 +1475,14 @@
     //-----------------------------------------------------------------------
     // withHour()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withHour_normal() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withHour(15);
         assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withHour(15), ZONE_0100));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withHour_noChange() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withHour(11);
@@ -1334,14 +1492,14 @@
     //-----------------------------------------------------------------------
     // withMinute()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withMinute_normal() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withMinute(15);
         assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withMinute(15), ZONE_0100));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withMinute_noChange() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withMinute(30);
@@ -1351,14 +1509,14 @@
     //-----------------------------------------------------------------------
     // withSecond()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withSecond_normal() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withSecond(12);
         assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withSecond(12), ZONE_0100));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withSecond_noChange() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withSecond(59);
@@ -1368,14 +1526,14 @@
     //-----------------------------------------------------------------------
     // withNano()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_withNanoOfSecond_normal() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withNano(15);
         assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withNano(15), ZONE_0100));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_withNanoOfSecond_noChange() {
         ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
         ZonedDateTime test = base.withNano(500);
@@ -1385,14 +1543,14 @@
     //-----------------------------------------------------------------------
     // truncatedTo(TemporalUnit)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_truncatedTo_normal() {
         assertEquals(TEST_DATE_TIME.truncatedTo(NANOS), TEST_DATE_TIME);
         assertEquals(TEST_DATE_TIME.truncatedTo(SECONDS), TEST_DATE_TIME.withNano(0));
         assertEquals(TEST_DATE_TIME.truncatedTo(DAYS), TEST_DATE_TIME.with(LocalTime.MIDNIGHT));
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_truncatedTo_null() {
         TEST_DATE_TIME.truncatedTo(null);
     }
@@ -1444,22 +1602,22 @@
     //-----------------------------------------------------------------------
     // plus(TemporalAmount)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="plusDays")
+    @Test(dataProvider="plusDays")
     public void test_plus_TemporalAmount_Period_days(ZonedDateTime base, int amount, ZonedDateTime expected) {
         assertEquals(base.plus(Period.ofDays(amount)), expected);
     }
 
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_plus_TemporalAmount_Period_hours(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.plus(MockSimplePeriod.of(amount, HOURS)), expected);
     }
 
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_plus_TemporalAmount_Duration_hours(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.plus(Duration.ofHours(amount)), expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_TemporalAmount() {
         MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS);
         ZonedDateTime t = ZonedDateTime.of(LocalDateTime.of(2008, 6, 1, 12, 30, 59, 500), ZONE_0100);
@@ -1467,7 +1625,7 @@
         assertEquals(t.plus(period), expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_TemporalAmount_Duration() {
         Duration duration = Duration.ofSeconds(4L * 60 * 60 + 5L * 60 + 6L);
         ZonedDateTime t = ZonedDateTime.of(LocalDateTime.of(2008, 6, 1, 12, 30, 59, 500), ZONE_0100);
@@ -1475,19 +1633,19 @@
         assertEquals(t.plus(duration), expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_TemporalAmount_Period_zero() {
         ZonedDateTime t = TEST_DATE_TIME.plus(MockSimplePeriod.ZERO_DAYS);
         assertEquals(t, TEST_DATE_TIME);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plus_TemporalAmount_Duration_zero() {
         ZonedDateTime t = TEST_DATE_TIME.plus(Duration.ZERO);
         assertEquals(t, TEST_DATE_TIME);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_plus_TemporalAmount_null() {
         TEST_DATE_TIME.plus((TemporalAmount) null);
     }
@@ -1495,32 +1653,32 @@
     //-----------------------------------------------------------------------
     // plus(long,TemporalUnit)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="plusDays")
+    @Test(dataProvider="plusDays")
     public void test_plus_longUnit_days(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.plus(amount, DAYS), expected);
     }
 
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_plus_longUnit_hours(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.plus(amount, HOURS), expected);
     }
 
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_plus_longUnit_minutes(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.plus(amount * 60, MINUTES), expected);
     }
 
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_plus_longUnit_seconds(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.plus(amount * 3600, SECONDS), expected);
     }
 
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_plus_longUnit_nanos(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.plus(amount * 3600_000_000_000L, NANOS), expected);
     }
 
-    @Test(groups={"tck"}, expectedExceptions=NullPointerException.class)
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_plus_longUnit_null() {
         TEST_DATE_TIME_PARIS.plus(0, null);
     }
@@ -1528,7 +1686,7 @@
     //-----------------------------------------------------------------------
     // plusYears()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1536,7 +1694,7 @@
         assertEquals(test, ZonedDateTime.of(ldt.plusYears(1), ZONE_0100));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusYears_zero() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1547,7 +1705,7 @@
     //-----------------------------------------------------------------------
     // plusMonths()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1555,7 +1713,7 @@
         assertEquals(test, ZonedDateTime.of(ldt.plusMonths(1), ZONE_0100));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMonths_zero() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1566,7 +1724,7 @@
     //-----------------------------------------------------------------------
     // plusWeeks()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1574,7 +1732,7 @@
         assertEquals(test, ZonedDateTime.of(ldt.plusWeeks(1), ZONE_0100));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusWeeks_zero() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1585,7 +1743,7 @@
     //-----------------------------------------------------------------------
     // plusDays()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="plusDays")
+    @Test(dataProvider="plusDays")
     public void test_plusDays(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.plusDays(amount), expected);
     }
@@ -1593,7 +1751,7 @@
     //-----------------------------------------------------------------------
     // plusHours()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_plusHours(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.plusHours(amount), expected);
     }
@@ -1601,12 +1759,12 @@
     //-----------------------------------------------------------------------
     // plusMinutes()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_plusMinutes(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.plusMinutes(amount * 60), expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusMinutes_minutes() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1617,12 +1775,12 @@
     //-----------------------------------------------------------------------
     // plusSeconds()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_plusSeconds(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.plusSeconds(amount * 3600), expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusSeconds_seconds() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1633,12 +1791,12 @@
     //-----------------------------------------------------------------------
     // plusNanos()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_plusNanos(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.plusNanos(amount * 3600_000_000_000L), expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_plusNanos_nanos() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1649,22 +1807,22 @@
     //-----------------------------------------------------------------------
     // minus(TemporalAmount)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="plusDays")
+    @Test(dataProvider="plusDays")
     public void test_minus_TemporalAmount_Period_days(ZonedDateTime base, int amount, ZonedDateTime expected) {
         assertEquals(base.minus(Period.ofDays(-amount)), expected);
     }
 
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_minus_TemporalAmount_Period_hours(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.minus(MockSimplePeriod.of(-amount, HOURS)), expected);
     }
 
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_minus_TemporalAmount_Duration_hours(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.minus(Duration.ofHours(-amount)), expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_TemporalAmount() {
         MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS);
         ZonedDateTime t = ZonedDateTime.of(LocalDateTime.of(2008, 6, 1, 12, 30, 59, 500), ZONE_0100);
@@ -1672,7 +1830,7 @@
         assertEquals(t.minus(period), expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_TemporalAmount_Duration() {
         Duration duration = Duration.ofSeconds(4L * 60 * 60 + 5L * 60 + 6L);
         ZonedDateTime t = ZonedDateTime.of(LocalDateTime.of(2008, 6, 1, 12, 30, 59, 500), ZONE_0100);
@@ -1680,19 +1838,19 @@
         assertEquals(t.minus(duration), expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_TemporalAmount_Period_zero() {
         ZonedDateTime t = TEST_DATE_TIME.minus(MockSimplePeriod.ZERO_DAYS);
         assertEquals(t, TEST_DATE_TIME);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minus_TemporalAmount_Duration_zero() {
         ZonedDateTime t = TEST_DATE_TIME.minus(Duration.ZERO);
         assertEquals(t, TEST_DATE_TIME);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_minus_TemporalAmount_null() {
         TEST_DATE_TIME.minus((TemporalAmount) null);
     }
@@ -1700,7 +1858,7 @@
     //-----------------------------------------------------------------------
     // minusYears()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1708,7 +1866,7 @@
         assertEquals(test, ZonedDateTime.of(ldt.minusYears(1), ZONE_0100));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusYears_zero() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1719,7 +1877,7 @@
     //-----------------------------------------------------------------------
     // minusMonths()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1727,7 +1885,7 @@
         assertEquals(test, ZonedDateTime.of(ldt.minusMonths(1), ZONE_0100));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMonths_zero() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1738,7 +1896,7 @@
     //-----------------------------------------------------------------------
     // minusWeeks()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1746,7 +1904,7 @@
         assertEquals(test, ZonedDateTime.of(ldt.minusWeeks(1), ZONE_0100));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusWeeks_zero() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1757,7 +1915,7 @@
     //-----------------------------------------------------------------------
     // minusDays()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="plusDays")
+    @Test(dataProvider="plusDays")
     public void test_minusDays(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.minusDays(-amount), expected);
     }
@@ -1765,7 +1923,7 @@
     //-----------------------------------------------------------------------
     // minusHours()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_minusHours(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.minusHours(-amount), expected);
     }
@@ -1773,12 +1931,12 @@
     //-----------------------------------------------------------------------
     // minusMinutes()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_minusMinutes(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.minusMinutes(-amount * 60), expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusMinutes_minutes() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1789,12 +1947,12 @@
     //-----------------------------------------------------------------------
     // minusSeconds()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_minusSeconds(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.minusSeconds(-amount * 3600), expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusSeconds_seconds() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1805,12 +1963,12 @@
     //-----------------------------------------------------------------------
     // minusNanos()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_minusNanos(ZonedDateTime base, long amount, ZonedDateTime expected) {
         assertEquals(base.minusNanos(-amount * 3600_000_000_000L), expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_minusNanos_nanos() {
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0);
         ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100);
@@ -1824,32 +1982,35 @@
     // TODO: more tests for period between two different zones
     // compare results to OffsetDateTime.periodUntil, especially wrt dates
 
-    @Test(groups={"tck"}, dataProvider="plusDays")
+    @Test(dataProvider="plusDays")
     public void test_periodUntil_days(ZonedDateTime base, long expected, ZonedDateTime end) {
+        if (base.toLocalTime().equals(end.toLocalTime()) == false) {
+            return;  // avoid DST gap input values
+        }
         assertEquals(base.periodUntil(end, DAYS), expected);
     }
 
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_periodUntil_hours(ZonedDateTime base, long expected, ZonedDateTime end) {
         assertEquals(base.periodUntil(end, HOURS), expected);
     }
 
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_periodUntil_minutes(ZonedDateTime base, long expected, ZonedDateTime end) {
         assertEquals(base.periodUntil(end, MINUTES), expected * 60);
     }
 
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_periodUntil_seconds(ZonedDateTime base, long expected, ZonedDateTime end) {
         assertEquals(base.periodUntil(end, SECONDS), expected * 3600);
     }
 
-    @Test(groups={"tck"}, dataProvider="plusTime")
+    @Test(dataProvider="plusTime")
     public void test_periodUntil_nanos(ZonedDateTime base, long expected, ZonedDateTime end) {
         assertEquals(base.periodUntil(end, NANOS), expected * 3600_000_000_000L);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_periodUntil_parisLondon() {
         ZonedDateTime midnightLondon = LocalDate.of(2012, 6, 28).atStartOfDay(ZONE_LONDON);
         ZonedDateTime midnightParis1 = LocalDate.of(2012, 6, 29).atStartOfDay(ZONE_PARIS);
@@ -1865,7 +2026,7 @@
         assertEquals(midnightLondon.periodUntil(midnightParis2, DAYS), 1);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_periodUntil_gap() {
         ZonedDateTime before = TEST_PARIS_GAP_2008_03_30_02_30.withHour(0).withMinute(0).atZone(ZONE_PARIS);
         ZonedDateTime after = TEST_PARIS_GAP_2008_03_30_02_30.withHour(0).withMinute(0).plusDays(1).atZone(ZONE_PARIS);
@@ -1874,7 +2035,7 @@
         assertEquals(before.periodUntil(after, DAYS), 1);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_periodUntil_overlap() {
         ZonedDateTime before = TEST_PARIS_OVERLAP_2008_10_26_02_30.withHour(0).withMinute(0).atZone(ZONE_PARIS);
         ZonedDateTime after = TEST_PARIS_OVERLAP_2008_10_26_02_30.withHour(0).withMinute(0).plusDays(1).atZone(ZONE_PARIS);
@@ -1883,25 +2044,40 @@
         assertEquals(before.periodUntil(after, DAYS), 1);
     }
 
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_periodUntil_differentType() {
         TEST_DATE_TIME_PARIS.periodUntil(TEST_LOCAL_2008_06_30_11_30_59_500, DAYS);
     }
 
-    @Test(groups={"tck"}, expectedExceptions=NullPointerException.class)
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_periodUntil_nullTemporal() {
         TEST_DATE_TIME_PARIS.periodUntil(null, DAYS);
     }
 
-    @Test(groups={"tck"}, expectedExceptions=NullPointerException.class)
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_periodUntil_nullUnit() {
         TEST_DATE_TIME_PARIS.periodUntil(TEST_DATE_TIME_PARIS, null);
     }
 
     //-----------------------------------------------------------------------
+    // format(DateTimeFormatter)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_format_formatter() {
+        DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s");
+        String t = ZonedDateTime.of(dateTime(2010, 12, 3, 11, 30), ZONE_PARIS).format(f);
+        assertEquals(t, "2010 12 3 11 30 0");
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_format_formatter_null() {
+        ZonedDateTime.of(dateTime(2010, 12, 3, 11, 30), ZONE_PARIS).format(null);
+    }
+
+    //-----------------------------------------------------------------------
     // toOffsetDateTime()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toOffsetDateTime() {
         assertEquals(TEST_DATE_TIME.toOffsetDateTime(), OffsetDateTime.of(TEST_DATE_TIME.toLocalDateTime(), TEST_DATE_TIME.getOffset()));
     }
@@ -1923,7 +2099,7 @@
         };
     }
 
-    @Test(groups={"tck"}, dataProvider="toInstant")
+    @Test(dataProvider="toInstant")
     public void test_toInstant_UTC(LocalDateTime ldt, long expectedEpSec, int expectedNos) {
         ZonedDateTime dt = ldt.atZone(ZoneOffset.UTC);
         Instant test = dt.toInstant();
@@ -1931,7 +2107,7 @@
         assertEquals(test.getNano(), expectedNos);
     }
 
-    @Test(groups={"tck"}, dataProvider="toInstant")
+    @Test(dataProvider="toInstant")
     public void test_toInstant_P0100(LocalDateTime ldt, long expectedEpSec, int expectedNos) {
         ZonedDateTime dt = ldt.atZone(ZONE_0100);
         Instant test = dt.toInstant();
@@ -1939,7 +2115,7 @@
         assertEquals(test.getNano(), expectedNos);
     }
 
-    @Test(groups={"tck"}, dataProvider="toInstant")
+    @Test(dataProvider="toInstant")
     public void test_toInstant_M0100(LocalDateTime ldt, long expectedEpSec, int expectedNos) {
         ZonedDateTime dt = ldt.atZone(ZONE_M0100);
         Instant test = dt.toInstant();
@@ -1950,7 +2126,7 @@
     //-----------------------------------------------------------------------
     // toEpochSecond()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toEpochSecond_afterEpoch() {
         LocalDateTime ldt = LocalDateTime.of(1970, 1, 1, 0, 0).plusHours(1);
         for (int i = 0; i < 100000; i++) {
@@ -1960,7 +2136,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_toEpochSecond_beforeEpoch() {
         LocalDateTime ldt = LocalDateTime.of(1970, 1, 1, 0, 0).plusHours(1);
         for (int i = 0; i < 100000; i++) {
@@ -1970,19 +2146,19 @@
         }
     }
 
-    @Test(groups={"tck"}, dataProvider="toInstant")
+    @Test(dataProvider="toInstant")
     public void test_toEpochSecond_UTC(LocalDateTime ldt, long expectedEpSec, int expectedNos) {
         ZonedDateTime dt = ldt.atZone(ZoneOffset.UTC);
         assertEquals(dt.toEpochSecond(), expectedEpSec);
     }
 
-    @Test(groups={"tck"}, dataProvider="toInstant")
+    @Test(dataProvider="toInstant")
     public void test_toEpochSecond_P0100(LocalDateTime ldt, long expectedEpSec, int expectedNos) {
         ZonedDateTime dt = ldt.atZone(ZONE_0100);
         assertEquals(dt.toEpochSecond(), expectedEpSec - 3600);
     }
 
-    @Test(groups={"tck"}, dataProvider="toInstant")
+    @Test(dataProvider="toInstant")
     public void test_toEpochSecond_M0100(LocalDateTime ldt, long expectedEpSec, int expectedNos) {
         ZonedDateTime dt = ldt.atZone(ZONE_M0100);
         assertEquals(dt.toEpochSecond(), expectedEpSec + 3600);
@@ -1991,7 +2167,7 @@
     //-----------------------------------------------------------------------
     // compareTo()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_time1() {
         ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 11, 30, 39, 0, ZONE_0100);
         ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, 11, 30, 41, 0, ZONE_0100);  // a is before b due to time
@@ -2001,7 +2177,7 @@
         assertEquals(b.compareTo(b) == 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_time2() {
         ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 11, 30, 40, 4, ZONE_0100);
         ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, 11, 30, 40, 5, ZONE_0100);  // a is before b due to time
@@ -2011,7 +2187,7 @@
         assertEquals(b.compareTo(b) == 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_offset1() {
         ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 11, 30, 41, 0, ZONE_0200);
         ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, 11, 30, 39, 0, ZONE_0100);  // a is before b due to offset
@@ -2021,7 +2197,7 @@
         assertEquals(b.compareTo(b) == 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_offset2() {
         ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 11, 30, 40, 5, ZoneId.of("UTC+01:01"));
         ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, 11, 30, 40, 4, ZONE_0100);  // a is before b due to offset
@@ -2031,7 +2207,7 @@
         assertEquals(b.compareTo(b) == 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_both() {
         ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 11, 50, 0, 0, ZONE_0200);
         ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, 11, 20, 0, 0, ZONE_0100);  // a is before b on instant scale
@@ -2041,7 +2217,7 @@
         assertEquals(b.compareTo(b) == 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_bothNanos() {
         ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 11, 20, 40, 5, ZONE_0200);
         ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, 10, 20, 40, 6, ZONE_0100);  // a is before b on instant scale
@@ -2051,7 +2227,7 @@
         assertEquals(b.compareTo(b) == 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_hourDifference() {
         ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 10, 0, 0, 0, ZONE_0100);
         ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, 11, 0, 0, 0, ZONE_0200);  // a is before b despite being same time-line time
@@ -2061,7 +2237,7 @@
         assertEquals(b.compareTo(b) == 0, true);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_compareTo_null() {
         ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 23, 30, 59, 0, ZONE_0100);
         a.compareTo(null);
@@ -2079,7 +2255,7 @@
         };
     }
 
-    @Test(dataProvider="IsBefore", groups={"tck"})
+    @Test(dataProvider="IsBefore")
     public void test_isBefore(int hour1, int minute1, ZoneId zone1, int hour2, int minute2, ZoneId zone2, boolean expected) {
         ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, hour1, minute1, 0, 0, zone1);
         ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, hour2, minute2, 0, 0, zone2);
@@ -2089,7 +2265,7 @@
         assertEquals(b.isBefore(b), false);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isBefore_null() {
         ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 23, 30, 59, 0, ZONE_0100);
         a.isBefore(null);
@@ -2107,7 +2283,7 @@
         };
     }
 
-    @Test(dataProvider="IsAfter", groups={"tck"})
+    @Test(dataProvider="IsAfter")
     public void test_isAfter(int hour1, int minute1, ZoneId zone1, int hour2, int minute2, ZoneId zone2, boolean expected) {
         ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, hour1, minute1, 0, 0, zone1);
         ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, hour2, minute2, 0, 0, zone2);
@@ -2117,7 +2293,7 @@
         assertEquals(b.isAfter(b), false);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_isAfter_null() {
         ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 23, 30, 59, 0, ZONE_0100);
         a.isAfter(null);
@@ -2126,60 +2302,60 @@
     //-----------------------------------------------------------------------
     // equals() / hashCode()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_true(int y, int o, int d, int h, int m, int s, int n, ZoneId ignored) {
         ZonedDateTime a = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100);
         ZonedDateTime b = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100);
         assertEquals(a.equals(b), true);
         assertEquals(a.hashCode() == b.hashCode(), true);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_year_differs(int y, int o, int d, int h, int m, int s, int n, ZoneId ignored) {
         ZonedDateTime a = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100);
         ZonedDateTime b = ZonedDateTime.of(dateTime(y + 1, o, d, h, m, s, n), ZONE_0100);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_hour_differs(int y, int o, int d, int h, int m, int s, int n, ZoneId ignored) {
         h = (h == 23 ? 22 : h);
         ZonedDateTime a = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100);
         ZonedDateTime b = ZonedDateTime.of(dateTime(y, o, d, h + 1, m, s, n), ZONE_0100);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_minute_differs(int y, int o, int d, int h, int m, int s, int n, ZoneId ignored) {
         m = (m == 59 ? 58 : m);
         ZonedDateTime a = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100);
         ZonedDateTime b = ZonedDateTime.of(dateTime(y, o, d, h, m + 1, s, n), ZONE_0100);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_second_differs(int y, int o, int d, int h, int m, int s, int n, ZoneId ignored) {
         s = (s == 59 ? 58 : s);
         ZonedDateTime a = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100);
         ZonedDateTime b = ZonedDateTime.of(dateTime(y, o, d, h, m, s + 1, n), ZONE_0100);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_nano_differs(int y, int o, int d, int h, int m, int s, int n, ZoneId ignored) {
         n = (n == 999999999 ? 999999998 : n);
         ZonedDateTime a = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100);
         ZonedDateTime b = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n + 1), ZONE_0100);
         assertEquals(a.equals(b), false);
     }
-    @Test(dataProvider="sampleTimes", groups={"tck"})
+    @Test(dataProvider="sampleTimes")
     public void test_equals_false_offset_differs(int y, int o, int d, int h, int m, int s, int n, ZoneId ignored) {
         ZonedDateTime a = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100);
         ZonedDateTime b = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0200);
         assertEquals(a.equals(b), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_itself_true() {
         assertEquals(TEST_DATE_TIME.equals(TEST_DATE_TIME), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_string_false() {
         assertEquals(TEST_DATE_TIME.equals("2007-07-15"), false);
     }
@@ -2204,28 +2380,13 @@
         };
     }
 
-    @Test(dataProvider="sampleToString", groups={"tck"})
+    @Test(dataProvider="sampleToString")
     public void test_toString(int y, int o, int d, int h, int m, int s, int n, String zoneId, String expected) {
         ZonedDateTime t = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZoneId.of(zoneId));
         String str = t.toString();
         assertEquals(str, expected);
     }
 
-    //-----------------------------------------------------------------------
-    // toString(DateTimeFormatter)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_toString_formatter() {
-        DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s");
-        String t = ZonedDateTime.of(dateTime(2010, 12, 3, 11, 30), ZONE_PARIS).toString(f);
-        assertEquals(t, "2010 12 3 11 30 0");
-    }
-
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
-    public void test_toString_formatter_null() {
-        ZonedDateTime.of(dateTime(2010, 12, 3, 11, 30), ZONE_PARIS).toString(null);
-    }
-
     //-------------------------------------------------------------------------
     private static LocalDateTime dateTime(
             int year, int month, int dayOfMonth,
--- a/test/java/time/tck/java/time/TestChronology.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,192 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * Copyright (c) 2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package tck.java.time;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertSame;
-import static org.testng.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.Locale;
-import java.util.Set;
-
-import java.time.chrono.Chronology;
-import java.time.temporal.ChronoField;
-import java.time.chrono.HijrahChronology;
-import java.time.chrono.JapaneseChronology;
-import java.time.chrono.MinguoChronology;
-import java.time.chrono.ThaiBuddhistChronology;
-import java.time.chrono.ChronoLocalDate;
-import java.time.chrono.IsoChronology;
-
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Test Chronology class.
- */
-@Test
-public class TestChronology {
-
-    //-----------------------------------------------------------------------
-    // regular data factory for names and descriptions of available calendars
-    //-----------------------------------------------------------------------
-    @DataProvider(name = "calendars")
-    Object[][] data_of_calendars() {
-        return new Object[][] {
-                    {"Hijrah", "islamicc", "Hijrah calendar"},
-                    {"ISO", "iso8601", "ISO calendar"},
-                    {"Japanese", "japanese", "Japanese calendar"},
-                    {"Minguo", "roc", "Minguo Calendar"},
-                    {"ThaiBuddhist", "buddhist", "ThaiBuddhist calendar"},
-                };
-    }
-
-    @Test(dataProvider = "calendars")
-    public void test_getters(String chronoId, String calendarSystemType, String description) {
-        Chronology chrono = Chronology.of(chronoId);
-        assertNotNull(chrono, "Required calendar not found by ID: " + chronoId);
-        assertEquals(chrono.getId(), chronoId);
-        assertEquals(chrono.getCalendarType(), calendarSystemType);
-    }
-
-    @Test(dataProvider = "calendars")
-    public void test_required_calendars(String chronoId, String calendarSystemType, String description) {
-        Chronology chrono = Chronology.of(chronoId);
-        assertNotNull(chrono, "Required calendar not found by ID: " + chronoId);
-        chrono = Chronology.of(calendarSystemType);
-        assertNotNull(chrono, "Required calendar not found by type: " + chronoId);
-        Set<Chronology> cals = Chronology.getAvailableChronologies();
-        assertTrue(cals.contains(chrono), "Required calendar not found in set of available calendars");
-    }
-
-    @Test(groups="tck")
-    public void test_calendar_list() {
-        Set<Chronology> chronos = Chronology.getAvailableChronologies();
-        assertNotNull(chronos, "Required list of calendars must be non-null");
-        for (Chronology chrono : chronos) {
-            Chronology lookup = Chronology.of(chrono.getId());
-            assertNotNull(lookup, "Required calendar not found: " + chrono);
-        }
-        assertEquals(chronos.size() >= data_of_calendars().length, true, "Chronology.getAvailableChronologies().size = " + chronos.size()
-                + ", expected >= " + data_of_calendars().length);
-    }
-
-    /**
-     * Compute the number of days from the Epoch and compute the date from the number of days.
-     */
-    @Test(dataProvider = "calendars", groups="tck")
-    public void test_epoch(String name, String alias, String description) {
-        Chronology chrono = Chronology.of(name); // a chronology. In practice this is rarely hardcoded
-        ChronoLocalDate<?> date1 = chrono.dateNow();
-        long epoch1 = date1.getLong(ChronoField.EPOCH_DAY);
-        ChronoLocalDate<?> date2 = date1.with(ChronoField.EPOCH_DAY, epoch1);
-        assertEquals(date1, date2, "Date from epoch day is not same date: " + date1 + " != " + date2);
-        long epoch2 = date1.getLong(ChronoField.EPOCH_DAY);
-        assertEquals(epoch1, epoch2, "Epoch day not the same: " + epoch1 + " != " + epoch2);
-    }
-
-    //-----------------------------------------------------------------------
-    // locale based lookup
-    //-----------------------------------------------------------------------
-    @DataProvider(name = "calendarsystemtype")
-    Object[][] data_CalendarType() {
-        return new Object[][] {
-            {HijrahChronology.INSTANCE, "islamicc"},
-            {IsoChronology.INSTANCE, "iso8601"},
-            {JapaneseChronology.INSTANCE, "japanese"},
-            {MinguoChronology.INSTANCE, "roc"},
-            {ThaiBuddhistChronology.INSTANCE, "buddhist"},
-        };
-    }
-
-    @Test(dataProvider = "calendarsystemtype", groups="tck")
-    public void test_getCalendarType(Chronology chrono, String calendarType) {
-        assertEquals(chrono.getCalendarType(), calendarType);
-    }
-
-    @Test(dataProvider = "calendarsystemtype", groups="tck")
-    public void test_lookupLocale(Chronology chrono, String calendarType) {
-        Locale locale = new Locale.Builder().setLanguage("en").setRegion("CA").setUnicodeLocaleKeyword("ca", calendarType).build();
-        assertEquals(Chronology.ofLocale(locale), chrono);
-    }
-
-
-    //-----------------------------------------------------------------------
-    // serialization; serialize and check each calendar system
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck","implementation"}, dataProvider = "calendarsystemtype")
-    public void test_chronoSerializationSingleton(Chronology chrono, String calendarType) throws Exception {
-        Chronology orginal = chrono;
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(orginal);
-        out.close();
-        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        ObjectInputStream in = new ObjectInputStream(bais);
-        Chronology ser = (Chronology) in.readObject();
-        assertSame(ser, chrono, "Deserialized Chronology is not the singleton serialized");
-    }
-
-}
--- a/test/java/time/tck/java/time/TestIsoChronology.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/TestIsoChronology.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,8 +59,8 @@
  */
 package tck.java.time;
 
-import static java.time.chrono.IsoChronology.ERA_BCE;
-import static java.time.chrono.IsoChronology.ERA_CE;
+import static java.time.chrono.IsoEra.BCE;
+import static java.time.chrono.IsoEra.CE;
 import static java.time.temporal.ChronoField.ERA;
 import static java.time.temporal.ChronoField.YEAR;
 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
@@ -73,13 +73,14 @@
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.Month;
-import java.time.temporal.Adjusters;
-import java.time.temporal.ChronoField;
+import java.time.chrono.Chronology;
+import java.time.chrono.Era;
 import java.time.chrono.HijrahChronology;
-import java.time.chrono.Chronology;
-import java.time.chrono.ChronoLocalDate;
-import java.time.chrono.Era;
+import java.time.chrono.HijrahEra;
 import java.time.chrono.IsoChronology;
+import java.time.chrono.IsoEra;
+import java.time.temporal.ChronoField;
+import java.time.temporal.TemporalAdjuster;
 
 import org.testng.Assert;
 import org.testng.annotations.DataProvider;
@@ -94,7 +95,7 @@
     //-----------------------------------------------------------------------
     // Chronology.ofName("ISO")  Lookup by name
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_chrono_byName() {
         Chronology c = IsoChronology.INSTANCE;
         Chronology test = Chronology.of("ISO");
@@ -107,7 +108,7 @@
     //-----------------------------------------------------------------------
     // Lookup by Singleton
     //-----------------------------------------------------------------------
-    @Test(groups="tck")
+    @Test
     public void instanceNotNull() {
         assertNotNull(IsoChronology.INSTANCE);
     }
@@ -115,10 +116,10 @@
     //-----------------------------------------------------------------------
     // Era creation
     //-----------------------------------------------------------------------
-    @Test(groups="tck")
+    @Test
     public void test_eraOf() {
-        assertEquals(IsoChronology.INSTANCE.eraOf(0), ERA_BCE);
-        assertEquals(IsoChronology.INSTANCE.eraOf(1), ERA_CE);
+        assertEquals(IsoChronology.INSTANCE.eraOf(0), BCE);
+        assertEquals(IsoChronology.INSTANCE.eraOf(1), CE);
     }
 
     //-----------------------------------------------------------------------
@@ -144,12 +145,12 @@
         };
     }
 
-    @Test(dataProvider="samples", groups={"tck"})
+    @Test(dataProvider="samples")
     public void test_toLocalDate(LocalDate isoDate, LocalDate iso) {
         assertEquals(LocalDate.from(isoDate), iso);
     }
 
-    @Test(dataProvider="samples", groups={"tck"})
+    @Test(dataProvider="samples")
     public void test_fromCalendrical(LocalDate isoDate, LocalDate iso) {
         assertEquals(IsoChronology.INSTANCE.date(iso), isoDate);
     }
@@ -174,18 +175,18 @@
         };
     }
 
-    @Test(dataProvider="badDates", groups={"tck"}, expectedExceptions=DateTimeException.class)
+    @Test(dataProvider="badDates", expectedExceptions=DateTimeException.class)
     public void test_badDates(int year, int month, int dom) {
         IsoChronology.INSTANCE.date(year, month, dom);
     }
 
-    @Test(groups="tck")
+    @Test
     public void test_date_withEra() {
         int year = 5;
         int month = 5;
         int dayOfMonth = 5;
-        LocalDate test = IsoChronology.INSTANCE.date(ERA_BCE, year, month, dayOfMonth);
-        assertEquals(test.getEra(), ERA_BCE);
+        LocalDate test = IsoChronology.INSTANCE.date(IsoEra.BCE, year, month, dayOfMonth);
+        assertEquals(test.getEra(), IsoEra.BCE);
         assertEquals(test.get(ChronoField.YEAR_OF_ERA), year);
         assertEquals(test.get(ChronoField.MONTH_OF_YEAR), month);
         assertEquals(test.get(ChronoField.DAY_OF_MONTH), dayOfMonth);
@@ -196,39 +197,39 @@
     }
 
     @SuppressWarnings({ "unchecked", "rawtypes" })
-    @Test(expectedExceptions=DateTimeException.class, groups="tck")
+    @Test(expectedExceptions=ClassCastException.class)
     public void test_date_withEra_withWrongEra() {
-        IsoChronology.INSTANCE.date((Era) HijrahChronology.ERA_AH, 1, 1, 1);
+        IsoChronology.INSTANCE.date((Era) HijrahEra.AH, 1, 1, 1);
     }
 
     //-----------------------------------------------------------------------
     // with(DateTimeAdjuster)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_adjust1() {
         LocalDate base = IsoChronology.INSTANCE.date(1728, 10, 28);
-        LocalDate test = base.with(Adjusters.lastDayOfMonth());
+        LocalDate test = base.with(TemporalAdjuster.lastDayOfMonth());
         assertEquals(test, IsoChronology.INSTANCE.date(1728, 10, 31));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_adjust2() {
         LocalDate base = IsoChronology.INSTANCE.date(1728, 12, 2);
-        LocalDate test = base.with(Adjusters.lastDayOfMonth());
+        LocalDate test = base.with(TemporalAdjuster.lastDayOfMonth());
         assertEquals(test, IsoChronology.INSTANCE.date(1728, 12, 31));
     }
 
     //-----------------------------------------------------------------------
     // ISODate.with(Local*)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_adjust_toLocalDate() {
         LocalDate isoDate = IsoChronology.INSTANCE.date(1726, 1, 4);
         LocalDate test = isoDate.with(LocalDate.of(2012, 7, 6));
         assertEquals(test, IsoChronology.INSTANCE.date(2012, 7, 6));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_adjust_toMonth() {
         LocalDate isoDate = IsoChronology.INSTANCE.date(1726, 1, 4);
         assertEquals(IsoChronology.INSTANCE.date(1726, 4, 4), isoDate.with(Month.APRIL));
@@ -237,14 +238,14 @@
     //-----------------------------------------------------------------------
     // LocalDate.with(ISODate)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_LocalDate_adjustToISODate() {
         LocalDate isoDate = IsoChronology.INSTANCE.date(1728, 10, 29);
         LocalDate test = LocalDate.MIN.with(isoDate);
         assertEquals(test, LocalDate.of(1728, 10, 29));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_LocalDateTime_adjustToISODate() {
         LocalDate isoDate = IsoChronology.INSTANCE.date(1728, 10, 29);
         LocalDateTime test = LocalDateTime.MIN.with(isoDate);
@@ -266,7 +267,7 @@
         };
     }
 
-    @Test(dataProvider="leapYears", groups="tck")
+    @Test(dataProvider="leapYears")
     public void test_isLeapYear(int year, boolean isLeapYear) {
         assertEquals(IsoChronology.INSTANCE.isLeapYear(year), isLeapYear);
     }
@@ -274,7 +275,7 @@
     //-----------------------------------------------------------------------
     // toString()
     //-----------------------------------------------------------------------
-    @Test(groups="tck")
+    @Test
     public void test_now() {
         assertEquals(LocalDate.from(IsoChronology.INSTANCE.dateNow()), LocalDate.now());
     }
@@ -293,7 +294,7 @@
         };
     }
 
-    @Test(dataProvider="toString", groups={"tck"})
+    @Test(dataProvider="toString")
     public void test_toString(LocalDate isoDate, String expected) {
         assertEquals(isoDate.toString(), expected);
     }
@@ -301,12 +302,12 @@
     //-----------------------------------------------------------------------
     // equals()
     //-----------------------------------------------------------------------
-    @Test(groups="tck")
+    @Test
     public void test_equals_true() {
         assertTrue(IsoChronology.INSTANCE.equals(IsoChronology.INSTANCE));
     }
 
-    @Test(groups="tck")
+    @Test
     public void test_equals_false() {
         assertFalse(IsoChronology.INSTANCE.equals(HijrahChronology.INSTANCE));
     }
--- a/test/java/time/tck/java/time/chrono/CopticChronology.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/chrono/CopticChronology.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,18 +59,17 @@
 import static java.time.temporal.ChronoField.EPOCH_DAY;
 
 import java.io.Serializable;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Locale;
 
-import java.time.DateTimeException;
 import java.time.temporal.ChronoField;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.ValueRange;
 import java.time.chrono.Chronology;
-import java.time.chrono.ChronoLocalDate;
 import java.time.chrono.Era;
 
+import java.util.Arrays;
+import java.util.List;
+import java.util.Locale;
+
 /**
  * The Coptic calendar system.
  * <p>
@@ -102,16 +101,6 @@
      * Singleton instance of the Coptic chronology.
      */
     public static final CopticChronology INSTANCE = new CopticChronology();
-    /**
-     * The singleton instance for the era BEFORE_AM.
-     * This has the numeric value of {@code 0}.
-     */
-    public static final Era ERA_BEFORE_AM = CopticEra.BEFORE_AM;
-    /**
-     * The singleton instance for the era AM - 'Era of the Martyrs'.
-     * This has the numeric value of {@code 1}.
-     */
-    public static final Era ERA_AM = CopticEra.AM;
 
     /**
      * Serialization version.
@@ -193,6 +182,11 @@
     }
 
     @Override
+    public CopticDate dateEpochDay(long epochDay) {
+        return CopticDate.ofEpochDay(epochDay);
+    }
+
+    @Override
     public CopticDate date(TemporalAccessor dateTime) {
         if (dateTime instanceof CopticDate) {
             return (CopticDate) dateTime;
@@ -219,7 +213,7 @@
     @Override
     public int prolepticYear(Era era, int yearOfEra) {
         if (era instanceof CopticEra == false) {
-            throw new DateTimeException("Era must be CopticEra");
+            throw new ClassCastException("Era must be CopticEra");
         }
         return (era == CopticEra.AM ? yearOfEra : 1 - yearOfEra);
     }
@@ -241,7 +235,7 @@
             case DAY_OF_MONTH: return ValueRange.of(1, 5, 30);
             case ALIGNED_WEEK_OF_MONTH: return ValueRange.of(1, 1, 5);
             case MONTH_OF_YEAR: return ValueRange.of(1, 13);
-            case EPOCH_MONTH: return ValueRange.of(-1000, 1000);  // TODO
+            case PROLEPTIC_MONTH: return ValueRange.of(-1000, 1000);  // TODO
             case YEAR_OF_ERA: return ValueRange.of(1, 999, 1000);  // TODO
             case YEAR: return ValueRange.of(-1000, 1000);  // TODO
         }
--- a/test/java/time/tck/java/time/chrono/CopticDate.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/chrono/CopticDate.java	Wed Apr 17 21:48:04 2013 -0700
@@ -68,6 +68,7 @@
 import java.time.DateTimeException;
 import java.time.LocalDate;
 import java.time.Period;
+import java.time.Year;
 import java.time.chrono.ChronoLocalDate;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
@@ -75,7 +76,7 @@
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.ValueRange;
-import java.time.Year;
+import java.time.temporal.UnsupportedTemporalTypeException;
 
 /**
  * A date in the Coptic calendar system.
@@ -201,7 +202,7 @@
                 }
                 return getChronology().range(f);
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.rangeRefinedBy(this);
     }
@@ -223,7 +224,7 @@
                 case YEAR: return prolepticYear;
                 case ERA: return (prolepticYear >= 1 ? 1 : 0);
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.getFrom(this);
     }
@@ -248,7 +249,7 @@
                 case YEAR: return resolvePreviousValid(nvalue, month, day);
                 case ERA: return resolvePreviousValid(1 - prolepticYear, month, day);
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.adjustInto(this, newValue);
     }
@@ -267,7 +268,7 @@
                 case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100));
                 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000));
             }
-            throw new DateTimeException(unit.getName() + " not valid for CopticDate");
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName());
         }
         return unit.addTo(this, amountToAdd);
     }
--- a/test/java/time/tck/java/time/chrono/CopticEra.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/chrono/CopticEra.java	Wed Apr 17 21:48:04 2013 -0700
@@ -71,7 +71,7 @@
  * <h4>Implementation notes</h4>
  * This is an immutable and thread-safe enum.
  */
-enum CopticEra implements Era {
+public enum CopticEra implements Era {
 
     /**
      * The singleton instance for the era BEFORE_AM, 'Before Era of the Martyrs'.
@@ -118,21 +118,4 @@
         return ordinal();
     }
 
-    @Override
-    public CopticChronology getChronology() {
-        return CopticChronology.INSTANCE;
-    }
-
-    // JDK8 default methods:
-    //-----------------------------------------------------------------------
-    @Override
-    public CopticDate date(int year, int month, int day) {
-        return (CopticDate)(getChronology().date(this, year, month, day));
-    }
-
-    @Override
-    public CopticDate dateYearDay(int year, int dayOfYear) {
-        return (CopticDate)(getChronology().dateYearDay(this, year, dayOfYear));
-    }
-
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKChronoLocalDate.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,482 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.time.DateTimeException;
+import java.time.Duration;
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.time.ZoneOffset;
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.Chronology;
+import java.time.chrono.HijrahChronology;
+import java.time.chrono.IsoChronology;
+import java.time.chrono.JapaneseChronology;
+import java.time.chrono.MinguoChronology;
+import java.time.chrono.ThaiBuddhistChronology;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.Temporal;
+import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalAdjuster;
+import java.time.temporal.TemporalAmount;
+import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalUnit;
+import java.time.temporal.ValueRange;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.testng.Assert;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test assertions that must be true for all built-in chronologies.
+ */
+@Test
+public class TCKChronoLocalDate {
+
+    //-----------------------------------------------------------------------
+    // regular data factory for names and descriptions of available calendars
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "calendars")
+    Chronology[][] data_of_calendars() {
+        return new Chronology[][]{
+                    {HijrahChronology.INSTANCE},
+                    {IsoChronology.INSTANCE},
+                    {JapaneseChronology.INSTANCE},
+                    {MinguoChronology.INSTANCE},
+                    {ThaiBuddhistChronology.INSTANCE}};
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badWithAdjusterChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoLocalDate<?> date = chrono.date(refDate);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoLocalDate<?> date2 = chrono2.date(refDate);
+            TemporalAdjuster adjuster = new FixedAdjuster(date2);
+            if (chrono != chrono2) {
+                try {
+                    date.with(adjuster);
+                    Assert.fail("WithAdjuster should have thrown a ClassCastException");
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoLocalDate<?> result = date.with(adjuster);
+                assertEquals(result, date2, "WithAdjuster failed to replace date");
+            }
+        }
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badPlusAdjusterChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoLocalDate<?> date = chrono.date(refDate);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoLocalDate<?> date2 = chrono2.date(refDate);
+            TemporalAmount adjuster = new FixedAdjuster(date2);
+            if (chrono != chrono2) {
+                try {
+                    date.plus(adjuster);
+                    Assert.fail("WithAdjuster should have thrown a ClassCastException");
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoLocalDate<?> result = date.plus(adjuster);
+                assertEquals(result, date2, "WithAdjuster failed to replace date");
+            }
+        }
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badMinusAdjusterChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoLocalDate<?> date = chrono.date(refDate);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoLocalDate<?> date2 = chrono2.date(refDate);
+            TemporalAmount adjuster = new FixedAdjuster(date2);
+            if (chrono != chrono2) {
+                try {
+                    date.minus(adjuster);
+                    Assert.fail("WithAdjuster should have thrown a ClassCastException");
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoLocalDate<?> result = date.minus(adjuster);
+                assertEquals(result, date2, "WithAdjuster failed to replace date");
+            }
+        }
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badPlusTemporalUnitChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoLocalDate<?> date = chrono.date(refDate);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoLocalDate<?> date2 = chrono2.date(refDate);
+            TemporalUnit adjuster = new FixedTemporalUnit(date2);
+            if (chrono != chrono2) {
+                try {
+                    date.plus(1, adjuster);
+                    Assert.fail("TemporalUnit.doAdd plus should have thrown a ClassCastException" + date.getClass()
+                            + ", can not be cast to " + date2.getClass());
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoLocalDate<?> result = date.plus(1, adjuster);
+                assertEquals(result, date2, "WithAdjuster failed to replace date");
+            }
+        }
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badMinusTemporalUnitChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoLocalDate<?> date = chrono.date(refDate);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoLocalDate<?> date2 = chrono2.date(refDate);
+            TemporalUnit adjuster = new FixedTemporalUnit(date2);
+            if (chrono != chrono2) {
+                try {
+                    date.minus(1, adjuster);
+                    Assert.fail("TemporalUnit.doAdd minus should have thrown a ClassCastException" + date.getClass()
+                            + ", can not be cast to " + date2.getClass());
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoLocalDate<?> result = date.minus(1, adjuster);
+                assertEquals(result, date2, "WithAdjuster failed to replace date");
+            }
+        }
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badTemporalFieldChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoLocalDate<?> date = chrono.date(refDate);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoLocalDate<?> date2 = chrono2.date(refDate);
+            TemporalField adjuster = new FixedTemporalField(date2);
+            if (chrono != chrono2) {
+                try {
+                    date.with(adjuster, 1);
+                    Assert.fail("TemporalField doSet should have thrown a ClassCastException" + date.getClass()
+                            + ", can not be cast to " + date2.getClass());
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoLocalDate<?> result = date.with(adjuster, 1);
+                assertEquals(result, date2, "TemporalField doSet failed to replace date");
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // isBefore, isAfter, isEqual, DATE_COMPARATOR
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    public void test_date_comparisons(Chronology chrono) {
+        List<ChronoLocalDate> dates = new ArrayList<>();
+
+        ChronoLocalDate<?> date = chrono.date(LocalDate.of(2013, 1, 1));
+
+        // Insert dates in order, no duplicates
+        dates.add(date.minus(1, ChronoUnit.YEARS));
+        dates.add(date.minus(1, ChronoUnit.MONTHS));
+        dates.add(date.minus(1, ChronoUnit.WEEKS));
+        dates.add(date.minus(1, ChronoUnit.DAYS));
+        dates.add(date);
+        dates.add(date.plus(1, ChronoUnit.DAYS));
+        dates.add(date.plus(1, ChronoUnit.WEEKS));
+        dates.add(date.plus(1, ChronoUnit.MONTHS));
+        dates.add(date.plus(1, ChronoUnit.YEARS));
+
+        // Check these dates against the corresponding dates for every calendar
+        for (Chronology[] clist : data_of_calendars()) {
+            List<ChronoLocalDate<?>> otherDates = new ArrayList<>();
+            Chronology chrono2 = clist[0];
+            for (ChronoLocalDate<?> d : dates) {
+                otherDates.add(chrono2.date(d));
+            }
+
+            // Now compare  the sequence of original dates with the sequence of converted dates
+            for (int i = 0; i < dates.size(); i++) {
+                ChronoLocalDate<?> a = dates.get(i);
+                for (int j = 0; j < otherDates.size(); j++) {
+                    ChronoLocalDate<?> b = otherDates.get(j);
+                    int cmp = ChronoLocalDate.timeLineOrder().compare(a, b);
+                    if (i < j) {
+                        assertTrue(cmp < 0, a + " compare " + b);
+                        assertEquals(a.isBefore(b), true, a + " isBefore " + b);
+                        assertEquals(a.isAfter(b), false, a + " isAfter " + b);
+                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
+                    } else if (i > j) {
+                        assertTrue(cmp > 0, a + " compare " + b);
+                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
+                        assertEquals(a.isAfter(b), true, a + " isAfter " + b);
+                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
+                    } else {
+                        assertTrue(cmp == 0, a + " compare " + b);
+                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
+                        assertEquals(a.isAfter(b), false, a + " isAfter " + b);
+                        assertEquals(a.isEqual(b), true, a + " isEqual " + b);
+                    }
+                }
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // Test Serialization of Calendars
+    //-----------------------------------------------------------------------
+    @Test( dataProvider="calendars")
+    public void test_ChronoSerialization(Chronology chrono) throws Exception {
+        LocalDate ref = LocalDate.of(2013, 1, 5);
+        ChronoLocalDate<?> orginal = chrono.date(ref);
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream out = new ObjectOutputStream(baos);
+        out.writeObject(orginal);
+        out.close();
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+        ObjectInputStream in = new ObjectInputStream(bais);
+        @SuppressWarnings("unchecked")
+        ChronoLocalDate<?> ser = (ChronoLocalDate<?>) in.readObject();
+        assertEquals(ser, orginal, "deserialized date is wrong");
+    }
+
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    public void test_from_TemporalAccessor(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoLocalDate<?> date = chrono.date(refDate);
+        ChronoLocalDate<?> test1 = ChronoLocalDate.from(date);
+        assertEquals(test1, date);
+        ChronoLocalDate<?> test2 = ChronoLocalDate.from(date.atTime(LocalTime.of(12, 30)));
+        assertEquals(test2, date);
+        ChronoLocalDate<?> test3 = ChronoLocalDate.from(date.atTime(LocalTime.of(12, 30)).atZone(ZoneOffset.UTC));
+        assertEquals(test3, date);
+    }
+
+    @Test(expectedExceptions = DateTimeException.class)
+    public void test_from_TemporalAccessor_timeOnly() {
+        ChronoLocalDate.from(LocalTime.of(12, 30));
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_from_TemporalAccessor_null() {
+        ChronoLocalDate.from(null);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * FixedAdjusted returns a fixed Temporal in all adjustments.
+     * Construct an adjuster with the Temporal that should be returned from adjust.
+     */
+    static class FixedAdjuster implements TemporalAdjuster, TemporalAmount {
+        private Temporal datetime;
+
+        FixedAdjuster(Temporal datetime) {
+            this.datetime = datetime;
+        }
+
+        @Override
+        public Temporal adjustInto(Temporal ignore) {
+            return datetime;
+        }
+
+        @Override
+        public Temporal addTo(Temporal ignore) {
+            return datetime;
+        }
+
+        @Override
+        public Temporal subtractFrom(Temporal ignore) {
+            return datetime;
+        }
+
+        @Override
+        public long get(TemporalUnit unit) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public List<TemporalUnit> getUnits() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+    }
+
+    /**
+     * FixedTemporalUnit returns a fixed Temporal in all adjustments.
+     * Construct an FixedTemporalUnit with the Temporal that should be returned from doAdd.
+     */
+    static class FixedTemporalUnit implements TemporalUnit {
+        private Temporal temporal;
+
+        FixedTemporalUnit(Temporal temporal) {
+            this.temporal = temporal;
+        }
+
+        @Override
+        public String getName() {
+            return "FixedTemporalUnit";
+        }
+
+        @Override
+        public Duration getDuration() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public boolean isDurationEstimated() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public boolean isSupportedBy(Temporal temporal) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @SuppressWarnings("unchecked")
+        @Override
+        public <R extends Temporal> R addTo(R temporal, long amount) {
+            return (R) this.temporal;
+        }
+
+        @Override
+        public long between(Temporal temporal1, Temporal temporal2) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+    }
+
+    /**
+     * FixedTemporalField returns a fixed Temporal in all adjustments.
+     * Construct an FixedTemporalField with the Temporal that should be returned from doSet.
+     */
+    static class FixedTemporalField implements TemporalField {
+        private Temporal temporal;
+        FixedTemporalField(Temporal temporal) {
+            this.temporal = temporal;
+        }
+
+        @Override
+        public String getName() {
+            return "FixedTemporalField";
+        }
+
+        @Override
+        public TemporalUnit getBaseUnit() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public TemporalUnit getRangeUnit() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public ValueRange range() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public boolean isSupportedBy(TemporalAccessor temporal) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public long getFrom(TemporalAccessor temporal) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @SuppressWarnings("unchecked")
+        @Override
+        public <R extends Temporal> R adjustInto(R temporal, long newValue) {
+            return (R) this.temporal;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKChronoLocalDateTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,496 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.time.DateTimeException;
+import java.time.Duration;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.ZoneOffset;
+import java.time.chrono.ChronoLocalDateTime;
+import java.time.chrono.Chronology;
+import java.time.chrono.HijrahChronology;
+import java.time.chrono.IsoChronology;
+import java.time.chrono.JapaneseChronology;
+import java.time.chrono.MinguoChronology;
+import java.time.chrono.ThaiBuddhistChronology;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.Temporal;
+import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalAdjuster;
+import java.time.temporal.TemporalAmount;
+import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalUnit;
+import java.time.temporal.ValueRange;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.testng.Assert;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test assertions that must be true for all built-in chronologies.
+ */
+@Test
+public class TCKChronoLocalDateTime {
+
+    //-----------------------------------------------------------------------
+    // regular data factory for names and descriptions of available calendars
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "calendars")
+    Chronology[][] data_of_calendars() {
+        return new Chronology[][]{
+                    {HijrahChronology.INSTANCE},
+                    {IsoChronology.INSTANCE},
+                    {JapaneseChronology.INSTANCE},
+                    {MinguoChronology.INSTANCE},
+                    {ThaiBuddhistChronology.INSTANCE}};
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badWithAdjusterChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
+            TemporalAdjuster adjuster = new FixedAdjuster(cdt2);
+            if (chrono != chrono2) {
+                try {
+                    cdt.with(adjuster);
+                    Assert.fail("WithAdjuster should have thrown a ClassCastException, "
+                            + "required: " + cdt + ", supplied: " + cdt2);
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoLocalDateTime<?> result = cdt.with(adjuster);
+                assertEquals(result, cdt2, "WithAdjuster failed to replace date");
+            }
+        }
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badPlusAdjusterChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
+            TemporalAmount adjuster = new FixedAdjuster(cdt2);
+            if (chrono != chrono2) {
+                try {
+                    cdt.plus(adjuster);
+                    Assert.fail("WithAdjuster should have thrown a ClassCastException, "
+                            + "required: " + cdt + ", supplied: " + cdt2);
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoLocalDateTime<?> result = cdt.plus(adjuster);
+                assertEquals(result, cdt2, "WithAdjuster failed to replace date time");
+            }
+        }
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badMinusAdjusterChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
+            TemporalAmount adjuster = new FixedAdjuster(cdt2);
+            if (chrono != chrono2) {
+                try {
+                    cdt.minus(adjuster);
+                    Assert.fail("WithAdjuster should have thrown a ClassCastException, "
+                            + "required: " + cdt + ", supplied: " + cdt2);
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoLocalDateTime<?> result = cdt.minus(adjuster);
+                assertEquals(result, cdt2, "WithAdjuster failed to replace date");
+            }
+        }
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badPlusTemporalUnitChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
+            TemporalUnit adjuster = new FixedTemporalUnit(cdt2);
+            if (chrono != chrono2) {
+                try {
+                    cdt.plus(1, adjuster);
+                    Assert.fail("TemporalUnit.doPlus plus should have thrown a ClassCastException" + cdt
+                            + ", can not be cast to " + cdt2);
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoLocalDateTime<?> result = cdt.plus(1, adjuster);
+                assertEquals(result, cdt2, "WithAdjuster failed to replace date");
+            }
+        }
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badMinusTemporalUnitChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
+            TemporalUnit adjuster = new FixedTemporalUnit(cdt2);
+            if (chrono != chrono2) {
+                try {
+                    cdt.minus(1, adjuster);
+                    Assert.fail("TemporalUnit.doPlus minus should have thrown a ClassCastException" + cdt.getClass()
+                            + ", can not be cast to " + cdt2.getClass());
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoLocalDateTime<?> result = cdt.minus(1, adjuster);
+                assertEquals(result, cdt2, "WithAdjuster failed to replace date");
+            }
+        }
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badTemporalFieldChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
+            TemporalField adjuster = new FixedTemporalField(cdt2);
+            if (chrono != chrono2) {
+                try {
+                    cdt.with(adjuster, 1);
+                    Assert.fail("TemporalField doWith() should have thrown a ClassCastException" + cdt.getClass()
+                            + ", can not be cast to " + cdt2.getClass());
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoLocalDateTime<?> result = cdt.with(adjuster, 1);
+                assertEquals(result, cdt2, "TemporalField doWith() failed to replace date");
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // isBefore, isAfter, isEqual
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    public void test_datetime_comparisons(Chronology chrono) {
+        List<ChronoLocalDateTime<?>> dates = new ArrayList<>();
+
+        ChronoLocalDateTime<?> date = chrono.date(LocalDate.of(2013, 1, 1)).atTime(LocalTime.MIN);
+
+        // Insert dates in order, no duplicates
+        dates.add(date.minus(1, ChronoUnit.YEARS));
+        dates.add(date.minus(1, ChronoUnit.MONTHS));
+        dates.add(date.minus(1, ChronoUnit.WEEKS));
+        dates.add(date.minus(1, ChronoUnit.DAYS));
+        dates.add(date.minus(1, ChronoUnit.HOURS));
+        dates.add(date.minus(1, ChronoUnit.MINUTES));
+        dates.add(date.minus(1, ChronoUnit.SECONDS));
+        dates.add(date.minus(1, ChronoUnit.NANOS));
+        dates.add(date);
+        dates.add(date.plus(1, ChronoUnit.NANOS));
+        dates.add(date.plus(1, ChronoUnit.SECONDS));
+        dates.add(date.plus(1, ChronoUnit.MINUTES));
+        dates.add(date.plus(1, ChronoUnit.HOURS));
+        dates.add(date.plus(1, ChronoUnit.DAYS));
+        dates.add(date.plus(1, ChronoUnit.WEEKS));
+        dates.add(date.plus(1, ChronoUnit.MONTHS));
+        dates.add(date.plus(1, ChronoUnit.YEARS));
+
+        // Check these dates against the corresponding dates for every calendar
+        for (Chronology[] clist : data_of_calendars()) {
+            List<ChronoLocalDateTime<?>> otherDates = new ArrayList<>();
+            Chronology chrono2 = clist[0];
+            for (ChronoLocalDateTime<?> d : dates) {
+                otherDates.add(chrono2.date(d).atTime(d.toLocalTime()));
+            }
+
+            // Now compare  the sequence of original dates with the sequence of converted dates
+            for (int i = 0; i < dates.size(); i++) {
+                ChronoLocalDateTime<?> a = dates.get(i);
+                for (int j = 0; j < otherDates.size(); j++) {
+                    ChronoLocalDateTime<?> b = otherDates.get(j);
+                    int cmp = ChronoLocalDateTime.timeLineOrder().compare(a, b);
+                    if (i < j) {
+                        assertTrue(cmp < 0, a + " compare " + b);
+                        assertEquals(a.isBefore(b), true, a + " isBefore " + b);
+                        assertEquals(a.isAfter(b), false, a + " isAfter " + b);
+                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
+                    } else if (i > j) {
+                        assertTrue(cmp > 0, a + " compare " + b);
+                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
+                        assertEquals(a.isAfter(b), true, a + " isAfter " + b);
+                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
+                    } else {
+                        assertTrue(cmp == 0, a + " compare " + b);
+                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
+                        assertEquals(a.isAfter(b), false, a + " isAfter " + b);
+                        assertEquals(a.isEqual(b), true, a + " isEqual " + b);
+                    }
+                }
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // Test Serialization of ISO via chrono API
+    //-----------------------------------------------------------------------
+    @Test( dataProvider="calendars")
+    public void test_ChronoLocalDateTimeSerialization(Chronology chrono) throws Exception {
+        LocalDateTime ref = LocalDate.of(2013, 1, 5).atTime(12, 1, 2, 3);
+        ChronoLocalDateTime<?> orginal = chrono.date(ref).atTime(ref.toLocalTime());
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream out = new ObjectOutputStream(baos);
+        out.writeObject(orginal);
+        out.close();
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+        ObjectInputStream in = new ObjectInputStream(bais);
+        ChronoLocalDateTime<?> ser = (ChronoLocalDateTime<?>) in.readObject();
+        assertEquals(ser, orginal, "deserialized date is wrong");
+    }
+
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    public void test_from_TemporalAccessor(Chronology chrono) {
+        LocalDateTime refDateTime = LocalDateTime.of(2013, 1, 1, 12, 30);
+        ChronoLocalDateTime<?> dateTime = chrono.localDateTime(refDateTime);
+        ChronoLocalDateTime<?> test1 = ChronoLocalDateTime.from(dateTime);
+        assertEquals(test1, dateTime);
+        ChronoLocalDateTime<?> test2 = ChronoLocalDateTime.from(dateTime.atZone(ZoneOffset.UTC));
+        assertEquals(test2, dateTime);
+    }
+
+    @Test(expectedExceptions = DateTimeException.class)
+    public void test_from_TemporalAccessor_dateOnly() {
+        ChronoLocalDateTime.from(LocalDate.of(2013, 1, 1));
+    }
+
+    @Test(expectedExceptions = DateTimeException.class)
+    public void test_from_TemporalAccessor_timeOnly() {
+        ChronoLocalDateTime.from(LocalTime.of(12, 30));
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_from_TemporalAccessor_null() {
+        ChronoLocalDateTime.from(null);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * FixedAdjusted returns a fixed Temporal in all adjustments.
+     * Construct an adjuster with the Temporal that should be returned from adjust.
+     */
+    static class FixedAdjuster implements TemporalAdjuster, TemporalAmount {
+        private Temporal datetime;
+
+        FixedAdjuster(Temporal datetime) {
+            this.datetime = datetime;
+        }
+
+        @Override
+        public Temporal adjustInto(Temporal ignore) {
+            return datetime;
+        }
+
+        @Override
+        public Temporal addTo(Temporal ignore) {
+            return datetime;
+        }
+
+        @Override
+        public Temporal subtractFrom(Temporal ignore) {
+            return datetime;
+        }
+
+        @Override
+        public long get(TemporalUnit unit) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public List<TemporalUnit> getUnits() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+    }
+
+    /**
+     * FixedTemporalUnit returns a fixed Temporal in all adjustments.
+     * Construct an FixedTemporalUnit with the Temporal that should be returned from addTo.
+     */
+    static class FixedTemporalUnit implements TemporalUnit {
+        private Temporal temporal;
+
+        FixedTemporalUnit(Temporal temporal) {
+            this.temporal = temporal;
+        }
+
+        @Override
+        public String getName() {
+            return "FixedTemporalUnit";
+        }
+
+        @Override
+        public Duration getDuration() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public boolean isDurationEstimated() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public boolean isSupportedBy(Temporal temporal) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @SuppressWarnings("unchecked")
+        @Override
+        public <R extends Temporal> R addTo(R temporal, long amount) {
+            return (R) this.temporal;
+        }
+
+        @Override
+        public long between(Temporal temporal1, Temporal temporal2) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+    }
+
+    /**
+     * FixedTemporalField returns a fixed Temporal in all adjustments.
+     * Construct an FixedTemporalField with the Temporal that should be returned from adjustInto.
+     */
+    static class FixedTemporalField implements TemporalField {
+        private Temporal temporal;
+        FixedTemporalField(Temporal temporal) {
+            this.temporal = temporal;
+        }
+
+        @Override
+        public String getName() {
+            return "FixedTemporalField";
+        }
+
+        @Override
+        public TemporalUnit getBaseUnit() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public TemporalUnit getRangeUnit() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public ValueRange range() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public boolean isSupportedBy(TemporalAccessor temporal) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public long getFrom(TemporalAccessor temporal) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @SuppressWarnings("unchecked")
+        @Override
+        public <R extends Temporal> R adjustInto(R temporal, long newValue) {
+            return (R) this.temporal;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKChronoZonedDateTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,498 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.time.DateTimeException;
+import java.time.Duration;
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+import java.time.chrono.ChronoZonedDateTime;
+import java.time.chrono.Chronology;
+import java.time.chrono.HijrahChronology;
+import java.time.chrono.IsoChronology;
+import java.time.chrono.JapaneseChronology;
+import java.time.chrono.MinguoChronology;
+import java.time.chrono.ThaiBuddhistChronology;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.Temporal;
+import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalAdjuster;
+import java.time.temporal.TemporalAmount;
+import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalUnit;
+import java.time.temporal.ValueRange;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.testng.Assert;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test assertions that must be true for all built-in chronologies.
+ */
+@Test
+public class TCKChronoZonedDateTime {
+
+    //-----------------------------------------------------------------------
+    // regular data factory for names and descriptions of available calendars
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "calendars")
+    Chronology[][] data_of_calendars() {
+        return new Chronology[][]{
+                    {HijrahChronology.INSTANCE},
+                    {IsoChronology.INSTANCE},
+                    {JapaneseChronology.INSTANCE},
+                    {MinguoChronology.INSTANCE},
+                    {ThaiBuddhistChronology.INSTANCE},
+        };
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badWithAdjusterChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
+            TemporalAdjuster adjuster = new FixedAdjuster(czdt2);
+            if (chrono != chrono2) {
+                try {
+                    czdt.with(adjuster);
+                    Assert.fail("WithAdjuster should have thrown a ClassCastException, "
+                            + "required: " + czdt + ", supplied: " + czdt2);
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                ChronoZonedDateTime<?> result = czdt.with(adjuster);
+                assertEquals(result, czdt2, "WithAdjuster failed to replace date");
+            }
+        }
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badPlusAdjusterChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
+            TemporalAmount adjuster = new FixedAdjuster(czdt2);
+            if (chrono != chrono2) {
+                try {
+                    czdt.plus(adjuster);
+                    Assert.fail("WithAdjuster should have thrown a ClassCastException, "
+                            + "required: " + czdt + ", supplied: " + czdt2);
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoZonedDateTime<?> result = czdt.plus(adjuster);
+                assertEquals(result, czdt2, "WithAdjuster failed to replace date time");
+            }
+        }
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badMinusAdjusterChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
+            TemporalAmount adjuster = new FixedAdjuster(czdt2);
+            if (chrono != chrono2) {
+                try {
+                    czdt.minus(adjuster);
+                    Assert.fail("WithAdjuster should have thrown a ClassCastException, "
+                            + "required: " + czdt + ", supplied: " + czdt2);
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoZonedDateTime<?> result = czdt.minus(adjuster);
+                assertEquals(result, czdt2, "WithAdjuster failed to replace date");
+            }
+        }
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badPlusTemporalUnitChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
+            TemporalUnit adjuster = new FixedTemporalUnit(czdt2);
+            if (chrono != chrono2) {
+                try {
+                    czdt.plus(1, adjuster);
+                    Assert.fail("TemporalUnit.doPlus plus should have thrown a ClassCastException, " + czdt
+                            + " can not be cast to " + czdt2);
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoZonedDateTime<?> result = czdt.plus(1, adjuster);
+                assertEquals(result, czdt2, "WithAdjuster failed to replace date");
+            }
+        }
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badMinusTemporalUnitChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
+            TemporalUnit adjuster = new FixedTemporalUnit(czdt2);
+            if (chrono != chrono2) {
+                try {
+                    czdt.minus(1, adjuster);
+                    Assert.fail("TemporalUnit.doPlus minus should have thrown a ClassCastException, " + czdt.getClass()
+                            + " can not be cast to " + czdt2.getClass());
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoZonedDateTime<?> result = czdt.minus(1, adjuster);
+                assertEquals(result, czdt2, "WithAdjuster failed to replace date");
+            }
+        }
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_badTemporalFieldChrono(Chronology chrono) {
+        LocalDate refDate = LocalDate.of(2013, 1, 1);
+        ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
+        for (Chronology[] clist : data_of_calendars()) {
+            Chronology chrono2 = clist[0];
+            ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
+            TemporalField adjuster = new FixedTemporalField(czdt2);
+            if (chrono != chrono2) {
+                try {
+                    czdt.with(adjuster, 1);
+                    Assert.fail("TemporalField doWith() should have thrown a ClassCastException, " + czdt.getClass()
+                            + " can not be cast to " + czdt2.getClass());
+                } catch (ClassCastException cce) {
+                    // Expected exception; not an error
+                }
+            } else {
+                // Same chronology,
+                ChronoZonedDateTime<?> result = czdt.with(adjuster, 1);
+                assertEquals(result, czdt2, "TemporalField doWith() failed to replace date");
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // isBefore, isAfter, isEqual, INSTANT_COMPARATOR  test a Chronology against the other Chronos
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    public void test_zonedDateTime_comparisons(Chronology chrono) {
+        List<ChronoZonedDateTime<?>> dates = new ArrayList<>();
+
+        ChronoZonedDateTime<?> date = chrono.date(LocalDate.of(2013, 1, 1))
+                .atTime(LocalTime.MIN)
+                .atZone(ZoneOffset.UTC);
+
+        // Insert dates in order, no duplicates
+        dates.add(date.minus(1, ChronoUnit.YEARS));
+        dates.add(date.minus(1, ChronoUnit.MONTHS));
+        dates.add(date.minus(1, ChronoUnit.WEEKS));
+        dates.add(date.minus(1, ChronoUnit.DAYS));
+        dates.add(date.minus(1, ChronoUnit.HOURS));
+        dates.add(date.minus(1, ChronoUnit.MINUTES));
+        dates.add(date.minus(1, ChronoUnit.SECONDS));
+        dates.add(date.minus(1, ChronoUnit.NANOS));
+        dates.add(date);
+        dates.add(date.plus(1, ChronoUnit.NANOS));
+        dates.add(date.plus(1, ChronoUnit.SECONDS));
+        dates.add(date.plus(1, ChronoUnit.MINUTES));
+        dates.add(date.plus(1, ChronoUnit.HOURS));
+        dates.add(date.plus(1, ChronoUnit.DAYS));
+        dates.add(date.plus(1, ChronoUnit.WEEKS));
+        dates.add(date.plus(1, ChronoUnit.MONTHS));
+        dates.add(date.plus(1, ChronoUnit.YEARS));
+
+        // Check these dates against the corresponding dates for every calendar
+        for (Chronology[] clist : data_of_calendars()) {
+            List<ChronoZonedDateTime<?>> otherDates = new ArrayList<>();
+            Chronology chrono2 = IsoChronology.INSTANCE; //clist[0];
+            for (ChronoZonedDateTime<?> d : dates) {
+                otherDates.add(chrono2.date(d).atTime(d.toLocalTime()).atZone(d.getZone()));
+            }
+
+            // Now compare  the sequence of original dates with the sequence of converted dates
+            for (int i = 0; i < dates.size(); i++) {
+                ChronoZonedDateTime<?> a = dates.get(i);
+                for (int j = 0; j < otherDates.size(); j++) {
+                    ChronoZonedDateTime<?> b = otherDates.get(j);
+                    int cmp = ChronoZonedDateTime.timeLineOrder().compare(a, b);
+                    if (i < j) {
+                        assertTrue(cmp < 0, a + " compare " + b);
+                        assertEquals(a.isBefore(b), true, a + " isBefore " + b);
+                        assertEquals(a.isAfter(b), false, a + " ifAfter " + b);
+                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
+                    } else if (i > j) {
+                        assertTrue(cmp > 0, a + " compare " + b);
+                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
+                        assertEquals(a.isAfter(b), true, a + " ifAfter " + b);
+                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
+                    } else {
+                        assertTrue(cmp == 0, a + " compare " + b);
+                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
+                        assertEquals(a.isAfter(b), false, a + " ifAfter " + b);
+                        assertEquals(a.isEqual(b), true, a + " isEqual " + b);
+                    }
+                }
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // Test Serialization of ISO via chrono API
+    //-----------------------------------------------------------------------
+    @Test( dataProvider="calendars")
+    public void test_ChronoZonedDateTimeSerialization(Chronology chrono) throws Exception {
+        ZonedDateTime ref = LocalDate.of(2013, 1, 5).atTime(12, 1, 2, 3).atZone(ZoneId.of("GMT+01:23"));
+        ChronoZonedDateTime<?> orginal = chrono.date(ref).atTime(ref.toLocalTime()).atZone(ref.getZone());
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream out = new ObjectOutputStream(baos);
+        out.writeObject(orginal);
+        out.close();
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+        ObjectInputStream in = new ObjectInputStream(bais);
+        @SuppressWarnings("unchecked")
+        ChronoZonedDateTime<?> ser = (ChronoZonedDateTime<?>) in.readObject();
+        assertEquals(ser, orginal, "deserialized date is wrong");
+    }
+
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    public void test_from_TemporalAccessor(Chronology chrono) {
+        ZonedDateTime refDateTime = ZonedDateTime.of(2013, 1, 1, 12, 30, 0, 0, ZoneId.of("Europe/Paris"));
+        ChronoZonedDateTime<?> dateTime = chrono.zonedDateTime(refDateTime);
+        ChronoZonedDateTime<?> test1 = ChronoZonedDateTime.from(dateTime);
+        assertEquals(test1, dateTime);
+    }
+
+    @Test(expectedExceptions = DateTimeException.class)
+    public void test_from_TemporalAccessor_dateOnly() {
+        ChronoZonedDateTime.from(LocalDate.of(2013, 1, 1));
+    }
+
+    @Test(expectedExceptions = DateTimeException.class)
+    public void test_from_TemporalAccessor_timeOnly() {
+        ChronoZonedDateTime.from(LocalTime.of(12, 30));
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_from_TemporalAccessor_null() {
+        ChronoZonedDateTime.from(null);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * FixedAdjusted returns a fixed Temporal in all adjustments.
+     * Construct an adjuster with the Temporal that should be returned from adjust.
+     */
+    static class FixedAdjuster implements TemporalAdjuster, TemporalAmount {
+        private Temporal datetime;
+
+        FixedAdjuster(Temporal datetime) {
+            this.datetime = datetime;
+        }
+
+        @Override
+        public Temporal adjustInto(Temporal ignore) {
+            return datetime;
+        }
+
+        @Override
+        public Temporal addTo(Temporal ignore) {
+            return datetime;
+        }
+
+        @Override
+        public Temporal subtractFrom(Temporal ignore) {
+            return datetime;
+        }
+
+        @Override
+        public long get(TemporalUnit unit) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public List<TemporalUnit> getUnits() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+    }
+
+    /**
+     * FixedTemporalUnit returns a fixed Temporal in all adjustments.
+     * Construct an FixedTemporalUnit with the Temporal that should be returned from addTo.
+     */
+    static class FixedTemporalUnit implements TemporalUnit {
+        private Temporal temporal;
+
+        FixedTemporalUnit(Temporal temporal) {
+            this.temporal = temporal;
+        }
+
+        @Override
+        public String getName() {
+            return "FixedTemporalUnit";
+        }
+
+        @Override
+        public Duration getDuration() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public boolean isDurationEstimated() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public boolean isSupportedBy(Temporal temporal) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @SuppressWarnings("unchecked")
+        @Override
+        public <R extends Temporal> R addTo(R temporal, long amount) {
+            return (R) this.temporal;
+        }
+
+        @Override
+        public long between(Temporal temporal1, Temporal temporal2) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+    }
+
+    /**
+     * FixedTemporalField returns a fixed Temporal in all adjustments.
+     * Construct an FixedTemporalField with the Temporal that should be returned from adjustInto.
+     */
+    static class FixedTemporalField implements TemporalField {
+        private Temporal temporal;
+        FixedTemporalField(Temporal temporal) {
+            this.temporal = temporal;
+        }
+
+        @Override
+        public String getName() {
+            return "FixedTemporalField";
+        }
+
+        @Override
+        public TemporalUnit getBaseUnit() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public TemporalUnit getRangeUnit() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public ValueRange range() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public boolean isSupportedBy(TemporalAccessor temporal) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public long getFrom(TemporalAccessor temporal) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @SuppressWarnings("unchecked")
+        @Override
+        public <R extends Temporal> R adjustInto(R temporal, long newValue) {
+            return (R) this.temporal;
+        }
+    }
+}
--- a/test/java/time/tck/java/time/chrono/TCKChronology.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/chrono/TCKChronology.java	Wed Apr 17 21:48:04 2013 -0700
@@ -4,9 +4,7 @@
  *
  * 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.
+ * 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
@@ -24,7 +22,12 @@
  */
 
 /*
- * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2012, Stephen Colebourne & Michael Nascimento Santos
  *
  * All rights reserved.
  *
@@ -57,217 +60,189 @@
 package tck.java.time.chrono;
 
 import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertSame;
+import static org.testng.Assert.assertTrue;
 
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.LocalTime;
-import java.time.ZoneId;
-import java.time.ZonedDateTime;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.time.DateTimeException;
 import java.time.chrono.ChronoLocalDate;
 import java.time.chrono.Chronology;
-import java.time.chrono.Era;
+import java.time.chrono.HijrahChronology;
 import java.time.chrono.IsoChronology;
+import java.time.chrono.JapaneseChronology;
+import java.time.chrono.MinguoChronology;
+import java.time.chrono.ThaiBuddhistChronology;
 import java.time.temporal.ChronoField;
-import java.time.temporal.Queries;
-import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalField;
-import java.time.temporal.TemporalQuery;
-import java.time.temporal.ValueRange;
-import java.util.List;
+import java.util.Locale;
+import java.util.Set;
 
+import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
 /**
- * Test.
+ * Test Chronology class.
  */
 @Test
 public class TCKChronology {
-    // Can only work with IsoChronology here
-    // others may be in separate module
+
+    //-----------------------------------------------------------------------
+    // regular data factory for ID and calendarType of available calendars
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "calendarNameAndType")
+    Object[][] data_of_calendars() {
+        return new Object[][] {
+                    {"Hijrah-umalqura", "islamic-umalqura"},
+                    {"ISO", "iso8601"},
+                    {"Japanese", "japanese"},
+                    {"Minguo", "roc"},
+                    {"ThaiBuddhist", "buddhist"},
+                };
+    }
 
-    @Test
-    public void factory_from_TemporalAccessor_dateWithChronlogy() {
-        assertEquals(Chronology.from(LocalDate.of(2012, 6, 30)), IsoChronology.INSTANCE);
+    @Test(dataProvider = "calendarNameAndType")
+    public void test_getters(String chronoId, String calendarSystemType) {
+        Chronology chrono = Chronology.of(chronoId);
+        assertNotNull(chrono, "Required calendar not found by ID: " + chronoId);
+        assertEquals(chrono.getId(), chronoId);
+        assertEquals(chrono.getCalendarType(), calendarSystemType);
+    }
+
+    @Test(dataProvider = "calendarNameAndType")
+    public void test_required_calendars(String chronoId, String calendarSystemType) {
+        Chronology chrono = Chronology.of(chronoId);
+        assertNotNull(chrono, "Required calendar not found by ID: " + chronoId);
+        chrono = Chronology.of(calendarSystemType);
+        assertNotNull(chrono, "Required calendar not found by type: " + chronoId);
+        Set<Chronology> cals = Chronology.getAvailableChronologies();
+        assertTrue(cals.contains(chrono), "Required calendar not found in set of available calendars");
     }
 
     @Test
-    public void factory_from_TemporalAccessor_chronology() {
-        assertEquals(Chronology.from(new TemporalAccessor() {
-            @Override
-            public boolean isSupported(TemporalField field) {
-                throw new UnsupportedOperationException();
-            }
-            @Override
-            public long getLong(TemporalField field) {
-                throw new UnsupportedOperationException();
-            }
-            @SuppressWarnings("unchecked")
-            @Override
-            public <R> R query(TemporalQuery<R> query) {
-                if (query == Queries.chronology()) {
-                    return (R) IsoChronology.INSTANCE;
-                }
-                throw new UnsupportedOperationException();
-            }
-        }), IsoChronology.INSTANCE);
+    public void test_calendar_list() {
+        Set<Chronology> chronos = Chronology.getAvailableChronologies();
+        assertNotNull(chronos, "Required list of calendars must be non-null");
+        for (Chronology chrono : chronos) {
+            Chronology lookup = Chronology.of(chrono.getId());
+            assertNotNull(lookup, "Required calendar not found: " + chrono);
+        }
+        assertEquals(chronos.size() >= data_of_calendars().length, true, "Chronology.getAvailableChronologies().size = " + chronos.size()
+                + ", expected >= " + data_of_calendars().length);
     }
 
-    @Test
-    public void factory_from_TemporalAccessor_noChronology() {
-        assertEquals(Chronology.from(new TemporalAccessor() {
-            @Override
-            public boolean isSupported(TemporalField field) {
-                throw new UnsupportedOperationException();
-            }
-
-            @Override
-            public long getLong(TemporalField field) {
-                throw new UnsupportedOperationException();
-            }
-
-            @Override
-            public <R> R query(TemporalQuery<R> query) {
-                if (query == Queries.chronology()) {
-                    return null;
-                }
-                throw new UnsupportedOperationException();
-            }
-        }), IsoChronology.INSTANCE);
+    /**
+     * Compute the number of days from the Epoch and compute the date from the number of days.
+     */
+    @Test(dataProvider = "calendarNameAndType")
+    public void test_epoch(String name, String alias) {
+        Chronology chrono = Chronology.of(name); // a chronology. In practice this is rarely hardcoded
+        ChronoLocalDate<?> date1 = chrono.dateNow();
+        long epoch1 = date1.getLong(ChronoField.EPOCH_DAY);
+        ChronoLocalDate<?> date2 = date1.with(ChronoField.EPOCH_DAY, epoch1);
+        assertEquals(date1, date2, "Date from epoch day is not same date: " + date1 + " != " + date2);
+        long epoch2 = date1.getLong(ChronoField.EPOCH_DAY);
+        assertEquals(epoch1, epoch2, "Epoch day not the same: " + epoch1 + " != " + epoch2);
     }
 
-    @Test(expectedExceptions=NullPointerException.class)
-    public void factory_from_TemporalAccessor_null() {
-        Chronology.from(null);
+    @Test(dataProvider = "calendarNameAndType")
+    public void test_dateEpochDay(String name, String alias) {
+        Chronology chrono = Chronology.of(name);
+        ChronoLocalDate<?> date = chrono.dateNow();
+        long epochDay = date.getLong(ChronoField.EPOCH_DAY);
+        ChronoLocalDate<?> test = chrono.dateEpochDay(epochDay);
+        assertEquals(test, date);
     }
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_date_TemporalAccessor() {
-        assertEquals(IsoChronology.INSTANCE.date(new TemporalAccessor() {
-            @Override
-            public boolean isSupported(TemporalField field) {
-                if (field == ChronoField.EPOCH_DAY) {
-                    return true;
-                }
-                throw new UnsupportedOperationException();
-            }
+    // locale based lookup
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "calendarsystemtype")
+    Object[][] data_CalendarType() {
+        return new Object[][] {
+            {HijrahChronology.INSTANCE, "islamic", "umalqura"},
+            {IsoChronology.INSTANCE, "iso8601", null},
+            {JapaneseChronology.INSTANCE, "japanese", null},
+            {MinguoChronology.INSTANCE, "roc", null},
+            {ThaiBuddhistChronology.INSTANCE, "buddhist", null},
+        };
+    }
 
-            @Override
-            public long getLong(TemporalField field) {
-                if (field == ChronoField.EPOCH_DAY) {
-                    return LocalDate.of(2012, 6, 30).toEpochDay();
-                }
-                throw new UnsupportedOperationException();
-            }
+    @Test(dataProvider = "calendarsystemtype")
+    public void test_getCalendarType(Chronology chrono, String calendarType, String variant) {
+        String type = calendarType;
+        if (variant != null) {
+            type += '-';
+            type += variant;
+        }
+        assertEquals(chrono.getCalendarType(), type);
+    }
 
-            @SuppressWarnings("unchecked")
-            @Override
-            public <R> R query(TemporalQuery<R> query) {
-                if (query == Queries.localDate()) {
-                    return (R) LocalDate.of(2012, 6, 30);
-                }
-                throw new UnsupportedOperationException();
-            }
-        }), LocalDate.of(2012, 6, 30));
+    @Test(dataProvider = "calendarsystemtype")
+    public void test_lookupLocale(Chronology chrono, String calendarType, String variant) {
+        Locale.Builder builder = new Locale.Builder().setLanguage("en").setRegion("CA");
+        builder.setUnicodeLocaleKeyword("ca", calendarType);
+        if (variant != null) {
+            builder.setUnicodeLocaleKeyword("cv", variant);
+        }
+        Locale locale = builder.build();
+        assertEquals(Chronology.ofLocale(locale), chrono);
     }
 
-    @Test(expectedExceptions=NullPointerException.class)
-    public void test_date_TemporalAccessor_null() {
-        IsoChronology.INSTANCE.date(null);
+
+    /**
+     * Test lookup by calendarType of each chronology.
+     * The calendarType is split on "-" to separate the calendar and variant.
+     * Verify that the calendar can be found by {@link java.time.chrono.Chronology#ofLocale}.
+     */
+    @Test
+    public void test_ofLocaleByType() {
+        // Test that all available chronologies can be successfully found using ofLocale
+        Set<Chronology> chronos = Chronology.getAvailableChronologies();
+        for (Chronology chrono : chronos) {
+            String[] split = chrono.getCalendarType().split("-");
+
+            Locale.Builder builder = new Locale.Builder().setLanguage("en").setRegion("CA");
+            builder.setUnicodeLocaleKeyword("ca", split[0]);
+            if (split.length > 1) {
+                builder.setUnicodeLocaleKeyword("cv", split[1]);
+            }
+            Locale locale = builder.build();
+            assertEquals(Chronology.ofLocale(locale), chrono, "Lookup by type and variant");
+        }
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void test_lookupLocale() {
+        Locale.Builder builder = new Locale.Builder().setLanguage("en").setRegion("CA");
+        builder.setUnicodeLocaleKeyword("ca", "xxx");
+        builder.setUnicodeLocaleKeyword("cv", "yyy");
+
+        Locale locale = builder.build();
+        Chronology.ofLocale(locale);
+    }
+
+    @Test(expectedExceptions = DateTimeException.class)
+    public void test_noChrono() {
+        Chronology chrono = Chronology.of("FooFoo");
     }
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_localDateTime_TemporalAccessor() {
-        assertEquals(IsoChronology.INSTANCE.localDateTime(new TemporalAccessor() {
-            @Override
-            public boolean isSupported(TemporalField field) {
-                if (field == ChronoField.EPOCH_DAY || field == ChronoField.NANO_OF_DAY) {
-                    return true;
-                }
-                throw new UnsupportedOperationException();
-            }
-
-            @Override
-            public long getLong(TemporalField field) {
-                if (field == ChronoField.EPOCH_DAY) {
-                    return LocalDate.of(2012, 6, 30).toEpochDay();
-                }
-                if (field == ChronoField.NANO_OF_DAY) {
-                    return LocalTime.of(12, 30, 40).toNanoOfDay();
-                }
-                throw new UnsupportedOperationException();
-            }
-
-            @SuppressWarnings("unchecked")
-            @Override
-            public <R> R query(TemporalQuery<R> query) {
-                if (query == Queries.localDate()) {
-                    return (R) LocalDate.of(2012, 6, 30);
-                }
-                if (query == Queries.localTime()) {
-                    return (R) LocalTime.of(12, 30, 40);
-                }
-                throw new UnsupportedOperationException();
-            }
-        }), LocalDateTime.of(2012, 6, 30, 12, 30, 40));
-    }
-
-    @Test(expectedExceptions=NullPointerException.class)
-    public void test_localDateTime_TemporalAccessor_null() {
-        IsoChronology.INSTANCE.localDateTime(null);
-    }
-
+    // serialization; serialize and check each calendar system
     //-----------------------------------------------------------------------
-    @Test
-    public void test_zonedDateTime_TemporalAccessor() {
-        assertEquals(IsoChronology.INSTANCE.zonedDateTime(new TemporalAccessor() {
-            @Override
-            public boolean isSupported(TemporalField field) {
-                if (field == ChronoField.EPOCH_DAY || field == ChronoField.NANO_OF_DAY ||
-                        field == ChronoField.INSTANT_SECONDS || field == ChronoField.NANO_OF_SECOND) {
-                    return true;
-                }
-                throw new UnsupportedOperationException();
-            }
-
-            @Override
-            public long getLong(TemporalField field) {
-                if (field == ChronoField.INSTANT_SECONDS) {
-                    return ZonedDateTime.of(2012, 6, 30, 12, 30, 40, 0, ZoneId.of("Europe/London")).toEpochSecond();
-                }
-                if (field == ChronoField.NANO_OF_SECOND) {
-                    return 0;
-                }
-                if (field == ChronoField.EPOCH_DAY) {
-                    return LocalDate.of(2012, 6, 30).toEpochDay();
-                }
-                if (field == ChronoField.NANO_OF_DAY) {
-                    return LocalTime.of(12, 30, 40).toNanoOfDay();
-                }
-                throw new UnsupportedOperationException();
-            }
-
-            @SuppressWarnings("unchecked")
-            @Override
-            public <R> R query(TemporalQuery<R> query) {
-                if (query == Queries.localDate()) {
-                    return (R) LocalDate.of(2012, 6, 30);
-                }
-                if (query == Queries.localTime()) {
-                    return (R) LocalTime.of(12, 30, 40);
-                }
-                if (query == Queries.zoneId() || query == Queries.zone()) {
-                    return (R) ZoneId.of("Europe/London");
-                }
-                throw new UnsupportedOperationException();
-            }
-        }), ZonedDateTime.of(2012, 6, 30, 12, 30, 40, 0, ZoneId.of("Europe/London")));
-    }
-
-    @Test(expectedExceptions=NullPointerException.class)
-    public void test_zonedDateTime_TemporalAccessor_null() {
-        IsoChronology.INSTANCE.zonedDateTime(null);
+    @Test(dataProvider = "calendarNameAndType")
+    public void test_chronoSerializationSingleton(String id, String _calendarType) throws Exception {
+        Chronology original = Chronology.of(id);
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream out = new ObjectOutputStream(baos);
+        out.writeObject(original);
+        out.close();
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+        ObjectInputStream in = new ObjectInputStream(bais);
+        Chronology ser = (Chronology) in.readObject();
+        assertEquals(ser, original, "Deserialized Chronology is not correct");
     }
 
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKChronologySerialization.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2013, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono;
+
+import static org.testng.Assert.assertEquals;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.PrintStream;
+import java.time.chrono.Chronology;
+import java.time.chrono.HijrahChronology;
+import java.time.chrono.IsoChronology;
+import java.time.chrono.JapaneseChronology;
+import java.time.chrono.MinguoChronology;
+import java.time.chrono.ThaiBuddhistChronology;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+public class TCKChronologySerialization {
+
+    //-----------------------------------------------------------------------
+    // regular data factory for names and descriptions of available calendars
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "calendars")
+    Chronology[][] data_of_calendars() {
+        return new Chronology[][]{
+                    {HijrahChronology.INSTANCE},
+                    {IsoChronology.INSTANCE},
+                    {JapaneseChronology.INSTANCE},
+                    {MinguoChronology.INSTANCE},
+                    {ThaiBuddhistChronology.INSTANCE}};
+    }
+
+    //-----------------------------------------------------------------------
+    // Test Serialization of Calendars
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    public void test_ChronoSerialization(Chronology chrono) throws Exception {
+        System.out.printf(" ChronoSerialization: %s%n", chrono);
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream out = new ObjectOutputStream(baos);
+        out.writeObject(chrono);
+        out.close();
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+
+        ObjectInputStream in = new ObjectInputStream(bais);
+        @SuppressWarnings("unchecked")
+        Chronology ser = (Chronology) in.readObject();
+        assertEquals(ser, chrono, "deserialized Chronology is wrong");
+    }
+
+    /**
+     * Utility method to dump a byte array in a java syntax.
+     * @param bytes and array of bytes
+     * @param os the outputstream to receive the output.
+     */
+    static void dumpSerialStream(byte[] bytes, PrintStream os) {
+        os.printf("    byte[] bytes = {" );
+        final int linelen = 10;
+        for (int i = 0; i < bytes.length; i++) {
+            if (i % linelen == 0) {
+                os.printf("%n        ");
+            }
+            os.printf(" %3d,", bytes[i] & 0xff);
+            if ((i % linelen) == (linelen-1) || i == bytes.length - 1) {
+                os.printf("  /*");
+                int s = i / linelen * linelen;
+                int k = i % linelen;
+                for (int j = 0; j <= k && s + j < bytes.length; j++) {
+                    os.printf(" %c", bytes[s + j] & 0xff);
+                }
+                os.printf(" */");
+            }
+        }
+        os.printf("%n    };%n");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKHijrahChronology.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,320 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono;
+
+import static java.time.temporal.ChronoField.DAY_OF_WEEK;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+
+import java.time.DateTimeException;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.Month;
+import java.time.Period;
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.Chronology;
+import java.time.chrono.Era;
+import java.time.chrono.HijrahChronology;
+import java.time.chrono.HijrahDate;
+import java.time.chrono.IsoChronology;
+import java.time.chrono.MinguoChronology;
+import java.time.chrono.MinguoDate;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.TemporalAdjuster;
+import java.util.List;
+
+import org.testng.Assert;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test.
+ */
+@Test
+public class TCKHijrahChronology {
+
+    //-----------------------------------------------------------------------
+    // Chronology.ofName("Hijrah")  Lookup by name
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_chrono_byName() {
+        Chronology c = HijrahChronology.INSTANCE;
+        Chronology test = Chronology.of("Hijrah-umalqura");
+        Assert.assertNotNull(test, "The Hijrah-umalqura calendar could not be found by name");
+        Assert.assertEquals(test.getId(), "Hijrah-umalqura", "ID mismatch");
+        Assert.assertEquals(test.getCalendarType(), "islamic-umalqura", "Type mismatch");
+        Assert.assertEquals(test, c);
+    }
+
+    //-----------------------------------------------------------------------
+    // creation, toLocalDate()
+    //-----------------------------------------------------------------------
+    @DataProvider(name="samples")
+    Object[][] data_samples() {
+        return new Object[][] {
+            //{HijrahChronology.INSTANCE.date(1320, 1, 1), LocalDate.of(1902, 4, 9)},
+            //{HijrahChronology.INSTANCE.date(1320, 1, 2), LocalDate.of(1902, 4, 10)},
+            //{HijrahChronology.INSTANCE.date(1320, 1, 3), LocalDate.of(1902, 4, 11)},
+
+            //{HijrahChronology.INSTANCE.date(1322, 1, 1), LocalDate.of(1904, 3, 18)},
+            //{HijrahChronology.INSTANCE.date(1323, 1, 1), LocalDate.of(1905, 3, 7)},
+            //{HijrahChronology.INSTANCE.date(1323, 12, 6), LocalDate.of(1906, 1, 30)},
+            //{HijrahChronology.INSTANCE.date(1324, 1, 1), LocalDate.of(1906, 2, 24)},
+            //{HijrahChronology.INSTANCE.date(1324, 7, 3), LocalDate.of(1906, 8, 23)},
+            //{HijrahChronology.INSTANCE.date(1324, 7, 4), LocalDate.of(1906, 8, 24)},
+            //{HijrahChronology.INSTANCE.date(1325, 1, 1), LocalDate.of(1907, 2, 13)},
+            {HijrahChronology.INSTANCE.date(1434, 7, 1), LocalDate.of(2013, 5, 11)},
+
+            //{HijrahChronology.INSTANCE.date(1500, 3, 3), LocalDate.of(2079, 1, 5)},
+            //{HijrahChronology.INSTANCE.date(1500, 10, 28), LocalDate.of(2079, 8, 25)},
+            //{HijrahChronology.INSTANCE.date(1500, 10, 29), LocalDate.of(2079, 8, 26)},
+        };
+    }
+
+    @Test(dataProvider="samples")
+    public void test_toLocalDate(ChronoLocalDate<?> hijrahDate, LocalDate iso) {
+        assertEquals(LocalDate.from(hijrahDate), iso);
+    }
+
+    @Test(dataProvider="samples")
+    public void test_fromCalendrical(ChronoLocalDate<?> hijrahDate, LocalDate iso) {
+        assertEquals(HijrahChronology.INSTANCE.date(iso), hijrahDate);
+    }
+
+    @Test(dataProvider="samples")
+    public void test_dayOfWeekEqualIsoDayOfWeek(ChronoLocalDate<?> hijrahDate, LocalDate iso) {
+        assertEquals(hijrahDate.get(DAY_OF_WEEK), iso.get(DAY_OF_WEEK), "Hijrah day of week should be same as ISO day of week");
+    }
+
+    @DataProvider(name="badDates")
+    Object[][] data_badDates() {
+        return new Object[][] {
+            {1434, 0, 0},
+
+            {1434, -1, 1},
+            {1434, 0, 1},
+            {1434, 14, 1},
+            {1434, 15, 1},
+
+            {1434, 1, -1},
+            {1434, 1, 0},
+            {1434, 1, 32},
+
+            {1434, 12, -1},
+            {1434, 12, 0},
+            {1434, 12, 32},
+        };
+    }
+
+    @Test(dataProvider="badDates", expectedExceptions=DateTimeException.class)
+    public void test_badDates(int year, int month, int dom) {
+        HijrahChronology.INSTANCE.date(year, month, dom);
+    }
+
+    //-----------------------------------------------------------------------
+    // Bad Era for Chronology.date(era,...) and Chronology.prolepticYear(Era,...)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_InvalidEras() {
+        // Verify that the eras from every other Chronology are invalid
+        for (Chronology chrono : Chronology.getAvailableChronologies()) {
+            if (chrono instanceof HijrahChronology) {
+                continue;
+            }
+            List<Era> eras = chrono.eras();
+            for (Era era : eras) {
+                try {
+                    ChronoLocalDate date = HijrahChronology.INSTANCE.date(era, 1, 1, 1);
+                    fail("HijrahChronology.date did not throw ClassCastException for Era: " + era);
+                } catch (ClassCastException cex) {
+                    ; // ignore expected exception
+                }
+
+                /* TODO: Test for missing HijrahDate.of(Era, y, m, d) method.
+                try {
+                    @SuppressWarnings("unused")
+                    HijrahDate jdate = HijrahDate.of(era, 1, 1, 1);
+                    fail("HijrahDate.of did not throw ClassCastException for Era: " + era);
+                } catch (ClassCastException cex) {
+                    ; // ignore expected exception
+                }
+                */
+
+                try {
+                    @SuppressWarnings("unused")
+                    int year = HijrahChronology.INSTANCE.prolepticYear(era, 1);
+                    fail("HijrahChronology.prolepticYear did not throw ClassCastException for Era: " + era);
+                } catch (ClassCastException cex) {
+                    ; // ignore expected exception
+                }
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // with(WithAdjuster)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_adjust1() {
+        ChronoLocalDate<?> base = HijrahChronology.INSTANCE.date(1434, 5, 15);
+        ChronoLocalDate<?> test = base.with(TemporalAdjuster.lastDayOfMonth());
+        assertEquals(test, HijrahChronology.INSTANCE.date(1434, 5, 29));
+    }
+
+    @Test
+    public void test_adjust2() {
+        ChronoLocalDate<?> base = HijrahChronology.INSTANCE.date(1434, 6, 2);
+        ChronoLocalDate<?> test = base.with(TemporalAdjuster.lastDayOfMonth());
+        assertEquals(test, HijrahChronology.INSTANCE.date(1434, 6, 30));
+    }
+
+    //-----------------------------------------------------------------------
+    // HijrahDate.with(Local*)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_adjust_toLocalDate() {
+        ChronoLocalDate<?> hijrahDate = HijrahChronology.INSTANCE.date(1435, 1, 4);
+        ChronoLocalDate<?> test = hijrahDate.with(LocalDate.of(2012, 7, 6));
+        assertEquals(test, HijrahChronology.INSTANCE.date(1433, 8, 16));
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void test_adjust_toMonth() {
+        ChronoLocalDate<?> hijrahDate = HijrahChronology.INSTANCE.date(1435, 1, 4);
+        hijrahDate.with(Month.APRIL);
+    }
+
+    //-----------------------------------------------------------------------
+    // LocalDate.with(HijrahDate)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_LocalDate_adjustToHijrahDate() {
+        ChronoLocalDate<?> hijrahDate = HijrahChronology.INSTANCE.date(1434, 5, 15);
+        LocalDate test = LocalDate.MIN.with(hijrahDate);
+        assertEquals(test, LocalDate.of(2013, 3, 27));
+    }
+
+    @Test
+    public void test_LocalDateTime_adjustToHijrahDate() {
+        ChronoLocalDate<?> hijrahDate = HijrahChronology.INSTANCE.date(1435, 5, 15);
+        LocalDateTime test = LocalDateTime.MIN.with(hijrahDate);
+        assertEquals(test, LocalDateTime.of(2014, 3, 16, 0, 0));
+    }
+
+    //-----------------------------------------------------------------------
+    // PeriodUntil()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_periodUntilDate() {
+        HijrahDate mdate1 = HijrahDate.of(1434, 1, 1);
+        HijrahDate mdate2 = HijrahDate.of(1435, 2, 2);
+        Period period = mdate1.periodUntil(mdate2);
+        assertEquals(period, Period.of(1, 1, 1));
+    }
+
+    @Test
+    public void test_periodUntilUnit() {
+        HijrahDate mdate1 = HijrahDate.of(1434, 1, 1);
+        HijrahDate mdate2 = HijrahDate.of(1435, 2, 2);
+        long months = mdate1.periodUntil(mdate2, ChronoUnit.MONTHS);
+        assertEquals(months, 13);
+    }
+
+    @Test
+    public void test_periodUntilDiffChrono() {
+        HijrahDate mdate1 = HijrahDate.of(1434, 1, 1);
+        HijrahDate mdate2 = HijrahDate.of(1435, 2, 2);
+        MinguoDate ldate2 = MinguoChronology.INSTANCE.date(mdate2);
+        Period period = mdate1.periodUntil(ldate2);
+        assertEquals(period, Period.of(1, 1, 1));
+    }
+
+    //-----------------------------------------------------------------------
+    // toString()
+    //-----------------------------------------------------------------------
+    @DataProvider(name="toString")
+    Object[][] data_toString() {
+        return new Object[][] {
+            //{HijrahChronology.INSTANCE.date(1320, 1, 1), "Hijrah AH 1320-01-01"},
+            //{HijrahChronology.INSTANCE.date(1500, 10, 28), "Hijrah AH 1500-10-28"},
+            //{HijrahChronology.INSTANCE.date(1500, 10, 29), "Hijrah AH 1500-10-29"},
+            {HijrahChronology.INSTANCE.date(1434, 12, 5), "Hijrah-umalqura AH 1434-12-05"},
+            {HijrahChronology.INSTANCE.date(1434, 12, 6), "Hijrah-umalqura AH 1434-12-06"},
+        };
+    }
+
+    @Test(dataProvider="toString")
+    public void test_toString(ChronoLocalDate<?> hijrahDate, String expected) {
+        assertEquals(hijrahDate.toString(), expected);
+    }
+
+    //-----------------------------------------------------------------------
+    // equals()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_equals_true() {
+        assertTrue(HijrahChronology.INSTANCE.equals(HijrahChronology.INSTANCE));
+    }
+
+    @Test
+    public void test_equals_false() {
+        assertFalse(HijrahChronology.INSTANCE.equals(IsoChronology.INSTANCE));
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKHijrahEra.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono;
+
+import static java.time.temporal.ChronoField.ERA;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.time.chrono.Era;
+import java.time.chrono.HijrahChronology;
+import java.time.chrono.HijrahEra;
+import java.time.temporal.ValueRange;
+import java.util.List;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test.
+ */
+@Test
+public class TCKHijrahEra {
+
+    @DataProvider(name = "HijrahEras")
+    Object[][] data_of_eras() {
+        return new Object[][] {
+                    {HijrahEra.AH, "AH", 1},
+       };
+    }
+
+    @Test(dataProvider="HijrahEras")
+    public void test_valueOf(HijrahEra era , String eraName, int eraValue) {
+        assertEquals(era.getValue(), eraValue);
+        assertEquals(HijrahEra.of(eraValue), era);
+        assertEquals(HijrahEra.valueOf(eraName), era);
+    }
+
+    //-----------------------------------------------------------------------
+    // values()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_values() {
+        List<Era> eraList = HijrahChronology.INSTANCE.eras();
+        HijrahEra[] eras = HijrahEra.values();
+        assertEquals(eraList.size(), eras.length);
+        for (HijrahEra era : eras) {
+            assertTrue(eraList.contains(era));
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // range()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_range() {
+        for (HijrahEra era : HijrahEra.values()) {
+            assertEquals(era.range(ERA), ValueRange.of(1, 1));
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKIsoChronology.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,679 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.fail;
+
+import java.time.DateTimeException;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.chrono.Chronology;
+import java.time.chrono.IsoChronology;
+import java.time.format.ResolverStyle;
+import java.time.temporal.ChronoField;
+import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQuery;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test.
+ */
+@Test
+public class TCKIsoChronology {
+    // Can only work with IsoChronology here
+    // others may be in separate module
+
+    @Test
+    public void factory_from_TemporalAccessor_dateWithChronlogy() {
+        assertEquals(Chronology.from(LocalDate.of(2012, 6, 30)), IsoChronology.INSTANCE);
+    }
+
+    @Test
+    public void factory_from_TemporalAccessor_chronology() {
+        assertEquals(Chronology.from(new TemporalAccessor() {
+            @Override
+            public boolean isSupported(TemporalField field) {
+                throw new UnsupportedOperationException();
+            }
+
+            @Override
+            public long getLong(TemporalField field) {
+                throw new UnsupportedOperationException();
+            }
+
+            @SuppressWarnings("unchecked")
+            @Override
+            public <R> R query(TemporalQuery<R> query) {
+                if (query == TemporalQuery.chronology()) {
+                    return (R) IsoChronology.INSTANCE;
+                }
+                throw new UnsupportedOperationException();
+            }
+        }), IsoChronology.INSTANCE);
+    }
+
+    @Test
+    public void factory_from_TemporalAccessor_noChronology() {
+        assertEquals(Chronology.from(new TemporalAccessor() {
+            @Override
+            public boolean isSupported(TemporalField field) {
+                throw new UnsupportedOperationException();
+            }
+
+            @Override
+            public long getLong(TemporalField field) {
+                throw new UnsupportedOperationException();
+            }
+
+            @Override
+            public <R> R query(TemporalQuery<R> query) {
+                if (query == TemporalQuery.chronology()) {
+                    return null;
+                }
+                throw new UnsupportedOperationException();
+            }
+        }), IsoChronology.INSTANCE);
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void factory_from_TemporalAccessor_null() {
+        Chronology.from(null);
+    }
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_date_TemporalAccessor() {
+        assertEquals(IsoChronology.INSTANCE.date(new TemporalAccessor() {
+            @Override
+            public boolean isSupported(TemporalField field) {
+                if (field == ChronoField.EPOCH_DAY) {
+                    return true;
+                }
+                throw new UnsupportedOperationException();
+            }
+
+            @Override
+            public long getLong(TemporalField field) {
+                if (field == ChronoField.EPOCH_DAY) {
+                    return LocalDate.of(2012, 6, 30).toEpochDay();
+                }
+                throw new UnsupportedOperationException();
+            }
+
+            @SuppressWarnings("unchecked")
+            @Override
+            public <R> R query(TemporalQuery<R> query) {
+                if (query == TemporalQuery.localDate()) {
+                    return (R) LocalDate.of(2012, 6, 30);
+                }
+                throw new UnsupportedOperationException();
+            }
+        }), LocalDate.of(2012, 6, 30));
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_date_TemporalAccessor_null() {
+        IsoChronology.INSTANCE.date(null);
+    }
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_localDateTime_TemporalAccessor() {
+        assertEquals(IsoChronology.INSTANCE.localDateTime(new TemporalAccessor() {
+            @Override
+            public boolean isSupported(TemporalField field) {
+                if (field == ChronoField.EPOCH_DAY || field == ChronoField.NANO_OF_DAY) {
+                    return true;
+                }
+                throw new UnsupportedOperationException();
+            }
+
+            @Override
+            public long getLong(TemporalField field) {
+                if (field == ChronoField.EPOCH_DAY) {
+                    return LocalDate.of(2012, 6, 30).toEpochDay();
+                }
+                if (field == ChronoField.NANO_OF_DAY) {
+                    return LocalTime.of(12, 30, 40).toNanoOfDay();
+                }
+                throw new UnsupportedOperationException();
+            }
+
+            @SuppressWarnings("unchecked")
+            @Override
+            public <R> R query(TemporalQuery<R> query) {
+                if (query == TemporalQuery.localDate()) {
+                    return (R) LocalDate.of(2012, 6, 30);
+                }
+                if (query == TemporalQuery.localTime()) {
+                    return (R) LocalTime.of(12, 30, 40);
+                }
+                throw new UnsupportedOperationException();
+            }
+        }), LocalDateTime.of(2012, 6, 30, 12, 30, 40));
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_localDateTime_TemporalAccessor_null() {
+        IsoChronology.INSTANCE.localDateTime(null);
+    }
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_zonedDateTime_TemporalAccessor() {
+        assertEquals(IsoChronology.INSTANCE.zonedDateTime(new TemporalAccessor() {
+            @Override
+            public boolean isSupported(TemporalField field) {
+                if (field == ChronoField.EPOCH_DAY || field == ChronoField.NANO_OF_DAY ||
+                        field == ChronoField.INSTANT_SECONDS || field == ChronoField.NANO_OF_SECOND) {
+                    return true;
+                }
+                throw new UnsupportedOperationException();
+            }
+
+            @Override
+            public long getLong(TemporalField field) {
+                if (field == ChronoField.INSTANT_SECONDS) {
+                    return ZonedDateTime.of(2012, 6, 30, 12, 30, 40, 0, ZoneId.of("Europe/London")).toEpochSecond();
+                }
+                if (field == ChronoField.NANO_OF_SECOND) {
+                    return 0;
+                }
+                if (field == ChronoField.EPOCH_DAY) {
+                    return LocalDate.of(2012, 6, 30).toEpochDay();
+                }
+                if (field == ChronoField.NANO_OF_DAY) {
+                    return LocalTime.of(12, 30, 40).toNanoOfDay();
+                }
+                throw new UnsupportedOperationException();
+            }
+
+            @SuppressWarnings("unchecked")
+            @Override
+            public <R> R query(TemporalQuery<R> query) {
+                if (query == TemporalQuery.localDate()) {
+                    return (R) LocalDate.of(2012, 6, 30);
+                }
+                if (query == TemporalQuery.localTime()) {
+                    return (R) LocalTime.of(12, 30, 40);
+                }
+                if (query == TemporalQuery.zoneId() || query == TemporalQuery.zone()) {
+                    return (R) ZoneId.of("Europe/London");
+                }
+                throw new UnsupportedOperationException();
+            }
+        }), ZonedDateTime.of(2012, 6, 30, 12, 30, 40, 0, ZoneId.of("Europe/London")));
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_zonedDateTime_TemporalAccessor_null() {
+        IsoChronology.INSTANCE.zonedDateTime(null);
+    }
+
+    //-----------------------------------------------------------------------
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "resolve_yearOfEra")
+    Object[][] data_resolve_yearOfEra() {
+        return new Object[][] {
+                {-1, 2012, null, null, false, false},
+                {0, 2012, null, -2011, true, true},
+                {1, 2012, null, 2012, true, true},
+                {2, 2012, null, null, false, false},
+
+                {null, 2012, null, 2012, true, null},
+                {null, 2012, 2012, 2012, true, true},
+                {null, 2012, -2011, -2011, true, true},
+                {null, 2012, 2013, null, false, false},
+                {null, 2012, -2013, null, false, false},
+        };
+    }
+
+    @Test(dataProvider = "resolve_yearOfEra")
+    public void test_resolve_yearOfEra_lenient(Integer e, int yoe, Integer y, Integer expected, boolean smart, Boolean strict) {
+        Map<TemporalField, Long> fieldValues = new HashMap<>();
+        if (e != null) {
+            fieldValues.put(ChronoField.ERA, (long) e);
+        }
+        fieldValues.put(ChronoField.YEAR_OF_ERA, (long) yoe);
+        if (y != null) {
+            fieldValues.put(ChronoField.YEAR, (long) y);
+        }
+        if (smart) {
+            LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.LENIENT);
+            assertEquals(date, null);
+            assertEquals(fieldValues.get(ChronoField.YEAR), (Long) (long) expected);
+            assertEquals(fieldValues.size(), 1);
+        } else {
+            try {
+                IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.LENIENT);
+                fail("Should have failed");
+            } catch (DateTimeException ex) {
+                // expected
+            }
+        }
+    }
+
+    @Test(dataProvider = "resolve_yearOfEra")
+    public void test_resolve_yearOfEra_smart(Integer e, int yoe, Integer y, Integer expected, boolean smart, Boolean strict) {
+        Map<TemporalField, Long> fieldValues = new HashMap<>();
+        if (e != null) {
+            fieldValues.put(ChronoField.ERA, (long) e);
+        }
+        fieldValues.put(ChronoField.YEAR_OF_ERA, (long) yoe);
+        if (y != null) {
+            fieldValues.put(ChronoField.YEAR, (long) y);
+        }
+        if (smart) {
+            LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART);
+            assertEquals(date, null);
+            assertEquals(fieldValues.get(ChronoField.YEAR), (Long) (long) expected);
+            assertEquals(fieldValues.size(), 1);
+        } else {
+            try {
+                IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART);
+                fail("Should have failed");
+            } catch (DateTimeException ex) {
+                // expected
+            }
+        }
+    }
+
+    @Test(dataProvider = "resolve_yearOfEra")
+    public void test_resolve_yearOfEra_strict(Integer e, int yoe, Integer y, Integer expected, boolean smart, Boolean strict) {
+        Map<TemporalField, Long> fieldValues = new HashMap<>();
+        if (e != null) {
+            fieldValues.put(ChronoField.ERA, (long) e);
+        }
+        fieldValues.put(ChronoField.YEAR_OF_ERA, (long) yoe);
+        if (y != null) {
+            fieldValues.put(ChronoField.YEAR, (long) y);
+        }
+        if (strict == null) {
+            LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT);
+            assertEquals(date, null);
+            assertEquals(fieldValues.get(ChronoField.YEAR_OF_ERA), (Long) (long) yoe);
+        } else if (strict) {
+            LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT);
+            assertEquals(date, null);
+            assertEquals(fieldValues.get(ChronoField.YEAR), (Long) (long) expected);
+            assertEquals(fieldValues.size(), 1);
+        } else {
+            try {
+                IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT);
+                fail("Should have failed");
+            } catch (DateTimeException ex) {
+                // expected
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "resolve_ymd")
+    Object[][] data_resolve_ymd() {
+        return new Object[][] {
+                {2012, 1, -365, date(2010, 12, 31), false, false},
+                {2012, 1, -364, date(2011, 1, 1), false, false},
+                {2012, 1, -31, date(2011, 11, 30), false, false},
+                {2012, 1, -30, date(2011, 12, 1), false, false},
+                {2012, 1, -12, date(2011, 12, 19), false, false},
+                {2012, 1, 1, date(2012, 1, 1), true, true},
+                {2012, 1, 59, date(2012, 2, 28), false, false},
+                {2012, 1, 60, date(2012, 2, 29), false, false},
+                {2012, 1, 61, date(2012, 3, 1), false, false},
+                {2012, 1, 365, date(2012, 12, 30), false, false},
+                {2012, 1, 366, date(2012, 12, 31), false, false},
+                {2012, 1, 367, date(2013, 1, 1), false, false},
+                {2012, 1, 367 + 364, date(2013, 12, 31), false, false},
+                {2012, 1, 367 + 365, date(2014, 1, 1), false, false},
+
+                {2012, 2, 1, date(2012, 2, 1), true, true},
+                {2012, 2, 28, date(2012, 2, 28), true, true},
+                {2012, 2, 29, date(2012, 2, 29), true, true},
+                {2012, 2, 30, date(2012, 3, 1), date(2012, 2, 29), false},
+                {2012, 2, 31, date(2012, 3, 2), date(2012, 2, 29), false},
+                {2012, 2, 32, date(2012, 3, 3), false, false},
+
+                {2012, -12, 1, date(2010, 12, 1), false, false},
+                {2012, -11, 1, date(2011, 1, 1), false, false},
+                {2012, -1, 1, date(2011, 11, 1), false, false},
+                {2012, 0, 1, date(2011, 12, 1), false, false},
+                {2012, 1, 1, date(2012, 1, 1), true, true},
+                {2012, 12, 1, date(2012, 12, 1), true, true},
+                {2012, 13, 1, date(2013, 1, 1), false, false},
+                {2012, 24, 1, date(2013, 12, 1), false, false},
+                {2012, 25, 1, date(2014, 1, 1), false, false},
+
+                {2012, 6, -31, date(2012, 4, 30), false, false},
+                {2012, 6, -30, date(2012, 5, 1), false, false},
+                {2012, 6, -1, date(2012, 5, 30), false, false},
+                {2012, 6, 0, date(2012, 5, 31), false, false},
+                {2012, 6, 1, date(2012, 6, 1), true, true},
+                {2012, 6, 30, date(2012, 6, 30), true, true},
+                {2012, 6, 31, date(2012, 7, 1), date(2012, 6, 30), false},
+                {2012, 6, 61, date(2012, 7, 31), false, false},
+                {2012, 6, 62, date(2012, 8, 1), false, false},
+
+                {2011, 2, 1, date(2011, 2, 1), true, true},
+                {2011, 2, 28, date(2011, 2, 28), true, true},
+                {2011, 2, 29, date(2011, 3, 1), date(2011, 2, 28), false},
+                {2011, 2, 30, date(2011, 3, 2), date(2011, 2, 28), false},
+                {2011, 2, 31, date(2011, 3, 3), date(2011, 2, 28), false},
+                {2011, 2, 32, date(2011, 3, 4), false, false},
+        };
+    }
+
+    @Test(dataProvider = "resolve_ymd")
+    public void test_resolve_ymd_lenient(int y, int m, int d, LocalDate expected, Object smart, boolean strict) {
+        Map<TemporalField, Long> fieldValues = new HashMap<>();
+        fieldValues.put(ChronoField.YEAR, (long) y);
+        fieldValues.put(ChronoField.MONTH_OF_YEAR, (long) m);
+        fieldValues.put(ChronoField.DAY_OF_MONTH, (long) d);
+        LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.LENIENT);
+        assertEquals(date, expected);
+        assertEquals(fieldValues.size(), 0);
+    }
+
+    @Test(dataProvider = "resolve_ymd")
+    public void test_resolve_ymd_smart(int y, int m, int d, LocalDate expected, Object smart, boolean strict) {
+        Map<TemporalField, Long> fieldValues = new HashMap<>();
+        fieldValues.put(ChronoField.YEAR, (long) y);
+        fieldValues.put(ChronoField.MONTH_OF_YEAR, (long) m);
+        fieldValues.put(ChronoField.DAY_OF_MONTH, (long) d);
+        if (Boolean.TRUE.equals(smart)) {
+            LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART);
+            assertEquals(date, expected);
+            assertEquals(fieldValues.size(), 0);
+        } else if (smart instanceof LocalDate) {
+            LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART);
+            assertEquals(date, smart);
+        } else {
+            try {
+                IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART);
+                fail("Should have failed");
+            } catch (DateTimeException ex) {
+                // expected
+            }
+        }
+    }
+
+    @Test(dataProvider = "resolve_ymd")
+    public void test_resolve_ymd_strict(int y, int m, int d, LocalDate expected, Object smart, boolean strict) {
+        Map<TemporalField, Long> fieldValues = new HashMap<>();
+        fieldValues.put(ChronoField.YEAR, (long) y);
+        fieldValues.put(ChronoField.MONTH_OF_YEAR, (long) m);
+        fieldValues.put(ChronoField.DAY_OF_MONTH, (long) d);
+        if (strict) {
+            LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT);
+            assertEquals(date, expected);
+            assertEquals(fieldValues.size(), 0);
+        } else {
+            try {
+                IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT);
+                fail("Should have failed");
+            } catch (DateTimeException ex) {
+                // expected
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "resolve_yd")
+    Object[][] data_resolve_yd() {
+        return new Object[][] {
+                {2012, -365, date(2010, 12, 31), false, false},
+                {2012, -364, date(2011, 1, 1), false, false},
+                {2012, -31, date(2011, 11, 30), false, false},
+                {2012, -30, date(2011, 12, 1), false, false},
+                {2012, -12, date(2011, 12, 19), false, false},
+                {2012, -1, date(2011, 12, 30), false, false},
+                {2012, 0, date(2011, 12, 31), false, false},
+                {2012, 1, date(2012, 1, 1), true, true},
+                {2012, 2, date(2012, 1, 2), true, true},
+                {2012, 31, date(2012, 1, 31), true, true},
+                {2012, 32, date(2012, 2, 1), true, true},
+                {2012, 59, date(2012, 2, 28), true, true},
+                {2012, 60, date(2012, 2, 29), true, true},
+                {2012, 61, date(2012, 3, 1), true, true},
+                {2012, 365, date(2012, 12, 30), true, true},
+                {2012, 366, date(2012, 12, 31), true, true},
+                {2012, 367, date(2013, 1, 1), false, false},
+                {2012, 367 + 364, date(2013, 12, 31), false, false},
+                {2012, 367 + 365, date(2014, 1, 1), false, false},
+
+                {2011, 59, date(2011, 2, 28), true, true},
+                {2011, 60, date(2011, 3, 1), true, true},
+        };
+    }
+
+    @Test(dataProvider = "resolve_yd")
+    public void test_resolve_yd_lenient(int y, int d, LocalDate expected, boolean smart, boolean strict) {
+        Map<TemporalField, Long> fieldValues = new HashMap<>();
+        fieldValues.put(ChronoField.YEAR, (long) y);
+        fieldValues.put(ChronoField.DAY_OF_YEAR, (long) d);
+        LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.LENIENT);
+        assertEquals(date, expected);
+        assertEquals(fieldValues.size(), 0);
+    }
+
+    @Test(dataProvider = "resolve_yd")
+    public void test_resolve_yd_smart(int y, int d, LocalDate expected, boolean smart, boolean strict) {
+        Map<TemporalField, Long> fieldValues = new HashMap<>();
+        fieldValues.put(ChronoField.YEAR, (long) y);
+        fieldValues.put(ChronoField.DAY_OF_YEAR, (long) d);
+        if (smart) {
+            LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART);
+            assertEquals(date, expected);
+            assertEquals(fieldValues.size(), 0);
+        } else {
+            try {
+                IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART);
+                fail("Should have failed");
+            } catch (DateTimeException ex) {
+                // expected
+            }
+        }
+    }
+
+    @Test(dataProvider = "resolve_yd")
+    public void test_resolve_yd_strict(int y, int d, LocalDate expected, boolean smart, boolean strict) {
+        Map<TemporalField, Long> fieldValues = new HashMap<>();
+        fieldValues.put(ChronoField.YEAR, (long) y);
+        fieldValues.put(ChronoField.DAY_OF_YEAR, (long) d);
+        if (strict) {
+            LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT);
+            assertEquals(date, expected);
+            assertEquals(fieldValues.size(), 0);
+        } else {
+            try {
+                IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT);
+                fail("Should have failed");
+            } catch (DateTimeException ex) {
+                // expected
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "resolve_ymaa")
+    Object[][] data_resolve_ymaa() {
+        return new Object[][] {
+                {2012, 1, 1, -365, date(2010, 12, 31), false, false},
+                {2012, 1, 1, -364, date(2011, 1, 1), false, false},
+                {2012, 1, 1, -31, date(2011, 11, 30), false, false},
+                {2012, 1, 1, -30, date(2011, 12, 1), false, false},
+                {2012, 1, 1, -12, date(2011, 12, 19), false, false},
+                {2012, 1, 1, 1, date(2012, 1, 1), true, true},
+                {2012, 1, 1, 59, date(2012, 2, 28), false, false},
+                {2012, 1, 1, 60, date(2012, 2, 29), false, false},
+                {2012, 1, 1, 61, date(2012, 3, 1), false, false},
+                {2012, 1, 1, 365, date(2012, 12, 30), false, false},
+                {2012, 1, 1, 366, date(2012, 12, 31), false, false},
+                {2012, 1, 1, 367, date(2013, 1, 1), false, false},
+                {2012, 1, 1, 367 + 364, date(2013, 12, 31), false, false},
+                {2012, 1, 1, 367 + 365, date(2014, 1, 1), false, false},
+
+                {2012, 2, 0, 1, date(2012, 1, 25), false, false},
+                {2012, 2, 0, 7, date(2012, 1, 31), false, false},
+                {2012, 2, 1, 1, date(2012, 2, 1), true, true},
+                {2012, 2, 1, 7, date(2012, 2, 7), true, true},
+                {2012, 2, 2, 1, date(2012, 2, 8), true, true},
+                {2012, 2, 2, 7, date(2012, 2, 14), true, true},
+                {2012, 2, 3, 1, date(2012, 2, 15), true, true},
+                {2012, 2, 3, 7, date(2012, 2, 21), true, true},
+                {2012, 2, 4, 1, date(2012, 2, 22), true, true},
+                {2012, 2, 4, 7, date(2012, 2, 28), true, true},
+                {2012, 2, 5, 1, date(2012, 2, 29), true, true},
+                {2012, 2, 5, 2, date(2012, 3, 1), true, false},
+                {2012, 2, 5, 7, date(2012, 3, 6), true, false},
+                {2012, 2, 6, 1, date(2012, 3, 7), false, false},
+                {2012, 2, 6, 7, date(2012, 3, 13), false, false},
+
+                {2012, 12, 1, 1, date(2012, 12, 1), true, true},
+                {2012, 12, 5, 1, date(2012, 12, 29), true, true},
+                {2012, 12, 5, 2, date(2012, 12, 30), true, true},
+                {2012, 12, 5, 3, date(2012, 12, 31), true, true},
+                {2012, 12, 5, 4, date(2013, 1, 1), true, false},
+                {2012, 12, 5, 7, date(2013, 1, 4), true, false},
+
+                {2012, -12, 1, 1, date(2010, 12, 1), false, false},
+                {2012, -11, 1, 1, date(2011, 1, 1), false, false},
+                {2012, -1, 1, 1, date(2011, 11, 1), false, false},
+                {2012, 0, 1, 1, date(2011, 12, 1), false, false},
+                {2012, 1, 1, 1, date(2012, 1, 1), true, true},
+                {2012, 12, 1, 1, date(2012, 12, 1), true, true},
+                {2012, 13, 1, 1, date(2013, 1, 1), false, false},
+                {2012, 24, 1, 1, date(2013, 12, 1), false, false},
+                {2012, 25, 1, 1, date(2014, 1, 1), false, false},
+
+                {2011, 2, 1, 1, date(2011, 2, 1), true, true},
+                {2011, 2, 4, 7, date(2011, 2, 28), true, true},
+                {2011, 2, 5, 1, date(2011, 3, 1), true, false},
+        };
+    }
+
+    @Test(dataProvider = "resolve_ymaa")
+    public void test_resolve_ymaa_lenient(int y, int m, int w, int d, LocalDate expected, boolean smart, boolean strict) {
+        Map<TemporalField, Long> fieldValues = new HashMap<>();
+        fieldValues.put(ChronoField.YEAR, (long) y);
+        fieldValues.put(ChronoField.MONTH_OF_YEAR, (long) m);
+        fieldValues.put(ChronoField.ALIGNED_WEEK_OF_MONTH, (long) w);
+        fieldValues.put(ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH, (long) d);
+        LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.LENIENT);
+        assertEquals(date, expected);
+        assertEquals(fieldValues.size(), 0);
+    }
+
+    @Test(dataProvider = "resolve_ymaa")
+    public void test_resolve_ymaa_smart(int y, int m, int w, int d, LocalDate expected, boolean smart, boolean strict) {
+        Map<TemporalField, Long> fieldValues = new HashMap<>();
+        fieldValues.put(ChronoField.YEAR, (long) y);
+        fieldValues.put(ChronoField.MONTH_OF_YEAR, (long) m);
+        fieldValues.put(ChronoField.ALIGNED_WEEK_OF_MONTH, (long) w);
+        fieldValues.put(ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH, (long) d);
+        if (smart) {
+            LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART);
+            assertEquals(date, expected);
+            assertEquals(fieldValues.size(), 0);
+        } else {
+            try {
+                IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART);
+                fail("Should have failed");
+            } catch (DateTimeException ex) {
+                // expected
+            }
+        }
+    }
+
+    @Test(dataProvider = "resolve_ymaa")
+    public void test_resolve_ymaa_strict(int y, int m, int w, int d, LocalDate expected, boolean smart, boolean strict) {
+        Map<TemporalField, Long> fieldValues = new HashMap<>();
+        fieldValues.put(ChronoField.YEAR, (long) y);
+        fieldValues.put(ChronoField.MONTH_OF_YEAR, (long) m);
+        fieldValues.put(ChronoField.ALIGNED_WEEK_OF_MONTH, (long) w);
+        fieldValues.put(ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH, (long) d);
+        if (strict) {
+            LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT);
+            assertEquals(date, expected);
+            assertEquals(fieldValues.size(), 0);
+        } else {
+            try {
+                IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT);
+                fail("Should have failed");
+            } catch (DateTimeException ex) {
+                // expected
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    private static LocalDate date(int y, int m, int d) {
+        return LocalDate.of(y, m, d);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKIsoEra.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono;
+
+import static java.time.temporal.ChronoField.ERA;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.time.chrono.Era;
+import java.time.chrono.IsoChronology;
+import java.time.chrono.IsoEra;
+import java.time.temporal.ValueRange;
+import java.util.List;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test.
+ */
+@Test
+public class TCKIsoEra {
+
+    @DataProvider(name = "IsoEras")
+    Object[][] data_of_eras() {
+        return new Object[][] {
+                    {IsoEra.BCE, "BCE", 0},
+                    {IsoEra.CE, "CE", 1},
+        };
+    }
+
+    @Test(dataProvider="IsoEras")
+    public void test_valueOf(IsoEra era , String eraName, int eraValue) {
+        assertEquals(era.getValue(), eraValue);
+        assertEquals(IsoEra.of(eraValue), era);
+        assertEquals(IsoEra.valueOf(eraName), era);
+    }
+
+    //-----------------------------------------------------------------------
+    // values()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_values() {
+        List<Era> eraList = IsoChronology.INSTANCE.eras();
+        IsoEra[] eras = IsoEra.values();
+        assertEquals(eraList.size(), eras.length);
+        for (IsoEra era : eras) {
+            assertTrue(eraList.contains(era));
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // range()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_range() {
+        for (IsoEra era : IsoEra.values()) {
+            assertEquals(era.range(ERA), ValueRange.of(0, 1));
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKJapaneseChronology.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,545 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono;
+
+import static java.time.temporal.ChronoField.DAY_OF_MONTH;
+import static java.time.temporal.ChronoField.ERA;
+import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoField.YEAR;
+import static java.time.temporal.ChronoField.YEAR_OF_ERA;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+
+import java.time.DateTimeException;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.Month;
+import java.time.Period;
+import java.time.Year;
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.Chronology;
+import java.time.chrono.Era;
+import java.time.chrono.IsoChronology;
+import java.time.chrono.JapaneseChronology;
+import java.time.chrono.JapaneseDate;
+import java.time.chrono.JapaneseEra;
+import java.time.chrono.MinguoChronology;
+import java.time.chrono.MinguoDate;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.TemporalAdjuster;
+import java.util.List;
+import java.util.Locale;
+
+import org.testng.Assert;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test.
+ */
+@Test
+public class TCKJapaneseChronology {
+    private static final int YDIFF_HEISEI = 1988;
+    private static final int YDIFF_MEIJI = 1867;
+    private static final int YDIFF_SHOWA = 1925;
+    private static final int YDIFF_TAISHO = 1911;
+
+    //-----------------------------------------------------------------------
+    // Chronology.of(String)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_chrono_byName() {
+        Chronology c = JapaneseChronology.INSTANCE;
+        Chronology test = Chronology.of("Japanese");
+        Assert.assertNotNull(test, "The Japanese calendar could not be found byName");
+        Assert.assertEquals(test.getId(), "Japanese", "ID mismatch");
+        Assert.assertEquals(test.getCalendarType(), "japanese", "Type mismatch");
+        Assert.assertEquals(test, c);
+    }
+
+    //-----------------------------------------------------------------------
+    // Chronology.ofLocale(Locale)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_chrono_byLocale_fullTag_japaneseCalendarFromJapan() {
+        Chronology test = Chronology.ofLocale(Locale.forLanguageTag("ja-JP-u-ca-japanese"));
+        Assert.assertEquals(test.getId(), "Japanese");
+        Assert.assertEquals(test, JapaneseChronology.INSTANCE);
+    }
+
+    @Test
+    public void test_chrono_byLocale_fullTag_japaneseCalendarFromElsewhere() {
+        Chronology test = Chronology.ofLocale(Locale.forLanguageTag("en-US-u-ca-japanese"));
+        Assert.assertEquals(test.getId(), "Japanese");
+        Assert.assertEquals(test, JapaneseChronology.INSTANCE);
+    }
+
+    @Test
+    public void test_chrono_byLocale_oldJP_noVariant() {
+        Chronology test = Chronology.ofLocale(new Locale("ja", "JP"));
+        Assert.assertEquals(test.getId(), "ISO");
+        Assert.assertEquals(test, IsoChronology.INSTANCE);
+    }
+
+    @Test
+    public void test_chrono_byLocale_oldJP_variant() {
+        Chronology test = Chronology.ofLocale(new Locale("ja", "JP", "JP"));
+        Assert.assertEquals(test.getId(), "Japanese");
+        Assert.assertEquals(test, JapaneseChronology.INSTANCE);
+    }
+
+    @Test
+    public void test_chrono_byLocale_iso() {
+        Assert.assertEquals(Chronology.ofLocale(new Locale("ja", "JP")).getId(), "ISO");
+        Assert.assertEquals(Chronology.ofLocale(Locale.forLanguageTag("ja-JP")).getId(), "ISO");
+        Assert.assertEquals(Chronology.ofLocale(Locale.forLanguageTag("ja-JP-JP")).getId(), "ISO");
+    }
+
+    //-----------------------------------------------------------------------
+    // creation, toLocalDate()
+    //-----------------------------------------------------------------------
+    @DataProvider(name="samples")
+    Object[][] data_samples() {
+        return new Object[][] {
+            {JapaneseChronology.INSTANCE.date(1, 1, 1), LocalDate.of(1, 1, 1)},
+            {JapaneseChronology.INSTANCE.date(1, 1, 2), LocalDate.of(1, 1, 2)},
+            {JapaneseChronology.INSTANCE.date(1, 1, 3), LocalDate.of(1, 1, 3)},
+
+            {JapaneseChronology.INSTANCE.date(2, 1, 1), LocalDate.of(2, 1, 1)},
+            {JapaneseChronology.INSTANCE.date(3, 1, 1), LocalDate.of(3, 1, 1)},
+            {JapaneseChronology.INSTANCE.date(3, 12, 6), LocalDate.of(3, 12, 6)},
+            {JapaneseChronology.INSTANCE.date(4, 1, 1), LocalDate.of(4, 1, 1)},
+            {JapaneseChronology.INSTANCE.date(4, 7, 3), LocalDate.of(4, 7, 3)},
+            {JapaneseChronology.INSTANCE.date(4, 7, 4), LocalDate.of(4, 7, 4)},
+            {JapaneseChronology.INSTANCE.date(5, 1, 1), LocalDate.of(5, 1, 1)},
+            {JapaneseChronology.INSTANCE.date(1662, 3, 3), LocalDate.of(1662, 3, 3)},
+            {JapaneseChronology.INSTANCE.date(1728, 10, 28), LocalDate.of(1728, 10, 28)},
+            {JapaneseChronology.INSTANCE.date(1728, 10, 29), LocalDate.of(1728, 10, 29)},
+
+            {JapaneseChronology.INSTANCE.date(JapaneseEra.HEISEI, 1996 - YDIFF_HEISEI, 2, 29), LocalDate.of(1996, 2, 29)},
+            {JapaneseChronology.INSTANCE.date(JapaneseEra.HEISEI, 2000 - YDIFF_HEISEI, 2, 29), LocalDate.of(2000, 2, 29)},
+            {JapaneseChronology.INSTANCE.date(JapaneseEra.MEIJI, 1868 - YDIFF_MEIJI, 2, 29), LocalDate.of(1868, 2, 29)},
+            {JapaneseChronology.INSTANCE.date(JapaneseEra.SHOWA, 1928 - YDIFF_SHOWA, 12, 25), LocalDate.of(1928, 12, 25)},
+            {JapaneseChronology.INSTANCE.date(JapaneseEra.TAISHO, 1912 - YDIFF_TAISHO, 7, 30), LocalDate.of(1912, 7, 30)},
+
+            {JapaneseChronology.INSTANCE.dateYearDay(1996, 60), LocalDate.of(1996, 2, 29)},
+            {JapaneseChronology.INSTANCE.dateYearDay(1868, 60), LocalDate.of(1868, 2, 29)},
+            {JapaneseChronology.INSTANCE.dateYearDay(1928, 60), LocalDate.of(1928, 2, 29)},
+            {JapaneseChronology.INSTANCE.dateYearDay(1912, 60), LocalDate.of(1912, 2, 29)},
+        };
+    }
+
+    @Test(dataProvider="samples")
+    public void test_toLocalDate(JapaneseDate jdate, LocalDate iso) {
+        assertEquals(LocalDate.from(jdate), iso);
+    }
+
+    @Test(dataProvider="samples")
+    public void test_fromCalendrical(JapaneseDate jdate, LocalDate iso) {
+        assertEquals(JapaneseChronology.INSTANCE.date(iso), jdate);
+    }
+
+    @DataProvider(name="badDates")
+    Object[][] data_badDates() {
+        return new Object[][] {
+            {1728, 0, 0},
+
+            {1728, -1, 1},
+            {1728, 0, 1},
+            {1728, 14, 1},
+            {1728, 15, 1},
+
+            {1728, 1, -1},
+            {1728, 1, 0},
+            {1728, 1, 32},
+
+            {1728, 12, -1},
+            {1728, 12, 0},
+            {1728, 12, 32},
+
+            {1725, 2, 29},
+            {500, 2, 29},
+            {2100, 2, 29},
+        };
+    }
+
+    @Test(dataProvider="badDates", expectedExceptions=DateTimeException.class)
+    public void test_badDates(int year, int month, int dom) {
+        JapaneseChronology.INSTANCE.date(year, month, dom);
+    }
+
+    //-----------------------------------------------------------------------
+    // prolepticYear() and is LeapYear()
+    //-----------------------------------------------------------------------
+    @DataProvider(name="prolepticYear")
+    Object[][] data_prolepticYear() {
+        return new Object[][] {
+                {2, JapaneseEra.HEISEI, 1, 1 + YDIFF_HEISEI, false},
+                {2, JapaneseEra.HEISEI, 100, 100 + YDIFF_HEISEI, true},
+                {2, JapaneseEra.HEISEI, 0, YDIFF_HEISEI, true},
+                {2, JapaneseEra.HEISEI, -10, -10 + YDIFF_HEISEI, false},
+
+                {-1, JapaneseEra.MEIJI, 1, 1 + YDIFF_MEIJI, true},
+                {-1, JapaneseEra.MEIJI, 4, 4 + YDIFF_MEIJI, false},
+
+                {1, JapaneseEra.SHOWA, 1, 1 + YDIFF_SHOWA, false},
+                {1, JapaneseEra.SHOWA, 7, 7 + YDIFF_SHOWA, true},
+
+                {0, JapaneseEra.TAISHO, 1, 1 + YDIFF_TAISHO, true},
+                {0, JapaneseEra.TAISHO, 4, 4 + YDIFF_TAISHO, false},
+        };
+    }
+
+    @Test(dataProvider="prolepticYear")
+    public void test_prolepticYear(int eraValue, Era  era, int yearOfEra, int expectedProlepticYear, boolean isLeapYear) {
+        Era eraObj = JapaneseChronology.INSTANCE.eraOf(eraValue) ;
+        assertTrue(JapaneseChronology.INSTANCE.eras().contains(eraObj));
+        assertEquals(eraObj, era);
+        assertEquals(JapaneseChronology.INSTANCE.prolepticYear(era, yearOfEra), expectedProlepticYear);
+        assertEquals(JapaneseChronology.INSTANCE.isLeapYear(expectedProlepticYear), isLeapYear) ;
+        assertEquals(JapaneseChronology.INSTANCE.isLeapYear(expectedProlepticYear), Year.of(expectedProlepticYear).isLeap()) ;
+    }
+
+    @DataProvider(name="prolepticYearError")
+    Object[][] data_prolepticYearError() {
+        return new Object[][] {
+                {JapaneseEra.MEIJI, 100},
+                {JapaneseEra.MEIJI, 0},
+                {JapaneseEra.MEIJI, -10},
+
+                {JapaneseEra.SHOWA, 100},
+                {JapaneseEra.SHOWA, 0},
+                {JapaneseEra.SHOWA, -10},
+
+                {JapaneseEra.TAISHO, 100},
+                {JapaneseEra.TAISHO, 0},
+                {JapaneseEra.TAISHO, -10},
+        };
+    }
+
+    @Test(dataProvider="prolepticYearError", expectedExceptions=DateTimeException.class)
+    public void test_prolepticYearError(Era era, int yearOfEra) {
+        JapaneseChronology.INSTANCE.prolepticYear(era, yearOfEra);
+    }
+
+    //-----------------------------------------------------------------------
+    // Bad Era for Chronology.date(era,...) and Chronology.prolepticYear(Era,...)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_InvalidEras() {
+        // Verify that the eras from every other Chronology are invalid
+        for (Chronology chrono : Chronology.getAvailableChronologies()) {
+            if (chrono instanceof JapaneseChronology) {
+                continue;
+            }
+            List<Era> eras = chrono.eras();
+            for (Era era : eras) {
+                try {
+                    ChronoLocalDate date = JapaneseChronology.INSTANCE.date(era, 1, 1, 1);
+                    fail("JapaneseChronology.date did not throw ClassCastException for Era: " + era);
+                } catch (ClassCastException cex) {
+                    ; // ignore expected exception
+                }
+
+                try {
+                    @SuppressWarnings("unused")
+                    JapaneseDate jdate = JapaneseDate.of(era, 1, 1, 1);
+                    fail("JapaneseDate.of did not throw ClassCastException for Era: " + era);
+                } catch (ClassCastException cex) {
+                    ; // ignore expected exception
+                }
+
+                try {
+                    @SuppressWarnings("unused")
+                    int year = JapaneseChronology.INSTANCE.prolepticYear(era, 1);
+                    fail("JapaneseChronology.prolepticYear did not throw ClassCastException for Era: " + era);
+                } catch (ClassCastException cex) {
+                    ; // ignore expected exception
+                }
+
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // get(TemporalField)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_getLong() {
+        JapaneseDate base = JapaneseChronology.INSTANCE.date(JapaneseEra.SHOWA, 63, 6, 30);
+        assertEquals(base.getLong(ERA), JapaneseEra.SHOWA.getValue());
+        assertEquals(base.getLong(YEAR), 1988L);
+        assertEquals(base.getLong(YEAR_OF_ERA), 63L);
+        assertEquals(base.getLong(MONTH_OF_YEAR), 6L);
+        assertEquals(base.getLong(DAY_OF_MONTH), 30L);
+    }
+
+    //-----------------------------------------------------------------------
+    // with(TemporalField, long)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_with_TemporalField_long() {
+        JapaneseDate base = JapaneseChronology.INSTANCE.date(JapaneseEra.SHOWA, 63, 6, 30);
+        JapaneseDate test = base.with(YEAR, 1987);
+        assertEquals(test, JapaneseChronology.INSTANCE.date(JapaneseEra.SHOWA, 62, 6, 30));
+
+        test = test.with(YEAR_OF_ERA, 2);
+        assertEquals(test, JapaneseChronology.INSTANCE.date(JapaneseEra.SHOWA, 2, 6, 30));
+
+        test = test.with(ERA, JapaneseEra.HEISEI.getValue());
+        assertEquals(test, JapaneseChronology.INSTANCE.date(JapaneseEra.HEISEI, 2, 6, 30));
+
+        test = test.with(MONTH_OF_YEAR, 3);
+        assertEquals(test, JapaneseChronology.INSTANCE.date(JapaneseEra.HEISEI, 2, 3, 30));
+
+        test = test.with(DAY_OF_MONTH, 4);
+        assertEquals(test, JapaneseChronology.INSTANCE.date(JapaneseEra.HEISEI, 2, 3, 4));
+    }
+
+    //-----------------------------------------------------------------------
+    // with(WithAdjuster)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_adjust1() {
+        JapaneseDate base = JapaneseChronology.INSTANCE.date(1728, 10, 29);
+        JapaneseDate test = base.with(TemporalAdjuster.lastDayOfMonth());
+        assertEquals(test, JapaneseChronology.INSTANCE.date(1728, 10, 31));
+    }
+
+    @Test
+    public void test_adjust2() {
+        JapaneseDate base = JapaneseChronology.INSTANCE.date(1728, 12, 2);
+        JapaneseDate test = base.with(TemporalAdjuster.lastDayOfMonth());
+        assertEquals(test, JapaneseChronology.INSTANCE.date(1728, 12, 31));
+    }
+
+    //-----------------------------------------------------------------------
+    // JapaneseDate.with(Local*)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_adjust_toLocalDate() {
+        JapaneseDate jdate = JapaneseChronology.INSTANCE.date(1726, 1, 4);
+        JapaneseDate test = jdate.with(LocalDate.of(2012, 7, 6));
+        assertEquals(test, JapaneseChronology.INSTANCE.date(2012, 7, 6));
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void test_adjust_toMonth() {
+        JapaneseDate jdate = JapaneseChronology.INSTANCE.date(1726, 1, 4);
+        jdate.with(Month.APRIL);
+    }
+
+    //-----------------------------------------------------------------------
+    // LocalDate.with(JapaneseDate)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_LocalDate_adjustToJapaneseDate() {
+        JapaneseDate jdate = JapaneseChronology.INSTANCE.date(1728, 10, 29);
+        LocalDate test = LocalDate.MIN.with(jdate);
+        assertEquals(test, LocalDate.of(1728, 10, 29));
+    }
+
+    @Test
+    public void test_LocalDateTime_adjustToJapaneseDate() {
+        JapaneseDate jdate = JapaneseChronology.INSTANCE.date(1728, 10, 29);
+        LocalDateTime test = LocalDateTime.MIN.with(jdate);
+        assertEquals(test, LocalDateTime.of(1728, 10, 29, 0, 0));
+    }
+
+    //-----------------------------------------------------------------------
+    // Check Japanese Eras
+    //-----------------------------------------------------------------------
+    @DataProvider(name="japaneseEras")
+    Object[][] data_japanseseEras() {
+        return new Object[][] {
+            { JapaneseEra.SEIREKI, -999, "Seireki"},
+            { JapaneseEra.MEIJI, -1, "Meiji"},
+            { JapaneseEra.TAISHO, 0, "Taisho"},
+            { JapaneseEra.SHOWA, 1, "Showa"},
+            { JapaneseEra.HEISEI, 2, "Heisei"},
+        };
+    }
+
+    @Test(dataProvider="japaneseEras")
+    public void test_Japanese_Eras(Era era, int eraValue, String name) {
+        assertEquals(era.getValue(), eraValue, "EraValue");
+        assertEquals(era.toString(), name, "Era Name");
+        assertEquals(era, JapaneseChronology.INSTANCE.eraOf(eraValue), "JapaneseChronology.eraOf()");
+        List<Era> eras = JapaneseChronology.INSTANCE.eras();
+        assertTrue(eras.contains(era), "Era is not present in JapaneseChronology.INSTANCE.eras()");
+    }
+
+    @Test
+    public void test_Japanese_badEras() {
+        int badEras[] = {-1000, -998, -997, -2, 3, 4, 1000};
+        for (int badEra : badEras) {
+            try {
+                Era era = JapaneseChronology.INSTANCE.eraOf(badEra);
+                fail("JapaneseChronology.eraOf returned " + era + " + for invalid eraValue " + badEra);
+            } catch (DateTimeException ex) {
+                // ignore expected exception
+            }
+        }
+    }
+
+    @Test(dataProvider="japaneseEras")
+    public void test_JapaneseEra_singletons(Era expectedEra, int eraValue, String name) {
+        JapaneseEra actualEra = JapaneseEra.valueOf(name);
+        assertEquals(actualEra, expectedEra, "JapaneseEra.valueOf(name)");
+
+        actualEra = JapaneseEra.of(eraValue);
+        assertEquals(actualEra, expectedEra, "JapaneseEra.of(value)");
+
+        String string = actualEra.toString();
+        assertEquals(string, name, "JapaneseEra.toString()");
+    }
+
+    @Test
+    public void test_JapaneseEra_values() {
+        JapaneseEra[] actualEras = JapaneseEra.values();
+        Object[][] erasInfo = data_japanseseEras();
+        assertEquals(actualEras.length, erasInfo.length, "Wrong number of Eras");
+
+        for (int i = 0; i < erasInfo.length; i++) {
+            Object[] eraInfo = erasInfo[i];
+            assertEquals(actualEras[i], eraInfo[0], "Singleton mismatch");
+        }
+    }
+
+    @Test
+    public void test_JapaneseChronology_eras() {
+        List<Era> actualEras = JapaneseChronology.INSTANCE.eras();
+        Object[][] erasInfo = data_japanseseEras();
+        assertEquals(actualEras.size(), erasInfo.length, "Wrong number of Eras");
+
+        for (int i = 0; i < erasInfo.length; i++) {
+            Object[] eraInfo = erasInfo[i];
+            assertEquals(actualEras.get(i), eraInfo[0], "Singleton mismatch");
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // PeriodUntil()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_periodUntilDate() {
+        JapaneseDate mdate1 = JapaneseDate.of(1970, 1, 1);
+        JapaneseDate mdate2 = JapaneseDate.of(1971, 2, 2);
+        Period period = mdate1.periodUntil(mdate2);
+        assertEquals(period, Period.of(1, 1, 1));
+    }
+
+    @Test
+    public void test_periodUntilUnit() {
+        JapaneseDate mdate1 = JapaneseDate.of(1970, 1, 1);
+        JapaneseDate mdate2 = JapaneseDate.of(1971, 2, 2);
+        long months = mdate1.periodUntil(mdate2, ChronoUnit.MONTHS);
+        assertEquals(months, 13);
+    }
+
+    @Test
+    public void test_periodUntilDiffChrono() {
+        JapaneseDate mdate1 = JapaneseDate.of(1970, 1, 1);
+        JapaneseDate mdate2 = JapaneseDate.of(1971, 2, 2);
+        MinguoDate ldate2 = MinguoChronology.INSTANCE.date(mdate2);
+        Period period = mdate1.periodUntil(ldate2);
+        assertEquals(period, Period.of(1, 1, 1));
+    }
+
+    //-----------------------------------------------------------------------
+    // toString()
+    //-----------------------------------------------------------------------
+    @DataProvider(name="toString")
+    Object[][] data_toString() {
+        return new Object[][] {
+            {JapaneseChronology.INSTANCE.date(0001,  1,  1), "Japanese 0001-01-01"},
+            {JapaneseChronology.INSTANCE.date(1728, 10, 28), "Japanese 1728-10-28"},
+            {JapaneseChronology.INSTANCE.date(1728, 10, 29), "Japanese 1728-10-29"},
+            {JapaneseChronology.INSTANCE.date(1727, 12,  5), "Japanese 1727-12-05"},
+            {JapaneseChronology.INSTANCE.date(1727, 12,  6), "Japanese 1727-12-06"},
+            {JapaneseChronology.INSTANCE.date(1868,  9,  8), "Japanese Meiji 1-09-08"},
+            {JapaneseChronology.INSTANCE.date(1912,  7, 29), "Japanese Meiji 45-07-29"},
+            {JapaneseChronology.INSTANCE.date(1912,  7, 30), "Japanese Taisho 1-07-30"},
+            {JapaneseChronology.INSTANCE.date(1926, 12, 24), "Japanese Taisho 15-12-24"},
+            {JapaneseChronology.INSTANCE.date(1926, 12, 25), "Japanese Showa 1-12-25"},
+            {JapaneseChronology.INSTANCE.date(1989,  1,  7), "Japanese Showa 64-01-07"},
+            {JapaneseChronology.INSTANCE.date(1989,  1,  8), "Japanese Heisei 1-01-08"},
+            {JapaneseChronology.INSTANCE.date(2012, 12,  6), "Japanese Heisei 24-12-06"},
+        };
+    }
+
+    @Test(dataProvider="toString")
+    public void test_toString(JapaneseDate jdate, String expected) {
+        assertEquals(jdate.toString(), expected);
+    }
+
+    //-----------------------------------------------------------------------
+    // equals()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_equals_true() {
+        assertTrue(JapaneseChronology.INSTANCE.equals(JapaneseChronology.INSTANCE));
+    }
+
+    @Test
+    public void test_equals_false() {
+        assertFalse(JapaneseChronology.INSTANCE.equals(IsoChronology.INSTANCE));
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKJapaneseEra.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono;
+
+import static java.time.temporal.ChronoField.ERA;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.time.chrono.Era;
+import java.time.chrono.JapaneseChronology;
+import java.time.chrono.JapaneseEra;
+import java.util.List;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test.
+ */
+@Test
+public class TCKJapaneseEra {
+
+    @DataProvider(name = "JapaneseEras")
+    Object[][] data_of_eras() {
+        return new Object[][] {
+                    {JapaneseEra.HEISEI, "Heisei", 2},
+                    {JapaneseEra.SHOWA, "Showa", 1},
+                    {JapaneseEra.TAISHO, "Taisho", 0},
+                    {JapaneseEra.MEIJI, "Meiji", -1},
+                    {JapaneseEra.SEIREKI, "Seireki", -999},
+        };
+    }
+
+    @Test(dataProvider="JapaneseEras")
+    public void test_valueOf(JapaneseEra era , String eraName, int eraValue) {
+        assertEquals(era.getValue(), eraValue);
+        assertEquals(JapaneseEra.of(eraValue), era);
+        assertEquals(JapaneseEra.valueOf(eraName), era);
+    }
+
+    //-----------------------------------------------------------------------
+    // values()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_values() {
+        List<Era> eraList = JapaneseChronology.INSTANCE.eras();
+        JapaneseEra[] eras = JapaneseEra.values();
+        assertEquals(eraList.size(), eras.length);
+        for (JapaneseEra era : eras) {
+            assertTrue(eraList.contains(era));
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // range()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_range() {
+        // eras may be added after release
+        for (JapaneseEra era : JapaneseEra.values()) {
+            assertEquals(era.range(ERA).getMinimum(), -999);
+            assertEquals(era.range(ERA).getLargestMinimum(), -999);
+            assertEquals(era.range(ERA).getSmallestMaximum(), era.range(ERA).getMaximum());
+            assertEquals(era.range(ERA).getMaximum() >= 2, true);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKMinguoChronology.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,523 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+
+import java.time.Clock;
+import java.time.DateTimeException;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.Month;
+import java.time.OffsetDateTime;
+import java.time.Period;
+import java.time.Year;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.ChronoLocalDateTime;
+import java.time.chrono.ChronoZonedDateTime;
+import java.time.chrono.Chronology;
+import java.time.chrono.Era;
+import java.time.chrono.IsoChronology;
+import java.time.chrono.JapaneseDate;
+import java.time.chrono.MinguoChronology;
+import java.time.chrono.MinguoDate;
+import java.time.chrono.MinguoEra;
+import java.time.chrono.ThaiBuddhistChronology;
+import java.time.chrono.ThaiBuddhistDate;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalAdjuster;
+import java.util.List;
+
+import org.testng.Assert;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test.
+ */
+@Test
+public class TCKMinguoChronology {
+
+    private static final ZoneOffset OFFSET_PTWO = ZoneOffset.ofHours(2);
+    private static final ZoneId ZONE_PARIS = ZoneId.of("Europe/Paris");
+    private static final int YDIFF = 1911;
+    //-----------------------------------------------------------------------
+    // Chronology.ofName("Minguo")  Lookup by name
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_chrono_byName() {
+        Chronology c = MinguoChronology.INSTANCE;
+        Chronology test = Chronology.of("Minguo");
+        Assert.assertNotNull(test, "The Minguo calendar could not be found byName");
+        Assert.assertEquals(test.getId(), "Minguo", "ID mismatch");
+        Assert.assertEquals(test.getCalendarType(), "roc", "Type mismatch");
+        Assert.assertEquals(test, c);
+    }
+
+    //-----------------------------------------------------------------------
+    // creation, toLocalDate()
+    //-----------------------------------------------------------------------
+    @DataProvider(name="samples")
+    Object[][] data_samples() {
+        return new Object[][] {
+            {MinguoChronology.INSTANCE.date(1, 1, 1), LocalDate.of(1 + YDIFF, 1, 1)},
+            {MinguoChronology.INSTANCE.date(1, 1, 2), LocalDate.of(1 + YDIFF, 1, 2)},
+            {MinguoChronology.INSTANCE.date(1, 1, 3), LocalDate.of(1 + YDIFF, 1, 3)},
+
+            {MinguoChronology.INSTANCE.date(2, 1, 1), LocalDate.of(2 + YDIFF, 1, 1)},
+            {MinguoChronology.INSTANCE.date(3, 1, 1), LocalDate.of(3 + YDIFF, 1, 1)},
+            {MinguoChronology.INSTANCE.date(3, 12, 6), LocalDate.of(3 + YDIFF, 12, 6)},
+            {MinguoChronology.INSTANCE.date(4, 1, 1), LocalDate.of(4 + YDIFF, 1, 1)},
+            {MinguoChronology.INSTANCE.date(4, 7, 3), LocalDate.of(4 + YDIFF, 7, 3)},
+            {MinguoChronology.INSTANCE.date(4, 7, 4), LocalDate.of(4 + YDIFF, 7, 4)},
+            {MinguoChronology.INSTANCE.date(5, 1, 1), LocalDate.of(5 + YDIFF, 1, 1)},
+            {MinguoChronology.INSTANCE.date(100, 3, 3), LocalDate.of(100 + YDIFF, 3, 3)},
+            {MinguoChronology.INSTANCE.date(101, 10, 28), LocalDate.of(101 + YDIFF, 10, 28)},
+            {MinguoChronology.INSTANCE.date(101, 10, 29), LocalDate.of(101 + YDIFF, 10, 29)},
+
+            {MinguoChronology.INSTANCE.dateYearDay(1916 - YDIFF, 60), LocalDate.of(1916, 2, 29)},
+            {MinguoChronology.INSTANCE.dateYearDay(1908 - YDIFF, 60), LocalDate.of(1908, 2, 29)},
+            {MinguoChronology.INSTANCE.dateYearDay(2000 - YDIFF, 60), LocalDate.of(2000, 2, 29)},
+            {MinguoChronology.INSTANCE.dateYearDay(2400 - YDIFF, 60), LocalDate.of(2400, 2, 29)},
+
+            {MinguoChronology.INSTANCE.dateYearDay(MinguoEra.ROC, 1916 - YDIFF, 60), LocalDate.of(1916, 2, 29)},
+            {MinguoChronology.INSTANCE.dateYearDay(MinguoEra.BEFORE_ROC, 4, 60), LocalDate.of(1908, 2, 29)},
+            {MinguoChronology.INSTANCE.dateYearDay(MinguoEra.ROC, 2000 - YDIFF, 60), LocalDate.of(2000, 2, 29)},
+            {MinguoChronology.INSTANCE.dateYearDay(MinguoEra.ROC, 2400 - YDIFF, 60), LocalDate.of(2400, 2, 29)},
+
+            {MinguoChronology.INSTANCE.date(MinguoEra.ROC, 1916 - YDIFF, 2, 29 ), LocalDate.of(1916, 2, 29)},
+            {MinguoChronology.INSTANCE.date(MinguoEra.BEFORE_ROC, 4, 2, 29), LocalDate.of(1908, 2, 29)},
+            {MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2000 - YDIFF, 2, 29), LocalDate.of(2000, 2, 29)},
+            {MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2400 - YDIFF, 2, 29), LocalDate.of(2400, 2, 29)},
+        };
+    }
+
+    @Test(dataProvider="samples")
+    public void test_toLocalDate(MinguoDate minguo, LocalDate iso) {
+        assertEquals(LocalDate.from(minguo), iso);
+    }
+
+    @Test(dataProvider="samples")
+    public void test_fromCalendrical(MinguoDate minguo, LocalDate iso) {
+        assertEquals(MinguoChronology.INSTANCE.date(iso), minguo);
+    }
+
+    @Test
+    public void test_dateNow(){
+        assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoDate.now()) ;
+        assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoDate.now(ZoneId.systemDefault())) ;
+        assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoDate.now(Clock.systemDefaultZone())) ;
+        assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoDate.now(Clock.systemDefaultZone().getZone())) ;
+
+        assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoChronology.INSTANCE.dateNow(ZoneId.systemDefault())) ;
+        assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoChronology.INSTANCE.dateNow(Clock.systemDefaultZone())) ;
+        assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoChronology.INSTANCE.dateNow(Clock.systemDefaultZone().getZone())) ;
+
+        ZoneId zoneId = ZoneId.of("Europe/Paris");
+        assertEquals(MinguoChronology.INSTANCE.dateNow(zoneId), MinguoChronology.INSTANCE.dateNow(Clock.system(zoneId))) ;
+        assertEquals(MinguoChronology.INSTANCE.dateNow(zoneId), MinguoChronology.INSTANCE.dateNow(Clock.system(zoneId).getZone())) ;
+        assertEquals(MinguoChronology.INSTANCE.dateNow(zoneId), MinguoDate.now(Clock.system(zoneId))) ;
+        assertEquals(MinguoChronology.INSTANCE.dateNow(zoneId), MinguoDate.now(Clock.system(zoneId).getZone())) ;
+
+        assertEquals(MinguoChronology.INSTANCE.dateNow(ZoneId.of(ZoneOffset.UTC.getId())), MinguoChronology.INSTANCE.dateNow(Clock.systemUTC())) ;
+    }
+
+    @SuppressWarnings("unused")
+    @Test(dataProvider="samples")
+    public void test_MinguoDate(MinguoDate minguoDate, LocalDate iso) {
+        MinguoDate hd = minguoDate;
+        ChronoLocalDateTime<MinguoDate> hdt = hd.atTime(LocalTime.NOON);
+        ZoneOffset zo = ZoneOffset.ofHours(1);
+        ChronoZonedDateTime<MinguoDate> hzdt = hdt.atZone(zo);
+        hdt = hdt.plus(1, ChronoUnit.YEARS);
+        hdt = hdt.plus(1, ChronoUnit.MONTHS);
+        hdt = hdt.plus(1, ChronoUnit.DAYS);
+        hdt = hdt.plus(1, ChronoUnit.HOURS);
+        hdt = hdt.plus(1, ChronoUnit.MINUTES);
+        hdt = hdt.plus(1, ChronoUnit.SECONDS);
+        hdt = hdt.plus(1, ChronoUnit.NANOS);
+        ChronoLocalDateTime<MinguoDate> a2 = hzdt.toLocalDateTime();
+        MinguoDate a3 = a2.toLocalDate();
+        MinguoDate a5 = hzdt.toLocalDate();
+        //System.out.printf(" d: %s, dt: %s; odt: %s; zodt: %s; a4: %s%n", date, hdt, hodt, hzdt, a5);
+    }
+
+    @Test()
+    public void test_MinguoChrono() {
+        MinguoDate h1 = MinguoChronology.INSTANCE.date(MinguoEra.ROC, 1, 2, 3);
+        MinguoDate h2 = h1;
+        ChronoLocalDateTime<MinguoDate> h3 = h2.atTime(LocalTime.NOON);
+        @SuppressWarnings("unused")
+        ChronoZonedDateTime<MinguoDate> h4 = h3.atZone(ZoneOffset.UTC);
+    }
+
+    @DataProvider(name="badDates")
+    Object[][] data_badDates() {
+        return new Object[][] {
+            {1912, 0, 0},
+
+            {1912, -1, 1},
+            {1912, 0, 1},
+            {1912, 14, 1},
+            {1912, 15, 1},
+
+            {1912, 1, -1},
+            {1912, 1, 0},
+            {1912, 1, 32},
+            {1912, 2, 29},
+            {1912, 2, 30},
+
+            {1912, 12, -1},
+            {1912, 12, 0},
+            {1912, 12, 32},
+
+            {1907 - YDIFF, 2, 29},
+            {100 - YDIFF, 2, 29},
+            {2100 - YDIFF, 2, 29},
+            {2101 - YDIFF, 2, 29},
+            };
+    }
+
+    @Test(dataProvider="badDates", expectedExceptions=DateTimeException.class)
+    public void test_badDates(int year, int month, int dom) {
+        MinguoChronology.INSTANCE.date(year, month, dom);
+    }
+
+    //-----------------------------------------------------------------------
+    // prolepticYear() and is LeapYear()
+    //-----------------------------------------------------------------------
+    @DataProvider(name="prolepticYear")
+    Object[][] data_prolepticYear() {
+        return new Object[][] {
+            {1, MinguoEra.ROC, 1912 - YDIFF, 1912 - YDIFF, true},
+            {1, MinguoEra.ROC, 1916 - YDIFF, 1916 - YDIFF, true},
+            {1, MinguoEra.ROC, 1914 - YDIFF, 1914 - YDIFF, false},
+            {1, MinguoEra.ROC, 2000 - YDIFF, 2000 - YDIFF, true},
+            {1, MinguoEra.ROC, 2100 - YDIFF, 2100 - YDIFF, false},
+            {1, MinguoEra.ROC, 0, 0, false},
+            {1, MinguoEra.ROC, 1908 - YDIFF, 1908 - YDIFF, true},
+            {1, MinguoEra.ROC, 1900 - YDIFF, 1900 - YDIFF, false},
+            {1, MinguoEra.ROC, 1600 - YDIFF, 1600 - YDIFF, true},
+
+            {0, MinguoEra.BEFORE_ROC, YDIFF - 1911, 1912 - YDIFF, true},
+            {0, MinguoEra.BEFORE_ROC, YDIFF - 1915, 1916 - YDIFF, true},
+            {0, MinguoEra.BEFORE_ROC, YDIFF - 1913, 1914 - YDIFF, false},
+            {0, MinguoEra.BEFORE_ROC, YDIFF - 1999, 2000 - YDIFF, true},
+            {0, MinguoEra.BEFORE_ROC, YDIFF - 2099, 2100 - YDIFF, false},
+            {0, MinguoEra.BEFORE_ROC, 1, 0, false},
+            {0, MinguoEra.BEFORE_ROC, YDIFF - 1907, 1908 - YDIFF, true},
+            {0, MinguoEra.BEFORE_ROC, YDIFF - 1899, 1900 - YDIFF, false},
+            {0, MinguoEra.BEFORE_ROC, YDIFF - 1599, 1600 - YDIFF, true},
+
+        };
+    }
+
+    @Test(dataProvider="prolepticYear")
+    public void test_prolepticYear(int eraValue, Era  era, int yearOfEra, int expectedProlepticYear, boolean isLeapYear) {
+        Era eraObj = MinguoChronology.INSTANCE.eraOf(eraValue) ;
+        assertTrue(MinguoChronology.INSTANCE.eras().contains(eraObj));
+        assertEquals(eraObj, era);
+        assertEquals(MinguoChronology.INSTANCE.prolepticYear(era, yearOfEra), expectedProlepticYear);
+        assertEquals(MinguoChronology.INSTANCE.isLeapYear(expectedProlepticYear), isLeapYear) ;
+        assertEquals(MinguoChronology.INSTANCE.isLeapYear(expectedProlepticYear), Year.of(expectedProlepticYear + YDIFF).isLeap()) ;
+    }
+
+    //-----------------------------------------------------------------------
+    // Bad Era for Chronology.date(era,...) and Chronology.prolepticYear(Era,...)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_InvalidEras() {
+        // Verify that the eras from every other Chronology are invalid
+        for (Chronology chrono : Chronology.getAvailableChronologies()) {
+            if (chrono instanceof MinguoChronology) {
+                continue;
+            }
+            List<Era> eras = chrono.eras();
+            for (Era era : eras) {
+                try {
+                    ChronoLocalDate date = MinguoChronology.INSTANCE.date(era, 1, 1, 1);
+                    fail("MinguoChronology.date did not throw ClassCastException for Era: " + era);
+                } catch (ClassCastException cex) {
+                    ; // ignore expected exception
+                }
+
+                /*  Test for missing MinguoDate.of(Era, y, m, d) method.
+                try {
+                    @SuppressWarnings("unused")
+                    MinguoDate jdate = MinguoDate.of(era, 1, 1, 1);
+                    fail("MinguoDate.of did not throw ClassCastException for Era: " + era);
+                } catch (ClassCastException cex) {
+                    ; // ignore expected exception
+                }
+                */
+
+                try {
+                    @SuppressWarnings("unused")
+                    int year = MinguoChronology.INSTANCE.prolepticYear(era, 1);
+                    fail("MinguoChronology.prolepticYear did not throw ClassCastException for Era: " + era);
+                } catch (ClassCastException cex) {
+                    ; // ignore expected exception
+                }
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // with(DateTimeAdjuster)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_adjust1() {
+        MinguoDate base = MinguoChronology.INSTANCE.date(2012, 10, 29);
+        MinguoDate test = base.with(TemporalAdjuster.lastDayOfMonth());
+        assertEquals(test, MinguoChronology.INSTANCE.date(2012, 10, 31));
+    }
+
+    @Test
+    public void test_adjust2() {
+        MinguoDate base = MinguoChronology.INSTANCE.date(1728, 12, 2);
+        MinguoDate test = base.with(TemporalAdjuster.lastDayOfMonth());
+        assertEquals(test, MinguoChronology.INSTANCE.date(1728, 12, 31));
+    }
+
+    //-----------------------------------------------------------------------
+    // MinguoDate.with(Local*)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_adjust_toLocalDate() {
+        MinguoDate minguo = MinguoChronology.INSTANCE.date(99, 1, 4);
+        MinguoDate test = minguo.with(LocalDate.of(2012, 7, 6));
+        assertEquals(test, MinguoChronology.INSTANCE.date(101, 7, 6));
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void test_adjust_toMonth() {
+        MinguoDate minguo = MinguoChronology.INSTANCE.date(1726, 1, 4);
+        minguo.with(Month.APRIL);
+    }
+
+    //-----------------------------------------------------------------------
+    // LocalDate.with(MinguoDate)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_LocalDate_adjustToMinguoDate() {
+        MinguoDate minguo = MinguoChronology.INSTANCE.date(101, 10, 29);
+        LocalDate test = LocalDate.MIN.with(minguo);
+        assertEquals(test, LocalDate.of(2012, 10, 29));
+    }
+
+    @Test
+    public void test_LocalDateTime_adjustToMinguoDate() {
+        MinguoDate minguo = MinguoChronology.INSTANCE.date(101, 10, 29);
+        LocalDateTime test = LocalDateTime.MIN.with(minguo);
+        assertEquals(test, LocalDateTime.of(2012, 10, 29, 0, 0));
+    }
+
+    //-----------------------------------------------------------------------
+    // localDateTime()
+    //-----------------------------------------------------------------------
+    @DataProvider(name="localDateTime")
+    Object[][] data_localDateTime() {
+        return new Object[][] {
+            {LocalDateTime.of(2012, 2, 29, 2, 7), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7), null},
+            {ZonedDateTime.of(2012, 2, 29, 2, 7, 1, 1, ZONE_PARIS), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7, 1, 1), null},
+            {OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7, 1, 1), null},
+
+            {JapaneseDate.of(2012, 2, 29), null, null, DateTimeException.class},
+            {ThaiBuddhistDate.of(2012 + 543, 2, 29), null, null, DateTimeException.class},
+            {LocalDate.of(2012, 2, 29), null, null, DateTimeException.class},
+            {LocalTime.of(20, 30, 29, 0), null, null, DateTimeException.class},
+        };
+    }
+
+    @Test(dataProvider="localDateTime")
+    public void test_localDateTime(TemporalAccessor accessor,  MinguoDate expectedDate, LocalTime expectedTime, Class<?> expectedEx) {
+        if (expectedEx == null) {
+            ChronoLocalDateTime<MinguoDate> result = MinguoChronology.INSTANCE.localDateTime(accessor);
+            assertEquals(result.toLocalDate(), expectedDate);
+            assertEquals(MinguoDate.from(accessor), expectedDate);
+            assertEquals(result.toLocalTime(), expectedTime);
+        } else {
+            try {
+                ChronoLocalDateTime<MinguoDate> result = MinguoChronology.INSTANCE.localDateTime(accessor);
+                fail();
+            } catch (Exception ex) {
+                assertTrue(expectedEx.isInstance(ex));
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // zonedDateTime(TemporalAccessor)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="zonedDateTime")
+    Object[][] data_zonedDateTime() {
+        return new Object[][] {
+            {ZonedDateTime.of(2012, 2, 29, 2, 7, 1, 1, ZONE_PARIS), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7, 1, 1), null},
+            {OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7, 1, 1), null},
+
+            {LocalDateTime.of(2012, 2, 29, 2, 7), null, null, DateTimeException.class},
+            {JapaneseDate.of(2012, 2, 29), null, null, DateTimeException.class},
+            {ThaiBuddhistDate.of(2012 + 543, 2, 29), null, null, DateTimeException.class},
+            {LocalDate.of(2012, 2, 29), null, null, DateTimeException.class},
+            {LocalTime.of(20, 30, 29, 0), null, null, DateTimeException.class},
+        };
+    }
+
+    @Test(dataProvider="zonedDateTime")
+    public void test_zonedDateTime(TemporalAccessor accessor,  MinguoDate expectedDate, LocalTime expectedTime, Class<?> expectedEx) {
+        if (expectedEx == null) {
+            ChronoZonedDateTime<MinguoDate> result = MinguoChronology.INSTANCE.zonedDateTime(accessor);
+            assertEquals(result.toLocalDate(), expectedDate);
+            assertEquals(MinguoDate.from(accessor), expectedDate);
+            assertEquals(result.toLocalTime(), expectedTime);
+
+        } else {
+            try {
+                ChronoZonedDateTime<MinguoDate> result = MinguoChronology.INSTANCE.zonedDateTime(accessor);
+                fail();
+            } catch (Exception ex) {
+                assertTrue(expectedEx.isInstance(ex));
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // zonedDateTime(Instant, ZoneId )
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_Instant_zonedDateTime() {
+        OffsetDateTime offsetDateTime = OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO);
+        ZonedDateTime zonedDateTime = ZonedDateTime.of(2012, 2, 29, 2, 7, 1, 1, ZONE_PARIS);
+
+        ChronoZonedDateTime<MinguoDate> result = MinguoChronology.INSTANCE.zonedDateTime(offsetDateTime.toInstant(), offsetDateTime.getOffset());
+        assertEquals(result.toLocalDate(), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29));
+        assertEquals(result.toLocalTime(), LocalTime.of(2, 7, 1, 1));
+
+        result = MinguoChronology.INSTANCE.zonedDateTime(zonedDateTime.toInstant(), zonedDateTime.getOffset());
+        assertEquals(result.toLocalDate(), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29));
+        assertEquals(result.toLocalTime(), LocalTime.of(2, 7, 1, 1));
+    }
+
+    //-----------------------------------------------------------------------
+    // PeriodUntil()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_periodUntilDate() {
+        MinguoDate mdate1 = MinguoDate.of(1970, 1, 1);
+        MinguoDate mdate2 = MinguoDate.of(1971, 2, 2);
+        Period period = mdate1.periodUntil(mdate2);
+        assertEquals(period, Period.of(1, 1, 1));
+    }
+
+    @Test
+    public void test_periodUntilUnit() {
+        MinguoDate mdate1 = MinguoDate.of(1970, 1, 1);
+        MinguoDate mdate2 = MinguoDate.of(1971, 2, 2);
+        long months = mdate1.periodUntil(mdate2, ChronoUnit.MONTHS);
+        assertEquals(months, 13);
+    }
+
+    @Test
+    public void test_periodUntilDiffChrono() {
+        MinguoDate mdate1 = MinguoDate.of(1970, 1, 1);
+        MinguoDate mdate2 = MinguoDate.of(1971, 2, 2);
+        ThaiBuddhistDate ldate2 = ThaiBuddhistChronology.INSTANCE.date(mdate2);
+        Period period = mdate1.periodUntil(ldate2);
+        assertEquals(period, Period.of(1, 1, 1));
+    }
+
+    //-----------------------------------------------------------------------
+    // toString()
+    //-----------------------------------------------------------------------
+    @DataProvider(name="toString")
+    Object[][] data_toString() {
+        return new Object[][] {
+            {MinguoChronology.INSTANCE.date(1, 1, 1), "Minguo ROC 1-01-01"},
+            {MinguoChronology.INSTANCE.date(1728, 10, 28), "Minguo ROC 1728-10-28"},
+            {MinguoChronology.INSTANCE.date(1728, 10, 29), "Minguo ROC 1728-10-29"},
+            {MinguoChronology.INSTANCE.date(1727, 12, 5), "Minguo ROC 1727-12-05"},
+            {MinguoChronology.INSTANCE.date(1727, 12, 6), "Minguo ROC 1727-12-06"},
+        };
+    }
+
+    @Test(dataProvider="toString")
+    public void test_toString(MinguoDate minguo, String expected) {
+        assertEquals(minguo.toString(), expected);
+    }
+
+    //-----------------------------------------------------------------------
+    // equals()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_equals_true() {
+        assertTrue(MinguoChronology.INSTANCE.equals(MinguoChronology.INSTANCE));
+    }
+
+    @Test
+    public void test_equals_false() {
+        assertFalse(MinguoChronology.INSTANCE.equals(IsoChronology.INSTANCE));
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKMinguoEra.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono;
+
+
+import static java.time.temporal.ChronoField.ERA;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.time.chrono.Era;
+import java.time.chrono.MinguoChronology;
+import java.time.chrono.MinguoEra;
+import java.time.temporal.ValueRange;
+import java.util.List;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test.
+ */
+@Test
+public class TCKMinguoEra {
+
+    @DataProvider(name = "MinguoEras")
+    Object[][] data_of_eras() {
+        return new Object[][] {
+                    {MinguoEra.BEFORE_ROC, "BEFORE_ROC", 0},
+                    {MinguoEra.ROC, "ROC", 1},
+        };
+    }
+
+    //-----------------------------------------------------------------------
+    // valueOf()
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="MinguoEras")
+    public void test_valueOf(MinguoEra era , String eraName, int eraValue) {
+        assertEquals(era.getValue(), eraValue);
+        assertEquals(MinguoEra.of(eraValue), era);
+        assertEquals(MinguoEra.valueOf(eraName), era);
+    }
+
+
+    //-----------------------------------------------------------------------
+    // values()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_values() {
+        List<Era> eraList = MinguoChronology.INSTANCE.eras();
+        MinguoEra[] eras = MinguoEra.values() ;
+        assertEquals(eraList.size(), eras.length);
+        for (MinguoEra era : eras) {
+            assertTrue(eraList.contains(era));
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // range()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_range() {
+        for (MinguoEra era : MinguoEra.values()) {
+            assertEquals(era.range(ERA), ValueRange.of(0, 1));
+        }
+    }
+
+}
--- a/test/java/time/tck/java/time/chrono/TCKTestServiceLoader.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/chrono/TCKTestServiceLoader.java	Wed Apr 17 21:48:04 2013 -0700
@@ -60,9 +60,13 @@
 
 import static org.testng.Assert.assertEquals;
 
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
 import java.time.LocalDate;
+import java.time.chrono.ChronoLocalDate;
 import java.time.chrono.Chronology;
-import java.time.chrono.ChronoLocalDate;
 
 import org.testng.annotations.Test;
 
@@ -73,7 +77,7 @@
 @Test
 public class TCKTestServiceLoader {
 
-     @Test(groups={"tck"})
+     @Test
      public void test_CopticServiceLoader() {
         Chronology chrono = Chronology.of("Coptic");
         ChronoLocalDate copticDate = chrono.date(1729, 4, 27);
@@ -81,4 +85,22 @@
         assertEquals(ld, LocalDate.of(2013, 1, 5), "CopticDate does not match LocalDate");
     }
 
+
+    //-----------------------------------------------------------------------
+    // Test Serialization of Loaded Coptic Calendar
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_ChronoSerialization() throws Exception {
+        Chronology chrono = Chronology.of("Coptic");
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream out = new ObjectOutputStream(baos);
+        out.writeObject(chrono);
+        out.close();
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+
+        ObjectInputStream in = new ObjectInputStream(bais);
+        @SuppressWarnings("unchecked")
+        Chronology ser = (Chronology) in.readObject();
+        assertEquals(ser, chrono, "deserialized Chronology is wrong");
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKThaiBuddhistChronology.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,468 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono;
+
+import static java.time.temporal.ChronoField.DAY_OF_MONTH;
+import static java.time.temporal.ChronoField.DAY_OF_YEAR;
+import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoField.YEAR;
+import static java.time.temporal.ChronoField.YEAR_OF_ERA;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+
+import java.time.DateTimeException;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.Month;
+import java.time.Period;
+import java.time.Year;
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.Chronology;
+import java.time.chrono.Era;
+import java.time.chrono.IsoChronology;
+import java.time.chrono.MinguoChronology;
+import java.time.chrono.MinguoDate;
+import java.time.chrono.ThaiBuddhistChronology;
+import java.time.chrono.ThaiBuddhistDate;
+import java.time.chrono.ThaiBuddhistEra;
+import java.time.temporal.ChronoField;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.TemporalAdjuster;
+import java.time.temporal.ValueRange;
+import java.util.List;
+import java.util.Locale;
+
+import org.testng.Assert;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test.
+ */
+@Test
+public class TCKThaiBuddhistChronology {
+
+    private static final int YDIFF = 543;
+
+    //-----------------------------------------------------------------------
+    // Chronology.of(String)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_chrono_byName() {
+        Chronology c = ThaiBuddhistChronology.INSTANCE;
+        Chronology test = Chronology.of("ThaiBuddhist");
+        Assert.assertNotNull(test, "The ThaiBuddhist calendar could not be found byName");
+        Assert.assertEquals(test.getId(), "ThaiBuddhist", "ID mismatch");
+        Assert.assertEquals(test.getCalendarType(), "buddhist", "Type mismatch");
+        Assert.assertEquals(test, c);
+    }
+
+    //-----------------------------------------------------------------------
+    // Chronology.ofLocale(Locale)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_chrono_byLocale_fullTag_thaiCalendarFromThai() {
+        Chronology test = Chronology.ofLocale(Locale.forLanguageTag("th-TH-u-ca-buddhist"));
+        Assert.assertEquals(test.getId(), "ThaiBuddhist");
+        Assert.assertEquals(test, ThaiBuddhistChronology.INSTANCE);
+    }
+
+    @Test
+    public void test_chrono_byLocale_fullTag_thaiCalendarFromElsewhere() {
+        Chronology test = Chronology.ofLocale(Locale.forLanguageTag("en-US-u-ca-buddhist"));
+        Assert.assertEquals(test.getId(), "ThaiBuddhist");
+        Assert.assertEquals(test, ThaiBuddhistChronology.INSTANCE);
+    }
+
+    @Test
+    public void test_chrono_byLocale_oldTH_noVariant() {  // deliberately different to Calendar
+        Chronology test = Chronology.ofLocale(new Locale("th", "TH"));
+        Assert.assertEquals(test.getId(), "ISO");
+        Assert.assertEquals(test, IsoChronology.INSTANCE);
+    }
+
+    @Test
+    public void test_chrono_byLocale_oldTH_variant() {
+        Chronology test = Chronology.ofLocale(new Locale("th", "TH", "TH"));
+        Assert.assertEquals(test.getId(), "ISO");
+        Assert.assertEquals(test, IsoChronology.INSTANCE);
+    }
+
+    @Test
+    public void test_chrono_byLocale_iso() {
+        Assert.assertEquals(Chronology.ofLocale(new Locale("th", "TH")).getId(), "ISO");
+        Assert.assertEquals(Chronology.ofLocale(Locale.forLanguageTag("th-TH")).getId(), "ISO");
+        Assert.assertEquals(Chronology.ofLocale(Locale.forLanguageTag("th-TH-TH")).getId(), "ISO");
+    }
+
+    //-----------------------------------------------------------------------
+    // creation, toLocalDate()
+    //-----------------------------------------------------------------------
+    @DataProvider(name="samples")
+    Object[][] data_samples() {
+        return new Object[][] {
+            {ThaiBuddhistChronology.INSTANCE.date(1 + YDIFF, 1, 1), LocalDate.of(1, 1, 1)},
+            {ThaiBuddhistChronology.INSTANCE.date(1 + YDIFF, 1, 2), LocalDate.of(1, 1, 2)},
+            {ThaiBuddhistChronology.INSTANCE.date(1 + YDIFF, 1, 3), LocalDate.of(1, 1, 3)},
+
+            {ThaiBuddhistChronology.INSTANCE.date(2 + YDIFF, 1, 1), LocalDate.of(2, 1, 1)},
+            {ThaiBuddhistChronology.INSTANCE.date(3 + YDIFF, 1, 1), LocalDate.of(3, 1, 1)},
+            {ThaiBuddhistChronology.INSTANCE.date(3 + YDIFF, 12, 6), LocalDate.of(3, 12, 6)},
+            {ThaiBuddhistChronology.INSTANCE.date(4 + YDIFF, 1, 1), LocalDate.of(4, 1, 1)},
+            {ThaiBuddhistChronology.INSTANCE.date(4 + YDIFF, 7, 3), LocalDate.of(4, 7, 3)},
+            {ThaiBuddhistChronology.INSTANCE.date(4 + YDIFF, 7, 4), LocalDate.of(4, 7, 4)},
+            {ThaiBuddhistChronology.INSTANCE.date(5 + YDIFF, 1, 1), LocalDate.of(5, 1, 1)},
+            {ThaiBuddhistChronology.INSTANCE.date(1662 + YDIFF, 3, 3), LocalDate.of(1662, 3, 3)},
+            {ThaiBuddhistChronology.INSTANCE.date(1728 + YDIFF, 10, 28), LocalDate.of(1728, 10, 28)},
+            {ThaiBuddhistChronology.INSTANCE.date(1728 + YDIFF, 10, 29), LocalDate.of(1728, 10, 29)},
+            {ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29), LocalDate.of(2012, 8, 29)},
+
+            {ThaiBuddhistChronology.INSTANCE.dateYearDay(4 + YDIFF, 60), LocalDate.of(4, 2, 29)},
+            {ThaiBuddhistChronology.INSTANCE.dateYearDay(400 + YDIFF, 60), LocalDate.of(400, 2, 29)},
+            {ThaiBuddhistChronology.INSTANCE.dateYearDay(2000 + YDIFF, 60), LocalDate.of(2000, 2, 29)},
+
+        };
+    }
+
+    @Test(dataProvider="samples")
+    public void test_toLocalDate(ThaiBuddhistDate jdate, LocalDate iso) {
+        assertEquals(LocalDate.from(jdate), iso);
+    }
+
+    @Test(dataProvider="samples")
+    public void test_fromCalendrical(ThaiBuddhistDate jdate, LocalDate iso) {
+        assertEquals(ThaiBuddhistChronology.INSTANCE.date(iso), jdate);
+    }
+
+    @DataProvider(name="badDates")
+    Object[][] data_badDates() {
+        return new Object[][] {
+            {1728, 0, 0},
+
+            {1728, -1, 1},
+            {1728, 0, 1},
+            {1728, 14, 1},
+            {1728, 15, 1},
+
+            {1728, 1, -1},
+            {1728, 1, 0},
+            {1728, 1, 32},
+
+            {1728, 12, -1},
+            {1728, 12, 0},
+            {1728, 12, 32},
+
+            {3 + YDIFF, 2, 29},
+            {600 + YDIFF, 2, 29},
+            {1501 + YDIFF, 2, 29},
+        };
+    }
+
+    @Test(dataProvider="badDates", expectedExceptions=DateTimeException.class)
+    public void test_badDates(int year, int month, int dom) {
+        ThaiBuddhistChronology.INSTANCE.date(year, month, dom);
+    }
+
+  //-----------------------------------------------------------------------
+  // prolepticYear() and is LeapYear()
+  //-----------------------------------------------------------------------
+  @DataProvider(name="prolepticYear")
+  Object[][] data_prolepticYear() {
+      return new Object[][] {
+          {1, ThaiBuddhistEra.BE, 4 + YDIFF, 4 + YDIFF, true},
+          {1, ThaiBuddhistEra.BE, 7 + YDIFF, 7 + YDIFF, false},
+          {1, ThaiBuddhistEra.BE, 8 + YDIFF, 8 + YDIFF, true},
+          {1, ThaiBuddhistEra.BE, 1000 + YDIFF, 1000 + YDIFF, false},
+          {1, ThaiBuddhistEra.BE, 2000 + YDIFF, 2000 + YDIFF, true},
+          {1, ThaiBuddhistEra.BE, 0, 0, false},
+          {1, ThaiBuddhistEra.BE, -4 + YDIFF, -4 + YDIFF, true},
+          {1, ThaiBuddhistEra.BE, -7 + YDIFF, -7 + YDIFF, false},
+          {1, ThaiBuddhistEra.BE, -100 + YDIFF, -100 + YDIFF, false},
+          {1, ThaiBuddhistEra.BE, -800 + YDIFF, -800 + YDIFF, true},
+
+          {0, ThaiBuddhistEra.BEFORE_BE, -3 - YDIFF, 4 + YDIFF, true},
+          {0, ThaiBuddhistEra.BEFORE_BE, -6 - YDIFF, 7 + YDIFF, false},
+          {0, ThaiBuddhistEra.BEFORE_BE, -7 - YDIFF, 8 + YDIFF, true},
+          {0, ThaiBuddhistEra.BEFORE_BE, -999 - YDIFF, 1000 + YDIFF, false},
+          {0, ThaiBuddhistEra.BEFORE_BE, -1999 - YDIFF, 2000 + YDIFF, true},
+          {0, ThaiBuddhistEra.BEFORE_BE, 1, 0, false},
+          {0, ThaiBuddhistEra.BEFORE_BE, 5 - YDIFF, -4 + YDIFF, true},
+          {0, ThaiBuddhistEra.BEFORE_BE, 8 - YDIFF, -7 + YDIFF, false},
+          {0, ThaiBuddhistEra.BEFORE_BE, 101 - YDIFF, -100 + YDIFF, false},
+          {0, ThaiBuddhistEra.BEFORE_BE, 801 - YDIFF, -800 + YDIFF, true},
+
+      };
+  }
+
+  @Test(dataProvider="prolepticYear")
+  public void test_prolepticYear(int eraValue, Era  era, int yearOfEra, int expectedProlepticYear, boolean isLeapYear) {
+      Era eraObj = ThaiBuddhistChronology.INSTANCE.eraOf(eraValue) ;
+      assertTrue(ThaiBuddhistChronology.INSTANCE.eras().contains(eraObj));
+      assertEquals(eraObj, era);
+      assertEquals(ThaiBuddhistChronology.INSTANCE.prolepticYear(era, yearOfEra), expectedProlepticYear);
+      assertEquals(ThaiBuddhistChronology.INSTANCE.isLeapYear(expectedProlepticYear), isLeapYear) ;
+      assertEquals(ThaiBuddhistChronology.INSTANCE.isLeapYear(expectedProlepticYear), Year.of(expectedProlepticYear - YDIFF).isLeap()) ;
+  }
+
+    //-----------------------------------------------------------------------
+    // Bad Era for Chronology.date(era,...) and Chronology.prolepticYear(Era,...)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_InvalidEras() {
+        // Verify that the eras from every other Chronology are invalid
+        for (Chronology chrono : Chronology.getAvailableChronologies()) {
+            if (chrono instanceof ThaiBuddhistChronology) {
+                continue;
+            }
+            List<Era> eras = chrono.eras();
+            for (Era era : eras) {
+                try {
+                    ChronoLocalDate date = ThaiBuddhistChronology.INSTANCE.date(era, 1, 1, 1);
+                    fail("ThaiBuddhistChronology.date did not throw ClassCastException for Era: " + era);
+                } catch (ClassCastException cex) {
+                    ; // ignore expected exception
+                }
+
+                /* TODO: Test for missing ThaiBuddhistDate.of(Era, y, m, d) method.
+                try {
+                    @SuppressWarnings("unused")
+                    ThaiBuddhistDate jdate = ThaiBuddhistDate.of(era, 1, 1, 1);
+                    fail("ThaiBuddhistDate.of did not throw ClassCastException for Era: " + era);
+                } catch (ClassCastException cex) {
+                    ; // ignore expected exception
+                }
+                */
+
+                try {
+                    @SuppressWarnings("unused")
+                    int year = ThaiBuddhistChronology.INSTANCE.prolepticYear(era, 1);
+                    fail("ThaiBuddhistChronology.prolepticYear did not throw ClassCastException for Era: " + era);
+                } catch (ClassCastException cex) {
+                    ; // ignore expected exception
+                }            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // with(WithAdjuster)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_adjust1() {
+        ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(1728, 10, 29);
+        ThaiBuddhistDate test = base.with(TemporalAdjuster.lastDayOfMonth());
+        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(1728, 10, 31));
+    }
+
+    @Test
+    public void test_adjust2() {
+        ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(1728, 12, 2);
+        ThaiBuddhistDate test = base.with(TemporalAdjuster.lastDayOfMonth());
+        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(1728, 12, 31));
+    }
+
+    //-----------------------------------------------------------------------
+    // withYear()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_withYear_BE() {
+        ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29);
+        ThaiBuddhistDate test = base.with(YEAR, 2554);
+        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2554, 8, 29));
+    }
+
+    @Test
+    public void test_withYear_BBE() {
+        ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29);
+        ThaiBuddhistDate test = base.with(YEAR_OF_ERA, 2554);
+        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(-2553, 8, 29));
+    }
+
+    //-----------------------------------------------------------------------
+    // withEra()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_withEra_BE() {
+        ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29);
+        ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BE.getValue());
+        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29));
+    }
+
+    @Test
+    public void test_withEra_BBE() {
+        ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29);
+        ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BEFORE_BE.getValue());
+        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29));
+    }
+
+    @Test
+    public void test_withEra_swap() {
+        ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29);
+        ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BE.getValue());
+        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29));
+    }
+
+    //-----------------------------------------------------------------------
+    // BuddhistDate.with(Local*)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_adjust_toLocalDate() {
+        ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(1726, 1, 4);
+        ThaiBuddhistDate test = jdate.with(LocalDate.of(2012, 7, 6));
+        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 7, 6));
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void test_adjust_toMonth() {
+        ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(1726, 1, 4);
+        jdate.with(Month.APRIL);
+    }
+
+    //-----------------------------------------------------------------------
+    // LocalDate.with(BuddhistDate)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_LocalDate_adjustToBuddhistDate() {
+        ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(2555, 10, 29);
+        LocalDate test = LocalDate.MIN.with(jdate);
+        assertEquals(test, LocalDate.of(2012, 10, 29));
+    }
+
+    @Test
+    public void test_LocalDateTime_adjustToBuddhistDate() {
+        ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(2555, 10, 29);
+        LocalDateTime test = LocalDateTime.MIN.with(jdate);
+        assertEquals(test, LocalDateTime.of(2012, 10, 29, 0, 0));
+    }
+
+    //-----------------------------------------------------------------------
+    // PeriodUntil()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_periodUntilDate() {
+        ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1);
+        ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2);
+        Period period = mdate1.periodUntil(mdate2);
+        assertEquals(period, Period.of(1, 1, 1));
+    }
+
+    @Test
+    public void test_periodUntilUnit() {
+        ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1);
+        ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2);
+        long months = mdate1.periodUntil(mdate2, ChronoUnit.MONTHS);
+        assertEquals(months, 13);
+    }
+
+    @Test
+    public void test_periodUntilDiffChrono() {
+        ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1);
+        ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2);
+        MinguoDate ldate2 = MinguoChronology.INSTANCE.date(mdate2);
+        Period period = mdate1.periodUntil(ldate2);
+        assertEquals(period, Period.of(1, 1, 1));
+    }
+
+    //-----------------------------------------------------------------------
+    // toString()
+    //-----------------------------------------------------------------------
+    @DataProvider(name="toString")
+    Object[][] data_toString() {
+        return new Object[][] {
+            {ThaiBuddhistChronology.INSTANCE.date(544, 1, 1), "ThaiBuddhist BE 544-01-01"},
+            {ThaiBuddhistChronology.INSTANCE.date(2271, 10, 28), "ThaiBuddhist BE 2271-10-28"},
+            {ThaiBuddhistChronology.INSTANCE.date(2271, 10, 29), "ThaiBuddhist BE 2271-10-29"},
+            {ThaiBuddhistChronology.INSTANCE.date(2270, 12, 5), "ThaiBuddhist BE 2270-12-05"},
+            {ThaiBuddhistChronology.INSTANCE.date(2270, 12, 6), "ThaiBuddhist BE 2270-12-06"},
+        };
+    }
+
+    @Test(dataProvider="toString")
+    public void test_toString(ThaiBuddhistDate jdate, String expected) {
+        assertEquals(jdate.toString(), expected);
+    }
+
+    //-----------------------------------------------------------------------
+    // chronology range(ChronoField)
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_Chrono_range() {
+        long minYear = LocalDate.MIN.getYear() + YDIFF;
+        long maxYear = LocalDate.MAX.getYear() + YDIFF;
+        assertEquals(ThaiBuddhistChronology.INSTANCE.range(YEAR), ValueRange.of(minYear, maxYear));
+        assertEquals(ThaiBuddhistChronology.INSTANCE.range(YEAR_OF_ERA), ValueRange.of(1, -minYear + 1, maxYear));
+
+        assertEquals(ThaiBuddhistChronology.INSTANCE.range(DAY_OF_MONTH), DAY_OF_MONTH.range());
+        assertEquals(ThaiBuddhistChronology.INSTANCE.range(DAY_OF_YEAR), DAY_OF_YEAR.range());
+        assertEquals(ThaiBuddhistChronology.INSTANCE.range(MONTH_OF_YEAR), MONTH_OF_YEAR.range());
+    }
+
+    //-----------------------------------------------------------------------
+    // equals()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_equals_true() {
+        assertTrue(ThaiBuddhistChronology.INSTANCE.equals(ThaiBuddhistChronology.INSTANCE));
+    }
+
+    @Test
+    public void test_equals_false() {
+        assertFalse(ThaiBuddhistChronology.INSTANCE.equals(IsoChronology.INSTANCE));
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/chrono/TCKThaiBuddhistEra.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono;
+
+import static java.time.temporal.ChronoField.ERA;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.time.chrono.Era;
+import java.time.chrono.ThaiBuddhistChronology;
+import java.time.chrono.ThaiBuddhistEra;
+import java.time.temporal.ValueRange;
+import java.util.List;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test.
+ */
+@Test
+public class TCKThaiBuddhistEra {
+
+    @DataProvider(name = "ThaiBuddhistEras")
+    Object[][] data_of_eras() {
+        return new Object[][] {
+                    {ThaiBuddhistEra.BEFORE_BE, "BEFORE_BE", 0},
+                    {ThaiBuddhistEra.BE, "BE", 1},
+        };
+    }
+
+
+    //-----------------------------------------------------------------------
+    // valueOf()
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="ThaiBuddhistEras")
+    public void test_valueOf(ThaiBuddhistEra era , String eraName, int eraValue) {
+        assertEquals(era.getValue(), eraValue);
+        assertEquals(ThaiBuddhistEra.of(eraValue), era);
+        assertEquals(ThaiBuddhistEra.valueOf(eraName), era);
+    }
+
+    //-----------------------------------------------------------------------
+    // values()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_values() {
+        List<Era> eraList = ThaiBuddhistChronology.INSTANCE.eras();
+        ThaiBuddhistEra[] eras = ThaiBuddhistEra.values();
+        assertEquals(eraList.size(), eras.length);
+        for (ThaiBuddhistEra era : eras) {
+            assertTrue(eraList.contains(era));
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // range()
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_range() {
+        for (ThaiBuddhistEra era : ThaiBuddhistEra.values()) {
+            assertEquals(era.range(ERA), ValueRange.of(0, 1));
+        }
+    }
+
+}
--- a/test/java/time/tck/java/time/chrono/TestChronoLocalDate.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,460 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package tck.java.time.chrono;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.time.Duration;
-import java.time.LocalDate;
-import java.time.chrono.HijrahChronology;
-import java.time.chrono.JapaneseChronology;
-import java.time.chrono.MinguoChronology;
-import java.time.chrono.ThaiBuddhistChronology;
-import java.time.chrono.Chronology;
-import java.time.chrono.ChronoLocalDate;
-import java.time.chrono.IsoChronology;
-import java.time.temporal.ChronoUnit;
-import java.time.temporal.Temporal;
-import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalAdjuster;
-import java.time.temporal.TemporalAmount;
-import java.time.temporal.TemporalField;
-import java.time.temporal.TemporalUnit;
-import java.time.temporal.ValueRange;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.testng.Assert;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Test assertions that must be true for all built-in chronologies.
- */
-@Test
-public class TestChronoLocalDate {
-
-    //-----------------------------------------------------------------------
-    // regular data factory for names and descriptions of available calendars
-    //-----------------------------------------------------------------------
-    @DataProvider(name = "calendars")
-    Chronology[][] data_of_calendars() {
-        return new Chronology[][]{
-                    {HijrahChronology.INSTANCE},
-                    {IsoChronology.INSTANCE},
-                    {JapaneseChronology.INSTANCE},
-                    {MinguoChronology.INSTANCE},
-                    {ThaiBuddhistChronology.INSTANCE}};
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badWithAdjusterChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDate<?> date = chrono.date(refDate);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDate<?> date2 = chrono2.date(refDate);
-            TemporalAdjuster adjuster = new FixedAdjuster(date2);
-            if (chrono != chrono2) {
-                try {
-                    date.with(adjuster);
-                    Assert.fail("WithAdjuster should have thrown a ClassCastException");
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDate<?> result = date.with(adjuster);
-                assertEquals(result, date2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badPlusAdjusterChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDate<?> date = chrono.date(refDate);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDate<?> date2 = chrono2.date(refDate);
-            TemporalAmount adjuster = new FixedAdjuster(date2);
-            if (chrono != chrono2) {
-                try {
-                    date.plus(adjuster);
-                    Assert.fail("WithAdjuster should have thrown a ClassCastException");
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDate<?> result = date.plus(adjuster);
-                assertEquals(result, date2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badMinusAdjusterChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDate<?> date = chrono.date(refDate);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDate<?> date2 = chrono2.date(refDate);
-            TemporalAmount adjuster = new FixedAdjuster(date2);
-            if (chrono != chrono2) {
-                try {
-                    date.minus(adjuster);
-                    Assert.fail("WithAdjuster should have thrown a ClassCastException");
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDate<?> result = date.minus(adjuster);
-                assertEquals(result, date2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badPlusTemporalUnitChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDate<?> date = chrono.date(refDate);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDate<?> date2 = chrono2.date(refDate);
-            TemporalUnit adjuster = new FixedTemporalUnit(date2);
-            if (chrono != chrono2) {
-                try {
-                    date.plus(1, adjuster);
-                    Assert.fail("TemporalUnit.doAdd plus should have thrown a ClassCastException" + date.getClass()
-                            + ", can not be cast to " + date2.getClass());
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDate<?> result = date.plus(1, adjuster);
-                assertEquals(result, date2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badMinusTemporalUnitChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDate<?> date = chrono.date(refDate);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDate<?> date2 = chrono2.date(refDate);
-            TemporalUnit adjuster = new FixedTemporalUnit(date2);
-            if (chrono != chrono2) {
-                try {
-                    date.minus(1, adjuster);
-                    Assert.fail("TemporalUnit.doAdd minus should have thrown a ClassCastException" + date.getClass()
-                            + ", can not be cast to " + date2.getClass());
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDate<?> result = date.minus(1, adjuster);
-                assertEquals(result, date2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badTemporalFieldChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDate<?> date = chrono.date(refDate);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDate<?> date2 = chrono2.date(refDate);
-            TemporalField adjuster = new FixedTemporalField(date2);
-            if (chrono != chrono2) {
-                try {
-                    date.with(adjuster, 1);
-                    Assert.fail("TemporalField doSet should have thrown a ClassCastException" + date.getClass()
-                            + ", can not be cast to " + date2.getClass());
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDate<?> result = date.with(adjuster, 1);
-                assertEquals(result, date2, "TemporalField doSet failed to replace date");
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // isBefore, isAfter, isEqual, DATE_COMPARATOR
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_date_comparisons(Chronology chrono) {
-        List<ChronoLocalDate> dates = new ArrayList<>();
-
-        ChronoLocalDate<?> date = chrono.date(LocalDate.of(1900, 1, 1));
-
-        // Insert dates in order, no duplicates
-        dates.add(date.minus(1000, ChronoUnit.YEARS));
-        dates.add(date.minus(100, ChronoUnit.YEARS));
-        dates.add(date.minus(10, ChronoUnit.YEARS));
-        dates.add(date.minus(1, ChronoUnit.YEARS));
-        dates.add(date.minus(1, ChronoUnit.MONTHS));
-        dates.add(date.minus(1, ChronoUnit.WEEKS));
-        dates.add(date.minus(1, ChronoUnit.DAYS));
-        dates.add(date);
-        dates.add(date.plus(1, ChronoUnit.DAYS));
-        dates.add(date.plus(1, ChronoUnit.WEEKS));
-        dates.add(date.plus(1, ChronoUnit.MONTHS));
-        dates.add(date.plus(1, ChronoUnit.YEARS));
-        dates.add(date.plus(10, ChronoUnit.YEARS));
-        dates.add(date.plus(100, ChronoUnit.YEARS));
-        dates.add(date.plus(1000, ChronoUnit.YEARS));
-
-        // Check these dates against the corresponding dates for every calendar
-        for (Chronology[] clist : data_of_calendars()) {
-            List<ChronoLocalDate<?>> otherDates = new ArrayList<>();
-            Chronology chrono2 = clist[0];
-            for (ChronoLocalDate<?> d : dates) {
-                otherDates.add(chrono2.date(d));
-            }
-
-            // Now compare  the sequence of original dates with the sequence of converted dates
-            for (int i = 0; i < dates.size(); i++) {
-                ChronoLocalDate<?> a = dates.get(i);
-                for (int j = 0; j < otherDates.size(); j++) {
-                    ChronoLocalDate<?> b = otherDates.get(j);
-                    int cmp = ChronoLocalDate.DATE_COMPARATOR.compare(a, b);
-                    if (i < j) {
-                        assertTrue(cmp < 0, a + " compare " + b);
-                        assertEquals(a.isBefore(b), true, a + " isBefore " + b);
-                        assertEquals(a.isAfter(b), false, a + " isAfter " + b);
-                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
-                    } else if (i > j) {
-                        assertTrue(cmp > 0, a + " compare " + b);
-                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
-                        assertEquals(a.isAfter(b), true, a + " isAfter " + b);
-                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
-                    } else {
-                        assertTrue(cmp == 0, a + " compare " + b);
-                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
-                        assertEquals(a.isAfter(b), false, a + " isAfter " + b);
-                        assertEquals(a.isEqual(b), true, a + " isEqual " + b);
-                    }
-                }
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // Test Serialization of Calendars
-    //-----------------------------------------------------------------------
-    @Test( groups={"tck"}, dataProvider="calendars")
-    public void test_ChronoSerialization(Chronology chrono) throws Exception {
-        LocalDate ref = LocalDate.of(1900, 1, 5);
-        ChronoLocalDate<?> orginal = chrono.date(ref);
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(orginal);
-        out.close();
-        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        ObjectInputStream in = new ObjectInputStream(bais);
-        @SuppressWarnings("unchecked")
-        ChronoLocalDate<?> ser = (ChronoLocalDate<?>) in.readObject();
-        assertEquals(ser, orginal, "deserialized date is wrong");
-    }
-
-    /**
-     * FixedAdjusted returns a fixed Temporal in all adjustments.
-     * Construct an adjuster with the Temporal that should be returned from adjust.
-     */
-    static class FixedAdjuster implements TemporalAdjuster, TemporalAmount {
-        private Temporal datetime;
-
-        FixedAdjuster(Temporal datetime) {
-            this.datetime = datetime;
-        }
-
-        @Override
-        public Temporal adjustInto(Temporal ignore) {
-            return datetime;
-        }
-
-        @Override
-        public Temporal addTo(Temporal ignore) {
-            return datetime;
-        }
-
-        @Override
-        public Temporal subtractFrom(Temporal ignore) {
-            return datetime;
-        }
-
-        @Override
-        public long get(TemporalUnit unit) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public List<TemporalUnit> getUnits() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-    }
-
-    /**
-     * FixedTemporalUnit returns a fixed Temporal in all adjustments.
-     * Construct an FixedTemporalUnit with the Temporal that should be returned from doAdd.
-     */
-    static class FixedTemporalUnit implements TemporalUnit {
-        private Temporal temporal;
-
-        FixedTemporalUnit(Temporal temporal) {
-            this.temporal = temporal;
-        }
-
-        @Override
-        public String getName() {
-            return "FixedTemporalUnit";
-        }
-
-        @Override
-        public Duration getDuration() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public boolean isDurationEstimated() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public boolean isSupportedBy(Temporal temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @SuppressWarnings("unchecked")
-        @Override
-        public <R extends Temporal> R addTo(R temporal, long amount) {
-            return (R) this.temporal;
-        }
-
-        @Override
-        public long between(Temporal temporal1, Temporal temporal2) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-    }
-
-    /**
-     * FixedTemporalField returns a fixed Temporal in all adjustments.
-     * Construct an FixedTemporalField with the Temporal that should be returned from doSet.
-     */
-    static class FixedTemporalField implements TemporalField {
-        private Temporal temporal;
-        FixedTemporalField(Temporal temporal) {
-            this.temporal = temporal;
-        }
-
-        @Override
-        public String getName() {
-            return "FixedTemporalField";
-        }
-
-        @Override
-        public TemporalUnit getBaseUnit() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public TemporalUnit getRangeUnit() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public ValueRange range() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public boolean isSupportedBy(TemporalAccessor temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public long getFrom(TemporalAccessor temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @SuppressWarnings("unchecked")
-        @Override
-        public <R extends Temporal> R adjustInto(R temporal, long newValue) {
-            return (R) this.temporal;
-        }
-    }
-}
--- a/test/java/time/tck/java/time/chrono/TestChronoLocalDateTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,470 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package tck.java.time.chrono;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.time.Duration;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.LocalTime;
-import java.time.chrono.HijrahChronology;
-import java.time.chrono.JapaneseChronology;
-import java.time.chrono.MinguoChronology;
-import java.time.chrono.ThaiBuddhistChronology;
-import java.time.chrono.ChronoLocalDate;
-import java.time.chrono.ChronoLocalDateTime;
-import java.time.chrono.Chronology;
-import java.time.chrono.IsoChronology;
-import java.time.temporal.ChronoUnit;
-import java.time.temporal.Temporal;
-import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalAdjuster;
-import java.time.temporal.TemporalAmount;
-import java.time.temporal.TemporalField;
-import java.time.temporal.TemporalUnit;
-import java.time.temporal.ValueRange;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.testng.Assert;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Test assertions that must be true for all built-in chronologies.
- */
-@Test
-public class TestChronoLocalDateTime {
-    //-----------------------------------------------------------------------
-    // regular data factory for names and descriptions of available calendars
-    //-----------------------------------------------------------------------
-    @DataProvider(name = "calendars")
-    Chronology[][] data_of_calendars() {
-        return new Chronology[][]{
-                    {HijrahChronology.INSTANCE},
-                    {IsoChronology.INSTANCE},
-                    {JapaneseChronology.INSTANCE},
-                    {MinguoChronology.INSTANCE},
-                    {ThaiBuddhistChronology.INSTANCE}};
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badWithAdjusterChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
-            TemporalAdjuster adjuster = new FixedAdjuster(cdt2);
-            if (chrono != chrono2) {
-                try {
-                    ChronoLocalDateTime<?> notreached = cdt.with(adjuster);
-                    Assert.fail("WithAdjuster should have thrown a ClassCastException, "
-                            + "required: " + cdt + ", supplied: " + cdt2);
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDateTime<?> result = cdt.with(adjuster);
-                assertEquals(result, cdt2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badPlusAdjusterChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
-            TemporalAmount adjuster = new FixedAdjuster(cdt2);
-            if (chrono != chrono2) {
-                try {
-                    ChronoLocalDateTime<?> notreached = cdt.plus(adjuster);
-                    Assert.fail("WithAdjuster should have thrown a ClassCastException, "
-                            + "required: " + cdt + ", supplied: " + cdt2);
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDateTime<?> result = cdt.plus(adjuster);
-                assertEquals(result, cdt2, "WithAdjuster failed to replace date time");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badMinusAdjusterChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
-            TemporalAmount adjuster = new FixedAdjuster(cdt2);
-            if (chrono != chrono2) {
-                try {
-                    ChronoLocalDateTime<?> notreached = cdt.minus(adjuster);
-                    Assert.fail("WithAdjuster should have thrown a ClassCastException, "
-                            + "required: " + cdt + ", supplied: " + cdt2);
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDateTime<?> result = cdt.minus(adjuster);
-                assertEquals(result, cdt2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badPlusTemporalUnitChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
-            TemporalUnit adjuster = new FixedTemporalUnit(cdt2);
-            if (chrono != chrono2) {
-                try {
-                    ChronoLocalDateTime<?> notreached = cdt.plus(1, adjuster);
-                    Assert.fail("TemporalUnit.doAdd plus should have thrown a ClassCastException" + cdt
-                            + ", can not be cast to " + cdt2);
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDateTime<?> result = cdt.plus(1, adjuster);
-                assertEquals(result, cdt2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badMinusTemporalUnitChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
-            TemporalUnit adjuster = new FixedTemporalUnit(cdt2);
-            if (chrono != chrono2) {
-                try {
-                    ChronoLocalDateTime<?> notreached = cdt.minus(1, adjuster);
-                    Assert.fail("TemporalUnit.doAdd minus should have thrown a ClassCastException" + cdt.getClass()
-                            + ", can not be cast to " + cdt2.getClass());
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDateTime<?> result = cdt.minus(1, adjuster);
-                assertEquals(result, cdt2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badTemporalFieldChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
-            TemporalField adjuster = new FixedTemporalField(cdt2);
-            if (chrono != chrono2) {
-                try {
-                    ChronoLocalDateTime<?> notreached = cdt.with(adjuster, 1);
-                    Assert.fail("TemporalField doSet should have thrown a ClassCastException" + cdt.getClass()
-                            + ", can not be cast to " + cdt2.getClass());
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDateTime<?> result = cdt.with(adjuster, 1);
-                assertEquals(result, cdt2, "TemporalField doSet failed to replace date");
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // isBefore, isAfter, isEqual
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_datetime_comparisons(Chronology chrono) {
-        List<ChronoLocalDateTime<?>> dates = new ArrayList<>();
-
-        ChronoLocalDateTime<?> date = chrono.date(LocalDate.of(1900, 1, 1)).atTime(LocalTime.MIN);
-
-        // Insert dates in order, no duplicates
-        dates.add(date.minus(100, ChronoUnit.YEARS));
-        dates.add(date.minus(1, ChronoUnit.YEARS));
-        dates.add(date.minus(1, ChronoUnit.MONTHS));
-        dates.add(date.minus(1, ChronoUnit.WEEKS));
-        dates.add(date.minus(1, ChronoUnit.DAYS));
-        dates.add(date.minus(1, ChronoUnit.HOURS));
-        dates.add(date.minus(1, ChronoUnit.MINUTES));
-        dates.add(date.minus(1, ChronoUnit.SECONDS));
-        dates.add(date.minus(1, ChronoUnit.NANOS));
-        dates.add(date);
-        dates.add(date.plus(1, ChronoUnit.NANOS));
-        dates.add(date.plus(1, ChronoUnit.SECONDS));
-        dates.add(date.plus(1, ChronoUnit.MINUTES));
-        dates.add(date.plus(1, ChronoUnit.HOURS));
-        dates.add(date.plus(1, ChronoUnit.DAYS));
-        dates.add(date.plus(1, ChronoUnit.WEEKS));
-        dates.add(date.plus(1, ChronoUnit.MONTHS));
-        dates.add(date.plus(1, ChronoUnit.YEARS));
-        dates.add(date.plus(100, ChronoUnit.YEARS));
-
-        // Check these dates against the corresponding dates for every calendar
-        for (Chronology[] clist : data_of_calendars()) {
-            List<ChronoLocalDateTime<?>> otherDates = new ArrayList<>();
-            Chronology chrono2 = clist[0];
-            for (ChronoLocalDateTime<?> d : dates) {
-                otherDates.add(chrono2.date(d).atTime(d.toLocalTime()));
-            }
-
-            // Now compare  the sequence of original dates with the sequence of converted dates
-            for (int i = 0; i < dates.size(); i++) {
-                ChronoLocalDateTime<?> a = dates.get(i);
-                for (int j = 0; j < otherDates.size(); j++) {
-                    ChronoLocalDateTime<?> b = otherDates.get(j);
-                    int cmp = ChronoLocalDateTime.DATE_TIME_COMPARATOR.compare(a, b);
-                    if (i < j) {
-                        assertTrue(cmp < 0, a + " compare " + b);
-                        assertEquals(a.isBefore(b), true, a + " isBefore " + b);
-                        assertEquals(a.isAfter(b), false, a + " isAfter " + b);
-                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
-                    } else if (i > j) {
-                        assertTrue(cmp > 0, a + " compare " + b);
-                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
-                        assertEquals(a.isAfter(b), true, a + " isAfter " + b);
-                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
-                    } else {
-                        assertTrue(cmp == 0, a + " compare " + b);
-                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
-                        assertEquals(a.isAfter(b), false, a + " isAfter " + b);
-                        assertEquals(a.isEqual(b), true, a + " isEqual " + b);
-                    }
-                }
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // Test Serialization of ISO via chrono API
-    //-----------------------------------------------------------------------
-    @Test( groups={"tck"}, dataProvider="calendars")
-    public void test_ChronoLocalDateTimeSerialization(Chronology chrono) throws Exception {
-        LocalDateTime ref = LocalDate.of(2000, 1, 5).atTime(12, 1, 2, 3);
-        ChronoLocalDateTime<?> orginal = chrono.date(ref).atTime(ref.toLocalTime());
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(orginal);
-        out.close();
-        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        ObjectInputStream in = new ObjectInputStream(bais);
-        ChronoLocalDateTime<?> ser = (ChronoLocalDateTime<?>) in.readObject();
-        assertEquals(ser, orginal, "deserialized date is wrong");
-    }
-
-
-    /**
-     * FixedAdjusted returns a fixed Temporal in all adjustments.
-     * Construct an adjuster with the Temporal that should be returned from adjust.
-     */
-    static class FixedAdjuster implements TemporalAdjuster, TemporalAmount {
-        private Temporal datetime;
-
-        FixedAdjuster(Temporal datetime) {
-            this.datetime = datetime;
-        }
-
-        @Override
-        public Temporal adjustInto(Temporal ignore) {
-            return datetime;
-        }
-
-        @Override
-        public Temporal addTo(Temporal ignore) {
-            return datetime;
-        }
-
-        @Override
-        public Temporal subtractFrom(Temporal ignore) {
-            return datetime;
-        }
-
-        @Override
-        public long get(TemporalUnit unit) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public List<TemporalUnit> getUnits() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-    }
-
-    /**
-     * FixedTemporalUnit returns a fixed Temporal in all adjustments.
-     * Construct an FixedTemporalUnit with the Temporal that should be returned from doAdd.
-     */
-    static class FixedTemporalUnit implements TemporalUnit {
-        private Temporal temporal;
-
-        FixedTemporalUnit(Temporal temporal) {
-            this.temporal = temporal;
-        }
-
-        @Override
-        public String getName() {
-            return "FixedTemporalUnit";
-        }
-
-        @Override
-        public Duration getDuration() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public boolean isDurationEstimated() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public boolean isSupportedBy(Temporal temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @SuppressWarnings("unchecked")
-        @Override
-        public <R extends Temporal> R addTo(R temporal, long amount) {
-            return (R) this.temporal;
-        }
-
-        @Override
-        public long between(Temporal temporal1, Temporal temporal2) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-    }
-
-    /**
-     * FixedTemporalField returns a fixed Temporal in all adjustments.
-     * Construct an FixedTemporalField with the Temporal that should be returned from doSet.
-     */
-    static class FixedTemporalField implements TemporalField {
-        private Temporal temporal;
-        FixedTemporalField(Temporal temporal) {
-            this.temporal = temporal;
-        }
-
-        @Override
-        public String getName() {
-            return "FixedTemporalField";
-        }
-
-        @Override
-        public TemporalUnit getBaseUnit() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public TemporalUnit getRangeUnit() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public ValueRange range() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public boolean isSupportedBy(TemporalAccessor temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public long getFrom(TemporalAccessor temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @SuppressWarnings("unchecked")
-        @Override
-        public <R extends Temporal> R adjustInto(R temporal, long newValue) {
-            return (R) this.temporal;
-        }
-    }
-}
--- a/test/java/time/tck/java/time/chrono/TestHijrahChronology.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,237 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package tck.java.time.chrono;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-
-import java.time.DateTimeException;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.Month;
-import java.time.chrono.HijrahChronology;
-import java.time.chrono.HijrahDate;
-import java.time.chrono.ChronoLocalDate;
-import java.time.temporal.Adjusters;
-import java.time.chrono.Chronology;
-import java.time.chrono.IsoChronology;
-
-import org.testng.Assert;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Test.
- */
-@Test
-public class TestHijrahChronology {
-
-    //-----------------------------------------------------------------------
-    // Chronology.ofName("Hijrah")  Lookup by name
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_chrono_byName() {
-        Chronology c = HijrahChronology.INSTANCE;
-        Chronology test = Chronology.of("Hijrah");
-        Assert.assertNotNull(test, "The Hijrah calendar could not be found byName");
-        Assert.assertEquals(test.getId(), "Hijrah", "ID mismatch");
-        Assert.assertEquals(test.getCalendarType(), "islamicc", "Type mismatch");
-        Assert.assertEquals(test, c);
-    }
-
-    //-----------------------------------------------------------------------
-    // creation, toLocalDate()
-    //-----------------------------------------------------------------------
-    @DataProvider(name="samples")
-    Object[][] data_samples() {
-        return new Object[][] {
-            {HijrahChronology.INSTANCE.date(1, 1, 1), LocalDate.of(622, 7, 19)},
-            {HijrahChronology.INSTANCE.date(1, 1, 2), LocalDate.of(622, 7, 20)},
-            {HijrahChronology.INSTANCE.date(1, 1, 3), LocalDate.of(622, 7, 21)},
-
-            {HijrahChronology.INSTANCE.date(2, 1, 1), LocalDate.of(623, 7, 8)},
-            {HijrahChronology.INSTANCE.date(3, 1, 1), LocalDate.of(624, 6, 27)},
-            {HijrahChronology.INSTANCE.date(3, 12, 6), LocalDate.of(625, 5, 23)},
-            {HijrahChronology.INSTANCE.date(4, 1, 1), LocalDate.of(625, 6, 16)},
-            {HijrahChronology.INSTANCE.date(4, 7, 3), LocalDate.of(625, 12, 12)},
-            {HijrahChronology.INSTANCE.date(4, 7, 4), LocalDate.of(625, 12, 13)},
-            {HijrahChronology.INSTANCE.date(5, 1, 1), LocalDate.of(626, 6, 5)},
-            {HijrahChronology.INSTANCE.date(1662, 3, 3), LocalDate.of(2234, 4, 3)},
-            {HijrahChronology.INSTANCE.date(1728, 10, 28), LocalDate.of(2298, 12, 03)},
-            {HijrahChronology.INSTANCE.date(1728, 10, 29), LocalDate.of(2298, 12, 04)},
-        };
-    }
-
-    @Test(dataProvider="samples", groups={"tck"})
-    public void test_toLocalDate(ChronoLocalDate<?> hijrahDate, LocalDate iso) {
-        assertEquals(LocalDate.from(hijrahDate), iso);
-    }
-
-    @Test(dataProvider="samples", groups={"tck"})
-    public void test_fromCalendrical(ChronoLocalDate<?> hijrahDate, LocalDate iso) {
-        assertEquals(HijrahChronology.INSTANCE.date(iso), hijrahDate);
-    }
-
-    @DataProvider(name="badDates")
-    Object[][] data_badDates() {
-        return new Object[][] {
-            {1728, 0, 0},
-
-            {1728, -1, 1},
-            {1728, 0, 1},
-            {1728, 14, 1},
-            {1728, 15, 1},
-
-            {1728, 1, -1},
-            {1728, 1, 0},
-            {1728, 1, 32},
-
-            {1728, 12, -1},
-            {1728, 12, 0},
-            {1728, 12, 32},
-        };
-    }
-
-    @Test(dataProvider="badDates", groups={"tck"}, expectedExceptions=DateTimeException.class)
-    public void test_badDates(int year, int month, int dom) {
-        HijrahChronology.INSTANCE.date(year, month, dom);
-    }
-
-    //-----------------------------------------------------------------------
-    // with(WithAdjuster)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_adjust1() {
-        ChronoLocalDate<?> base = HijrahChronology.INSTANCE.date(1728, 10, 28);
-        ChronoLocalDate<?> test = base.with(Adjusters.lastDayOfMonth());
-        assertEquals(test, HijrahChronology.INSTANCE.date(1728, 10, 29));
-    }
-
-    @Test(groups={"tck"})
-    public void test_adjust2() {
-        ChronoLocalDate<?> base = HijrahChronology.INSTANCE.date(1728, 12, 2);
-        ChronoLocalDate<?> test = base.with(Adjusters.lastDayOfMonth());
-        assertEquals(test, HijrahChronology.INSTANCE.date(1728, 12, 30));
-    }
-
-    //-----------------------------------------------------------------------
-    // HijrahDate.with(Local*)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_adjust_toLocalDate() {
-        ChronoLocalDate<?> hijrahDate = HijrahChronology.INSTANCE.date(1726, 1, 4);
-        ChronoLocalDate<?> test = hijrahDate.with(LocalDate.of(2012, 7, 6));
-        assertEquals(test, HijrahChronology.INSTANCE.date(1433, 8, 16));
-    }
-
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
-    public void test_adjust_toMonth() {
-        ChronoLocalDate<?> hijrahDate = HijrahChronology.INSTANCE.date(1726, 1, 4);
-        hijrahDate.with(Month.APRIL);
-    }
-
-    //-----------------------------------------------------------------------
-    // LocalDate.with(HijrahDate)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_LocalDate_adjustToHijrahDate() {
-        ChronoLocalDate<?> hijrahDate = HijrahChronology.INSTANCE.date(1728, 10, 29);
-        LocalDate test = LocalDate.MIN.with(hijrahDate);
-        assertEquals(test, LocalDate.of(2298, 12, 4));
-    }
-
-    @Test(groups={"tck"})
-    public void test_LocalDateTime_adjustToHijrahDate() {
-        ChronoLocalDate<?> hijrahDate = HijrahChronology.INSTANCE.date(1728, 10, 29);
-        LocalDateTime test = LocalDateTime.MIN.with(hijrahDate);
-        assertEquals(test, LocalDateTime.of(2298, 12, 4, 0, 0));
-    }
-
-    //-----------------------------------------------------------------------
-    // toString()
-    //-----------------------------------------------------------------------
-    @DataProvider(name="toString")
-    Object[][] data_toString() {
-        return new Object[][] {
-            {HijrahChronology.INSTANCE.date(1, 1, 1), "Hijrah AH 1-01-01"},
-            {HijrahChronology.INSTANCE.date(1728, 10, 28), "Hijrah AH 1728-10-28"},
-            {HijrahChronology.INSTANCE.date(1728, 10, 29), "Hijrah AH 1728-10-29"},
-            {HijrahChronology.INSTANCE.date(1727, 12, 5), "Hijrah AH 1727-12-05"},
-            {HijrahChronology.INSTANCE.date(1727, 12, 6), "Hijrah AH 1727-12-06"},
-        };
-    }
-
-    @Test(dataProvider="toString", groups={"tck"})
-    public void test_toString(ChronoLocalDate<?> hijrahDate, String expected) {
-        assertEquals(hijrahDate.toString(), expected);
-    }
-
-    //-----------------------------------------------------------------------
-    // equals()
-    //-----------------------------------------------------------------------
-    @Test(groups="tck")
-    public void test_equals_true() {
-        assertTrue(HijrahChronology.INSTANCE.equals(HijrahChronology.INSTANCE));
-    }
-
-    @Test(groups="tck")
-    public void test_equals_false() {
-        assertFalse(HijrahChronology.INSTANCE.equals(IsoChronology.INSTANCE));
-    }
-
-}
--- a/test/java/time/tck/java/time/chrono/TestJapaneseChronology.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,382 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package tck.java.time.chrono;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
-
-import java.util.List;
-
-import java.time.DateTimeException;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.Month;
-import java.time.Year;
-import java.time.chrono.JapaneseChronology;
-import java.time.chrono.JapaneseDate;
-import java.time.chrono.Chronology;
-import java.time.chrono.Era;
-import java.time.chrono.IsoChronology;
-import java.time.temporal.Adjusters;
-import java.util.Locale;
-
-import org.testng.Assert;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Test.
- */
-@Test
-public class TestJapaneseChronology {
-    private static int YDIFF_HEISEI = 1988;
-    private static int YDIFF_MEIJI = 1867;
-    private static int YDIFF_SHOWA = 1925;
-    private static int YDIFF_TAISHO = 1911;
-
-    //-----------------------------------------------------------------------
-    // Chronology.of(String)
-    //-----------------------------------------------------------------------
-    @Test
-    public void test_chrono_byName() {
-        Chronology c = JapaneseChronology.INSTANCE;
-        Chronology test = Chronology.of("Japanese");
-        Assert.assertNotNull(test, "The Japanese calendar could not be found byName");
-        Assert.assertEquals(test.getId(), "Japanese", "ID mismatch");
-        Assert.assertEquals(test.getCalendarType(), "japanese", "Type mismatch");
-        Assert.assertEquals(test, c);
-    }
-
-    //-----------------------------------------------------------------------
-    // Chronology.ofLocale(Locale)
-    //-----------------------------------------------------------------------
-    @Test
-    public void test_chrono_byLocale_fullTag_japaneseCalendarFromJapan() {
-        Chronology test = Chronology.ofLocale(Locale.forLanguageTag("ja-JP-u-ca-japanese"));
-        Assert.assertEquals(test.getId(), "Japanese");
-        Assert.assertEquals(test, JapaneseChronology.INSTANCE);
-    }
-
-    @Test
-    public void test_chrono_byLocale_fullTag_japaneseCalendarFromElsewhere() {
-        Chronology test = Chronology.ofLocale(Locale.forLanguageTag("en-US-u-ca-japanese"));
-        Assert.assertEquals(test.getId(), "Japanese");
-        Assert.assertEquals(test, JapaneseChronology.INSTANCE);
-    }
-
-    @Test
-    public void test_chrono_byLocale_oldJP_noVariant() {
-        Chronology test = Chronology.ofLocale(new Locale("ja", "JP"));
-        Assert.assertEquals(test.getId(), "ISO");
-        Assert.assertEquals(test, IsoChronology.INSTANCE);
-    }
-
-    @Test
-    public void test_chrono_byLocale_oldJP_variant() {
-        Chronology test = Chronology.ofLocale(new Locale("ja", "JP", "JP"));
-        Assert.assertEquals(test.getId(), "Japanese");
-        Assert.assertEquals(test, JapaneseChronology.INSTANCE);
-    }
-
-    @Test
-    public void test_chrono_byLocale_iso() {
-        Assert.assertEquals(Chronology.ofLocale(new Locale("ja", "JP")).getId(), "ISO");
-        Assert.assertEquals(Chronology.ofLocale(Locale.forLanguageTag("ja-JP")).getId(), "ISO");
-        Assert.assertEquals(Chronology.ofLocale(Locale.forLanguageTag("ja-JP-JP")).getId(), "ISO");
-    }
-
-    //-----------------------------------------------------------------------
-    // creation, toLocalDate()
-    //-----------------------------------------------------------------------
-    @DataProvider(name="samples")
-    Object[][] data_samples() {
-        return new Object[][] {
-            {JapaneseChronology.INSTANCE.date(1, 1, 1), LocalDate.of(1, 1, 1)},
-            {JapaneseChronology.INSTANCE.date(1, 1, 2), LocalDate.of(1, 1, 2)},
-            {JapaneseChronology.INSTANCE.date(1, 1, 3), LocalDate.of(1, 1, 3)},
-
-            {JapaneseChronology.INSTANCE.date(2, 1, 1), LocalDate.of(2, 1, 1)},
-            {JapaneseChronology.INSTANCE.date(3, 1, 1), LocalDate.of(3, 1, 1)},
-            {JapaneseChronology.INSTANCE.date(3, 12, 6), LocalDate.of(3, 12, 6)},
-            {JapaneseChronology.INSTANCE.date(4, 1, 1), LocalDate.of(4, 1, 1)},
-            {JapaneseChronology.INSTANCE.date(4, 7, 3), LocalDate.of(4, 7, 3)},
-            {JapaneseChronology.INSTANCE.date(4, 7, 4), LocalDate.of(4, 7, 4)},
-            {JapaneseChronology.INSTANCE.date(5, 1, 1), LocalDate.of(5, 1, 1)},
-            {JapaneseChronology.INSTANCE.date(1662, 3, 3), LocalDate.of(1662, 3, 3)},
-            {JapaneseChronology.INSTANCE.date(1728, 10, 28), LocalDate.of(1728, 10, 28)},
-            {JapaneseChronology.INSTANCE.date(1728, 10, 29), LocalDate.of(1728, 10, 29)},
-
-            {JapaneseChronology.INSTANCE.date(JapaneseChronology.ERA_HEISEI, 1996 - YDIFF_HEISEI, 2, 29), LocalDate.of(1996, 2, 29)},
-            {JapaneseChronology.INSTANCE.date(JapaneseChronology.ERA_HEISEI, 2000 - YDIFF_HEISEI, 2, 29), LocalDate.of(2000, 2, 29)},
-            {JapaneseChronology.INSTANCE.date(JapaneseChronology.ERA_MEIJI, 1868 - YDIFF_MEIJI, 2, 29), LocalDate.of(1868, 2, 29)},
-            {JapaneseChronology.INSTANCE.date(JapaneseChronology.ERA_SHOWA, 1928 - YDIFF_SHOWA, 2, 29), LocalDate.of(1928, 2, 29)},
-            {JapaneseChronology.INSTANCE.date(JapaneseChronology.ERA_TAISHO, 1912 - YDIFF_TAISHO, 2, 29), LocalDate.of(1912, 2, 29)},
-
-            {JapaneseChronology.INSTANCE.dateYearDay(1996, 60), LocalDate.of(1996, 2, 29)},
-            {JapaneseChronology.INSTANCE.dateYearDay(1868, 60), LocalDate.of(1868, 2, 29)},
-            {JapaneseChronology.INSTANCE.dateYearDay(1928, 60), LocalDate.of(1928, 2, 29)},
-            {JapaneseChronology.INSTANCE.dateYearDay(1912, 60), LocalDate.of(1912, 2, 29)},
-        };
-    }
-
-    @Test(dataProvider="samples", groups={"tck"})
-    public void test_toLocalDate(JapaneseDate jdate, LocalDate iso) {
-        assertEquals(LocalDate.from(jdate), iso);
-    }
-
-    @Test(dataProvider="samples", groups={"tck"})
-    public void test_fromCalendrical(JapaneseDate jdate, LocalDate iso) {
-        assertEquals(JapaneseChronology.INSTANCE.date(iso), jdate);
-    }
-
-    @DataProvider(name="badDates")
-    Object[][] data_badDates() {
-        return new Object[][] {
-            {1728, 0, 0},
-
-            {1728, -1, 1},
-            {1728, 0, 1},
-            {1728, 14, 1},
-            {1728, 15, 1},
-
-            {1728, 1, -1},
-            {1728, 1, 0},
-            {1728, 1, 32},
-
-            {1728, 12, -1},
-            {1728, 12, 0},
-            {1728, 12, 32},
-
-            {1725, 2, 29},
-            {500, 2, 29},
-            {2100, 2, 29},
-        };
-    }
-
-    @Test(dataProvider="badDates", groups={"tck"}, expectedExceptions=DateTimeException.class)
-    public void test_badDates(int year, int month, int dom) {
-        JapaneseChronology.INSTANCE.date(year, month, dom);
-    }
-
-    //-----------------------------------------------------------------------
-    // prolepticYear() and is LeapYear()
-    //-----------------------------------------------------------------------
-    @DataProvider(name="prolepticYear")
-    Object[][] data_prolepticYear() {
-        return new Object[][] {
-            {2, JapaneseChronology.ERA_HEISEI, 1, 1 + YDIFF_HEISEI, false},
-            {2, JapaneseChronology.ERA_HEISEI, 100, 100 + YDIFF_HEISEI, true},
-            {2, JapaneseChronology.ERA_HEISEI, 0, YDIFF_HEISEI, true},
-            {2, JapaneseChronology.ERA_HEISEI, -10, -10 + YDIFF_HEISEI, false},
-
-            {-1, JapaneseChronology.ERA_MEIJI, 1, 1 + YDIFF_MEIJI, true},
-            {-1, JapaneseChronology.ERA_MEIJI, 100, 100 + YDIFF_MEIJI, false},
-            {-1, JapaneseChronology.ERA_MEIJI, 0, YDIFF_MEIJI, false},
-            {-1, JapaneseChronology.ERA_MEIJI, -10, -10 + YDIFF_MEIJI, false},
-
-            {1, JapaneseChronology.ERA_SHOWA, 1, 1 + YDIFF_SHOWA, false},
-            {1, JapaneseChronology.ERA_SHOWA, 100, 100 + YDIFF_SHOWA, false},
-            {1, JapaneseChronology.ERA_SHOWA, 0, YDIFF_SHOWA, false},
-            {1, JapaneseChronology.ERA_SHOWA, -5, -5 + YDIFF_SHOWA, true},
-
-            {0, JapaneseChronology.ERA_TAISHO, 1, 1 + YDIFF_TAISHO, true},
-            {0, JapaneseChronology.ERA_TAISHO, 100, 100 + YDIFF_TAISHO, false},
-            {0, JapaneseChronology.ERA_TAISHO, 0, YDIFF_TAISHO, false},
-            {0, JapaneseChronology.ERA_TAISHO, -10, -10 + YDIFF_TAISHO, false},
-
-        };
-    }
-
-    @Test(dataProvider="prolepticYear", groups={"tck"})
-    public void test_prolepticYear(int eraValue, Era  era, int yearOfEra, int expectedProlepticYear, boolean isLeapYear) {
-        Era eraObj = JapaneseChronology.INSTANCE.eraOf(eraValue) ;
-        assertTrue(JapaneseChronology.INSTANCE.eras().contains(eraObj));
-        assertEquals(eraObj, era);
-        assertEquals(JapaneseChronology.INSTANCE.prolepticYear(era, yearOfEra), expectedProlepticYear);
-        assertEquals(JapaneseChronology.INSTANCE.isLeapYear(expectedProlepticYear), isLeapYear) ;
-        assertEquals(JapaneseChronology.INSTANCE.isLeapYear(expectedProlepticYear), Year.of(expectedProlepticYear).isLeap()) ;
-    }
-
-    //-----------------------------------------------------------------------
-    // with(WithAdjuster)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_adjust1() {
-        JapaneseDate base = JapaneseChronology.INSTANCE.date(1728, 10, 29);
-        JapaneseDate test = base.with(Adjusters.lastDayOfMonth());
-        assertEquals(test, JapaneseChronology.INSTANCE.date(1728, 10, 31));
-    }
-
-    @Test(groups={"tck"})
-    public void test_adjust2() {
-        JapaneseDate base = JapaneseChronology.INSTANCE.date(1728, 12, 2);
-        JapaneseDate test = base.with(Adjusters.lastDayOfMonth());
-        assertEquals(test, JapaneseChronology.INSTANCE.date(1728, 12, 31));
-    }
-
-    //-----------------------------------------------------------------------
-    // JapaneseDate.with(Local*)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_adjust_toLocalDate() {
-        JapaneseDate jdate = JapaneseChronology.INSTANCE.date(1726, 1, 4);
-        JapaneseDate test = jdate.with(LocalDate.of(2012, 7, 6));
-        assertEquals(test, JapaneseChronology.INSTANCE.date(2012, 7, 6));
-    }
-
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
-    public void test_adjust_toMonth() {
-        JapaneseDate jdate = JapaneseChronology.INSTANCE.date(1726, 1, 4);
-        jdate.with(Month.APRIL);
-    }
-
-    //-----------------------------------------------------------------------
-    // LocalDate.with(JapaneseDate)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_LocalDate_adjustToJapaneseDate() {
-        JapaneseDate jdate = JapaneseChronology.INSTANCE.date(1728, 10, 29);
-        LocalDate test = LocalDate.MIN.with(jdate);
-        assertEquals(test, LocalDate.of(1728, 10, 29));
-    }
-
-    @Test(groups={"tck"})
-    public void test_LocalDateTime_adjustToJapaneseDate() {
-        JapaneseDate jdate = JapaneseChronology.INSTANCE.date(1728, 10, 29);
-        LocalDateTime test = LocalDateTime.MIN.with(jdate);
-        assertEquals(test, LocalDateTime.of(1728, 10, 29, 0, 0));
-    }
-
-    //-----------------------------------------------------------------------
-    // Check Japanese Eras
-    //-----------------------------------------------------------------------
-    @DataProvider(name="japaneseEras")
-    Object[][] data_japanseseEras() {
-        return new Object[][] {
-            { JapaneseChronology.ERA_SEIREKI, -999, "Seireki"},
-            { JapaneseChronology.ERA_MEIJI, -1, "Meiji"},
-            { JapaneseChronology.ERA_TAISHO, 0, "Taisho"},
-            { JapaneseChronology.ERA_SHOWA, 1, "Showa"},
-            { JapaneseChronology.ERA_HEISEI, 2, "Heisei"},
-        };
-    }
-
-    @Test(groups={"tck"}, dataProvider="japaneseEras")
-    public void test_Japanese_Eras(Era era, int eraValue, String name) {
-        assertEquals(era.getValue(), eraValue, "EraValue");
-        assertEquals(era.toString(), name, "Era Name");
-        assertEquals(era, JapaneseChronology.INSTANCE.eraOf(eraValue), "JapaneseChronology.eraOf()");
-        List<Era> eras = JapaneseChronology.INSTANCE.eras();
-        assertTrue(eras.contains(era), "Era is not present in JapaneseChronology.INSTANCE.eras()");
-    }
-
-    @Test(groups="tck")
-    public void test_Japanese_badEras() {
-        int badEras[] = {-1000, -998, -997, -2, 3, 4, 1000};
-        for (int badEra : badEras) {
-            try {
-                Era era = JapaneseChronology.INSTANCE.eraOf(badEra);
-                fail("JapaneseChronology.eraOf returned " + era + " + for invalid eraValue " + badEra);
-            } catch (DateTimeException ex) {
-                // ignore expected exception
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // toString()
-    //-----------------------------------------------------------------------
-    @DataProvider(name="toString")
-    Object[][] data_toString() {
-        return new Object[][] {
-            {JapaneseChronology.INSTANCE.date(0001,  1,  1), "Japanese 0001-01-01"},
-            {JapaneseChronology.INSTANCE.date(1728, 10, 28), "Japanese 1728-10-28"},
-            {JapaneseChronology.INSTANCE.date(1728, 10, 29), "Japanese 1728-10-29"},
-            {JapaneseChronology.INSTANCE.date(1727, 12,  5), "Japanese 1727-12-05"},
-            {JapaneseChronology.INSTANCE.date(1727, 12,  6), "Japanese 1727-12-06"},
-            {JapaneseChronology.INSTANCE.date(1868,  9,  8), "Japanese Meiji 1-09-08"},
-            {JapaneseChronology.INSTANCE.date(1912,  7, 29), "Japanese Meiji 45-07-29"},
-            {JapaneseChronology.INSTANCE.date(1912,  7, 30), "Japanese Taisho 1-07-30"},
-            {JapaneseChronology.INSTANCE.date(1926, 12, 24), "Japanese Taisho 15-12-24"},
-            {JapaneseChronology.INSTANCE.date(1926, 12, 25), "Japanese Showa 1-12-25"},
-            {JapaneseChronology.INSTANCE.date(1989,  1,  7), "Japanese Showa 64-01-07"},
-            {JapaneseChronology.INSTANCE.date(1989,  1,  8), "Japanese Heisei 1-01-08"},
-            {JapaneseChronology.INSTANCE.date(2012, 12,  6), "Japanese Heisei 24-12-06"},
-        };
-    }
-
-    @Test(dataProvider="toString", groups={"tck"})
-    public void test_toString(JapaneseDate jdate, String expected) {
-        assertEquals(jdate.toString(), expected);
-    }
-
-    //-----------------------------------------------------------------------
-    // equals()
-    //-----------------------------------------------------------------------
-    @Test(groups="tck")
-    public void test_equals_true() {
-        assertTrue(JapaneseChronology.INSTANCE.equals(JapaneseChronology.INSTANCE));
-    }
-
-    @Test(groups="tck")
-    public void test_equals_false() {
-        assertFalse(JapaneseChronology.INSTANCE.equals(IsoChronology.INSTANCE));
-    }
-
-}
--- a/test/java/time/tck/java/time/chrono/TestMinguoChronology.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,325 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package tck.java.time.chrono;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-
-import java.time.DateTimeException;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.LocalTime;
-import java.time.Month;
-import java.time.ZoneOffset;
-import java.time.chrono.MinguoChronology;
-import java.time.chrono.MinguoDate;
-import java.time.temporal.Adjusters;
-import java.time.temporal.ChronoUnit;
-import java.time.chrono.ChronoZonedDateTime;
-import java.time.chrono.Chronology;
-import java.time.chrono.ChronoLocalDate;
-import java.time.chrono.ChronoLocalDateTime;
-import java.time.chrono.IsoChronology;
-import java.time.chrono.Era;
-import java.time.Year;
-
-import org.testng.Assert;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Test.
- */
-@Test
-public class TestMinguoChronology {
-
-    private static final int YDIFF = 1911;
-    //-----------------------------------------------------------------------
-    // Chronology.ofName("Minguo")  Lookup by name
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_chrono_byName() {
-        Chronology c = MinguoChronology.INSTANCE;
-        Chronology test = Chronology.of("Minguo");
-        Assert.assertNotNull(test, "The Minguo calendar could not be found byName");
-        Assert.assertEquals(test.getId(), "Minguo", "ID mismatch");
-        Assert.assertEquals(test.getCalendarType(), "roc", "Type mismatch");
-        Assert.assertEquals(test, c);
-    }
-
-    //-----------------------------------------------------------------------
-    // creation, toLocalDate()
-    //-----------------------------------------------------------------------
-    @DataProvider(name="samples")
-    Object[][] data_samples() {
-        return new Object[][] {
-            {MinguoChronology.INSTANCE.date(1, 1, 1), LocalDate.of(1 + YDIFF, 1, 1)},
-            {MinguoChronology.INSTANCE.date(1, 1, 2), LocalDate.of(1 + YDIFF, 1, 2)},
-            {MinguoChronology.INSTANCE.date(1, 1, 3), LocalDate.of(1 + YDIFF, 1, 3)},
-
-            {MinguoChronology.INSTANCE.date(2, 1, 1), LocalDate.of(2 + YDIFF, 1, 1)},
-            {MinguoChronology.INSTANCE.date(3, 1, 1), LocalDate.of(3 + YDIFF, 1, 1)},
-            {MinguoChronology.INSTANCE.date(3, 12, 6), LocalDate.of(3 + YDIFF, 12, 6)},
-            {MinguoChronology.INSTANCE.date(4, 1, 1), LocalDate.of(4 + YDIFF, 1, 1)},
-            {MinguoChronology.INSTANCE.date(4, 7, 3), LocalDate.of(4 + YDIFF, 7, 3)},
-            {MinguoChronology.INSTANCE.date(4, 7, 4), LocalDate.of(4 + YDIFF, 7, 4)},
-            {MinguoChronology.INSTANCE.date(5, 1, 1), LocalDate.of(5 + YDIFF, 1, 1)},
-            {MinguoChronology.INSTANCE.date(100, 3, 3), LocalDate.of(100 + YDIFF, 3, 3)},
-            {MinguoChronology.INSTANCE.date(101, 10, 28), LocalDate.of(101 + YDIFF, 10, 28)},
-            {MinguoChronology.INSTANCE.date(101, 10, 29), LocalDate.of(101 + YDIFF, 10, 29)},
-
-            {MinguoChronology.INSTANCE.dateYearDay(1916 - YDIFF, 60), LocalDate.of(1916, 2, 29)},
-            {MinguoChronology.INSTANCE.dateYearDay(1908 - YDIFF, 60), LocalDate.of(1908, 2, 29)},
-            {MinguoChronology.INSTANCE.dateYearDay(2000 - YDIFF, 60), LocalDate.of(2000, 2, 29)},
-            {MinguoChronology.INSTANCE.dateYearDay(2400 - YDIFF, 60), LocalDate.of(2400, 2, 29)},
-        };
-    }
-
-    @Test(dataProvider="samples", groups={"tck"})
-    public void test_toLocalDate(MinguoDate minguo, LocalDate iso) {
-        assertEquals(LocalDate.from(minguo), iso);
-    }
-
-    @Test(dataProvider="samples", groups={"tck"})
-    public void test_fromCalendrical(MinguoDate minguo, LocalDate iso) {
-        assertEquals(MinguoChronology.INSTANCE.date(iso), minguo);
-    }
-
-    @SuppressWarnings("unused")
-    @Test(dataProvider="samples", groups={"implementation"})
-    public void test_MinguoDate(MinguoDate minguoDate, LocalDate iso) {
-        MinguoDate hd = minguoDate;
-        ChronoLocalDateTime<MinguoDate> hdt = hd.atTime(LocalTime.NOON);
-        ZoneOffset zo = ZoneOffset.ofHours(1);
-        ChronoZonedDateTime<MinguoDate> hzdt = hdt.atZone(zo);
-        hdt = hdt.plus(1, ChronoUnit.YEARS);
-        hdt = hdt.plus(1, ChronoUnit.MONTHS);
-        hdt = hdt.plus(1, ChronoUnit.DAYS);
-        hdt = hdt.plus(1, ChronoUnit.HOURS);
-        hdt = hdt.plus(1, ChronoUnit.MINUTES);
-        hdt = hdt.plus(1, ChronoUnit.SECONDS);
-        hdt = hdt.plus(1, ChronoUnit.NANOS);
-        ChronoLocalDateTime<MinguoDate> a2 = hzdt.toLocalDateTime();
-        MinguoDate a3 = a2.toLocalDate();
-        MinguoDate a5 = hzdt.toLocalDate();
-        //System.out.printf(" d: %s, dt: %s; odt: %s; zodt: %s; a4: %s%n", date, hdt, hodt, hzdt, a5);
-    }
-
-    @Test()
-    public void test_MinguoChrono() {
-        MinguoDate h1 = (MinguoDate)MinguoChronology.ERA_ROC.date(1, 2, 3);
-        MinguoDate h2 = h1;
-        ChronoLocalDateTime<MinguoDate> h3 = h2.atTime(LocalTime.NOON);
-        @SuppressWarnings("unused")
-        ChronoZonedDateTime<MinguoDate> h4 = h3.atZone(ZoneOffset.UTC);
-    }
-
-    @DataProvider(name="badDates")
-    Object[][] data_badDates() {
-        return new Object[][] {
-            {1912, 0, 0},
-
-            {1912, -1, 1},
-            {1912, 0, 1},
-            {1912, 14, 1},
-            {1912, 15, 1},
-
-            {1912, 1, -1},
-            {1912, 1, 0},
-            {1912, 1, 32},
-            {1912, 2, 29},
-            {1912, 2, 30},
-
-            {1912, 12, -1},
-            {1912, 12, 0},
-            {1912, 12, 32},
-
-            {1907 - YDIFF, 2, 29},
-            {100 - YDIFF, 2, 29},
-            {2100 - YDIFF, 2, 29},
-            {2101 - YDIFF, 2, 29},
-            };
-    }
-
-    @Test(dataProvider="badDates", groups={"tck"}, expectedExceptions=DateTimeException.class)
-    public void test_badDates(int year, int month, int dom) {
-        MinguoChronology.INSTANCE.date(year, month, dom);
-    }
-
-    //-----------------------------------------------------------------------
-    // prolepticYear() and is LeapYear()
-    //-----------------------------------------------------------------------
-    @DataProvider(name="prolepticYear")
-    Object[][] data_prolepticYear() {
-        return new Object[][] {
-            {1, MinguoChronology.ERA_ROC, 1912 - YDIFF, 1912 - YDIFF, true},
-            {1, MinguoChronology.ERA_ROC, 1916 - YDIFF, 1916 - YDIFF, true},
-            {1, MinguoChronology.ERA_ROC, 1914 - YDIFF, 1914 - YDIFF, false},
-            {1, MinguoChronology.ERA_ROC, 2000 - YDIFF, 2000 - YDIFF, true},
-            {1, MinguoChronology.ERA_ROC, 2100 - YDIFF, 2100 - YDIFF, false},
-            {1, MinguoChronology.ERA_ROC, 0, 0, false},
-            {1, MinguoChronology.ERA_ROC, 1908 - YDIFF, 1908 - YDIFF, true},
-            {1, MinguoChronology.ERA_ROC, 1900 - YDIFF, 1900 - YDIFF, false},
-            {1, MinguoChronology.ERA_ROC, 1600 - YDIFF, 1600 - YDIFF, true},
-
-            {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 1911, 1912 - YDIFF, true},
-            {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 1915, 1916 - YDIFF, true},
-            {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 1913, 1914 - YDIFF, false},
-            {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 1999, 2000 - YDIFF, true},
-            {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 2099, 2100 - YDIFF, false},
-            {0, MinguoChronology.ERA_BEFORE_ROC, 1, 0, false},
-            {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 1907, 1908 - YDIFF, true},
-            {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 1899, 1900 - YDIFF, false},
-            {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 1599, 1600 - YDIFF, true},
-
-        };
-    }
-
-    @Test(dataProvider="prolepticYear", groups={"tck"})
-    public void test_prolepticYear(int eraValue, Era  era, int yearOfEra, int expectedProlepticYear, boolean isLeapYear) {
-        Era eraObj = MinguoChronology.INSTANCE.eraOf(eraValue) ;
-        assertTrue(MinguoChronology.INSTANCE.eras().contains(eraObj));
-        assertEquals(eraObj, era);
-        assertEquals(MinguoChronology.INSTANCE.prolepticYear(era, yearOfEra), expectedProlepticYear);
-        assertEquals(MinguoChronology.INSTANCE.isLeapYear(expectedProlepticYear), isLeapYear) ;
-        assertEquals(MinguoChronology.INSTANCE.isLeapYear(expectedProlepticYear), Year.of(expectedProlepticYear + YDIFF).isLeap()) ;
-    }
-
-    //-----------------------------------------------------------------------
-    // with(DateTimeAdjuster)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_adjust1() {
-        MinguoDate base = MinguoChronology.INSTANCE.date(2012, 10, 29);
-        MinguoDate test = base.with(Adjusters.lastDayOfMonth());
-        assertEquals(test, MinguoChronology.INSTANCE.date(2012, 10, 31));
-    }
-
-    @Test(groups={"tck"})
-    public void test_adjust2() {
-        MinguoDate base = MinguoChronology.INSTANCE.date(1728, 12, 2);
-        MinguoDate test = base.with(Adjusters.lastDayOfMonth());
-        assertEquals(test, MinguoChronology.INSTANCE.date(1728, 12, 31));
-    }
-
-    //-----------------------------------------------------------------------
-    // MinguoDate.with(Local*)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_adjust_toLocalDate() {
-        MinguoDate minguo = MinguoChronology.INSTANCE.date(99, 1, 4);
-        MinguoDate test = minguo.with(LocalDate.of(2012, 7, 6));
-        assertEquals(test, MinguoChronology.INSTANCE.date(101, 7, 6));
-    }
-
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
-    public void test_adjust_toMonth() {
-        MinguoDate minguo = MinguoChronology.INSTANCE.date(1726, 1, 4);
-        minguo.with(Month.APRIL);
-    }
-
-    //-----------------------------------------------------------------------
-    // LocalDate.with(MinguoDate)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_LocalDate_adjustToMinguoDate() {
-        MinguoDate minguo = MinguoChronology.INSTANCE.date(101, 10, 29);
-        LocalDate test = LocalDate.MIN.with(minguo);
-        assertEquals(test, LocalDate.of(2012, 10, 29));
-    }
-
-    @Test(groups={"tck"})
-    public void test_LocalDateTime_adjustToMinguoDate() {
-        MinguoDate minguo = MinguoChronology.INSTANCE.date(101, 10, 29);
-        LocalDateTime test = LocalDateTime.MIN.with(minguo);
-        assertEquals(test, LocalDateTime.of(2012, 10, 29, 0, 0));
-    }
-
-    //-----------------------------------------------------------------------
-    // toString()
-    //-----------------------------------------------------------------------
-    @DataProvider(name="toString")
-    Object[][] data_toString() {
-        return new Object[][] {
-            {MinguoChronology.INSTANCE.date(1, 1, 1), "Minguo ROC 1-01-01"},
-            {MinguoChronology.INSTANCE.date(1728, 10, 28), "Minguo ROC 1728-10-28"},
-            {MinguoChronology.INSTANCE.date(1728, 10, 29), "Minguo ROC 1728-10-29"},
-            {MinguoChronology.INSTANCE.date(1727, 12, 5), "Minguo ROC 1727-12-05"},
-            {MinguoChronology.INSTANCE.date(1727, 12, 6), "Minguo ROC 1727-12-06"},
-        };
-    }
-
-    @Test(dataProvider="toString", groups={"tck"})
-    public void test_toString(MinguoDate minguo, String expected) {
-        assertEquals(minguo.toString(), expected);
-    }
-
-    //-----------------------------------------------------------------------
-    // equals()
-    //-----------------------------------------------------------------------
-    @Test(groups="tck")
-    public void test_equals_true() {
-        assertTrue(MinguoChronology.INSTANCE.equals(MinguoChronology.INSTANCE));
-    }
-
-    @Test(groups="tck")
-    public void test_equals_false() {
-        assertFalse(MinguoChronology.INSTANCE.equals(IsoChronology.INSTANCE));
-    }
-
-}
--- a/test/java/time/tck/java/time/chrono/TestThaiBuddhistChronology.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,394 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package tck.java.time.chrono;
-
-import static java.time.temporal.ChronoField.DAY_OF_MONTH;
-import static java.time.temporal.ChronoField.DAY_OF_YEAR;
-import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
-import static java.time.temporal.ChronoField.YEAR;
-import static java.time.temporal.ChronoField.YEAR_OF_ERA;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-
-import java.time.DateTimeException;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.Month;
-import java.time.Year;
-import java.time.chrono.ThaiBuddhistChronology;
-import java.time.chrono.ThaiBuddhistDate;
-import java.time.chrono.Chronology;
-import java.time.chrono.ChronoLocalDate;
-import java.time.chrono.Era;
-import java.time.chrono.IsoChronology;
-import java.time.temporal.Adjusters;
-import java.time.temporal.ChronoField;
-import java.time.temporal.ValueRange;
-import java.util.Locale;
-
-import org.testng.Assert;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Test.
- */
-@Test
-public class TestThaiBuddhistChronology {
-
-    private static final int YDIFF = 543;
-
-    //-----------------------------------------------------------------------
-    // Chronology.of(String)
-    //-----------------------------------------------------------------------
-    @Test
-    public void test_chrono_byName() {
-        Chronology c = ThaiBuddhistChronology.INSTANCE;
-        Chronology test = Chronology.of("ThaiBuddhist");
-        Assert.assertNotNull(test, "The ThaiBuddhist calendar could not be found byName");
-        Assert.assertEquals(test.getId(), "ThaiBuddhist", "ID mismatch");
-        Assert.assertEquals(test.getCalendarType(), "buddhist", "Type mismatch");
-        Assert.assertEquals(test, c);
-    }
-
-    //-----------------------------------------------------------------------
-    // Chronology.ofLocale(Locale)
-    //-----------------------------------------------------------------------
-    @Test
-    public void test_chrono_byLocale_fullTag_thaiCalendarFromThai() {
-        Chronology test = Chronology.ofLocale(Locale.forLanguageTag("th-TH-u-ca-buddhist"));
-        Assert.assertEquals(test.getId(), "ThaiBuddhist");
-        Assert.assertEquals(test, ThaiBuddhistChronology.INSTANCE);
-    }
-
-    @Test
-    public void test_chrono_byLocale_fullTag_thaiCalendarFromElsewhere() {
-        Chronology test = Chronology.ofLocale(Locale.forLanguageTag("en-US-u-ca-buddhist"));
-        Assert.assertEquals(test.getId(), "ThaiBuddhist");
-        Assert.assertEquals(test, ThaiBuddhistChronology.INSTANCE);
-    }
-
-    @Test
-    public void test_chrono_byLocale_oldTH_noVariant() {  // deliberately different to Calendar
-        Chronology test = Chronology.ofLocale(new Locale("th", "TH"));
-        Assert.assertEquals(test.getId(), "ISO");
-        Assert.assertEquals(test, IsoChronology.INSTANCE);
-    }
-
-    @Test
-    public void test_chrono_byLocale_oldTH_variant() {
-        Chronology test = Chronology.ofLocale(new Locale("th", "TH", "TH"));
-        Assert.assertEquals(test.getId(), "ISO");
-        Assert.assertEquals(test, IsoChronology.INSTANCE);
-    }
-
-    @Test
-    public void test_chrono_byLocale_iso() {
-        Assert.assertEquals(Chronology.ofLocale(new Locale("th", "TH")).getId(), "ISO");
-        Assert.assertEquals(Chronology.ofLocale(Locale.forLanguageTag("th-TH")).getId(), "ISO");
-        Assert.assertEquals(Chronology.ofLocale(Locale.forLanguageTag("th-TH-TH")).getId(), "ISO");
-    }
-
-    //-----------------------------------------------------------------------
-    // creation, toLocalDate()
-    //-----------------------------------------------------------------------
-    @DataProvider(name="samples")
-    Object[][] data_samples() {
-        return new Object[][] {
-            {ThaiBuddhistChronology.INSTANCE.date(1 + YDIFF, 1, 1), LocalDate.of(1, 1, 1)},
-            {ThaiBuddhistChronology.INSTANCE.date(1 + YDIFF, 1, 2), LocalDate.of(1, 1, 2)},
-            {ThaiBuddhistChronology.INSTANCE.date(1 + YDIFF, 1, 3), LocalDate.of(1, 1, 3)},
-
-            {ThaiBuddhistChronology.INSTANCE.date(2 + YDIFF, 1, 1), LocalDate.of(2, 1, 1)},
-            {ThaiBuddhistChronology.INSTANCE.date(3 + YDIFF, 1, 1), LocalDate.of(3, 1, 1)},
-            {ThaiBuddhistChronology.INSTANCE.date(3 + YDIFF, 12, 6), LocalDate.of(3, 12, 6)},
-            {ThaiBuddhistChronology.INSTANCE.date(4 + YDIFF, 1, 1), LocalDate.of(4, 1, 1)},
-            {ThaiBuddhistChronology.INSTANCE.date(4 + YDIFF, 7, 3), LocalDate.of(4, 7, 3)},
-            {ThaiBuddhistChronology.INSTANCE.date(4 + YDIFF, 7, 4), LocalDate.of(4, 7, 4)},
-            {ThaiBuddhistChronology.INSTANCE.date(5 + YDIFF, 1, 1), LocalDate.of(5, 1, 1)},
-            {ThaiBuddhistChronology.INSTANCE.date(1662 + YDIFF, 3, 3), LocalDate.of(1662, 3, 3)},
-            {ThaiBuddhistChronology.INSTANCE.date(1728 + YDIFF, 10, 28), LocalDate.of(1728, 10, 28)},
-            {ThaiBuddhistChronology.INSTANCE.date(1728 + YDIFF, 10, 29), LocalDate.of(1728, 10, 29)},
-            {ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29), LocalDate.of(2012, 8, 29)},
-
-            {ThaiBuddhistChronology.INSTANCE.dateYearDay(4 + YDIFF, 60), LocalDate.of(4, 2, 29)},
-            {ThaiBuddhistChronology.INSTANCE.dateYearDay(400 + YDIFF, 60), LocalDate.of(400, 2, 29)},
-            {ThaiBuddhistChronology.INSTANCE.dateYearDay(2000 + YDIFF, 60), LocalDate.of(2000, 2, 29)},
-
-        };
-    }
-
-    @Test(dataProvider="samples", groups={"tck"})
-    public void test_toLocalDate(ThaiBuddhistDate jdate, LocalDate iso) {
-        assertEquals(LocalDate.from(jdate), iso);
-    }
-
-    @Test(dataProvider="samples", groups={"tck"})
-    public void test_fromCalendrical(ThaiBuddhistDate jdate, LocalDate iso) {
-        assertEquals(ThaiBuddhistChronology.INSTANCE.date(iso), jdate);
-    }
-
-    @DataProvider(name="badDates")
-    Object[][] data_badDates() {
-        return new Object[][] {
-            {1728, 0, 0},
-
-            {1728, -1, 1},
-            {1728, 0, 1},
-            {1728, 14, 1},
-            {1728, 15, 1},
-
-            {1728, 1, -1},
-            {1728, 1, 0},
-            {1728, 1, 32},
-
-            {1728, 12, -1},
-            {1728, 12, 0},
-            {1728, 12, 32},
-
-            {3 + YDIFF, 2, 29},
-            {600 + YDIFF, 2, 29},
-            {1501 + YDIFF, 2, 29},
-        };
-    }
-
-    @Test(dataProvider="badDates", groups={"tck"}, expectedExceptions=DateTimeException.class)
-    public void test_badDates(int year, int month, int dom) {
-        ThaiBuddhistChronology.INSTANCE.date(year, month, dom);
-    }
-
-  //-----------------------------------------------------------------------
-  // prolepticYear() and is LeapYear()
-  //-----------------------------------------------------------------------
-  @DataProvider(name="prolepticYear")
-  Object[][] data_prolepticYear() {
-      return new Object[][] {
-          {1, ThaiBuddhistChronology.ERA_BE, 4 + YDIFF, 4 + YDIFF, true},
-          {1, ThaiBuddhistChronology.ERA_BE, 7 + YDIFF, 7 + YDIFF, false},
-          {1, ThaiBuddhistChronology.ERA_BE, 8 + YDIFF, 8 + YDIFF, true},
-          {1, ThaiBuddhistChronology.ERA_BE, 1000 + YDIFF, 1000 + YDIFF, false},
-          {1, ThaiBuddhistChronology.ERA_BE, 2000 + YDIFF, 2000 + YDIFF, true},
-          {1, ThaiBuddhistChronology.ERA_BE, 0, 0, false},
-          {1, ThaiBuddhistChronology.ERA_BE, -4 + YDIFF, -4 + YDIFF, true},
-          {1, ThaiBuddhistChronology.ERA_BE, -7 + YDIFF, -7 + YDIFF, false},
-          {1, ThaiBuddhistChronology.ERA_BE, -100 + YDIFF, -100 + YDIFF, false},
-          {1, ThaiBuddhistChronology.ERA_BE, -800 + YDIFF, -800 + YDIFF, true},
-
-          {0, ThaiBuddhistChronology.ERA_BEFORE_BE, -3 - YDIFF, 4 + YDIFF, true},
-          {0, ThaiBuddhistChronology.ERA_BEFORE_BE, -6 - YDIFF, 7 + YDIFF, false},
-          {0, ThaiBuddhistChronology.ERA_BEFORE_BE, -7 - YDIFF, 8 + YDIFF, true},
-          {0, ThaiBuddhistChronology.ERA_BEFORE_BE, -999 - YDIFF, 1000 + YDIFF, false},
-          {0, ThaiBuddhistChronology.ERA_BEFORE_BE, -1999 - YDIFF, 2000 + YDIFF, true},
-          {0, ThaiBuddhistChronology.ERA_BEFORE_BE, 1, 0, false},
-          {0, ThaiBuddhistChronology.ERA_BEFORE_BE, 5 - YDIFF, -4 + YDIFF, true},
-          {0, ThaiBuddhistChronology.ERA_BEFORE_BE, 8 - YDIFF, -7 + YDIFF, false},
-          {0, ThaiBuddhistChronology.ERA_BEFORE_BE, 101 - YDIFF, -100 + YDIFF, false},
-          {0, ThaiBuddhistChronology.ERA_BEFORE_BE, 801 - YDIFF, -800 + YDIFF, true},
-
-      };
-  }
-
-  @Test(dataProvider="prolepticYear", groups={"tck"})
-  public void test_prolepticYear(int eraValue, Era  era, int yearOfEra, int expectedProlepticYear, boolean isLeapYear) {
-      Era eraObj = ThaiBuddhistChronology.INSTANCE.eraOf(eraValue) ;
-      assertTrue(ThaiBuddhistChronology.INSTANCE.eras().contains(eraObj));
-      assertEquals(eraObj, era);
-      assertEquals(ThaiBuddhistChronology.INSTANCE.prolepticYear(era, yearOfEra), expectedProlepticYear);
-      assertEquals(ThaiBuddhistChronology.INSTANCE.isLeapYear(expectedProlepticYear), isLeapYear) ;
-      assertEquals(ThaiBuddhistChronology.INSTANCE.isLeapYear(expectedProlepticYear), Year.of(expectedProlepticYear - YDIFF).isLeap()) ;
-  }
-
-    //-----------------------------------------------------------------------
-    // with(WithAdjuster)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_adjust1() {
-        ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(1728, 10, 29);
-        ThaiBuddhistDate test = base.with(Adjusters.lastDayOfMonth());
-        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(1728, 10, 31));
-    }
-
-    @Test(groups={"tck"})
-    public void test_adjust2() {
-        ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(1728, 12, 2);
-        ThaiBuddhistDate test = base.with(Adjusters.lastDayOfMonth());
-        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(1728, 12, 31));
-    }
-
-    //-----------------------------------------------------------------------
-    // withYear()
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_withYear_BE() {
-        ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29);
-        ThaiBuddhistDate test = base.with(YEAR, 2554);
-        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2554, 8, 29));
-    }
-
-    @Test(groups={"tck"})
-    public void test_withYear_BBE() {
-        ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29);
-        ThaiBuddhistDate test = base.with(YEAR_OF_ERA, 2554);
-        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(-2553, 8, 29));
-    }
-
-    //-----------------------------------------------------------------------
-    // withEra()
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_withEra_BE() {
-        ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29);
-        ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistChronology.ERA_BE.getValue());
-        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29));
-    }
-
-    @Test(groups={"tck"})
-    public void test_withEra_BBE() {
-        ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29);
-        ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistChronology.ERA_BEFORE_BE.getValue());
-        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29));
-    }
-
-    @Test(groups={"tck"})
-    public void test_withEra_swap() {
-        ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29);
-        ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistChronology.ERA_BE.getValue());
-        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29));
-    }
-
-    //-----------------------------------------------------------------------
-    // BuddhistDate.with(Local*)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_adjust_toLocalDate() {
-        ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(1726, 1, 4);
-        ThaiBuddhistDate test = jdate.with(LocalDate.of(2012, 7, 6));
-        assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 7, 6));
-    }
-
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
-    public void test_adjust_toMonth() {
-        ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(1726, 1, 4);
-        jdate.with(Month.APRIL);
-    }
-
-    //-----------------------------------------------------------------------
-    // LocalDate.with(BuddhistDate)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_LocalDate_adjustToBuddhistDate() {
-        ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(2555, 10, 29);
-        LocalDate test = LocalDate.MIN.with(jdate);
-        assertEquals(test, LocalDate.of(2012, 10, 29));
-    }
-
-    @Test(groups={"tck"})
-    public void test_LocalDateTime_adjustToBuddhistDate() {
-        ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(2555, 10, 29);
-        LocalDateTime test = LocalDateTime.MIN.with(jdate);
-        assertEquals(test, LocalDateTime.of(2012, 10, 29, 0, 0));
-    }
-
-    //-----------------------------------------------------------------------
-    // toString()
-    //-----------------------------------------------------------------------
-    @DataProvider(name="toString")
-    Object[][] data_toString() {
-        return new Object[][] {
-            {ThaiBuddhistChronology.INSTANCE.date(544, 1, 1), "ThaiBuddhist BE 544-01-01"},
-            {ThaiBuddhistChronology.INSTANCE.date(2271, 10, 28), "ThaiBuddhist BE 2271-10-28"},
-            {ThaiBuddhistChronology.INSTANCE.date(2271, 10, 29), "ThaiBuddhist BE 2271-10-29"},
-            {ThaiBuddhistChronology.INSTANCE.date(2270, 12, 5), "ThaiBuddhist BE 2270-12-05"},
-            {ThaiBuddhistChronology.INSTANCE.date(2270, 12, 6), "ThaiBuddhist BE 2270-12-06"},
-        };
-    }
-
-    @Test(dataProvider="toString", groups={"tck"})
-    public void test_toString(ThaiBuddhistDate jdate, String expected) {
-        assertEquals(jdate.toString(), expected);
-    }
-
-    //-----------------------------------------------------------------------
-    // chronology range(ChronoField)
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void test_Chrono_range() {
-        long minYear = LocalDate.MIN.getYear() + YDIFF;
-        long maxYear = LocalDate.MAX.getYear() + YDIFF;
-        assertEquals(ThaiBuddhistChronology.INSTANCE.range(YEAR), ValueRange.of(minYear, maxYear));
-        assertEquals(ThaiBuddhistChronology.INSTANCE.range(YEAR_OF_ERA), ValueRange.of(1, -minYear + 1, maxYear));
-
-        assertEquals(ThaiBuddhistChronology.INSTANCE.range(DAY_OF_MONTH), DAY_OF_MONTH.range());
-        assertEquals(ThaiBuddhistChronology.INSTANCE.range(DAY_OF_YEAR), DAY_OF_YEAR.range());
-        assertEquals(ThaiBuddhistChronology.INSTANCE.range(MONTH_OF_YEAR), MONTH_OF_YEAR.range());
-    }
-
-    //-----------------------------------------------------------------------
-    // equals()
-    //-----------------------------------------------------------------------
-    @Test(groups="tck")
-    public void test_equals_true() {
-        assertTrue(ThaiBuddhistChronology.INSTANCE.equals(ThaiBuddhistChronology.INSTANCE));
-    }
-
-    @Test(groups="tck")
-    public void test_equals_false() {
-        assertFalse(ThaiBuddhistChronology.INSTANCE.equals(IsoChronology.INSTANCE));
-    }
-
-}
--- a/test/java/time/tck/java/time/format/TCKChronoPrinterParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/format/TCKChronoPrinterParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -67,8 +67,8 @@
 import java.time.chrono.JapaneseChronology;
 import java.time.chrono.ThaiBuddhistChronology;
 import java.time.format.DateTimeFormatterBuilder;
-import java.time.temporal.Queries;
 import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalQuery;
 import java.util.Locale;
 
 import org.testng.annotations.BeforeMethod;
@@ -122,7 +122,7 @@
         TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text, pos);
         assertEquals(pos.getIndex(), expected.getId().length());
         assertEquals(pos.getErrorIndex(), -1);
-        assertEquals(parsed.query(Queries.chronology()), expected);
+        assertEquals(parsed.query(TemporalQuery.chronology()), expected);
     }
 
     @Test(dataProvider="parseValid")
@@ -140,7 +140,7 @@
         TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text.toLowerCase(Locale.ENGLISH), pos);
         assertEquals(pos.getIndex(), expected.getId().length());
         assertEquals(pos.getErrorIndex(), -1);
-        assertEquals(parsed.query(Queries.chronology()), expected);
+        assertEquals(parsed.query(TemporalQuery.chronology()), expected);
     }
 
     //-----------------------------------------------------------------------
--- a/test/java/time/tck/java/time/format/TCKDateTimeFormatSymbols.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/format/TCKDateTimeFormatSymbols.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,11 +59,9 @@
  */
 package tck.java.time.format;
 
-import java.time.format.*;
-import test.java.time.format.*;
-
 import static org.testng.Assert.assertEquals;
 
+import java.time.format.DateTimeFormatSymbols;
 import java.util.Arrays;
 import java.util.Locale;
 
@@ -75,7 +73,7 @@
 @Test
 public class TCKDateTimeFormatSymbols {
 
-    @Test(groups={"tck"})
+    @Test
     public void test_getAvailableLocales() {
         Locale[] locales = DateTimeFormatSymbols.getAvailableLocales();
         assertEquals(locales.length > 0, true);
@@ -83,7 +81,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_of_Locale() {
         DateTimeFormatSymbols loc1 = DateTimeFormatSymbols.of(Locale.CANADA);
         assertEquals(loc1.getZeroDigit(), '0');
@@ -93,7 +91,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_STANDARD() {
         DateTimeFormatSymbols loc1 = DateTimeFormatSymbols.STANDARD;
         assertEquals(loc1.getZeroDigit(), '0');
@@ -103,25 +101,25 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_zeroDigit() {
         DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD;
         assertEquals(base.withZeroDigit('A').getZeroDigit(), 'A');
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_positiveSign() {
         DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD;
         assertEquals(base.withPositiveSign('A').getPositiveSign(), 'A');
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_negativeSign() {
         DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD;
         assertEquals(base.withNegativeSign('A').getNegativeSign(), 'A');
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_decimalSeparator() {
         DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD;
         assertEquals(base.withDecimalSeparator('A').getDecimalSeparator(), 'A');
@@ -129,7 +127,7 @@
 
     //-----------------------------------------------------------------------
     /* TBD: convertToDigit and convertNumberToI18N are package-private methods
-    @Test(groups={"tck"})
+    @Test
     public void test_convertToDigit_base() {
         DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD;
         assertEquals(base.convertToDigit('0'), 0);
@@ -139,7 +137,7 @@
         assertEquals(base.convertToDigit('A'), -1);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_convertToDigit_altered() {
         DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD.withZeroDigit('A');
         assertEquals(base.convertToDigit('A'), 0);
@@ -150,20 +148,20 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_convertNumberToI18N_base() {
         DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD;
         assertEquals(base.convertNumberToI18N("134"), "134");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_convertNumberToI18N_altered() {
         DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD.withZeroDigit('A');
         assertEquals(base.convertNumberToI18N("134"), "BDE");
     }
     */
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_equalsHashCode1() {
         DateTimeFormatSymbols a = DateTimeFormatSymbols.STANDARD;
         DateTimeFormatSymbols b = DateTimeFormatSymbols.STANDARD;
@@ -172,7 +170,7 @@
         assertEquals(a.hashCode(), b.hashCode());
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equalsHashCode2() {
         DateTimeFormatSymbols a = DateTimeFormatSymbols.STANDARD.withZeroDigit('A');
         DateTimeFormatSymbols b = DateTimeFormatSymbols.STANDARD.withZeroDigit('A');
@@ -181,7 +179,7 @@
         assertEquals(a.hashCode(), b.hashCode());
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equalsHashCode3() {
         DateTimeFormatSymbols a = DateTimeFormatSymbols.STANDARD.withZeroDigit('A');
         DateTimeFormatSymbols b = DateTimeFormatSymbols.STANDARD.withDecimalSeparator('A');
@@ -189,7 +187,7 @@
         assertEquals(b.equals(a), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equalsHashCode_bad() {
         DateTimeFormatSymbols a = DateTimeFormatSymbols.STANDARD;
         assertEquals(a.equals(""), false);
@@ -197,13 +195,13 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toString_base() {
         DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD;
         assertEquals(base.toString(), "Symbols[0+-.]");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_toString_altered() {
         DateTimeFormatSymbols base = DateTimeFormatSymbols.of(Locale.US).withZeroDigit('A').withDecimalSeparator('@');
         assertEquals(base.toString(), "Symbols[A+-@]");
--- a/test/java/time/tck/java/time/format/TCKDateTimeFormatter.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/format/TCKDateTimeFormatter.java	Wed Apr 17 21:48:04 2013 -0700
@@ -60,6 +60,8 @@
 package tck.java.time.format;
 
 import static java.time.temporal.ChronoField.DAY_OF_MONTH;
+import static java.time.temporal.ChronoField.DAY_OF_WEEK;
+import static java.time.temporal.ChronoField.DAY_OF_YEAR;
 import static java.time.temporal.ChronoField.HOUR_OF_DAY;
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
 import static java.time.temporal.ChronoField.YEAR;
@@ -71,29 +73,37 @@
 import java.text.Format;
 import java.text.ParseException;
 import java.text.ParsePosition;
-import java.util.Locale;
-
 import java.time.DateTimeException;
+import java.time.DayOfWeek;
 import java.time.Instant;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.YearMonth;
 import java.time.ZoneId;
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
+import java.time.chrono.ChronoZonedDateTime;
+import java.time.chrono.Chronology;
+import java.time.chrono.IsoChronology;
 import java.time.chrono.ThaiBuddhistChronology;
+import java.time.chrono.ThaiBuddhistDate;
 import java.time.format.DateTimeFormatSymbols;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.format.DateTimeParseException;
 import java.time.format.SignStyle;
-import java.time.chrono.Chronology;
-import java.time.chrono.IsoChronology;
-import java.time.OffsetDateTime;
-import java.time.OffsetTime;
-import java.time.temporal.Temporal;
+import java.time.temporal.IsoFields;
 import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
+import java.time.temporal.UnsupportedTemporalTypeException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Locale;
+import java.util.Set;
 
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
@@ -102,7 +112,7 @@
 /**
  * Test DateTimeFormatter.
  */
-@Test(groups={"tck"})
+@Test
 public class TCKDateTimeFormatter {
 
     private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
@@ -160,87 +170,241 @@
     }
 
     //-----------------------------------------------------------------------
-    // print
+    @Test
+    public void test_resolverFields_selectOneDateResolveYMD() throws Exception {
+        DateTimeFormatter base = new DateTimeFormatterBuilder()
+                .appendValue(YEAR).appendLiteral('-').appendValue(MONTH_OF_YEAR).appendLiteral('-')
+                .appendValue(DAY_OF_MONTH).appendLiteral('-').appendValue(DAY_OF_YEAR).toFormatter();
+        DateTimeFormatter f = base.withResolverFields(YEAR, MONTH_OF_YEAR, DAY_OF_MONTH);
+        try {
+            base.parse("2012-6-30-321", LocalDate::from);  // wrong day-of-year
+            fail();
+        } catch (DateTimeException ex) {
+            // expected, fails as it produces two different dates
+        }
+        LocalDate parsed = f.parse("2012-6-30-321", LocalDate::from);  // ignored day-of-year
+        assertEquals(parsed, LocalDate.of(2012, 6, 30));
+    }
+
+    @Test
+    public void test_resolverFields_selectOneDateResolveYD() throws Exception {
+        DateTimeFormatter base = new DateTimeFormatterBuilder()
+                .appendValue(YEAR).appendLiteral('-').appendValue(MONTH_OF_YEAR).appendLiteral('-')
+                .appendValue(DAY_OF_MONTH).appendLiteral('-').appendValue(DAY_OF_YEAR).toFormatter();
+        DateTimeFormatter f = base.withResolverFields(YEAR, DAY_OF_YEAR);
+        assertEquals(f.getResolverFields(), new HashSet<>(Arrays.asList(YEAR, DAY_OF_YEAR)));
+        try {
+            base.parse("2012-6-30-321", LocalDate::from);  // wrong month/day-of-month
+            fail();
+        } catch (DateTimeException ex) {
+            // expected, fails as it produces two different dates
+        }
+        LocalDate parsed = f.parse("2012-6-30-321", LocalDate::from);  // ignored month/day-of-month
+        assertEquals(parsed, LocalDate.of(2012, 11, 16));
+    }
+
+    @Test
+    public void test_resolverFields_ignoreCrossCheck() throws Exception {
+        DateTimeFormatter base = new DateTimeFormatterBuilder()
+                .appendValue(YEAR).appendLiteral('-').appendValue(DAY_OF_YEAR).appendLiteral('-')
+                .appendValue(DAY_OF_WEEK).toFormatter();
+        DateTimeFormatter f = base.withResolverFields(YEAR, DAY_OF_YEAR);
+        try {
+            base.parse("2012-321-1", LocalDate::from);  // wrong day-of-week
+            fail();
+        } catch (DateTimeException ex) {
+            // expected, should fail in cross-check of day-of-week
+        }
+        LocalDate parsed = f.parse("2012-321-1", LocalDate::from);  // ignored wrong day-of-week
+        assertEquals(parsed, LocalDate.of(2012, 11, 16));
+    }
+
+    @Test
+    public void test_resolverFields_emptyList() throws Exception {
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(YEAR).toFormatter().withResolverFields();
+        TemporalAccessor parsed = f.parse("2012");
+        assertEquals(parsed.isSupported(YEAR), false);  // not in the list of resolverFields
+    }
+
+    @Test
+    public void test_resolverFields_listOfOneMatching() throws Exception {
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(YEAR).toFormatter().withResolverFields(YEAR);
+        TemporalAccessor parsed = f.parse("2012");
+        assertEquals(parsed.isSupported(YEAR), true);
+    }
+
+    @Test
+    public void test_resolverFields_listOfOneNotMatching() throws Exception {
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(YEAR).toFormatter().withResolverFields(MONTH_OF_YEAR);
+        TemporalAccessor parsed = f.parse("2012");
+        assertEquals(parsed.isSupported(YEAR), false);  // not in the list of resolverFields
+        assertEquals(parsed.isSupported(MONTH_OF_YEAR), false);
+    }
+
+    @Test
+    public void test_resolverFields_listOfOneNull() throws Exception {
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(YEAR).toFormatter().withResolverFields((TemporalField) null);
+        TemporalAccessor parsed = f.parse("2012");
+        assertEquals(parsed.isSupported(YEAR), false);  // not in the list of resolverFields
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_resolverFields_Array_null() throws Exception {
+        DateTimeFormatter.ISO_DATE.withResolverFields((TemporalField[]) null);
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_resolverFields_Set_null() throws Exception {
+        DateTimeFormatter.ISO_DATE.withResolverFields((Set<TemporalField>) null);
+    }
+
     //-----------------------------------------------------------------------
-    @DataProvider(name="print")
-    Object[][] data_format() {
+    // format
+    //-----------------------------------------------------------------------
+    @DataProvider(name="formatWithZoneWithChronology")
+    Object[][] data_format_withZone_withChronology() {
+        YearMonth ym = YearMonth.of(2008, 6);
         LocalDate ld = LocalDate.of(2008, 6, 30);
         LocalTime lt = LocalTime.of(11, 30);
         LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 11, 30);
         OffsetTime ot = OffsetTime.of(LocalTime.of(11, 30), OFFSET_PONE);
         OffsetDateTime odt = OffsetDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), OFFSET_PONE);
         ZonedDateTime zdt = ZonedDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), ZONE_PARIS);
+        ChronoZonedDateTime<ThaiBuddhistDate> thaiZdt = ThaiBuddhistChronology.INSTANCE.zonedDateTime(zdt);
         Instant instant = Instant.ofEpochSecond(3600);
         return new Object[][] {
-                {null, null, ld, "2008::"},
-                {null, null, lt, ":11:"},
-                {null, null, ldt, "2008:11:"},
-                {null, null, ot, ":11:+01:00"},
-                {null, null, odt, "2008:11:+01:00"},
-                {null, null, zdt, "2008:11:+02:00Europe/Paris"},
-                {null, null, instant, "::"},
+                {null, null, DayOfWeek.MONDAY, "::::"},
+                {null, null, ym, "2008::::ISO"},
+                {null, null, ld, "2008::::ISO"},
+                {null, null, lt, ":11:::"},
+                {null, null, ldt, "2008:11:::ISO"},
+                {null, null, ot, ":11:+01:00::"},
+                {null, null, odt, "2008:11:+01:00::ISO"},
+                {null, null, zdt, "2008:11:+02:00:Europe/Paris:ISO"},
+                {null, null, instant, "::::"},
 
-                {null, ZONE_PARIS, ld, "2008::"},
-                {null, ZONE_PARIS, lt, ":11:"},
-                {null, ZONE_PARIS, ldt, "2008:11:"},
-                {null, ZONE_PARIS, ot, ":11:+01:00"},
-                {null, ZONE_PARIS, odt, "2008:12:+02:00Europe/Paris"},
-                {null, ZONE_PARIS, zdt, "2008:11:+02:00Europe/Paris"},
-                {null, ZONE_PARIS, instant, "1970:02:+01:00Europe/Paris"},
+                {IsoChronology.INSTANCE, null, DayOfWeek.MONDAY, "::::ISO"},
+                {IsoChronology.INSTANCE, null, ym, "2008::::ISO"},
+                {IsoChronology.INSTANCE, null, ld, "2008::::ISO"},
+                {IsoChronology.INSTANCE, null, lt, ":11:::ISO"},
+                {IsoChronology.INSTANCE, null, ldt, "2008:11:::ISO"},
+                {IsoChronology.INSTANCE, null, ot, ":11:+01:00::ISO"},
+                {IsoChronology.INSTANCE, null, odt, "2008:11:+01:00::ISO"},
+                {IsoChronology.INSTANCE, null, zdt, "2008:11:+02:00:Europe/Paris:ISO"},
+                {IsoChronology.INSTANCE, null, instant, "::::ISO"},
+
+                {null, ZONE_PARIS, DayOfWeek.MONDAY, ":::Europe/Paris:"},
+                {null, ZONE_PARIS, ym, "2008:::Europe/Paris:ISO"},
+                {null, ZONE_PARIS, ld, "2008:::Europe/Paris:ISO"},
+                {null, ZONE_PARIS, lt, ":11::Europe/Paris:"},
+                {null, ZONE_PARIS, ldt, "2008:11::Europe/Paris:ISO"},
+                {null, ZONE_PARIS, ot, ":11:+01:00:Europe/Paris:"},
+                {null, ZONE_PARIS, odt, "2008:12:+02:00:Europe/Paris:ISO"},
+                {null, ZONE_PARIS, zdt, "2008:11:+02:00:Europe/Paris:ISO"},
+                {null, ZONE_PARIS, instant, "1970:02:+01:00:Europe/Paris:ISO"},
 
-                {null, OFFSET_PTHREE, ld, "2008::"},
-                {null, OFFSET_PTHREE, lt, ":11:"},
-                {null, OFFSET_PTHREE, ldt, "2008:11:"},
-                {null, OFFSET_PTHREE, ot, ":11:+01:00"},
-                {null, OFFSET_PTHREE, odt, "2008:13:+03:00"},
-                {null, OFFSET_PTHREE, zdt, "2008:12:+03:00"},
-                {null, OFFSET_PTHREE, instant, "1970:04:+03:00"},
+                {null, OFFSET_PTHREE, DayOfWeek.MONDAY, ":::+03:00:"},
+                {null, OFFSET_PTHREE, ym, "2008:::+03:00:ISO"},
+                {null, OFFSET_PTHREE, ld, "2008:::+03:00:ISO"},
+                {null, OFFSET_PTHREE, lt, ":11::+03:00:"},
+                {null, OFFSET_PTHREE, ldt, "2008:11::+03:00:ISO"},
+                {null, OFFSET_PTHREE, ot, null},  // offset and zone clash
+                {null, OFFSET_PTHREE, odt, "2008:13:+03:00:+03:00:ISO"},
+                {null, OFFSET_PTHREE, zdt, "2008:12:+03:00:+03:00:ISO"},
+                {null, OFFSET_PTHREE, instant, "1970:04:+03:00:+03:00:ISO"},
 
-                {ThaiBuddhistChronology.INSTANCE, null, ld, "2551::"},
-                {ThaiBuddhistChronology.INSTANCE, null, lt, ":11:"},
-                {ThaiBuddhistChronology.INSTANCE, null, ldt, "2551:11:"},
-                {ThaiBuddhistChronology.INSTANCE, null, ot, ":11:+01:00"},
-                {ThaiBuddhistChronology.INSTANCE, null, odt, "2551:11:+01:00"},
-                {ThaiBuddhistChronology.INSTANCE, null, zdt, "2551:11:+02:00Europe/Paris"},
-                {ThaiBuddhistChronology.INSTANCE, null, instant, "::"},
+                {ThaiBuddhistChronology.INSTANCE, null, DayOfWeek.MONDAY, null},  // not a complete date
+                {ThaiBuddhistChronology.INSTANCE, null, ym, null},  // not a complete date
+                {ThaiBuddhistChronology.INSTANCE, null, ld, "2551::::ThaiBuddhist"},
+                {ThaiBuddhistChronology.INSTANCE, null, lt, ":11:::ThaiBuddhist"},
+                {ThaiBuddhistChronology.INSTANCE, null, ldt, "2551:11:::ThaiBuddhist"},
+                {ThaiBuddhistChronology.INSTANCE, null, ot, ":11:+01:00::ThaiBuddhist"},
+                {ThaiBuddhistChronology.INSTANCE, null, odt, "2551:11:+01:00::ThaiBuddhist"},
+                {ThaiBuddhistChronology.INSTANCE, null, zdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"},
+                {ThaiBuddhistChronology.INSTANCE, null, instant, "::::ThaiBuddhist"},
 
-                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ld, "2551::"},
-                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, lt, ":11:"},
-                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ldt, "2551:11:"},
-                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ot, ":11:+01:00"},
-                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, odt, "2551:12:+02:00Europe/Paris"},
-                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, zdt, "2551:11:+02:00Europe/Paris"},
-                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, instant, "1970:02:+01:00Europe/Paris"},
+                {ThaiBuddhistChronology.INSTANCE, null, DayOfWeek.MONDAY, null},  // not a complete date
+                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ym, null},  // not a complete date
+                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ld, "2551:::Europe/Paris:ThaiBuddhist"},
+                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, lt, ":11::Europe/Paris:ThaiBuddhist"},
+                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ldt, "2551:11::Europe/Paris:ThaiBuddhist"},
+                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ot, ":11:+01:00:Europe/Paris:ThaiBuddhist"},
+                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, odt, "2551:12:+02:00:Europe/Paris:ThaiBuddhist"},
+                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, zdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"},
+                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, instant, "2513:02:+01:00:Europe/Paris:ThaiBuddhist"},
+
+                {null, ZONE_PARIS, thaiZdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"},
+                {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, thaiZdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"},
+                {IsoChronology.INSTANCE, ZONE_PARIS, thaiZdt, "2008:11:+02:00:Europe/Paris:ISO"},
         };
     }
 
-    @Test(dataProvider="print")
-    public void test_print_Temporal(Chronology overrideChrono, ZoneId overrideZone, Temporal temporal, String expected) {
+    @Test(dataProvider="formatWithZoneWithChronology")
+    public void test_format_withZone_withChronology(Chronology overrideChrono, ZoneId overrideZone, TemporalAccessor temporal, String expected) {
         DateTimeFormatter test = new DateTimeFormatterBuilder()
                 .optionalStart().appendValue(YEAR, 4).optionalEnd()
                 .appendLiteral(':').optionalStart().appendValue(HOUR_OF_DAY, 2).optionalEnd()
-                .appendLiteral(':').optionalStart().appendOffsetId().optionalStart().appendZoneRegionId().optionalEnd().optionalEnd()
+                .appendLiteral(':').optionalStart().appendOffsetId().optionalEnd()
+                .appendLiteral(':').optionalStart().appendZoneId().optionalEnd()
+                .appendLiteral(':').optionalStart().appendChronologyId().optionalEnd()
                 .toFormatter(Locale.ENGLISH)
                 .withChronology(overrideChrono).withZone(overrideZone);
-        String result = test.format(temporal);
-        assertEquals(result, expected);
+        if (expected != null) {
+            String result = test.format(temporal);
+            assertEquals(result, expected);
+        } else {
+            try {
+                test.format(temporal);
+                fail("Formatting should have failed");
+            } catch (DateTimeException ex) {
+                // expected
+            }
+        }
     }
 
     @Test
-    public void test_print_Temporal_simple() throws Exception {
+    public void test_format_withChronology_nonChronoFieldMapLink() {
+        TemporalAccessor temporal = new TemporalAccessor() {
+            @Override
+            public boolean isSupported(TemporalField field) {
+                return field == IsoFields.WEEK_BASED_YEAR;
+            }
+            @Override
+            public long getLong(TemporalField field) {
+                if (field == IsoFields.WEEK_BASED_YEAR) {
+                    return 2345;
+                }
+                throw new UnsupportedTemporalTypeException("Unsupported field: " + field);
+            }
+        };
+        DateTimeFormatter test = new DateTimeFormatterBuilder()
+                .appendValue(IsoFields.WEEK_BASED_YEAR, 4)
+                .toFormatter(Locale.ENGLISH)
+                .withChronology(IsoChronology.INSTANCE);
+        String result = test.format(temporal);
+        assertEquals(result, "2345");
+    }
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_format_TemporalAccessor_simple() {
         DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withSymbols(DateTimeFormatSymbols.STANDARD);
         String result = test.format(LocalDate.of(2008, 6, 30));
         assertEquals(result, "ONE30");
     }
 
-    @Test(expectedExceptions=DateTimeException.class)
-    public void test_print_Temporal_noSuchField() throws Exception {
+    @Test(expectedExceptions = DateTimeException.class)
+    public void test_format_TemporalAccessor_noSuchField() {
         DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withSymbols(DateTimeFormatSymbols.STANDARD);
         test.format(LocalTime.of(11, 30));
     }
 
-    @Test(expectedExceptions=NullPointerException.class)
-    public void test_print_Temporal_null() throws Exception {
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_format_TemporalAccessor_null() {
         DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withSymbols(DateTimeFormatSymbols.STANDARD);
         test.format((TemporalAccessor) null);
     }
--- a/test/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java	Wed Apr 17 21:48:04 2013 -0700
@@ -98,7 +98,36 @@
     @Test
     public void test_toFormatter_empty() throws Exception {
         DateTimeFormatter f = builder.toFormatter();
-        assertEquals(f.toString(), "");
+        assertEquals(f.format(LocalDate.of(2012, 6, 30)), "");
+    }
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_parseDefaulting_entireDate() {
+        DateTimeFormatter f = builder
+            .parseDefaulting(YEAR, 2012).parseDefaulting(MONTH_OF_YEAR, 6)
+            .parseDefaulting(DAY_OF_MONTH, 30).toFormatter();
+        LocalDate parsed = f.parse("", LocalDate::from);  // blank string can be parsed
+        assertEquals(parsed, LocalDate.of(2012, 6, 30));
+    }
+
+    @Test
+    public void test_parseDefaulting_yearOptionalMonthOptionalDay() {
+        DateTimeFormatter f = builder
+                .appendValue(YEAR)
+                .optionalStart().appendLiteral('-').appendValue(MONTH_OF_YEAR)
+                .optionalStart().appendLiteral('-').appendValue(DAY_OF_MONTH)
+                .optionalEnd().optionalEnd()
+                .parseDefaulting(MONTH_OF_YEAR, 1)
+                .parseDefaulting(DAY_OF_MONTH, 1).toFormatter();
+        assertEquals(f.parse("2012", LocalDate::from), LocalDate.of(2012, 1, 1));
+        assertEquals(f.parse("2012-6", LocalDate::from), LocalDate.of(2012, 6, 1));
+        assertEquals(f.parse("2012-6-30", LocalDate::from), LocalDate.of(2012, 6, 30));
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test_parseDefaulting_null() {
+        builder.parseDefaulting(null, 1);
     }
 
     //-----------------------------------------------------------------------
@@ -393,6 +422,7 @@
             {"''"},
             {"'!'"},
             {"!"},
+            {"'#'"},
 
             {"'hello_people,][)('"},
             {"'hi'"},
@@ -418,17 +448,20 @@
             {"MMMM"},
             {"MMMMM"},
 
+            {"L"},
+            {"LL"},
+            {"LLL"},
+            {"LLLL"},
+            {"LLLLL"},
+
             {"D"},
             {"DD"},
             {"DDD"},
 
             {"d"},
             {"dd"},
-            {"ddd"},
 
             {"F"},
-            {"FF"},
-            {"FFF"},
 
             {"Q"},
             {"QQ"},
@@ -436,41 +469,48 @@
             {"QQQQ"},
             {"QQQQQ"},
 
+            {"q"},
+            {"qq"},
+            {"qqq"},
+            {"qqqq"},
+            {"qqqqq"},
+
             {"E"},
             {"EE"},
             {"EEE"},
             {"EEEE"},
             {"EEEEE"},
 
+            {"e"},
+            {"ee"},
+            {"eee"},
+            {"eeee"},
+            {"eeeee"},
+
+            {"c"},
+            {"ccc"},
+            {"cccc"},
+            {"ccccc"},
+
             {"a"},
-            {"aa"},
-            {"aaa"},
-            {"aaaa"},
-            {"aaaaa"},
 
             {"H"},
             {"HH"},
-            {"HHH"},
 
             {"K"},
             {"KK"},
-            {"KKK"},
 
             {"k"},
             {"kk"},
-            {"kkk"},
 
             {"h"},
             {"hh"},
-            {"hhh"},
 
             {"m"},
             {"mm"},
-            {"mmm"},
 
             {"s"},
             {"ss"},
-            {"sss"},
 
             {"S"},
             {"SS"},
@@ -523,8 +563,9 @@
 
             {"e"},
             {"w"},
+            {"ww"},
             {"W"},
-            {"WW"},
+            {"W"},
 
         };
     }
@@ -545,18 +586,40 @@
             {"{"},
             {"}"},
             {"{}"},
+            {"#"},
             {"]"},
             {"yyyy]"},
             {"yyyy]MM"},
             {"yyyy[MM]]"},
 
+            {"aa"},
+            {"aaa"},
+            {"aaaa"},
+            {"aaaaa"},
+            {"aaaaaa"},
             {"MMMMMM"},
             {"QQQQQQ"},
+            {"qqqqqq"},
             {"EEEEEE"},
-            {"aaaaaa"},
-            {"ZZZZ"},
+            {"eeeeee"},
+            {"cc"},
+            {"cccccc"},
+            {"ddd"},
+            {"DDDD"},
+            {"FF"},
+            {"FFF"},
+            {"hhh"},
+            {"HHH"},
+            {"kkk"},
+            {"KKK"},
+            {"mmm"},
+            {"sss"},
+            {"OO"},
+            {"OOO"},
+            {"OOOOO"},
             {"XXXXXX"},
             {"zzzzz"},
+            {"ZZZZZZ"},
 
             {"RO"},
 
@@ -571,9 +634,8 @@
             {"fa"},
             {"fM"},
 
-            {"ww"},
-            {"ee"},
-            {"WWW"},
+            {"www"},
+            {"WW"},
         };
     }
 
@@ -588,9 +650,9 @@
         return new Object[][] {
             {"Q", date(2012, 2, 10), "1"},
             {"QQ", date(2012, 2, 10), "01"},
-//            {"QQQ", date(2012, 2, 10), "Q1"},  // TODO: data for quarters?
-//            {"QQQQ", date(2012, 2, 10), "Q1"},
-//            {"QQQQQ", date(2012, 2, 10), "Q1"},
+            {"QQQ", date(2012, 2, 10), "Q1"},
+            {"QQQQ", date(2012, 2, 10), "1st quarter"},
+            {"QQQQQ", date(2012, 2, 10), "1"},
         };
     }
 
--- a/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java	Wed Apr 17 21:48:04 2013 -0700
@@ -77,16 +77,20 @@
 import java.time.DateTimeException;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.time.Month;
 import java.time.Year;
 import java.time.YearMonth;
 import java.time.ZoneId;
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
 import java.time.chrono.Chronology;
+import java.time.chrono.IsoChronology;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeParseException;
+import java.time.format.FormatStyle;
+import java.time.format.ResolverStyle;
+import java.time.format.TextStyle;
 import java.time.temporal.IsoFields;
-import java.time.temporal.Queries;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
@@ -110,27 +114,28 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
-    public void test_print_nullCalendrical() {
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_format_nullTemporalAccessor() {
         DateTimeFormatter.ISO_DATE.format((TemporalAccessor) null);
     }
 
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_pattern_String() {
         DateTimeFormatter test = DateTimeFormatter.ofPattern("d MMM yyyy");
-        assertEquals(test.toString(), "Value(DayOfMonth)' 'Text(MonthOfYear,SHORT)' 'Value(Year,4,19,EXCEEDS_PAD)");
+        assertEquals(test.format(LocalDate.of(2012, 6, 30)), "30 " +
+                Month.JUNE.getDisplayName(TextStyle.SHORT, Locale.getDefault()) + " 2012");
         assertEquals(test.getLocale(), Locale.getDefault());
     }
 
-    @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"})
+    @Test(expectedExceptions=IllegalArgumentException.class)
     public void test_pattern_String_invalid() {
         DateTimeFormatter.ofPattern("p");
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_pattern_String_null() {
         DateTimeFormatter.ofPattern(null);
     }
@@ -138,24 +143,24 @@
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_pattern_StringLocale() {
         DateTimeFormatter test = DateTimeFormatter.ofPattern("d MMM yyyy", Locale.UK);
-        assertEquals(test.toString(), "Value(DayOfMonth)' 'Text(MonthOfYear,SHORT)' 'Value(Year,4,19,EXCEEDS_PAD)");
+        assertEquals(test.format(LocalDate.of(2012, 6, 30)), "30 Jun 2012");
         assertEquals(test.getLocale(), Locale.UK);
     }
 
-    @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"})
+    @Test(expectedExceptions=IllegalArgumentException.class)
     public void test_pattern_StringLocale_invalid() {
         DateTimeFormatter.ofPattern("p", Locale.UK);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_pattern_StringLocale_nullPattern() {
         DateTimeFormatter.ofPattern(null, Locale.UK);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_pattern_StringLocale_nullLocale() {
         DateTimeFormatter.ofPattern("yyyy", null);
     }
@@ -163,6 +168,37 @@
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
+    @Test
+    public void test_ofLocalizedDate_basics() {
+        assertEquals(DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL).getChronology(), IsoChronology.INSTANCE);
+        assertEquals(DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL).getZone(), null);
+        assertEquals(DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL).getResolverStyle(), ResolverStyle.SMART);
+    }
+
+    @Test
+    public void test_ofLocalizedTime_basics() {
+        assertEquals(DateTimeFormatter.ofLocalizedTime(FormatStyle.FULL).getChronology(), IsoChronology.INSTANCE);
+        assertEquals(DateTimeFormatter.ofLocalizedTime(FormatStyle.FULL).getZone(), null);
+        assertEquals(DateTimeFormatter.ofLocalizedTime(FormatStyle.FULL).getResolverStyle(), ResolverStyle.SMART);
+    }
+
+    @Test
+    public void test_ofLocalizedDateTime1_basics() {
+        assertEquals(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.FULL).getChronology(), IsoChronology.INSTANCE);
+        assertEquals(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.FULL).getZone(), null);
+        assertEquals(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.FULL).getResolverStyle(), ResolverStyle.SMART);
+    }
+
+    @Test
+    public void test_ofLocalizedDateTime2_basics() {
+        assertEquals(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.FULL, FormatStyle.MEDIUM).getChronology(), IsoChronology.INSTANCE);
+        assertEquals(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.FULL, FormatStyle.MEDIUM).getZone(), null);
+        assertEquals(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.FULL, FormatStyle.MEDIUM).getResolverStyle(), ResolverStyle.SMART);
+    }
+
+    //-----------------------------------------------------------------------
+    //-----------------------------------------------------------------------
+    //-----------------------------------------------------------------------
     @DataProvider(name="sample_isoLocalDate")
     Object[][] provider_sample_isoLocalDate() {
         return new Object[][]{
@@ -183,7 +219,7 @@
         };
     }
 
-    @Test(dataProvider="sample_isoLocalDate", groups={"tck"})
+    @Test(dataProvider="sample_isoLocalDate")
     public void test_print_isoLocalDate(
             Integer year, Integer month, Integer day, String offsetId, String zoneId,
             String expected, Class<?> expectedEx) {
@@ -200,7 +236,7 @@
         }
     }
 
-    @Test(dataProvider="sample_isoLocalDate", groups={"tck"})
+    @Test(dataProvider="sample_isoLocalDate")
     public void test_parse_isoLocalDate(
             Integer year, Integer month, Integer day, String offsetId, String zoneId,
             String input, Class<?> invalid) {
@@ -211,42 +247,49 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_parse_isoLocalDate_999999999() {
         Expected expected = createDate(999999999, 8, 6);
         assertParseMatch(DateTimeFormatter.ISO_LOCAL_DATE.parseUnresolved("+999999999-08-06", new ParsePosition(0)), expected);
         assertEquals(LocalDate.parse("+999999999-08-06"), LocalDate.of(999999999, 8, 6));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_parse_isoLocalDate_1000000000() {
         Expected expected = createDate(1000000000, 8, 6);
         assertParseMatch(DateTimeFormatter.ISO_LOCAL_DATE.parseUnresolved("+1000000000-08-06", new ParsePosition(0)), expected);
     }
 
-    @Test(expectedExceptions = DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions = DateTimeException.class)
     public void test_parse_isoLocalDate_1000000000_failedCreate() {
         LocalDate.parse("+1000000000-08-06");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_parse_isoLocalDate_M999999999() {
         Expected expected = createDate(-999999999, 8, 6);
         assertParseMatch(DateTimeFormatter.ISO_LOCAL_DATE.parseUnresolved("-999999999-08-06", new ParsePosition(0)), expected);
         assertEquals(LocalDate.parse("-999999999-08-06"), LocalDate.of(-999999999, 8, 6));
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_parse_isoLocalDate_M1000000000() {
         Expected expected = createDate(-1000000000, 8, 6);
         assertParseMatch(DateTimeFormatter.ISO_LOCAL_DATE.parseUnresolved("-1000000000-08-06", new ParsePosition(0)), expected);
     }
 
-    @Test(expectedExceptions = DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions = DateTimeException.class)
     public void test_parse_isoLocalDate_M1000000000_failedCreate() {
         LocalDate.parse("-1000000000-08-06");
     }
 
+    @Test
+    public void test_isoLocalDate_basics() {
+        assertEquals(DateTimeFormatter.ISO_LOCAL_DATE.getChronology(), IsoChronology.INSTANCE);
+        assertEquals(DateTimeFormatter.ISO_LOCAL_DATE.getZone(), null);
+        assertEquals(DateTimeFormatter.ISO_LOCAL_DATE.getResolverStyle(), ResolverStyle.STRICT);
+    }
+
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
@@ -270,7 +313,7 @@
         };
     }
 
-    @Test(dataProvider="sample_isoOffsetDate", groups={"tck"})
+    @Test(dataProvider="sample_isoOffsetDate")
     public void test_print_isoOffsetDate(
             Integer year, Integer month, Integer day, String offsetId, String zoneId,
             String expected, Class<?> expectedEx) {
@@ -287,7 +330,7 @@
         }
     }
 
-    @Test(dataProvider="sample_isoOffsetDate", groups={"tck"})
+    @Test(dataProvider="sample_isoOffsetDate")
     public void test_parse_isoOffsetDate(
             Integer year, Integer month, Integer day, String offsetId, String zoneId,
             String input, Class<?> invalid) {
@@ -298,6 +341,13 @@
         }
     }
 
+    @Test
+    public void test_isoOffsetDate_basics() {
+        assertEquals(DateTimeFormatter.ISO_OFFSET_DATE.getChronology(), IsoChronology.INSTANCE);
+        assertEquals(DateTimeFormatter.ISO_OFFSET_DATE.getZone(), null);
+        assertEquals(DateTimeFormatter.ISO_OFFSET_DATE.getResolverStyle(), ResolverStyle.STRICT);
+    }
+
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
@@ -321,7 +371,7 @@
         };
     }
 
-    @Test(dataProvider="sample_isoDate", groups={"tck"})
+    @Test(dataProvider="sample_isoDate")
     public void test_print_isoDate(
             Integer year, Integer month, Integer day, String offsetId, String zoneId,
             String expected, Class<?> expectedEx) {
@@ -338,7 +388,7 @@
         }
     }
 
-    @Test(dataProvider="sample_isoDate", groups={"tck"})
+    @Test(dataProvider="sample_isoDate")
     public void test_parse_isoDate(
             Integer year, Integer month, Integer day, String offsetId, String zoneId,
             String input, Class<?> invalid) {
@@ -351,6 +401,13 @@
         }
     }
 
+    @Test
+    public void test_isoDate_basics() {
+        assertEquals(DateTimeFormatter.ISO_DATE.getChronology(), IsoChronology.INSTANCE);
+        assertEquals(DateTimeFormatter.ISO_DATE.getZone(), null);
+        assertEquals(DateTimeFormatter.ISO_DATE.getResolverStyle(), ResolverStyle.STRICT);
+    }
+
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
@@ -386,7 +443,7 @@
         };
     }
 
-    @Test(dataProvider="sample_isoLocalTime", groups={"tck"})
+    @Test(dataProvider="sample_isoLocalTime")
     public void test_print_isoLocalTime(
             Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId,
             String expected, Class<?> expectedEx) {
@@ -403,7 +460,7 @@
         }
     }
 
-    @Test(dataProvider="sample_isoLocalTime", groups={"tck"})
+    @Test(dataProvider="sample_isoLocalTime")
     public void test_parse_isoLocalTime(
             Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId,
             String input, Class<?> invalid) {
@@ -414,6 +471,13 @@
         }
     }
 
+    @Test
+    public void test_isoLocalTime_basics() {
+        assertEquals(DateTimeFormatter.ISO_LOCAL_TIME.getChronology(), null);
+        assertEquals(DateTimeFormatter.ISO_LOCAL_TIME.getZone(), null);
+        assertEquals(DateTimeFormatter.ISO_LOCAL_TIME.getResolverStyle(), ResolverStyle.STRICT);
+    }
+
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
@@ -449,7 +513,7 @@
         };
     }
 
-    @Test(dataProvider="sample_isoOffsetTime", groups={"tck"})
+    @Test(dataProvider="sample_isoOffsetTime")
     public void test_print_isoOffsetTime(
             Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId,
             String expected, Class<?> expectedEx) {
@@ -466,7 +530,7 @@
         }
     }
 
-    @Test(dataProvider="sample_isoOffsetTime", groups={"tck"})
+    @Test(dataProvider="sample_isoOffsetTime")
     public void test_parse_isoOffsetTime(
             Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId,
             String input, Class<?> invalid) {
@@ -477,6 +541,13 @@
         }
     }
 
+    @Test
+    public void test_isoOffsetTime_basics() {
+        assertEquals(DateTimeFormatter.ISO_OFFSET_TIME.getChronology(), null);
+        assertEquals(DateTimeFormatter.ISO_OFFSET_TIME.getZone(), null);
+        assertEquals(DateTimeFormatter.ISO_OFFSET_TIME.getResolverStyle(), ResolverStyle.STRICT);
+    }
+
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
@@ -512,7 +583,7 @@
         };
     }
 
-    @Test(dataProvider="sample_isoTime", groups={"tck"})
+    @Test(dataProvider="sample_isoTime")
     public void test_print_isoTime(
             Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId,
             String expected, Class<?> expectedEx) {
@@ -529,7 +600,7 @@
         }
     }
 
-    @Test(dataProvider="sample_isoTime", groups={"tck"})
+    @Test(dataProvider="sample_isoTime")
     public void test_parse_isoTime(
             Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId,
             String input, Class<?> invalid) {
@@ -542,6 +613,13 @@
         }
     }
 
+    @Test
+    public void test_isoTime_basics() {
+        assertEquals(DateTimeFormatter.ISO_TIME.getChronology(), null);
+        assertEquals(DateTimeFormatter.ISO_TIME.getZone(), null);
+        assertEquals(DateTimeFormatter.ISO_TIME.getResolverStyle(), ResolverStyle.STRICT);
+    }
+
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
@@ -585,7 +663,7 @@
         };
     }
 
-    @Test(dataProvider="sample_isoLocalDateTime", groups={"tck"})
+    @Test(dataProvider="sample_isoLocalDateTime")
     public void test_print_isoLocalDateTime(
             Integer year, Integer month, Integer day,
             Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId,
@@ -603,7 +681,7 @@
         }
     }
 
-    @Test(dataProvider="sample_isoLocalDateTime", groups={"tck"})
+    @Test(dataProvider="sample_isoLocalDateTime")
     public void test_parse_isoLocalDateTime(
             Integer year, Integer month, Integer day,
             Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId,
@@ -614,6 +692,13 @@
         }
     }
 
+    @Test
+    public void test_isoLocalDateTime_basics() {
+        assertEquals(DateTimeFormatter.ISO_LOCAL_DATE_TIME.getChronology(), IsoChronology.INSTANCE);
+        assertEquals(DateTimeFormatter.ISO_LOCAL_DATE_TIME.getZone(), null);
+        assertEquals(DateTimeFormatter.ISO_LOCAL_DATE_TIME.getResolverStyle(), ResolverStyle.STRICT);
+    }
+
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
@@ -657,7 +742,7 @@
         };
     }
 
-    @Test(dataProvider="sample_isoOffsetDateTime", groups={"tck"})
+    @Test(dataProvider="sample_isoOffsetDateTime")
     public void test_print_isoOffsetDateTime(
             Integer year, Integer month, Integer day,
             Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId,
@@ -675,7 +760,7 @@
         }
     }
 
-    @Test(dataProvider="sample_isoOffsetDateTime", groups={"tck"})
+    @Test(dataProvider="sample_isoOffsetDateTime")
     public void test_parse_isoOffsetDateTime(
             Integer year, Integer month, Integer day,
             Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId,
@@ -687,6 +772,13 @@
         }
     }
 
+    @Test
+    public void test_isoOffsetDateTime_basics() {
+        assertEquals(DateTimeFormatter.ISO_OFFSET_DATE_TIME.getChronology(), IsoChronology.INSTANCE);
+        assertEquals(DateTimeFormatter.ISO_OFFSET_DATE_TIME.getZone(), null);
+        assertEquals(DateTimeFormatter.ISO_OFFSET_DATE_TIME.getResolverStyle(), ResolverStyle.STRICT);
+    }
+
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
@@ -739,7 +831,7 @@
         };
     }
 
-    @Test(dataProvider="sample_isoZonedDateTime", groups={"tck"})
+    @Test(dataProvider="sample_isoZonedDateTime")
     public void test_print_isoZonedDateTime(
             Integer year, Integer month, Integer day,
             Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId,
@@ -757,7 +849,7 @@
         }
     }
 
-    @Test(dataProvider="sample_isoZonedDateTime", groups={"tck"})
+    @Test(dataProvider="sample_isoZonedDateTime")
     public void test_parse_isoZonedDateTime(
             Integer year, Integer month, Integer day,
             Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId,
@@ -773,6 +865,13 @@
         }
     }
 
+    @Test
+    public void test_isoZonedDateTime_basics() {
+        assertEquals(DateTimeFormatter.ISO_ZONED_DATE_TIME.getChronology(), IsoChronology.INSTANCE);
+        assertEquals(DateTimeFormatter.ISO_ZONED_DATE_TIME.getZone(), null);
+        assertEquals(DateTimeFormatter.ISO_ZONED_DATE_TIME.getResolverStyle(), ResolverStyle.STRICT);
+    }
+
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
@@ -816,7 +915,7 @@
         };
     }
 
-    @Test(dataProvider="sample_isoDateTime", groups={"tck"})
+    @Test(dataProvider="sample_isoDateTime")
     public void test_print_isoDateTime(
             Integer year, Integer month, Integer day,
             Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId,
@@ -834,7 +933,7 @@
         }
     }
 
-    @Test(dataProvider="sample_isoDateTime", groups={"tck"})
+    @Test(dataProvider="sample_isoDateTime")
     public void test_parse_isoDateTime(
             Integer year, Integer month, Integer day,
             Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId,
@@ -851,28 +950,35 @@
         }
     }
 
+    @Test
+    public void test_isoDateTime_basics() {
+        assertEquals(DateTimeFormatter.ISO_DATE_TIME.getChronology(), IsoChronology.INSTANCE);
+        assertEquals(DateTimeFormatter.ISO_DATE_TIME.getZone(), null);
+        assertEquals(DateTimeFormatter.ISO_DATE_TIME.getResolverStyle(), ResolverStyle.STRICT);
+    }
+
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_print_isoOrdinalDate() {
         TemporalAccessor test = buildAccessor(LocalDateTime.of(2008, 6, 3, 11, 5, 30), null, null);
         assertEquals(DateTimeFormatter.ISO_ORDINAL_DATE.format(test), "2008-155");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_print_isoOrdinalDate_offset() {
         TemporalAccessor test = buildAccessor(LocalDateTime.of(2008, 6, 3, 11, 5, 30), "Z", null);
         assertEquals(DateTimeFormatter.ISO_ORDINAL_DATE.format(test), "2008-155Z");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_print_isoOrdinalDate_zoned() {
         TemporalAccessor test = buildAccessor(LocalDateTime.of(2008, 6, 3, 11, 5, 30), "+02:00", "Europe/Paris");
         assertEquals(DateTimeFormatter.ISO_ORDINAL_DATE.format(test), "2008-155+02:00");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_print_isoOrdinalDate_zoned_largeYear() {
         TemporalAccessor test = buildAccessor(LocalDateTime.of(123456, 6, 3, 11, 5, 30), "Z", null);
         assertEquals(DateTimeFormatter.ISO_ORDINAL_DATE.format(test), "+123456-155Z");
@@ -907,65 +1013,72 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_parse_isoOrdinalDate() {
         Expected expected = new Expected(YEAR, 2008, DAY_OF_YEAR, 123);
         assertParseMatch(DateTimeFormatter.ISO_ORDINAL_DATE.parseUnresolved("2008-123", new ParsePosition(0)), expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_parse_isoOrdinalDate_largeYear() {
         Expected expected = new Expected(YEAR, 123456, DAY_OF_YEAR, 123);
         assertParseMatch(DateTimeFormatter.ISO_ORDINAL_DATE.parseUnresolved("+123456-123", new ParsePosition(0)), expected);
     }
 
+    @Test
+    public void test_isoOrdinalDate_basics() {
+        assertEquals(DateTimeFormatter.ISO_ORDINAL_DATE.getChronology(), IsoChronology.INSTANCE);
+        assertEquals(DateTimeFormatter.ISO_ORDINAL_DATE.getZone(), null);
+        assertEquals(DateTimeFormatter.ISO_ORDINAL_DATE.getResolverStyle(), ResolverStyle.STRICT);
+    }
+
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_print_basicIsoDate() {
         TemporalAccessor test = buildAccessor(LocalDateTime.of(2008, 6, 3, 11, 5, 30), null, null);
         assertEquals(DateTimeFormatter.BASIC_ISO_DATE.format(test), "20080603");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_print_basicIsoDate_offset() {
         TemporalAccessor test = buildAccessor(LocalDateTime.of(2008, 6, 3, 11, 5, 30), "Z", null);
         assertEquals(DateTimeFormatter.BASIC_ISO_DATE.format(test), "20080603Z");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_print_basicIsoDate_zoned() {
         TemporalAccessor test = buildAccessor(LocalDateTime.of(2008, 6, 3, 11, 5, 30), "+02:00", "Europe/Paris");
         assertEquals(DateTimeFormatter.BASIC_ISO_DATE.format(test), "20080603+0200");
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_print_basicIsoDate_largeYear() {
         TemporalAccessor test = buildAccessor(LocalDateTime.of(123456, 6, 3, 11, 5, 30), "Z", null);
         DateTimeFormatter.BASIC_ISO_DATE.format(test);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_print_basicIsoDate_fields() {
         TemporalAccessor test = buildAccessor(LocalDate.of(2008, 6, 3), null, null);
         assertEquals(DateTimeFormatter.BASIC_ISO_DATE.format(test), "20080603");
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_print_basicIsoDate_missingField() {
         TemporalAccessor test = YearMonth.of(2008, 6);
         DateTimeFormatter.BASIC_ISO_DATE.format(test);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_parse_basicIsoDate() {
         LocalDate expected = LocalDate.of(2008, 6, 3);
         assertEquals(DateTimeFormatter.BASIC_ISO_DATE.parse("20080603", LocalDate::from), expected);
     }
 
-    @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeParseException.class)
     public void test_parse_basicIsoDate_largeYear() {
         try {
             LocalDate expected = LocalDate.of(123456, 6, 3);
@@ -977,6 +1090,13 @@
         }
     }
 
+    @Test
+    public void test_basicIsoDate_basics() {
+        assertEquals(DateTimeFormatter.BASIC_ISO_DATE.getChronology(), IsoChronology.INSTANCE);
+        assertEquals(DateTimeFormatter.BASIC_ISO_DATE.getZone(), null);
+        assertEquals(DateTimeFormatter.BASIC_ISO_DATE.getResolverStyle(), ResolverStyle.STRICT);
+    }
+
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
@@ -1012,37 +1132,37 @@
         };
     }
 
-    @Test(dataProvider="weekDate", groups={"tck"})
+    @Test(dataProvider="weekDate")
     public void test_print_isoWeekDate(TemporalAccessor test, String expected) {
         assertEquals(DateTimeFormatter.ISO_WEEK_DATE.format(test), expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_print_isoWeekDate_zoned_largeYear() {
         TemporalAccessor test = buildAccessor(LocalDateTime.of(123456, 6, 3, 11, 5, 30), "Z", null);
         assertEquals(DateTimeFormatter.ISO_WEEK_DATE.format(test), "+123456-W23-2Z");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_print_isoWeekDate_fields() {
         TemporalAccessor test = buildAccessor(LocalDate.of(2004, 1, 27), null, null);
         assertEquals(DateTimeFormatter.ISO_WEEK_DATE.format(test), "2004-W05-2");
     }
 
-    @Test(expectedExceptions=DateTimeException.class, groups={"tck"})
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_print_isoWeekDate_missingField() {
         TemporalAccessor test = YearMonth.of(2008, 6);
         DateTimeFormatter.ISO_WEEK_DATE.format(test);
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_parse_weekDate() {
         LocalDate expected = LocalDate.of(2004, 1, 28);
         assertEquals(DateTimeFormatter.ISO_WEEK_DATE.parse("2004-W05-3", LocalDate::from), expected);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_parse_weekDate_largeYear() {
         TemporalAccessor parsed = DateTimeFormatter.ISO_WEEK_DATE.parseUnresolved("+123456-W04-5", new ParsePosition(0));
         assertEquals(parsed.getLong(IsoFields.WEEK_BASED_YEAR), 123456L);
@@ -1050,6 +1170,23 @@
         assertEquals(parsed.getLong(DAY_OF_WEEK), 5L);
     }
 
+    @Test
+    public void test_isoWeekDate_basics() {
+        assertEquals(DateTimeFormatter.ISO_WEEK_DATE.getChronology(), IsoChronology.INSTANCE);
+        assertEquals(DateTimeFormatter.ISO_WEEK_DATE.getZone(), null);
+        assertEquals(DateTimeFormatter.ISO_WEEK_DATE.getResolverStyle(), ResolverStyle.STRICT);
+    }
+
+    //-----------------------------------------------------------------------
+    //-----------------------------------------------------------------------
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_isoInstant_basics() {
+        assertEquals(DateTimeFormatter.ISO_INSTANT.getChronology(), null);
+        assertEquals(DateTimeFormatter.ISO_INSTANT.getZone(), null);
+        assertEquals(DateTimeFormatter.ISO_INSTANT.getResolverStyle(), ResolverStyle.STRICT);
+    }
+
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
@@ -1063,24 +1200,31 @@
         };
     }
 
-    @Test(groups={"tck"}, dataProvider="rfc")
+    @Test(dataProvider="rfc")
     public void test_print_rfc1123(LocalDateTime base, String offsetId, String expected) {
         TemporalAccessor test = buildAccessor(base, offsetId, null);
         assertEquals(DateTimeFormatter.RFC_1123_DATE_TIME.format(test), expected);
     }
 
-    @Test(groups={"tck"}, dataProvider="rfc")
+    @Test(dataProvider="rfc")
     public void test_print_rfc1123_french(LocalDateTime base, String offsetId, String expected) {
         TemporalAccessor test = buildAccessor(base, offsetId, null);
         assertEquals(DateTimeFormatter.RFC_1123_DATE_TIME.withLocale(Locale.FRENCH).format(test), expected);
     }
 
-    @Test(groups={"tck"}, expectedExceptions=DateTimeException.class)
+    @Test(expectedExceptions=DateTimeException.class)
     public void test_print_rfc1123_missingField() {
         TemporalAccessor test = YearMonth.of(2008, 6);
         DateTimeFormatter.RFC_1123_DATE_TIME.format(test);
     }
 
+    @Test
+    public void test_rfc1123_basics() {
+        assertEquals(DateTimeFormatter.RFC_1123_DATE_TIME.getChronology(), IsoChronology.INSTANCE);
+        assertEquals(DateTimeFormatter.RFC_1123_DATE_TIME.getZone(), null);
+        assertEquals(DateTimeFormatter.RFC_1123_DATE_TIME.getResolverStyle(), ResolverStyle.SMART);
+    }
+
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
@@ -1204,13 +1348,11 @@
             assertEquals(parsed.isSupported(field), true);
             parsed.getLong(field);
         }
-        assertEquals(parsed.query(Queries.chronology()), expected.chrono);
-        assertEquals(parsed.query(Queries.zoneId()), expected.zone);
+        assertEquals(parsed.query(TemporalQuery.chronology()), expected.chrono);
+        assertEquals(parsed.query(TemporalQuery.zoneId()), expected.zone);
     }
 
     //-------------------------------------------------------------------------
-        Map<TemporalField, Long> fields = new HashMap<>();
-        ZoneId zoneId;
     static class MockAccessor implements TemporalAccessor {
         Map<TemporalField, Long> fields = new HashMap<>();
         ZoneId zoneId;
@@ -1272,7 +1414,7 @@
         @SuppressWarnings("unchecked")
         @Override
         public <R> R query(TemporalQuery<R> query) {
-            if (query == Queries.zoneId()) {
+            if (query == TemporalQuery.zoneId()) {
                 return (R) zoneId;
             }
             return TemporalAccessor.super.query(query);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,522 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2013, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.format;
+
+import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH;
+import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR;
+import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_MONTH;
+import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_YEAR;
+import static java.time.temporal.ChronoField.AMPM_OF_DAY;
+import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_AMPM;
+import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_DAY;
+import static java.time.temporal.ChronoField.DAY_OF_MONTH;
+import static java.time.temporal.ChronoField.DAY_OF_WEEK;
+import static java.time.temporal.ChronoField.DAY_OF_YEAR;
+import static java.time.temporal.ChronoField.EPOCH_DAY;
+import static java.time.temporal.ChronoField.ERA;
+import static java.time.temporal.ChronoField.HOUR_OF_AMPM;
+import static java.time.temporal.ChronoField.HOUR_OF_DAY;
+import static java.time.temporal.ChronoField.MICRO_OF_DAY;
+import static java.time.temporal.ChronoField.MICRO_OF_SECOND;
+import static java.time.temporal.ChronoField.MILLI_OF_DAY;
+import static java.time.temporal.ChronoField.MILLI_OF_SECOND;
+import static java.time.temporal.ChronoField.MINUTE_OF_DAY;
+import static java.time.temporal.ChronoField.MINUTE_OF_HOUR;
+import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoField.NANO_OF_DAY;
+import static java.time.temporal.ChronoField.NANO_OF_SECOND;
+import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
+import static java.time.temporal.ChronoField.SECOND_OF_DAY;
+import static java.time.temporal.ChronoField.SECOND_OF_MINUTE;
+import static java.time.temporal.ChronoField.YEAR;
+import static java.time.temporal.ChronoField.YEAR_OF_ERA;
+import static org.testng.Assert.assertEquals;
+
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.temporal.IsoFields;
+import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQuery;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test parse resolving.
+ */
+@Test
+public class TCKDateTimeParseResolver {
+    // TODO: tests with weird TenporalField implementations
+    // TODO: tests with non-ISO chronologies
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="resolveOneNoChange")
+    Object[][] data_resolveOneNoChange() {
+        return new Object[][]{
+                {YEAR, 2012},
+                {MONTH_OF_YEAR, 8},
+                {DAY_OF_MONTH, 7},
+                {DAY_OF_YEAR, 6},
+                {DAY_OF_WEEK, 5},
+        };
+    }
+
+    @Test(dataProvider="resolveOneNoChange")
+    public void test_resolveOneNoChange(TemporalField field1, long value1) {
+        String str = Long.toString(value1);
+        DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field1).toFormatter();
+
+        TemporalAccessor accessor = f.parse(str);
+        assertEquals(accessor.query(TemporalQuery.localDate()), null);
+        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+        assertEquals(accessor.isSupported(field1), true);
+        assertEquals(accessor.getLong(field1), value1);
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="resolveTwoNoChange")
+    Object[][] data_resolveTwoNoChange() {
+        return new Object[][]{
+                {YEAR, 2012, MONTH_OF_YEAR, 5},
+                {YEAR, 2012, DAY_OF_MONTH, 5},
+                {YEAR, 2012, DAY_OF_WEEK, 5},
+                {YEAR, 2012, ALIGNED_WEEK_OF_YEAR, 5},
+                {YEAR, 2012, ALIGNED_WEEK_OF_MONTH, 5},
+                {YEAR, 2012, IsoFields.QUARTER_OF_YEAR, 3},
+                {YEAR, 2012, MINUTE_OF_HOUR, 5},
+                {YEAR, 2012, SECOND_OF_MINUTE, 5},
+                {YEAR, 2012, NANO_OF_SECOND, 5},
+
+                {MONTH_OF_YEAR, 5, DAY_OF_MONTH, 5},
+                {MONTH_OF_YEAR, 5, DAY_OF_WEEK, 5},
+                {MONTH_OF_YEAR, 5, ALIGNED_WEEK_OF_YEAR, 5},
+                {MONTH_OF_YEAR, 5, ALIGNED_WEEK_OF_MONTH, 5},
+                {MONTH_OF_YEAR, 3, IsoFields.QUARTER_OF_YEAR, 5},
+                {MONTH_OF_YEAR, 5, MINUTE_OF_HOUR, 5},
+                {MONTH_OF_YEAR, 5, SECOND_OF_MINUTE, 5},
+                {MONTH_OF_YEAR, 5, NANO_OF_SECOND, 5},
+        };
+    }
+
+    @Test(dataProvider="resolveTwoNoChange")
+    public void test_resolveTwoNoChange(TemporalField field1, long value1, TemporalField field2, long value2) {
+        String str = value1 + " " + value2;
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(field1).appendLiteral(' ')
+                .appendValue(field2).toFormatter();
+        TemporalAccessor accessor = f.parse(str);
+
+        assertEquals(accessor.query(TemporalQuery.localDate()), null);
+        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+        assertEquals(accessor.isSupported(field1), true);
+        assertEquals(accessor.isSupported(field2), true);
+        assertEquals(accessor.getLong(field1), value1);
+        assertEquals(accessor.getLong(field2), value2);
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="resolveThreeNoChange")
+    Object[][] data_resolveThreeNoChange() {
+        return new Object[][]{
+                {YEAR, 2012, MONTH_OF_YEAR, 5, DAY_OF_WEEK, 5},
+                {YEAR, 2012, ALIGNED_WEEK_OF_YEAR, 5, DAY_OF_MONTH, 5},
+                {YEAR, 2012, ALIGNED_WEEK_OF_MONTH, 5, DAY_OF_MONTH, 5},
+                {YEAR, 2012, MONTH_OF_YEAR, 5, DAY_OF_WEEK, 5},
+                {ERA, 1, MONTH_OF_YEAR, 5, DAY_OF_MONTH, 5},
+                {MONTH_OF_YEAR, 1, DAY_OF_MONTH, 5, IsoFields.QUARTER_OF_YEAR, 3},
+                {HOUR_OF_DAY, 1, SECOND_OF_MINUTE, 5, NANO_OF_SECOND, 5},
+                {MINUTE_OF_HOUR, 1, SECOND_OF_MINUTE, 5, NANO_OF_SECOND, 5},
+        };
+    }
+
+    @Test(dataProvider="resolveThreeNoChange")
+    public void test_resolveThreeNoChange(TemporalField field1, long value1, TemporalField field2, long value2, TemporalField field3, long value3) {
+        String str = value1 + " " + value2 + " " + value3;
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(field1).appendLiteral(' ')
+                .appendValue(field2).appendLiteral(' ')
+                .appendValue(field3).toFormatter();
+        TemporalAccessor accessor = f.parse(str);
+
+        assertEquals(accessor.query(TemporalQuery.localDate()), null);
+        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+        assertEquals(accessor.isSupported(field1), true);
+        assertEquals(accessor.isSupported(field2), true);
+        assertEquals(accessor.isSupported(field3), true);
+        assertEquals(accessor.getLong(field1), value1);
+        assertEquals(accessor.getLong(field2), value2);
+        assertEquals(accessor.getLong(field3), value3);
+    }
+
+    //-----------------------------------------------------------------------
+    //-----------------------------------------------------------------------
+    //-----------------------------------------------------------------------
+    @DataProvider(name="resolveOneToField")
+    Object[][] data_resolveOneToField() {
+        return new Object[][]{
+                {YEAR_OF_ERA, 2012, YEAR, 2012L, null, null},
+                {PROLEPTIC_MONTH, 2012 * 12L + (3 - 1), YEAR, 2012L, MONTH_OF_YEAR, 3L},
+
+                {CLOCK_HOUR_OF_AMPM, 8, HOUR_OF_AMPM, 8L, null, null},
+                {CLOCK_HOUR_OF_AMPM, 12, HOUR_OF_AMPM, 0L, null, null},
+                {MICRO_OF_SECOND, 12, NANO_OF_SECOND, 12_000L, null, null},
+                {MILLI_OF_SECOND, 12, NANO_OF_SECOND, 12_000_000L, null, null},
+        };
+    }
+
+    @Test(dataProvider="resolveOneToField")
+    public void test_resolveOneToField(TemporalField field1, long value1,
+                                       TemporalField expectedField1, Long expectedValue1,
+                                       TemporalField expectedField2, Long expectedValue2) {
+        String str = Long.toString(value1);
+        DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field1).toFormatter();
+
+        TemporalAccessor accessor = f.parse(str);
+        assertEquals(accessor.query(TemporalQuery.localDate()), null);
+        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+        if (expectedField1 != null) {
+            assertEquals(accessor.isSupported(expectedField1), true);
+            assertEquals(accessor.getLong(expectedField1), expectedValue1.longValue());
+        }
+        if (expectedField2 != null) {
+            assertEquals(accessor.isSupported(expectedField2), true);
+            assertEquals(accessor.getLong(expectedField2), expectedValue2.longValue());
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="resolveOneToDate")
+    Object[][] data_resolveOneToDate() {
+        return new Object[][]{
+                {EPOCH_DAY, 32, LocalDate.of(1970, 2, 2)},
+        };
+    }
+
+    @Test(dataProvider="resolveOneToDate")
+    public void test_resolveOneToDate(TemporalField field1, long value1, LocalDate expectedDate) {
+        String str = Long.toString(value1);
+        DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field1).toFormatter();
+
+        TemporalAccessor accessor = f.parse(str);
+        assertEquals(accessor.query(TemporalQuery.localDate()), expectedDate);
+        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="resolveOneToTime")
+    Object[][] data_resolveOneToTime() {
+        return new Object[][]{
+                {HOUR_OF_DAY, 8, LocalTime.of(8, 0)},
+                {CLOCK_HOUR_OF_DAY, 8, LocalTime.of(8, 0)},
+                {CLOCK_HOUR_OF_DAY, 24, LocalTime.of(0, 0)},
+                {MINUTE_OF_DAY, 650, LocalTime.of(10, 50)},
+                {SECOND_OF_DAY, 3600 + 650, LocalTime.of(1, 10, 50)},
+                {MILLI_OF_DAY, (3600 + 650) * 1_000L + 2, LocalTime.of(1, 10, 50, 2_000_000)},
+                {MICRO_OF_DAY, (3600 + 650) * 1_000_000L + 2, LocalTime.of(1, 10, 50, 2_000)},
+                {NANO_OF_DAY, (3600 + 650) * 1_000_000_000L + 2, LocalTime.of(1, 10, 50, 2)},
+        };
+    }
+
+    @Test(dataProvider="resolveOneToTime")
+    public void test_resolveOneToTime(TemporalField field1, long value1, LocalTime expectedTime) {
+        String str = Long.toString(value1);
+        DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field1).toFormatter();
+
+        TemporalAccessor accessor = f.parse(str);
+        assertEquals(accessor.query(TemporalQuery.localDate()), null);
+        assertEquals(accessor.query(TemporalQuery.localTime()), expectedTime);
+    }
+
+    //-----------------------------------------------------------------------
+    //-----------------------------------------------------------------------
+    //-----------------------------------------------------------------------
+    @DataProvider(name="resolveTwoToField")
+    Object[][] data_resolveTwoToField() {
+        return new Object[][]{
+                // cross-check
+                {PROLEPTIC_MONTH, 2012 * 12L + (3 - 1), YEAR, 2012, YEAR, 2012L, MONTH_OF_YEAR, 3L},
+                {PROLEPTIC_MONTH, 2012 * 12L + (3 - 1), YEAR_OF_ERA, 2012, YEAR, 2012L, MONTH_OF_YEAR, 3L},
+                {PROLEPTIC_MONTH, 2012 * 12L + (3 - 1), ERA, 1, YEAR, 2012L, MONTH_OF_YEAR, 3L},
+                {PROLEPTIC_MONTH, (3 - 1), YEAR, 0, YEAR, 0L, MONTH_OF_YEAR, 3L},
+                {PROLEPTIC_MONTH, (3 - 1), YEAR_OF_ERA, 1, YEAR, 0L, MONTH_OF_YEAR, 3L},
+                {PROLEPTIC_MONTH, (3 - 1), ERA, 0, YEAR, 0L, MONTH_OF_YEAR, 3L},
+        };
+    }
+
+    @Test(dataProvider="resolveTwoToField")
+    public void test_resolveTwoToField(TemporalField field1, long value1,
+                                       TemporalField field2, long value2,
+                                       TemporalField expectedField1, Long expectedValue1,
+                                       TemporalField expectedField2, Long expectedValue2) {
+        String str = value1 + " " + value2;
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(field1).appendLiteral(' ')
+                .appendValue(field2).toFormatter();
+
+        TemporalAccessor accessor = f.parse(str);
+        assertEquals(accessor.query(TemporalQuery.localDate()), null);
+        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+        if (expectedField1 != null) {
+            assertEquals(accessor.isSupported(expectedField1), true);
+            assertEquals(accessor.getLong(expectedField1), expectedValue1.longValue());
+        }
+        if (expectedField2 != null) {
+            assertEquals(accessor.isSupported(expectedField2), true);
+            assertEquals(accessor.getLong(expectedField2), expectedValue2.longValue());
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="resolveTwoToDate")
+    Object[][] data_resolveTwoToDate() {
+        return new Object[][]{
+                // merge
+                {YEAR, 2012, DAY_OF_YEAR, 32, LocalDate.of(2012, 2, 1)},
+                {YEAR_OF_ERA, 2012, DAY_OF_YEAR, 32, LocalDate.of(2012, 2, 1)},
+
+                // merge
+                {PROLEPTIC_MONTH, 2012 * 12 + (2 - 1), DAY_OF_MONTH, 25, LocalDate.of(2012, 2, 25)},
+                {PROLEPTIC_MONTH, 2012 * 12 + (2 - 1), DAY_OF_YEAR, 56, LocalDate.of(2012, 2, 25)},
+
+                // cross-check
+                {EPOCH_DAY, 32, ERA, 1, LocalDate.of(1970, 2, 2)},
+                {EPOCH_DAY, -146097 * 5L, ERA, 0, LocalDate.of(1970 - (400 * 5), 1, 1)},
+                {EPOCH_DAY, 32, YEAR, 1970, LocalDate.of(1970, 2, 2)},
+                {EPOCH_DAY, -146097 * 5L, YEAR, 1970 - (400 * 5), LocalDate.of(1970 - (400 * 5), 1, 1)},
+                {EPOCH_DAY, 32, YEAR_OF_ERA, 1970, LocalDate.of(1970, 2, 2)},
+                {EPOCH_DAY, -146097 * 5L, YEAR_OF_ERA, 1 - (1970 - (400 * 5)), LocalDate.of(1970 - (400 * 5), 1, 1)},
+                {EPOCH_DAY, 32, MONTH_OF_YEAR, 2, LocalDate.of(1970, 2, 2)},
+                {EPOCH_DAY, 32, DAY_OF_YEAR, 33, LocalDate.of(1970, 2, 2)},
+                {EPOCH_DAY, 32, DAY_OF_MONTH, 2, LocalDate.of(1970, 2, 2)},
+                {EPOCH_DAY, 32, DAY_OF_WEEK, 1, LocalDate.of(1970, 2, 2)},
+        };
+    }
+
+    @Test(dataProvider="resolveTwoToDate")
+    public void test_resolveTwoToDate(TemporalField field1, long value1,
+                                      TemporalField field2, long value2,
+                                      LocalDate expectedDate) {
+        String str = value1 + " " + value2;
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(field1).appendLiteral(' ')
+                .appendValue(field2).toFormatter();
+
+        TemporalAccessor accessor = f.parse(str);
+        assertEquals(accessor.query(TemporalQuery.localDate()), expectedDate);
+        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="resolveTwoToTime")
+    Object[][] data_resolveTwoToTime() {
+        return new Object[][]{
+                // merge
+                {HOUR_OF_DAY, 8, MINUTE_OF_HOUR, 6, LocalTime.of(8, 6)},
+
+                // merge
+                {AMPM_OF_DAY, 0, HOUR_OF_AMPM, 5, LocalTime.of(5, 0)},
+                {AMPM_OF_DAY, 1, HOUR_OF_AMPM, 5, LocalTime.of(17, 0)},
+                {AMPM_OF_DAY, 0, CLOCK_HOUR_OF_AMPM, 5, LocalTime.of(5, 0)},
+                {AMPM_OF_DAY, 1, CLOCK_HOUR_OF_AMPM, 5, LocalTime.of(17, 0)},
+                {AMPM_OF_DAY, 0, HOUR_OF_DAY, 5, LocalTime.of(5, 0)},
+                {AMPM_OF_DAY, 1, HOUR_OF_DAY, 17, LocalTime.of(17, 0)},
+                {AMPM_OF_DAY, 0, CLOCK_HOUR_OF_DAY, 5, LocalTime.of(5, 0)},
+                {AMPM_OF_DAY, 1, CLOCK_HOUR_OF_DAY, 17, LocalTime.of(17, 0)},
+
+                // merge
+                {CLOCK_HOUR_OF_DAY, 8, MINUTE_OF_HOUR, 6, LocalTime.of(8, 6)},
+                {CLOCK_HOUR_OF_DAY, 24, MINUTE_OF_HOUR, 6, LocalTime.of(0, 6)},
+                // cross-check
+                {CLOCK_HOUR_OF_DAY, 8, HOUR_OF_DAY, 8, LocalTime.of(8, 0)},
+                {CLOCK_HOUR_OF_DAY, 8, CLOCK_HOUR_OF_AMPM, 8, LocalTime.of(8, 0)},
+                {CLOCK_HOUR_OF_DAY, 20, CLOCK_HOUR_OF_AMPM, 8, LocalTime.of(20, 0)},
+                {CLOCK_HOUR_OF_DAY, 8, AMPM_OF_DAY, 0, LocalTime.of(8, 0)},
+                {CLOCK_HOUR_OF_DAY, 20, AMPM_OF_DAY, 1, LocalTime.of(20, 0)},
+
+                // merge
+                {MINUTE_OF_DAY, 650, SECOND_OF_MINUTE, 8, LocalTime.of(10, 50, 8)},
+                // cross-check
+                {MINUTE_OF_DAY, 650, HOUR_OF_DAY, 10, LocalTime.of(10, 50)},
+                {MINUTE_OF_DAY, 650, CLOCK_HOUR_OF_DAY, 10, LocalTime.of(10, 50)},
+                {MINUTE_OF_DAY, 650, CLOCK_HOUR_OF_AMPM, 10, LocalTime.of(10, 50)},
+                {MINUTE_OF_DAY, 650, AMPM_OF_DAY, 0, LocalTime.of(10, 50)},
+                {MINUTE_OF_DAY, 650, MINUTE_OF_HOUR, 50, LocalTime.of(10, 50)},
+
+                // merge
+                {SECOND_OF_DAY, 3600 + 650, MILLI_OF_SECOND, 2, LocalTime.of(1, 10, 50, 2_000_000)},
+                {SECOND_OF_DAY, 3600 + 650, MICRO_OF_SECOND, 2, LocalTime.of(1, 10, 50, 2_000)},
+                {SECOND_OF_DAY, 3600 + 650, NANO_OF_SECOND, 2, LocalTime.of(1, 10, 50, 2)},
+                // cross-check
+                {SECOND_OF_DAY, 3600 + 650, HOUR_OF_DAY, 1, LocalTime.of(1, 10, 50)},
+                {SECOND_OF_DAY, 3600 + 650, MINUTE_OF_HOUR, 10, LocalTime.of(1, 10, 50)},
+                {SECOND_OF_DAY, 3600 + 650, SECOND_OF_MINUTE, 50, LocalTime.of(1, 10, 50)},
+
+                // merge
+                {MILLI_OF_DAY, (3600 + 650) * 1000L + 2, MICRO_OF_SECOND, 2_004, LocalTime.of(1, 10, 50, 2_004_000)},
+                {MILLI_OF_DAY, (3600 + 650) * 1000L + 2, NANO_OF_SECOND, 2_000_004, LocalTime.of(1, 10, 50, 2_000_004)},
+                // cross-check
+                {MILLI_OF_DAY, (3600 + 650) * 1000L + 2, HOUR_OF_DAY, 1, LocalTime.of(1, 10, 50, 2_000_000)},
+                {MILLI_OF_DAY, (3600 + 650) * 1000L + 2, MINUTE_OF_HOUR, 10, LocalTime.of(1, 10, 50, 2_000_000)},
+                {MILLI_OF_DAY, (3600 + 650) * 1000L + 2, SECOND_OF_MINUTE, 50, LocalTime.of(1, 10, 50, 2_000_000)},
+                {MILLI_OF_DAY, (3600 + 650) * 1000L + 2, MILLI_OF_SECOND, 2, LocalTime.of(1, 10, 50, 2_000_000)},
+
+                // merge
+                {MICRO_OF_DAY, (3600 + 650) * 1000_000L + 2, NANO_OF_SECOND, 2_004, LocalTime.of(1, 10, 50, 2_004)},
+                // cross-check
+                {MICRO_OF_DAY, (3600 + 650) * 1000_000L + 2, HOUR_OF_DAY, 1, LocalTime.of(1, 10, 50, 2_000)},
+                {MICRO_OF_DAY, (3600 + 650) * 1000_000L + 2, MINUTE_OF_HOUR, 10, LocalTime.of(1, 10, 50, 2_000)},
+                {MICRO_OF_DAY, (3600 + 650) * 1000_000L + 2, SECOND_OF_MINUTE, 50, LocalTime.of(1, 10, 50, 2_000)},
+                {MICRO_OF_DAY, (3600 + 650) * 1000_000L + 2, MILLI_OF_SECOND, 0, LocalTime.of(1, 10, 50, 2_000)},
+                {MICRO_OF_DAY, (3600 + 650) * 1000_000L + 2, MICRO_OF_SECOND, 2, LocalTime.of(1, 10, 50, 2_000)},
+
+                // cross-check
+                {NANO_OF_DAY, (3600 + 650) * 1000_000_000L + 2, HOUR_OF_DAY, 1, LocalTime.of(1, 10, 50, 2)},
+                {NANO_OF_DAY, (3600 + 650) * 1000_000_000L + 2, MINUTE_OF_HOUR, 10, LocalTime.of(1, 10, 50, 2)},
+                {NANO_OF_DAY, (3600 + 650) * 1000_000_000L + 2, SECOND_OF_MINUTE, 50, LocalTime.of(1, 10, 50, 2)},
+                {NANO_OF_DAY, (3600 + 650) * 1000_000_000L + 2, MILLI_OF_SECOND, 0, LocalTime.of(1, 10, 50, 2)},
+                {NANO_OF_DAY, (3600 + 650) * 1000_000_000L + 2, MICRO_OF_SECOND, 0, LocalTime.of(1, 10, 50, 2)},
+                {NANO_OF_DAY, (3600 + 650) * 1000_000_000L + 2, NANO_OF_SECOND, 2, LocalTime.of(1, 10, 50, 2)},
+        };
+    }
+
+    @Test(dataProvider="resolveTwoToTime")
+    public void test_resolveTwoToTime(TemporalField field1, long value1,
+                                TemporalField field2, long value2,
+                                LocalTime expectedTime) {
+        String str = value1 + " " + value2;
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(field1).appendLiteral(' ')
+                .appendValue(field2).toFormatter();
+
+        TemporalAccessor accessor = f.parse(str);
+        assertEquals(accessor.query(TemporalQuery.localDate()), null);
+        assertEquals(accessor.query(TemporalQuery.localTime()), expectedTime);
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="resolveThreeToDate")
+    Object[][] data_resolveThreeToDate() {
+        return new Object[][]{
+                // merge
+                {YEAR, 2012, MONTH_OF_YEAR, 2, DAY_OF_MONTH, 1, LocalDate.of(2012, 2, 1)},
+                {YEAR, 2012, ALIGNED_WEEK_OF_YEAR, 5, ALIGNED_DAY_OF_WEEK_IN_YEAR, 4, LocalDate.of(2012, 2, 1)},
+                {YEAR, 2012, ALIGNED_WEEK_OF_YEAR, 5, DAY_OF_WEEK, 3, LocalDate.of(2012, 2, 1)},
+
+                // cross-check
+                {YEAR, 2012, DAY_OF_YEAR, 32, DAY_OF_MONTH, 1, LocalDate.of(2012, 2, 1)},
+                {YEAR_OF_ERA, 2012, DAY_OF_YEAR, 32, DAY_OF_MONTH, 1, LocalDate.of(2012, 2, 1)},
+                {YEAR, 2012, DAY_OF_YEAR, 32, DAY_OF_WEEK, 3, LocalDate.of(2012, 2, 1)},
+                {PROLEPTIC_MONTH, 2012 * 12 + (2 - 1), DAY_OF_MONTH, 25, DAY_OF_WEEK, 6, LocalDate.of(2012, 2, 25)},
+        };
+    }
+
+    @Test(dataProvider="resolveThreeToDate")
+    public void test_resolveThreeToDate(TemporalField field1, long value1,
+                                      TemporalField field2, long value2,
+                                      TemporalField field3, long value3,
+                                      LocalDate expectedDate) {
+        String str = value1 + " " + value2 + " " + value3;
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(field1).appendLiteral(' ')
+                .appendValue(field2).appendLiteral(' ')
+                .appendValue(field3).toFormatter();
+
+        TemporalAccessor accessor = f.parse(str);
+        assertEquals(accessor.query(TemporalQuery.localDate()), expectedDate);
+        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="resolveFourToDate")
+    Object[][] data_resolveFourToDate() {
+        return new Object[][]{
+                // merge
+                {YEAR, 2012, MONTH_OF_YEAR, 2, ALIGNED_WEEK_OF_MONTH, 1, ALIGNED_DAY_OF_WEEK_IN_MONTH, 1, LocalDate.of(2012, 2, 1)},
+                {YEAR, 2012, MONTH_OF_YEAR, 2, ALIGNED_WEEK_OF_MONTH, 1, DAY_OF_WEEK, 3, LocalDate.of(2012, 2, 1)},
+
+                // cross-check
+                {YEAR, 2012, MONTH_OF_YEAR, 2, DAY_OF_MONTH, 1, DAY_OF_WEEK, 3, LocalDate.of(2012, 2, 1)},
+                {YEAR, 2012, ALIGNED_WEEK_OF_YEAR, 5, ALIGNED_DAY_OF_WEEK_IN_YEAR, 4, DAY_OF_WEEK, 3, LocalDate.of(2012, 2, 1)},
+                {YEAR, 2012, ALIGNED_WEEK_OF_YEAR, 5, DAY_OF_WEEK, 3, DAY_OF_MONTH, 1, LocalDate.of(2012, 2, 1)},
+        };
+    }
+
+    @Test(dataProvider="resolveFourToDate")
+    public void test_resolveFourToDate(TemporalField field1, long value1,
+                                        TemporalField field2, long value2,
+                                        TemporalField field3, long value3,
+                                        TemporalField field4, long value4,
+                                        LocalDate expectedDate) {
+        String str = value1 + " " + value2 + " " + value3 + " " + value4;
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(field1).appendLiteral(' ')
+                .appendValue(field2).appendLiteral(' ')
+                .appendValue(field3).appendLiteral(' ')
+                .appendValue(field4).toFormatter();
+
+        TemporalAccessor accessor = f.parse(str);
+        assertEquals(accessor.query(TemporalQuery.localDate()), expectedDate);
+        assertEquals(accessor.query(TemporalQuery.localTime()), null);
+    }
+
+}
--- a/test/java/time/tck/java/time/format/TCKDateTimeTextPrinting.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/format/TCKDateTimeTextPrinting.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,21 +59,21 @@
  */
 package tck.java.time.format;
 
-import java.time.format.*;
-
 import static java.time.temporal.ChronoField.DAY_OF_MONTH;
 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
 import static org.testng.Assert.assertEquals;
 
+import java.time.LocalDateTime;
+import java.time.Month;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.TextStyle;
+import java.time.temporal.TemporalField;
 import java.util.HashMap;
 import java.util.Locale;
 import java.util.Map;
 
-import java.time.LocalDateTime;
-import java.time.Month;
-import java.time.temporal.TemporalField;
-
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -86,7 +86,7 @@
 
     private DateTimeFormatterBuilder builder;
 
-    @BeforeMethod(groups={"tck"})
+    @BeforeMethod
     public void setUp() {
         builder = new DateTimeFormatterBuilder();
     }
@@ -135,7 +135,7 @@
        };
     }
 
-    @Test(dataProvider="printText", groups={"tck"})
+    @Test(dataProvider="printText")
     public void test_appendText2arg_format(TemporalField field, TextStyle style, int value, String expected) throws Exception {
         DateTimeFormatter f = builder.appendText(field, style).toFormatter(Locale.ENGLISH);
         LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0);
@@ -144,7 +144,7 @@
         assertEquals(text, expected);
     }
 
-    @Test(dataProvider="printText", groups={"tck"})
+    @Test(dataProvider="printText")
     public void test_appendText1arg_format(TemporalField field, TextStyle style, int value, String expected) throws Exception {
         if (style == TextStyle.FULL) {
             DateTimeFormatter f = builder.appendText(field).toFormatter(Locale.ENGLISH);
@@ -156,7 +156,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_print_appendText2arg_french_long() throws Exception {
         DateTimeFormatter f = builder.appendText(MONTH_OF_YEAR, TextStyle.FULL).toFormatter(Locale.FRENCH);
         LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0);
@@ -164,7 +164,7 @@
         assertEquals(text, "janvier");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_print_appendText2arg_french_short() throws Exception {
         DateTimeFormatter f = builder.appendText(MONTH_OF_YEAR, TextStyle.SHORT).toFormatter(Locale.FRENCH);
         LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0);
@@ -173,7 +173,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_appendTextMap() throws Exception {
         Map<Long, String> map = new HashMap<Long, String>();
         map.put(1L, "JNY");
@@ -196,7 +196,7 @@
         }
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_appendTextMap_DOM() throws Exception {
         Map<Long, String> map = new HashMap<Long, String>();
         map.put(1L, "1st");
@@ -210,7 +210,7 @@
         assertEquals(f.format(dt.withDayOfMonth(3)), "3rd");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_appendTextMapIncomplete() throws Exception {
         Map<Long, String> map = new HashMap<Long, String>();
         map.put(1L, "JNY");
--- a/test/java/time/tck/java/time/format/TCKLocalizedFieldParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/format/TCKLocalizedFieldParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,8 +59,7 @@
  */
 package tck.java.time.format;
 
-import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
-import static java.time.temporal.ChronoField.YEAR;
+import static java.time.temporal.ChronoField.YEAR_OF_ERA;
 import static org.testng.Assert.assertEquals;
 
 import java.text.ParsePosition;
@@ -78,7 +77,7 @@
 /**
  * Test TCKLocalizedFieldParser.
  */
-@Test(groups={"tck"})
+@Test
 public class TCKLocalizedFieldParser extends AbstractTestPrinterParser {
 
     //-----------------------------------------------------------------------
@@ -86,13 +85,16 @@
     Object[][] provider_fieldPatterns() {
         return new Object[][] {
             {"e",  "6", 0, 1, 6},
-            {"w",  "3", 0, 1, 3},
-            {"W",  "29", 0, 2, 29},
-            {"WW", "29", 0, 2, 29},
+            {"W",  "3", 0, 1, 3},
+            {"w",  "29", 0, 2, 29},
+            {"ww", "29", 0, 2, 29},
+            {"Y", "2013", 0, 4, 2013},
+            {"YY", "13", 0, 2, 2013},
+            {"YYYY", "2013", 0, 4, 2013},
         };
     }
 
-    @Test(dataProvider="FieldPatterns",groups={"tck"})
+    @Test(dataProvider="FieldPatterns")
     public void test_parse_textField(String pattern, String text, int pos, int expectedPos, long expectedValue) {
         WeekFields weekDef = WeekFields.of(locale);
         TemporalField field = null;
@@ -101,10 +103,13 @@
                 field = weekDef.dayOfWeek();
                 break;
             case 'w':
+                field = weekDef.weekOfWeekBasedYear();
+                break;
+            case 'W':
                 field = weekDef.weekOfMonth();
                 break;
-            case 'W':
-                field = weekDef.weekOfYear();
+            case 'Y':
+                field = weekDef.weekBasedYear();
                 break;
             default:
                 throw new IllegalStateException("bad format letter from pattern");
@@ -123,27 +128,24 @@
         }
     }
 
-   //-----------------------------------------------------------------------
-    @DataProvider(name="LocalDatePatterns")
+    //-----------------------------------------------------------------------
+    @DataProvider(name="LocalWeekMonthYearPatterns")
     Object[][] provider_patternLocalDate() {
         return new Object[][] {
-            {"e w M y",  "1 1 1 2012", 0, 10, LocalDate.of(2012, 1, 1)},
-            {"e w M y",  "1 2 1 2012", 0, 10, LocalDate.of(2012, 1, 8)},
-            {"e w M y",  "2 2 1 2012", 0, 10, LocalDate.of(2012, 1, 9)},
-            {"e w M y",  "3 2 1 2012", 0, 10, LocalDate.of(2012, 1, 10)},
-            {"e w M y",  "1 3 1 2012", 0, 10, LocalDate.of(2012, 1, 15)},
-            {"e w M y",  "2 3 1 2012", 0, 10, LocalDate.of(2012, 1, 16)},
-            {"e w M y",  "6 2 1 2012", 0, 10, LocalDate.of(2012, 1, 13)},
-            {"e w M y",  "6 2 7 2012", 0, 10, LocalDate.of(2012, 7, 13)},
-            {"e W y",  "6 29 2012", 0, 9, LocalDate.of(2012, 7, 20)},
-            {"'Date: 'y-MM', day-of-week: 'e', week-of-month: 'w",
+            {"e W M y",  "1 1 1 2012", 0, 10, LocalDate.of(2012, 1, 1)},
+            {"e W M y",  "1 2 1 2012", 0, 10, LocalDate.of(2012, 1, 8)},
+            {"e W M y",  "2 2 1 2012", 0, 10, LocalDate.of(2012, 1, 9)},
+            {"e W M y",  "3 2 1 2012", 0, 10, LocalDate.of(2012, 1, 10)},
+            {"e W M y",  "1 3 1 2012", 0, 10, LocalDate.of(2012, 1, 15)},
+            {"e W M y",  "2 3 1 2012", 0, 10, LocalDate.of(2012, 1, 16)},
+            {"e W M y",  "6 2 1 2012", 0, 10, LocalDate.of(2012, 1, 13)},
+            {"e W M y",  "6 2 7 2012", 0, 10, LocalDate.of(2012, 7, 13)},
+            {"'Date: 'y-MM', day-of-week: 'e', week-of-month: 'W",
                 "Date: 2012-07, day-of-week: 6, week-of-month: 3", 0, 47, LocalDate.of(2012, 7, 20)},
-            {"'Date: 'y', day-of-week: 'e', week-of-year: 'W",
-                "Date: 2012, day-of-week: 6, week-of-year: 29", 0, 44, LocalDate.of(2012, 7, 20)},
         };
     }
 
-   @Test(dataProvider="LocalDatePatterns",groups={"tck"})
+   @Test(dataProvider="LocalWeekMonthYearPatterns")
     public void test_parse_textLocalDate(String pattern, String text, int pos, int expectedPos, LocalDate expectedValue) {
         ParsePosition ppos = new ParsePosition(pos);
         DateTimeFormatterBuilder b = new DateTimeFormatterBuilder().appendPattern(pattern);
@@ -153,7 +155,7 @@
             assertEquals(ppos.getErrorIndex(), expectedPos);
         } else {
             assertEquals(ppos.getIndex(), expectedPos, "Incorrect ending parse position");
-            assertEquals(parsed.isSupported(YEAR), true);
+            assertEquals(parsed.isSupported(YEAR_OF_ERA), true);
             assertEquals(parsed.isSupported(WeekFields.of(locale).dayOfWeek()), true);
             assertEquals(parsed.isSupported(WeekFields.of(locale).weekOfMonth()) ||
                     parsed.isSupported(WeekFields.of(locale).weekOfYear()), true);
@@ -163,4 +165,41 @@
         }
     }
 
+    //-----------------------------------------------------------------------
+    @DataProvider(name="LocalWeekBasedYearPatterns")
+    Object[][] provider_patternLocalWeekBasedYearDate() {
+        return new Object[][] {
+            //{"w Y",  "29 2012", 0, 7, LocalDate.of(2012, 7, 20)},  // Default lenient dayOfWeek not supported
+            {"e w Y",  "6 29 2012", 0, 9, LocalDate.of(2012, 7, 20)},
+            {"'Date: 'Y', day-of-week: 'e', week-of-year: 'w",
+                "Date: 2012, day-of-week: 6, week-of-year: 29", 0, 44, LocalDate.of(2012, 7, 20)},
+            {"Y-w-e",  "2008-01-1", 0, 9, LocalDate.of(2007, 12, 30)},
+            {"Y-w-e",  "2008-52-1", 0, 9, LocalDate.of(2008, 12, 21)},
+            {"Y-w-e",  "2008-52-7", 0, 9, LocalDate.of(2008, 12, 27)},
+            {"Y-w-e",  "2009-01-01", 0, 10, LocalDate.of(2008, 12, 28)},
+            {"Y-w-e",  "2009-01-04", 0, 10, LocalDate.of(2008, 12, 31)},
+            {"Y-w-e",  "2009-01-05", 0, 10, LocalDate.of(2009, 1, 1)},
+       };
+    }
+
+   @Test(dataProvider="LocalWeekBasedYearPatterns")
+    public void test_parse_WeekBasedYear(String pattern, String text, int pos, int expectedPos, LocalDate expectedValue) {
+        ParsePosition ppos = new ParsePosition(pos);
+        DateTimeFormatterBuilder b = new DateTimeFormatterBuilder().appendPattern(pattern);
+        DateTimeFormatter dtf = b.toFormatter(locale);
+        TemporalAccessor parsed = dtf.parseUnresolved(text, ppos);
+        if (ppos.getErrorIndex() != -1) {
+            assertEquals(ppos.getErrorIndex(), expectedPos);
+        } else {
+            WeekFields weekDef = WeekFields.of(locale);
+            assertEquals(ppos.getIndex(), expectedPos, "Incorrect ending parse position");
+            assertEquals(parsed.isSupported(weekDef.dayOfWeek()), pattern.indexOf('e') >= 0);
+            assertEquals(parsed.isSupported(weekDef.weekOfWeekBasedYear()), pattern.indexOf('w') >= 0);
+            assertEquals(parsed.isSupported(weekDef.weekBasedYear()), pattern.indexOf('Y') >= 0);
+            // ensure combination resolves into a date
+            LocalDate result = LocalDate.parse(text, dtf);
+            assertEquals(result, expectedValue, "LocalDate incorrect for " + pattern + ", weekDef: " + weekDef);
+        }
+    }
+
 }
--- a/test/java/time/tck/java/time/format/TCKLocalizedFieldPrinter.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/format/TCKLocalizedFieldPrinter.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,22 +59,22 @@
  */
 package tck.java.time.format;
 
-import java.time.format.*;
-
 import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.fail;
 
 import java.time.LocalDate;
-
-import test.java.time.format.AbstractTestPrinterParser;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.temporal.WeekFields;
 
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
+import test.java.time.format.AbstractTestPrinterParser;
+
 /**
  * Test LocalizedFieldPrinterParser.
  */
-@Test(groups={"tck"})
+@Test
 public class TCKLocalizedFieldPrinter extends AbstractTestPrinterParser {
 
         //-----------------------------------------------------------------------
@@ -82,17 +82,17 @@
     Object[][] provider_pad() {
         return new Object[][] {
             {"e",  "6"},
-            {"w",  "3"},
-            {"W",  "29"},
-            {"WW", "29"},
-            {"'Date: 'y-MM-d', week-of-month: 'w', week-of-year: 'W",
+            {"W",  "3"},
+            {"w",  "29"},
+            {"ww", "29"},
+            {"'Date: 'y-MM-d', week-of-month: 'W', week-of-year: 'w",
                 "Date: 2012-07-20, week-of-month: 3, week-of-year: 29"},
 
         };
     }
 
     //-----------------------------------------------------------------------
-    @Test(dataProvider="Patterns",groups={"tck"})
+    @Test(dataProvider="Patterns")
     public void test_localizedDayOfWeek(String pattern, String expected) {
         DateTimeFormatterBuilder b
                 = new DateTimeFormatterBuilder().appendPattern(pattern);
@@ -102,4 +102,28 @@
         assertEquals(result, expected, "Wrong output for pattern '" + pattern + "'.");
     }
 
+    //-----------------------------------------------------------------------
+    @DataProvider(name="LocalWeekBasedYearPatterns")
+    Object[][] provider_patternLocalWeekBasedYearDate() {
+        return new Object[][] {
+            {"e w Y",  "6 29 2012", LocalDate.of(2012, 7, 20)},
+            {"'Date: 'Y', day-of-week: 'e', week-of-year: 'w",
+                "Date: 2012, day-of-week: 6, week-of-year: 29", LocalDate.of(2012, 7, 20)},
+            {"Y-ww-ee", "2008-01-01", LocalDate.of(2007, 12, 30)},
+            {"Y-w-e",   "2008-52-1", LocalDate.of(2008, 12, 21)},
+            {"Y-w-e",   "2008-52-7", LocalDate.of(2008, 12, 27)},
+            {"Y-ww-e",  "2009-01-1", LocalDate.of(2008, 12, 28)},
+            {"Y-w-e",   "2009-1-4",  LocalDate.of(2008, 12, 31)},
+            {"Y-w-e",   "2009-1-5", LocalDate.of(2009, 1, 1)},
+            {"YYYYYYYYY-w-e",   "000002009-1-5", LocalDate.of(2009, 1, 1)},
+       };
+    }
+
+    @Test(dataProvider = "LocalWeekBasedYearPatterns")
+    public void test_print_WeekBasedYear(String pattern, String expectedText, LocalDate date) {
+        DateTimeFormatter dtf = DateTimeFormatter.ofPattern(pattern, locale);
+        String result = dtf.format(date);
+        WeekFields weekDef = WeekFields.of(locale);
+        assertEquals(result, expectedText, "Incorrect formatting for " + pattern + ", weekDef: " + weekDef);
+    }
 }
--- a/test/java/time/tck/java/time/format/TCKLocalizedPrinterParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/format/TCKLocalizedPrinterParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -63,7 +63,6 @@
 
 import java.text.DateFormat;
 import java.text.ParsePosition;
-import java.text.SimpleDateFormat;
 import java.time.LocalDate;
 import java.time.LocalTime;
 import java.time.format.DateTimeFormatter;
--- a/test/java/time/tck/java/time/format/TCKOffsetPrinterParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/format/TCKOffsetPrinterParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -62,11 +62,13 @@
 import static org.testng.Assert.assertEquals;
 
 import java.time.LocalDateTime;
+import java.time.OffsetDateTime;
 import java.time.ZoneId;
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.TextStyle;
 
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
@@ -200,6 +202,34 @@
         };
     }
 
+    @DataProvider(name="print_localized")
+    Object[][] data_print_localized() {
+        return new Object[][] {
+                {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_UTC, "GMT"},
+                {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_P0100, "GMT+01:00"},
+                {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_P0123, "GMT+01:23"},
+                {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_P0023, "GMT+00:23"},
+                {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_P012345, "GMT+01:23:45"},
+                {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_M000045, "GMT-00:00:45"},
+                {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_M0100, "GMT-01:00"},
+                {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_M0123, "GMT-01:23"},
+                {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_M0023, "GMT-00:23"},
+                {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_M012345, "GMT-01:23:45"},
+                {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_M000045, "GMT-00:00:45"},
+                {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_UTC, "GMT"},
+                {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_P0100, "GMT+1"},
+                {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_P0123, "GMT+1:23"},
+                {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_P0023, "GMT+0:23"},
+                {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_P012345, "GMT+1:23:45"},
+                {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_M000045, "GMT-0:00:45"},
+                {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_M0100, "GMT-1"},
+                {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_M0123, "GMT-1:23"},
+                {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_M0023, "GMT-0:23"},
+                {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_M012345, "GMT-1:23:45"},
+                {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_M000045, "GMT-0:00:45"},
+        };
+    }
+
     @Test(dataProvider="print")
     public void test_print(String offsetPattern, String noOffset, LocalDateTime ldt, ZoneId zone, String expected) {
         ZonedDateTime zdt = ldt.atZone(zone);
@@ -275,6 +305,45 @@
             DateTimeFormatter f3 = new DateTimeFormatterBuilder().appendPattern("ZZZ").toFormatter();
             String output3 = f3.format(zdt);
             assertEquals(output3, (expected.equals("Z") ? "+0000" : expected));
+        } else if (offsetPattern.equals("+HH:MM:ss") && noOffset.equals("Z")) {
+            ZonedDateTime zdt = ldt.atZone(zone);
+            DateTimeFormatter f = new DateTimeFormatterBuilder().appendPattern("ZZZZZ").toFormatter();
+            String output = f.format(zdt);
+            assertEquals(output, expected);
+        }
+    }
+
+    @Test(dataProvider="print_localized")
+    public void test_print_localized(TextStyle style, LocalDateTime ldt, ZoneOffset offset, String expected) {
+        OffsetDateTime odt = OffsetDateTime.of(ldt, offset);
+        ZonedDateTime zdt = ldt.atZone(offset);
+
+        DateTimeFormatter f = new DateTimeFormatterBuilder().appendLocalizedOffset(style)
+                                                            .toFormatter();
+        assertEquals(f.format(odt), expected);
+        assertEquals(f.format(zdt), expected);
+        assertEquals(f.parse(expected, ZoneOffset::from), offset);
+
+        if (style == TextStyle.FULL) {
+            f = new DateTimeFormatterBuilder().appendPattern("ZZZZ")
+                                              .toFormatter();
+            assertEquals(f.format(odt), expected);
+            assertEquals(f.format(zdt), expected);
+            assertEquals(f.parse(expected, ZoneOffset::from), offset);
+
+            f = new DateTimeFormatterBuilder().appendPattern("OOOO")
+                                              .toFormatter();
+            assertEquals(f.format(odt), expected);
+            assertEquals(f.format(zdt), expected);
+            assertEquals(f.parse(expected, ZoneOffset::from), offset);
+        }
+
+        if (style == TextStyle.SHORT) {
+            f = new DateTimeFormatterBuilder().appendPattern("O")
+                                              .toFormatter();
+            assertEquals(f.format(odt), expected);
+            assertEquals(f.format(zdt), expected);
+            assertEquals(f.parse(expected, ZoneOffset::from), offset);
         }
     }
 
@@ -290,8 +359,43 @@
     }
 
     @Test(expectedExceptions=IllegalArgumentException.class)
-    public void test_print_pattern_Z4rejected() {
-        builder.appendPattern("ZZZZ");
+    public void test_print_pattern_Z6rejected() {
+        builder.appendPattern("ZZZZZZ");
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_print_pattern_O2rejected() {
+        builder.appendPattern("OO");
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_print_pattern_O3rejected() {
+        builder.appendPattern("OOO");
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_print_pattern_O5rejected() {
+        builder.appendPattern("OOOOO");
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_print_pattern_localzed_full_standline() {
+        builder.appendLocalizedOffset(TextStyle.FULL_STANDALONE);
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_print_pattern_localzed_short_standalone() {
+        builder.appendLocalizedOffset(TextStyle.SHORT_STANDALONE);
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_print_pattern_localzed_narrow() {
+        builder.appendLocalizedOffset(TextStyle.NARROW);
+    }
+
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_print_pattern_localzed_narrow_standalone() {
+        builder.appendLocalizedOffset(TextStyle.NARROW_STANDALONE);
     }
 
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/format/TCKTextStyle.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2013, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.format;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.time.format.TextStyle;
+
+import org.testng.annotations.Test;
+
+/**
+ * Test DateTimeFormatSymbols.
+ */
+@Test
+public class TCKTextStyle {
+
+    @Test
+    public void test_standaloneNormal() {
+        assertEquals(TextStyle.FULL, TextStyle.FULL_STANDALONE.asNormal());
+        assertEquals(TextStyle.SHORT, TextStyle.SHORT.asNormal());
+        assertEquals(TextStyle.NARROW, TextStyle.NARROW.asNormal());
+
+        assertEquals(TextStyle.FULL_STANDALONE, TextStyle.FULL_STANDALONE.asStandalone());
+        assertEquals(TextStyle.SHORT_STANDALONE, TextStyle.SHORT.asStandalone());
+        assertEquals(TextStyle.NARROW_STANDALONE, TextStyle.NARROW.asStandalone());
+
+        assertTrue(TextStyle.FULL_STANDALONE.isStandalone());
+        assertTrue(TextStyle.SHORT_STANDALONE.isStandalone());
+        assertTrue(TextStyle.NARROW_STANDALONE.isStandalone());
+
+        assertTrue(!TextStyle.FULL.isStandalone());
+        assertTrue(!TextStyle.SHORT.isStandalone());
+        assertTrue(!TextStyle.NARROW.isStandalone());
+    }
+
+}
--- a/test/java/time/tck/java/time/format/TCKZoneIdPrinterParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/format/TCKZoneIdPrinterParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -67,8 +67,8 @@
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
 import java.time.format.DateTimeFormatterBuilder;
-import java.time.temporal.Queries;
 import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalQuery;
 import java.util.Locale;
 
 import org.testng.annotations.BeforeMethod;
@@ -209,9 +209,9 @@
         assertEquals(pos.getErrorIndex(), expectedErrorIndex);
         assertEquals(pos.getIndex(), expectedIndex);
         if (expected != null) {
-            assertEquals(parsed.query(Queries.zoneId()), expected);
-            assertEquals(parsed.query(Queries.offset()), null);
-            assertEquals(parsed.query(Queries.zone()), expected);
+            assertEquals(parsed.query(TemporalQuery.zoneId()), expected);
+            assertEquals(parsed.query(TemporalQuery.offset()), null);
+            assertEquals(parsed.query(TemporalQuery.zone()), expected);
         } else {
             assertEquals(parsed, null);
         }
@@ -225,9 +225,9 @@
         assertEquals(pos.getErrorIndex(), expectedErrorIndex >= 0  ? expectedErrorIndex + 3 : expectedErrorIndex);
         assertEquals(pos.getIndex(), expectedIndex + 3);
         if (expected != null) {
-            assertEquals(parsed.query(Queries.zoneId()), expected);
-            assertEquals(parsed.query(Queries.offset()), null);
-            assertEquals(parsed.query(Queries.zone()), expected);
+            assertEquals(parsed.query(TemporalQuery.zoneId()), expected);
+            assertEquals(parsed.query(TemporalQuery.offset()), null);
+            assertEquals(parsed.query(TemporalQuery.zone()), expected);
         } else {
             assertEquals(parsed, null);
         }
@@ -240,9 +240,9 @@
         assertEquals(pos.getErrorIndex(), expectedErrorIndex);
         assertEquals(pos.getIndex(), expectedIndex);
         if (expected != null) {
-            assertEquals(parsed.query(Queries.zoneId()), expected);
-            assertEquals(parsed.query(Queries.offset()), null);
-            assertEquals(parsed.query(Queries.zone()), expected);
+            assertEquals(parsed.query(TemporalQuery.zoneId()), expected);
+            assertEquals(parsed.query(TemporalQuery.offset()), null);
+            assertEquals(parsed.query(TemporalQuery.zone()), expected);
         } else {
             assertEquals(parsed, null);
         }
@@ -261,9 +261,9 @@
             assertEquals(pos.getIndex(), expectedIndex);
             assertEquals(pos.getErrorIndex(), expectedErrorIndex);
             if (expected != null) {
-                assertEquals(parsed.query(Queries.zoneId()), expected);
-                assertEquals(parsed.query(Queries.offset()), null);
-                assertEquals(parsed.query(Queries.zone()), expected);
+                assertEquals(parsed.query(TemporalQuery.zoneId()), expected);
+                assertEquals(parsed.query(TemporalQuery.offset()), null);
+                assertEquals(parsed.query(TemporalQuery.zone()), expected);
             } else {
                 assertEquals(parsed, null);
             }
@@ -277,9 +277,9 @@
         assertEquals(pos.getErrorIndex(), expectedErrorIndex);
         assertEquals(pos.getIndex(), expectedIndex);
         if (expected != null) {
-            assertEquals(parsed.query(Queries.zoneId()), expected);
-            assertEquals(parsed.query(Queries.offset()), null);
-            assertEquals(parsed.query(Queries.zone()), expected);
+            assertEquals(parsed.query(TemporalQuery.zoneId()), expected);
+            assertEquals(parsed.query(TemporalQuery.offset()), null);
+            assertEquals(parsed.query(TemporalQuery.zone()), expected);
         } else {
             assertEquals(parsed, null);
         }
--- a/test/java/time/tck/java/time/temporal/TCKDateTimeAdjusters.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,601 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package tck.java.time.temporal;
-
-import java.time.temporal.*;
-
-import static java.time.DayOfWeek.MONDAY;
-import static java.time.DayOfWeek.TUESDAY;
-import static java.time.Month.DECEMBER;
-import static java.time.Month.JANUARY;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertSame;
-import static org.testng.Assert.assertTrue;
-
-import java.time.DayOfWeek;
-import java.time.LocalDate;
-import java.time.Month;
-
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Test Adjusters.
- */
-@Test
-public class TCKDateTimeAdjusters {
-
-    //-----------------------------------------------------------------------
-    // firstDayOfMonth()
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void factory_firstDayOfMonth() {
-        assertNotNull(Adjusters.firstDayOfMonth());
-    }
-
-    @Test(groups={"tck"})
-    public void test_firstDayOfMonth_nonLeap() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(false); i++) {
-                LocalDate date = date(2007, month, i);
-                LocalDate test = (LocalDate) Adjusters.firstDayOfMonth().adjustInto(date);
-                assertEquals(test.getYear(), 2007);
-                assertEquals(test.getMonth(), month);
-                assertEquals(test.getDayOfMonth(), 1);
-            }
-        }
-    }
-
-    @Test(groups={"tck"})
-    public void test_firstDayOfMonth_leap() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(true); i++) {
-                LocalDate date = date(2008, month, i);
-                LocalDate test = (LocalDate) Adjusters.firstDayOfMonth().adjustInto(date);
-                assertEquals(test.getYear(), 2008);
-                assertEquals(test.getMonth(), month);
-                assertEquals(test.getDayOfMonth(), 1);
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // lastDayOfMonth()
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void factory_lastDayOfMonth() {
-        assertNotNull(Adjusters.lastDayOfMonth());
-    }
-
-    @Test(groups={"tck"})
-    public void test_lastDayOfMonth_nonLeap() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(false); i++) {
-                LocalDate date = date(2007, month, i);
-                LocalDate test = (LocalDate) Adjusters.lastDayOfMonth().adjustInto(date);
-                assertEquals(test.getYear(), 2007);
-                assertEquals(test.getMonth(), month);
-                assertEquals(test.getDayOfMonth(), month.length(false));
-            }
-        }
-    }
-
-    @Test(groups={"tck"})
-    public void test_lastDayOfMonth_leap() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(true); i++) {
-                LocalDate date = date(2008, month, i);
-                LocalDate test = (LocalDate) Adjusters.lastDayOfMonth().adjustInto(date);
-                assertEquals(test.getYear(), 2008);
-                assertEquals(test.getMonth(), month);
-                assertEquals(test.getDayOfMonth(), month.length(true));
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // firstDayOfNextMonth()
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void factory_firstDayOfNextMonth() {
-        assertNotNull(Adjusters.firstDayOfNextMonth());
-    }
-
-    @Test(groups={"tck"})
-    public void test_firstDayOfNextMonth_nonLeap() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(false); i++) {
-                LocalDate date = date(2007, month, i);
-                LocalDate test = (LocalDate) Adjusters.firstDayOfNextMonth().adjustInto(date);
-                assertEquals(test.getYear(), month == DECEMBER ? 2008 : 2007);
-                assertEquals(test.getMonth(), month.plus(1));
-                assertEquals(test.getDayOfMonth(), 1);
-            }
-        }
-    }
-
-    @Test(groups={"tck"})
-    public void test_firstDayOfNextMonth_leap() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(true); i++) {
-                LocalDate date = date(2008, month, i);
-                LocalDate test = (LocalDate) Adjusters.firstDayOfNextMonth().adjustInto(date);
-                assertEquals(test.getYear(), month == DECEMBER ? 2009 : 2008);
-                assertEquals(test.getMonth(), month.plus(1));
-                assertEquals(test.getDayOfMonth(), 1);
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // firstDayOfYear()
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void factory_firstDayOfYear() {
-        assertNotNull(Adjusters.firstDayOfYear());
-    }
-
-    @Test(groups={"tck"})
-    public void test_firstDayOfYear_nonLeap() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(false); i++) {
-                LocalDate date = date(2007, month, i);
-                LocalDate test = (LocalDate) Adjusters.firstDayOfYear().adjustInto(date);
-                assertEquals(test.getYear(), 2007);
-                assertEquals(test.getMonth(), Month.JANUARY);
-                assertEquals(test.getDayOfMonth(), 1);
-            }
-        }
-    }
-
-    @Test(groups={"tck"})
-    public void test_firstDayOfYear_leap() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(true); i++) {
-                LocalDate date = date(2008, month, i);
-                LocalDate test = (LocalDate) Adjusters.firstDayOfYear().adjustInto(date);
-                assertEquals(test.getYear(), 2008);
-                assertEquals(test.getMonth(), Month.JANUARY);
-                assertEquals(test.getDayOfMonth(), 1);
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // lastDayOfYear()
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void factory_lastDayOfYear() {
-        assertNotNull(Adjusters.lastDayOfYear());
-    }
-
-    @Test(groups={"tck"})
-    public void test_lastDayOfYear_nonLeap() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(false); i++) {
-                LocalDate date = date(2007, month, i);
-                LocalDate test = (LocalDate) Adjusters.lastDayOfYear().adjustInto(date);
-                assertEquals(test.getYear(), 2007);
-                assertEquals(test.getMonth(), Month.DECEMBER);
-                assertEquals(test.getDayOfMonth(), 31);
-            }
-        }
-    }
-
-    @Test(groups={"tck"})
-    public void test_lastDayOfYear_leap() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(true); i++) {
-                LocalDate date = date(2008, month, i);
-                LocalDate test = (LocalDate) Adjusters.lastDayOfYear().adjustInto(date);
-                assertEquals(test.getYear(), 2008);
-                assertEquals(test.getMonth(), Month.DECEMBER);
-                assertEquals(test.getDayOfMonth(), 31);
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // firstDayOfNextYear()
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void factory_firstDayOfNextYear() {
-        assertNotNull(Adjusters.firstDayOfNextYear());
-    }
-
-    @Test(groups={"tck"})
-    public void test_firstDayOfNextYear_nonLeap() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(false); i++) {
-                LocalDate date = date(2007, month, i);
-                LocalDate test = (LocalDate) Adjusters.firstDayOfNextYear().adjustInto(date);
-                assertEquals(test.getYear(), 2008);
-                assertEquals(test.getMonth(), JANUARY);
-                assertEquals(test.getDayOfMonth(), 1);
-            }
-        }
-    }
-
-    @Test(groups={"tck"})
-    public void test_firstDayOfNextYear_leap() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(true); i++) {
-                LocalDate date = date(2008, month, i);
-                LocalDate test = (LocalDate) Adjusters.firstDayOfNextYear().adjustInto(date);
-                assertEquals(test.getYear(), 2009);
-                assertEquals(test.getMonth(), JANUARY);
-                assertEquals(test.getDayOfMonth(), 1);
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // dayOfWeekInMonth()
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void factory_dayOfWeekInMonth() {
-        assertNotNull(Adjusters.dayOfWeekInMonth(1, MONDAY));
-    }
-
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
-    public void factory_dayOfWeekInMonth_nullDayOfWeek() {
-        Adjusters.dayOfWeekInMonth(1, null);
-    }
-
-    @DataProvider(name = "dayOfWeekInMonth_positive")
-    Object[][] data_dayOfWeekInMonth_positive() {
-        return new Object[][] {
-            {2011, 1, TUESDAY, date(2011, 1, 4)},
-            {2011, 2, TUESDAY, date(2011, 2, 1)},
-            {2011, 3, TUESDAY, date(2011, 3, 1)},
-            {2011, 4, TUESDAY, date(2011, 4, 5)},
-            {2011, 5, TUESDAY, date(2011, 5, 3)},
-            {2011, 6, TUESDAY, date(2011, 6, 7)},
-            {2011, 7, TUESDAY, date(2011, 7, 5)},
-            {2011, 8, TUESDAY, date(2011, 8, 2)},
-            {2011, 9, TUESDAY, date(2011, 9, 6)},
-            {2011, 10, TUESDAY, date(2011, 10, 4)},
-            {2011, 11, TUESDAY, date(2011, 11, 1)},
-            {2011, 12, TUESDAY, date(2011, 12, 6)},
-        };
-    }
-
-    @Test(groups={"tck"}, dataProvider = "dayOfWeekInMonth_positive")
-    public void test_dayOfWeekInMonth_positive(int year, int month, DayOfWeek dow, LocalDate expected) {
-        for (int ordinal = 1; ordinal <= 5; ordinal++) {
-            for (int day = 1; day <= Month.of(month).length(false); day++) {
-                LocalDate date = date(year, month, day);
-                LocalDate test = (LocalDate) Adjusters.dayOfWeekInMonth(ordinal, dow).adjustInto(date);
-                assertEquals(test, expected.plusWeeks(ordinal - 1));
-            }
-        }
-    }
-
-    @DataProvider(name = "dayOfWeekInMonth_zero")
-    Object[][] data_dayOfWeekInMonth_zero() {
-        return new Object[][] {
-            {2011, 1, TUESDAY, date(2010, 12, 28)},
-            {2011, 2, TUESDAY, date(2011, 1, 25)},
-            {2011, 3, TUESDAY, date(2011, 2, 22)},
-            {2011, 4, TUESDAY, date(2011, 3, 29)},
-            {2011, 5, TUESDAY, date(2011, 4, 26)},
-            {2011, 6, TUESDAY, date(2011, 5, 31)},
-            {2011, 7, TUESDAY, date(2011, 6, 28)},
-            {2011, 8, TUESDAY, date(2011, 7, 26)},
-            {2011, 9, TUESDAY, date(2011, 8, 30)},
-            {2011, 10, TUESDAY, date(2011, 9, 27)},
-            {2011, 11, TUESDAY, date(2011, 10, 25)},
-            {2011, 12, TUESDAY, date(2011, 11, 29)},
-        };
-    }
-
-    @Test(groups={"tck"}, dataProvider = "dayOfWeekInMonth_zero")
-    public void test_dayOfWeekInMonth_zero(int year, int month, DayOfWeek dow, LocalDate expected) {
-        for (int day = 1; day <= Month.of(month).length(false); day++) {
-            LocalDate date = date(year, month, day);
-            LocalDate test = (LocalDate) Adjusters.dayOfWeekInMonth(0, dow).adjustInto(date);
-            assertEquals(test, expected);
-        }
-    }
-
-    @DataProvider(name = "dayOfWeekInMonth_negative")
-    Object[][] data_dayOfWeekInMonth_negative() {
-        return new Object[][] {
-            {2011, 1, TUESDAY, date(2011, 1, 25)},
-            {2011, 2, TUESDAY, date(2011, 2, 22)},
-            {2011, 3, TUESDAY, date(2011, 3, 29)},
-            {2011, 4, TUESDAY, date(2011, 4, 26)},
-            {2011, 5, TUESDAY, date(2011, 5, 31)},
-            {2011, 6, TUESDAY, date(2011, 6, 28)},
-            {2011, 7, TUESDAY, date(2011, 7, 26)},
-            {2011, 8, TUESDAY, date(2011, 8, 30)},
-            {2011, 9, TUESDAY, date(2011, 9, 27)},
-            {2011, 10, TUESDAY, date(2011, 10, 25)},
-            {2011, 11, TUESDAY, date(2011, 11, 29)},
-            {2011, 12, TUESDAY, date(2011, 12, 27)},
-        };
-    }
-
-    @Test(groups={"tck"}, dataProvider = "dayOfWeekInMonth_negative")
-    public void test_dayOfWeekInMonth_negative(int year, int month, DayOfWeek dow, LocalDate expected) {
-        for (int ordinal = 0; ordinal < 5; ordinal++) {
-            for (int day = 1; day <= Month.of(month).length(false); day++) {
-                LocalDate date = date(year, month, day);
-                LocalDate test = (LocalDate) Adjusters.dayOfWeekInMonth(-1 - ordinal, dow).adjustInto(date);
-                assertEquals(test, expected.minusWeeks(ordinal));
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // firstInMonth()
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void factory_firstInMonth() {
-        assertNotNull(Adjusters.firstInMonth(MONDAY));
-    }
-
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
-    public void factory_firstInMonth_nullDayOfWeek() {
-        Adjusters.firstInMonth(null);
-    }
-
-    @Test(groups={"tck"}, dataProvider = "dayOfWeekInMonth_positive")
-    public void test_firstInMonth(int year, int month, DayOfWeek dow, LocalDate expected) {
-        for (int day = 1; day <= Month.of(month).length(false); day++) {
-            LocalDate date = date(year, month, day);
-            LocalDate test = (LocalDate) Adjusters.firstInMonth(dow).adjustInto(date);
-            assertEquals(test, expected, "day-of-month=" + day);
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // lastInMonth()
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void factory_lastInMonth() {
-        assertNotNull(Adjusters.lastInMonth(MONDAY));
-    }
-
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
-    public void factory_lastInMonth_nullDayOfWeek() {
-        Adjusters.lastInMonth(null);
-    }
-
-    @Test(groups={"tck"}, dataProvider = "dayOfWeekInMonth_negative")
-    public void test_lastInMonth(int year, int month, DayOfWeek dow, LocalDate expected) {
-        for (int day = 1; day <= Month.of(month).length(false); day++) {
-            LocalDate date = date(year, month, day);
-            LocalDate test = (LocalDate) Adjusters.lastInMonth(dow).adjustInto(date);
-            assertEquals(test, expected, "day-of-month=" + day);
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // next()
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void factory_next() {
-        assertNotNull(Adjusters.next(MONDAY));
-    }
-
-    @Test(expectedExceptions = NullPointerException.class, groups={"tck"})
-    public void factory_next_nullDayOfWeek() {
-        Adjusters.next(null);
-    }
-
-    @Test(groups={"tck"})
-    public void test_next() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(false); i++) {
-                LocalDate date = date(2007, month, i);
-
-                for (DayOfWeek dow : DayOfWeek.values()) {
-                    LocalDate test = (LocalDate) Adjusters.next(dow).adjustInto(date);
-
-                    assertSame(test.getDayOfWeek(), dow, date + " " + test);
-
-                    if (test.getYear() == 2007) {
-                        int dayDiff = test.getDayOfYear() - date.getDayOfYear();
-                        assertTrue(dayDiff > 0 && dayDiff < 8);
-                    } else {
-                        assertSame(month, Month.DECEMBER);
-                        assertTrue(date.getDayOfMonth() > 24);
-                        assertEquals(test.getYear(), 2008);
-                        assertSame(test.getMonth(), Month.JANUARY);
-                        assertTrue(test.getDayOfMonth() < 8);
-                    }
-                }
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // nextOrSame()
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void factory_nextOrCurrent() {
-        assertNotNull(Adjusters.nextOrSame(MONDAY));
-    }
-
-    @Test(expectedExceptions = NullPointerException.class, groups={"tck"})
-    public void factory_nextOrCurrent_nullDayOfWeek() {
-        Adjusters.nextOrSame(null);
-    }
-
-    @Test(groups={"tck"})
-    public void test_nextOrCurrent() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(false); i++) {
-                LocalDate date = date(2007, month, i);
-
-                for (DayOfWeek dow : DayOfWeek.values()) {
-                    LocalDate test = (LocalDate) Adjusters.nextOrSame(dow).adjustInto(date);
-
-                    assertSame(test.getDayOfWeek(), dow);
-
-                    if (test.getYear() == 2007) {
-                        int dayDiff = test.getDayOfYear() - date.getDayOfYear();
-                        assertTrue(dayDiff < 8);
-                        assertEquals(date.equals(test), date.getDayOfWeek() == dow);
-                    } else {
-                        assertFalse(date.getDayOfWeek() == dow);
-                        assertSame(month, Month.DECEMBER);
-                        assertTrue(date.getDayOfMonth() > 24);
-                        assertEquals(test.getYear(), 2008);
-                        assertSame(test.getMonth(), Month.JANUARY);
-                        assertTrue(test.getDayOfMonth() < 8);
-                    }
-                }
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // previous()
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void factory_previous() {
-        assertNotNull(Adjusters.previous(MONDAY));
-    }
-
-    @Test(expectedExceptions = NullPointerException.class, groups={"tck"})
-    public void factory_previous_nullDayOfWeek() {
-        Adjusters.previous(null);
-    }
-
-    @Test(groups={"tck"})
-    public void test_previous() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(false); i++) {
-                LocalDate date = date(2007, month, i);
-
-                for (DayOfWeek dow : DayOfWeek.values()) {
-                    LocalDate test = (LocalDate) Adjusters.previous(dow).adjustInto(date);
-
-                    assertSame(test.getDayOfWeek(), dow, date + " " + test);
-
-                    if (test.getYear() == 2007) {
-                        int dayDiff = test.getDayOfYear() - date.getDayOfYear();
-                        assertTrue(dayDiff < 0 && dayDiff > -8, dayDiff + " " + test);
-                    } else {
-                        assertSame(month, Month.JANUARY);
-                        assertTrue(date.getDayOfMonth() < 8);
-                        assertEquals(test.getYear(), 2006);
-                        assertSame(test.getMonth(), Month.DECEMBER);
-                        assertTrue(test.getDayOfMonth() > 24);
-                    }
-                }
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // previousOrSame()
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
-    public void factory_previousOrCurrent() {
-        assertNotNull(Adjusters.previousOrSame(MONDAY));
-    }
-
-    @Test(expectedExceptions = NullPointerException.class, groups={"tck"})
-    public void factory_previousOrCurrent_nullDayOfWeek() {
-        Adjusters.previousOrSame(null);
-    }
-
-    @Test(groups={"tck"})
-    public void test_previousOrCurrent() {
-        for (Month month : Month.values()) {
-            for (int i = 1; i <= month.length(false); i++) {
-                LocalDate date = date(2007, month, i);
-
-                for (DayOfWeek dow : DayOfWeek.values()) {
-                    LocalDate test = (LocalDate) Adjusters.previousOrSame(dow).adjustInto(date);
-
-                    assertSame(test.getDayOfWeek(), dow);
-
-                    if (test.getYear() == 2007) {
-                        int dayDiff = test.getDayOfYear() - date.getDayOfYear();
-                        assertTrue(dayDiff <= 0 && dayDiff > -7);
-                        assertEquals(date.equals(test), date.getDayOfWeek() == dow);
-                    } else {
-                        assertFalse(date.getDayOfWeek() == dow);
-                        assertSame(month, Month.JANUARY);
-                        assertTrue(date.getDayOfMonth() < 7);
-                        assertEquals(test.getYear(), 2006);
-                        assertSame(test.getMonth(), Month.DECEMBER);
-                        assertTrue(test.getDayOfMonth() > 25);
-                    }
-                }
-            }
-        }
-    }
-
-    private LocalDate date(int year, Month month, int day) {
-        return LocalDate.of(year, month, day);
-    }
-
-    private LocalDate date(int year, int month, int day) {
-        return LocalDate.of(year, month, day);
-    }
-
-}
--- a/test/java/time/tck/java/time/temporal/TCKIsoFields.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/temporal/TCKIsoFields.java	Wed Apr 17 21:48:04 2013 -0700
@@ -66,11 +66,14 @@
 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
 import static java.time.temporal.ChronoField.YEAR;
 import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.fail;
 
 import java.time.DayOfWeek;
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.DateTimeParseException;
+import java.time.format.ResolverStyle;
 import java.time.temporal.IsoFields;
 import java.time.temporal.ValueRange;
 
@@ -80,7 +83,7 @@
 /**
  * Test.
  */
-@Test(groups={"tck"})
+@Test
 public class TCKIsoFields {
 
     @DataProvider(name="quarter")
@@ -115,35 +118,133 @@
     //-----------------------------------------------------------------------
     // DAY_OF_QUARTER
     //-----------------------------------------------------------------------
-    @Test(dataProvider="quarter")
+    @Test(dataProvider = "quarter")
     public void test_DOQ(LocalDate date, int doq, int qoy) {
         assertEquals(IsoFields.DAY_OF_QUARTER.getFrom(date), doq);
         assertEquals(date.get(IsoFields.DAY_OF_QUARTER), doq);
     }
 
+    public void test_DOQ_basics() {
+        assertEquals(IsoFields.DAY_OF_QUARTER.isDateBased(), true);
+        assertEquals(IsoFields.DAY_OF_QUARTER.isTimeBased(), false);
+    }
+
     //-----------------------------------------------------------------------
     // QUARTER_OF_YEAR
     //-----------------------------------------------------------------------
-    @Test(dataProvider="quarter")
+    @Test(dataProvider = "quarter")
     public void test_QOY(LocalDate date, int doq, int qoy) {
         assertEquals(IsoFields.QUARTER_OF_YEAR.getFrom(date), qoy);
         assertEquals(date.get(IsoFields.QUARTER_OF_YEAR), qoy);
     }
 
+    public void test_QOY_basics() {
+        assertEquals(IsoFields.QUARTER_OF_YEAR.isDateBased(), true);
+        assertEquals(IsoFields.QUARTER_OF_YEAR.isTimeBased(), false);
+    }
+
     //-----------------------------------------------------------------------
     // parse quarters
     //-----------------------------------------------------------------------
-    @Test(dataProvider="quarter")
+    @Test(dataProvider = "quarter")
     public void test_parse_quarters(LocalDate date, int doq, int qoy) {
         DateTimeFormatter f = new DateTimeFormatterBuilder()
                 .appendValue(YEAR).appendLiteral('-')
                 .appendValue(IsoFields.QUARTER_OF_YEAR).appendLiteral('-')
-                .appendValue(IsoFields.DAY_OF_QUARTER).toFormatter();
+                .appendValue(IsoFields.DAY_OF_QUARTER)
+                .toFormatter().withResolverStyle(ResolverStyle.STRICT);
+        LocalDate parsed = LocalDate.parse(date.getYear() + "-" + qoy + "-" + doq, f);
+        assertEquals(parsed, date);
+    }
+
+    @Test(dataProvider = "quarter")
+    public void test_parse_quarters_SMART(LocalDate date, int doq, int qoy) {
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(YEAR).appendLiteral('-')
+                .appendValue(IsoFields.QUARTER_OF_YEAR).appendLiteral('-')
+                .appendValue(IsoFields.DAY_OF_QUARTER)
+                .toFormatter().withResolverStyle(ResolverStyle.SMART);
+        LocalDate parsed = LocalDate.parse(date.getYear() + "-" + qoy + "-" + doq, f);
+        assertEquals(parsed, date);
+    }
+
+    @Test(dataProvider = "quarter")
+    public void test_parse_quarters_LENIENT(LocalDate date, int doq, int qoy) {
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(YEAR).appendLiteral('-')
+                .appendValue(IsoFields.QUARTER_OF_YEAR).appendLiteral('-')
+                .appendValue(IsoFields.DAY_OF_QUARTER)
+                .toFormatter().withResolverStyle(ResolverStyle.LENIENT);
         LocalDate parsed = LocalDate.parse(date.getYear() + "-" + qoy + "-" + doq, f);
         assertEquals(parsed, date);
     }
 
     //-----------------------------------------------------------------------
+    @DataProvider(name="parseLenientQuarter")
+    Object[][] data_parseLenientQuarter() {
+        return new Object[][] {
+                {"2012:0:1", LocalDate.of(2011, 10, 1), false},
+                {"2012:5:1", LocalDate.of(2013, 1, 1), false},
+
+                {"2012:1:-1", LocalDate.of(2011, 12, 30), false},
+                {"2012:1:0", LocalDate.of(2011, 12, 31), false},
+                {"2012:0:0", LocalDate.of(2011, 9, 30), false},
+
+                {"2012:1:92", LocalDate.of(2012, 4, 1), true},
+                {"2012:2:92", LocalDate.of(2012, 7, 1), true},
+                {"2012:2:93", LocalDate.of(2012, 7, 2), false},
+                {"2012:3:93", LocalDate.of(2012, 10, 1), false},
+                {"2012:4:93", LocalDate.of(2013, 1, 1), false},
+                {"2012:4:182", LocalDate.of(2013, 3, 31), false},
+                {"2012:4:183", LocalDate.of(2013, 4, 1), false},
+
+                {"2011:1:91", LocalDate.of(2011, 4, 1), true},
+                {"2011:1:92", LocalDate.of(2011, 4, 2), true},
+        };
+    }
+
+    @Test(dataProvider = "parseLenientQuarter", expectedExceptions = DateTimeParseException.class)
+    public void test_parse_parseLenientQuarter_STRICT(String str, LocalDate expected, boolean smart) {
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(YEAR).appendLiteral(':')
+                .appendValue(IsoFields.QUARTER_OF_YEAR).appendLiteral(':')
+                .appendValue(IsoFields.DAY_OF_QUARTER)
+                .toFormatter().withResolverStyle(ResolverStyle.STRICT);
+        LocalDate.parse(str, f);
+    }
+
+    @Test(dataProvider = "parseLenientQuarter")
+    public void test_parse_parseLenientQuarter_SMART(String str, LocalDate expected, boolean smart) {
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(YEAR).appendLiteral(':')
+                .appendValue(IsoFields.QUARTER_OF_YEAR).appendLiteral(':')
+                .appendValue(IsoFields.DAY_OF_QUARTER)
+                .toFormatter().withResolverStyle(ResolverStyle.SMART);
+        if (smart) {
+            LocalDate parsed = LocalDate.parse(str, f);
+            assertEquals(parsed, expected);
+        } else {
+            try {
+                LocalDate.parse(str, f);
+                fail("Should have failed");
+            } catch (DateTimeParseException ex) {
+                // expected
+            }
+        }
+    }
+
+    @Test(dataProvider = "parseLenientQuarter")
+    public void test_parse_parseLenientQuarter_LENIENT(String str, LocalDate expected, boolean smart) {
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(YEAR).appendLiteral(':')
+                .appendValue(IsoFields.QUARTER_OF_YEAR).appendLiteral(':')
+                .appendValue(IsoFields.DAY_OF_QUARTER)
+                .toFormatter().withResolverStyle(ResolverStyle.LENIENT);
+        LocalDate parsed = LocalDate.parse(str, f);
+        assertEquals(parsed, expected);
+    }
+
+    //-----------------------------------------------------------------------
     // quarters between
     //-----------------------------------------------------------------------
     @DataProvider(name="quartersBetween")
@@ -214,6 +315,11 @@
         assertEquals(date.get(IsoFields.WEEK_OF_WEEK_BASED_YEAR), week);
     }
 
+    public void test_WOWBY_basics() {
+        assertEquals(IsoFields.WEEK_OF_WEEK_BASED_YEAR.isDateBased(), true);
+        assertEquals(IsoFields.WEEK_OF_WEEK_BASED_YEAR.isTimeBased(), false);
+    }
+
     //-----------------------------------------------------------------------
     // WEEK_BASED_YEAR
     //-----------------------------------------------------------------------
@@ -224,20 +330,106 @@
         assertEquals(date.get(IsoFields.WEEK_BASED_YEAR), wby);
     }
 
+    public void test_WBY_basics() {
+        assertEquals(IsoFields.WEEK_BASED_YEAR.isDateBased(), true);
+        assertEquals(IsoFields.WEEK_BASED_YEAR.isTimeBased(), false);
+    }
+
     //-----------------------------------------------------------------------
     // parse weeks
     //-----------------------------------------------------------------------
     @Test(dataProvider="week")
-    public void test_parse_weeks(LocalDate date, DayOfWeek dow, int week, int wby) {
+    public void test_parse_weeks_STRICT(LocalDate date, DayOfWeek dow, int week, int wby) {
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(IsoFields.WEEK_BASED_YEAR).appendLiteral('-')
+                .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR).appendLiteral('-')
+                .appendValue(DAY_OF_WEEK)
+                .toFormatter().withResolverStyle(ResolverStyle.STRICT);
+        LocalDate parsed = LocalDate.parse(wby + "-" + week + "-" + dow.getValue(), f);
+        assertEquals(parsed, date);
+    }
+
+    @Test(dataProvider="week")
+    public void test_parse_weeks_SMART(LocalDate date, DayOfWeek dow, int week, int wby) {
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(IsoFields.WEEK_BASED_YEAR).appendLiteral('-')
+                .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR).appendLiteral('-')
+                .appendValue(DAY_OF_WEEK)
+                .toFormatter().withResolverStyle(ResolverStyle.SMART);
+        LocalDate parsed = LocalDate.parse(wby + "-" + week + "-" + dow.getValue(), f);
+        assertEquals(parsed, date);
+    }
+
+    @Test(dataProvider="week")
+    public void test_parse_weeks_LENIENT(LocalDate date, DayOfWeek dow, int week, int wby) {
         DateTimeFormatter f = new DateTimeFormatterBuilder()
                 .appendValue(IsoFields.WEEK_BASED_YEAR).appendLiteral('-')
                 .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR).appendLiteral('-')
-                .appendValue(DAY_OF_WEEK).toFormatter();
+                .appendValue(DAY_OF_WEEK)
+                .toFormatter().withResolverStyle(ResolverStyle.LENIENT);
         LocalDate parsed = LocalDate.parse(wby + "-" + week + "-" + dow.getValue(), f);
         assertEquals(parsed, date);
     }
 
     //-----------------------------------------------------------------------
+    @DataProvider(name="parseLenientWeek")
+    Object[][] data_parseLenientWeek() {
+        return new Object[][] {
+                {"2012:52:-1", LocalDate.of(2012, 12, 22), false},
+                {"2012:52:0", LocalDate.of(2012, 12, 23), false},
+                {"2012:52:8", LocalDate.of(2012, 12, 31), false},
+                {"2012:52:9", LocalDate.of(2013, 1, 1), false},
+
+                {"2012:53:1", LocalDate.of(2012, 12, 31), true},
+                {"2012:54:1", LocalDate.of(2013, 1, 7), false},
+
+                {"2013:0:1", LocalDate.of(2012, 12, 24), false},
+                {"2013:0:0", LocalDate.of(2012, 12, 23), false},
+        };
+    }
+
+    @Test(dataProvider = "parseLenientWeek", expectedExceptions = DateTimeParseException.class)
+    public void test_parse_parseLenientWeek_STRICT(String str, LocalDate expected, boolean smart) {
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(IsoFields.WEEK_BASED_YEAR).appendLiteral(':')
+                .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR).appendLiteral(':')
+                .appendValue(DAY_OF_WEEK)
+                .toFormatter().withResolverStyle(ResolverStyle.STRICT);
+        LocalDate.parse(str, f);
+    }
+
+    @Test(dataProvider = "parseLenientWeek")
+    public void test_parse_parseLenientWeek_SMART(String str, LocalDate expected, boolean smart) {
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(IsoFields.WEEK_BASED_YEAR).appendLiteral(':')
+                .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR).appendLiteral(':')
+                .appendValue(DAY_OF_WEEK)
+                .toFormatter().withResolverStyle(ResolverStyle.SMART);
+        if (smart) {
+            LocalDate parsed = LocalDate.parse(str, f);
+            assertEquals(parsed, expected);
+        } else {
+            try {
+                LocalDate.parse(str, f);
+                fail("Should have failed");
+            } catch (DateTimeParseException ex) {
+                // expected
+            }
+        }
+    }
+
+    @Test(dataProvider = "parseLenientWeek")
+    public void test_parse_parseLenientWeek_LENIENT(String str, LocalDate expected, boolean smart) {
+        DateTimeFormatter f = new DateTimeFormatterBuilder()
+                .appendValue(IsoFields.WEEK_BASED_YEAR).appendLiteral(':')
+                .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR).appendLiteral(':')
+                .appendValue(DAY_OF_WEEK)
+                .toFormatter().withResolverStyle(ResolverStyle.LENIENT);
+        LocalDate parsed = LocalDate.parse(str, f);
+        assertEquals(parsed, expected);
+    }
+
+    //-----------------------------------------------------------------------
     public void test_loop() {
         // loop round at least one 400 year cycle, including before 1970
         LocalDate date = LocalDate.of(1960, 1, 5);  // Tuseday of week 1 1960
--- a/test/java/time/tck/java/time/temporal/TCKJulianFields.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/temporal/TCKJulianFields.java	Wed Apr 17 21:48:04 2013 -0700
@@ -65,7 +65,9 @@
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.ResolverStyle;
 import java.time.temporal.ChronoField;
+import java.time.temporal.IsoFields;
 import java.time.temporal.JulianFields;
 import java.time.temporal.TemporalField;
 
@@ -125,6 +127,17 @@
         assertSerializable(field);
     }
 
+    public void test_basics() {
+        assertEquals(JulianFields.JULIAN_DAY.isDateBased(), true);
+        assertEquals(JulianFields.JULIAN_DAY.isTimeBased(), false);
+
+        assertEquals(JulianFields.MODIFIED_JULIAN_DAY.isDateBased(), true);
+        assertEquals(JulianFields.MODIFIED_JULIAN_DAY.isTimeBased(), false);
+
+        assertEquals(JulianFields.RATA_DIE.isDateBased(), true);
+        assertEquals(JulianFields.RATA_DIE.isTimeBased(), false);
+    }
+
     //-----------------------------------------------------------------------
     @Test(dataProvider="samples")
     public void test_samples_get(TemporalField field, LocalDate date, long expected) {
@@ -142,8 +155,25 @@
 
     //-----------------------------------------------------------------------
     @Test(dataProvider="samples")
-    public void test_samples_parse(TemporalField field, LocalDate date, long value) {
-        DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field).toFormatter();
+    public void test_samples_parse_STRICT(TemporalField field, LocalDate date, long value) {
+        DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field)
+                .toFormatter().withResolverStyle(ResolverStyle.STRICT);
+        LocalDate parsed = LocalDate.parse(Long.toString(value), f);
+        assertEquals(parsed, date);
+    }
+
+    @Test(dataProvider="samples")
+    public void test_samples_parse_SMART(TemporalField field, LocalDate date, long value) {
+        DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field)
+                .toFormatter().withResolverStyle(ResolverStyle.SMART);
+        LocalDate parsed = LocalDate.parse(Long.toString(value), f);
+        assertEquals(parsed, date);
+    }
+
+    @Test(dataProvider="samples")
+    public void test_samples_parse_LENIENT(TemporalField field, LocalDate date, long value) {
+        DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field)
+                .toFormatter().withResolverStyle(ResolverStyle.LENIENT);
         LocalDate parsed = LocalDate.parse(Long.toString(value), f);
         assertEquals(parsed, date);
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/tck/java/time/temporal/TCKTemporalAdjusters.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,615 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.temporal;
+
+import static java.time.DayOfWeek.MONDAY;
+import static java.time.DayOfWeek.TUESDAY;
+import static java.time.Month.DECEMBER;
+import static java.time.Month.JANUARY;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertSame;
+import static org.testng.Assert.assertTrue;
+
+import java.time.DayOfWeek;
+import java.time.LocalDate;
+import java.time.Month;
+import java.time.temporal.TemporalAdjuster;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test TemporalAdjuster.
+ */
+@Test
+public class TCKTemporalAdjusters {
+
+    //-----------------------------------------------------------------------
+    // ofDateAdjuster()
+    //-----------------------------------------------------------------------
+    @Test
+    public void factory_ofDateAdjuster() {
+        TemporalAdjuster test = TemporalAdjuster.ofDateAdjuster(date -> date.plusDays(2));
+        assertEquals(LocalDate.of(2012, 6, 30).with(test), LocalDate.of(2012, 7, 2));
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void factory_ofDateAdjuster_null() {
+        TemporalAdjuster.ofDateAdjuster(null);
+    }
+
+
+    //-----------------------------------------------------------------------
+    // firstDayOfMonth()
+    //-----------------------------------------------------------------------
+    @Test
+    public void factory_firstDayOfMonth() {
+        assertNotNull(TemporalAdjuster.firstDayOfMonth());
+    }
+
+    @Test
+    public void test_firstDayOfMonth_nonLeap() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(false); i++) {
+                LocalDate date = date(2007, month, i);
+                LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfMonth().adjustInto(date);
+                assertEquals(test.getYear(), 2007);
+                assertEquals(test.getMonth(), month);
+                assertEquals(test.getDayOfMonth(), 1);
+            }
+        }
+    }
+
+    @Test
+    public void test_firstDayOfMonth_leap() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(true); i++) {
+                LocalDate date = date(2008, month, i);
+                LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfMonth().adjustInto(date);
+                assertEquals(test.getYear(), 2008);
+                assertEquals(test.getMonth(), month);
+                assertEquals(test.getDayOfMonth(), 1);
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // lastDayOfMonth()
+    //-----------------------------------------------------------------------
+    @Test
+    public void factory_lastDayOfMonth() {
+        assertNotNull(TemporalAdjuster.lastDayOfMonth());
+    }
+
+    @Test
+    public void test_lastDayOfMonth_nonLeap() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(false); i++) {
+                LocalDate date = date(2007, month, i);
+                LocalDate test = (LocalDate) TemporalAdjuster.lastDayOfMonth().adjustInto(date);
+                assertEquals(test.getYear(), 2007);
+                assertEquals(test.getMonth(), month);
+                assertEquals(test.getDayOfMonth(), month.length(false));
+            }
+        }
+    }
+
+    @Test
+    public void test_lastDayOfMonth_leap() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(true); i++) {
+                LocalDate date = date(2008, month, i);
+                LocalDate test = (LocalDate) TemporalAdjuster.lastDayOfMonth().adjustInto(date);
+                assertEquals(test.getYear(), 2008);
+                assertEquals(test.getMonth(), month);
+                assertEquals(test.getDayOfMonth(), month.length(true));
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // firstDayOfNextMonth()
+    //-----------------------------------------------------------------------
+    @Test
+    public void factory_firstDayOfNextMonth() {
+        assertNotNull(TemporalAdjuster.firstDayOfNextMonth());
+    }
+
+    @Test
+    public void test_firstDayOfNextMonth_nonLeap() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(false); i++) {
+                LocalDate date = date(2007, month, i);
+                LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfNextMonth().adjustInto(date);
+                assertEquals(test.getYear(), month == DECEMBER ? 2008 : 2007);
+                assertEquals(test.getMonth(), month.plus(1));
+                assertEquals(test.getDayOfMonth(), 1);
+            }
+        }
+    }
+
+    @Test
+    public void test_firstDayOfNextMonth_leap() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(true); i++) {
+                LocalDate date = date(2008, month, i);
+                LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfNextMonth().adjustInto(date);
+                assertEquals(test.getYear(), month == DECEMBER ? 2009 : 2008);
+                assertEquals(test.getMonth(), month.plus(1));
+                assertEquals(test.getDayOfMonth(), 1);
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // firstDayOfYear()
+    //-----------------------------------------------------------------------
+    @Test
+    public void factory_firstDayOfYear() {
+        assertNotNull(TemporalAdjuster.firstDayOfYear());
+    }
+
+    @Test
+    public void test_firstDayOfYear_nonLeap() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(false); i++) {
+                LocalDate date = date(2007, month, i);
+                LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfYear().adjustInto(date);
+                assertEquals(test.getYear(), 2007);
+                assertEquals(test.getMonth(), Month.JANUARY);
+                assertEquals(test.getDayOfMonth(), 1);
+            }
+        }
+    }
+
+    @Test
+    public void test_firstDayOfYear_leap() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(true); i++) {
+                LocalDate date = date(2008, month, i);
+                LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfYear().adjustInto(date);
+                assertEquals(test.getYear(), 2008);
+                assertEquals(test.getMonth(), Month.JANUARY);
+                assertEquals(test.getDayOfMonth(), 1);
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // lastDayOfYear()
+    //-----------------------------------------------------------------------
+    @Test
+    public void factory_lastDayOfYear() {
+        assertNotNull(TemporalAdjuster.lastDayOfYear());
+    }
+
+    @Test
+    public void test_lastDayOfYear_nonLeap() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(false); i++) {
+                LocalDate date = date(2007, month, i);
+                LocalDate test = (LocalDate) TemporalAdjuster.lastDayOfYear().adjustInto(date);
+                assertEquals(test.getYear(), 2007);
+                assertEquals(test.getMonth(), Month.DECEMBER);
+                assertEquals(test.getDayOfMonth(), 31);
+            }
+        }
+    }
+
+    @Test
+    public void test_lastDayOfYear_leap() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(true); i++) {
+                LocalDate date = date(2008, month, i);
+                LocalDate test = (LocalDate) TemporalAdjuster.lastDayOfYear().adjustInto(date);
+                assertEquals(test.getYear(), 2008);
+                assertEquals(test.getMonth(), Month.DECEMBER);
+                assertEquals(test.getDayOfMonth(), 31);
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // firstDayOfNextYear()
+    //-----------------------------------------------------------------------
+    @Test
+    public void factory_firstDayOfNextYear() {
+        assertNotNull(TemporalAdjuster.firstDayOfNextYear());
+    }
+
+    @Test
+    public void test_firstDayOfNextYear_nonLeap() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(false); i++) {
+                LocalDate date = date(2007, month, i);
+                LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfNextYear().adjustInto(date);
+                assertEquals(test.getYear(), 2008);
+                assertEquals(test.getMonth(), JANUARY);
+                assertEquals(test.getDayOfMonth(), 1);
+            }
+        }
+    }
+
+    @Test
+    public void test_firstDayOfNextYear_leap() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(true); i++) {
+                LocalDate date = date(2008, month, i);
+                LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfNextYear().adjustInto(date);
+                assertEquals(test.getYear(), 2009);
+                assertEquals(test.getMonth(), JANUARY);
+                assertEquals(test.getDayOfMonth(), 1);
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // dayOfWeekInMonth()
+    //-----------------------------------------------------------------------
+    @Test
+    public void factory_dayOfWeekInMonth() {
+        assertNotNull(TemporalAdjuster.dayOfWeekInMonth(1, MONDAY));
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void factory_dayOfWeekInMonth_nullDayOfWeek() {
+        TemporalAdjuster.dayOfWeekInMonth(1, null);
+    }
+
+    @DataProvider(name = "dayOfWeekInMonth_positive")
+    Object[][] data_dayOfWeekInMonth_positive() {
+        return new Object[][] {
+            {2011, 1, TUESDAY, date(2011, 1, 4)},
+            {2011, 2, TUESDAY, date(2011, 2, 1)},
+            {2011, 3, TUESDAY, date(2011, 3, 1)},
+            {2011, 4, TUESDAY, date(2011, 4, 5)},
+            {2011, 5, TUESDAY, date(2011, 5, 3)},
+            {2011, 6, TUESDAY, date(2011, 6, 7)},
+            {2011, 7, TUESDAY, date(2011, 7, 5)},
+            {2011, 8, TUESDAY, date(2011, 8, 2)},
+            {2011, 9, TUESDAY, date(2011, 9, 6)},
+            {2011, 10, TUESDAY, date(2011, 10, 4)},
+            {2011, 11, TUESDAY, date(2011, 11, 1)},
+            {2011, 12, TUESDAY, date(2011, 12, 6)},
+        };
+    }
+
+    @Test(dataProvider = "dayOfWeekInMonth_positive")
+    public void test_dayOfWeekInMonth_positive(int year, int month, DayOfWeek dow, LocalDate expected) {
+        for (int ordinal = 1; ordinal <= 5; ordinal++) {
+            for (int day = 1; day <= Month.of(month).length(false); day++) {
+                LocalDate date = date(year, month, day);
+                LocalDate test = (LocalDate) TemporalAdjuster.dayOfWeekInMonth(ordinal, dow).adjustInto(date);
+                assertEquals(test, expected.plusWeeks(ordinal - 1));
+            }
+        }
+    }
+
+    @DataProvider(name = "dayOfWeekInMonth_zero")
+    Object[][] data_dayOfWeekInMonth_zero() {
+        return new Object[][] {
+            {2011, 1, TUESDAY, date(2010, 12, 28)},
+            {2011, 2, TUESDAY, date(2011, 1, 25)},
+            {2011, 3, TUESDAY, date(2011, 2, 22)},
+            {2011, 4, TUESDAY, date(2011, 3, 29)},
+            {2011, 5, TUESDAY, date(2011, 4, 26)},
+            {2011, 6, TUESDAY, date(2011, 5, 31)},
+            {2011, 7, TUESDAY, date(2011, 6, 28)},
+            {2011, 8, TUESDAY, date(2011, 7, 26)},
+            {2011, 9, TUESDAY, date(2011, 8, 30)},
+            {2011, 10, TUESDAY, date(2011, 9, 27)},
+            {2011, 11, TUESDAY, date(2011, 10, 25)},
+            {2011, 12, TUESDAY, date(2011, 11, 29)},
+        };
+    }
+
+    @Test(dataProvider = "dayOfWeekInMonth_zero")
+    public void test_dayOfWeekInMonth_zero(int year, int month, DayOfWeek dow, LocalDate expected) {
+        for (int day = 1; day <= Month.of(month).length(false); day++) {
+            LocalDate date = date(year, month, day);
+            LocalDate test = (LocalDate) TemporalAdjuster.dayOfWeekInMonth(0, dow).adjustInto(date);
+            assertEquals(test, expected);
+        }
+    }
+
+    @DataProvider(name = "dayOfWeekInMonth_negative")
+    Object[][] data_dayOfWeekInMonth_negative() {
+        return new Object[][] {
+            {2011, 1, TUESDAY, date(2011, 1, 25)},
+            {2011, 2, TUESDAY, date(2011, 2, 22)},
+            {2011, 3, TUESDAY, date(2011, 3, 29)},
+            {2011, 4, TUESDAY, date(2011, 4, 26)},
+            {2011, 5, TUESDAY, date(2011, 5, 31)},
+            {2011, 6, TUESDAY, date(2011, 6, 28)},
+            {2011, 7, TUESDAY, date(2011, 7, 26)},
+            {2011, 8, TUESDAY, date(2011, 8, 30)},
+            {2011, 9, TUESDAY, date(2011, 9, 27)},
+            {2011, 10, TUESDAY, date(2011, 10, 25)},
+            {2011, 11, TUESDAY, date(2011, 11, 29)},
+            {2011, 12, TUESDAY, date(2011, 12, 27)},
+        };
+    }
+
+    @Test(dataProvider = "dayOfWeekInMonth_negative")
+    public void test_dayOfWeekInMonth_negative(int year, int month, DayOfWeek dow, LocalDate expected) {
+        for (int ordinal = 0; ordinal < 5; ordinal++) {
+            for (int day = 1; day <= Month.of(month).length(false); day++) {
+                LocalDate date = date(year, month, day);
+                LocalDate test = (LocalDate) TemporalAdjuster.dayOfWeekInMonth(-1 - ordinal, dow).adjustInto(date);
+                assertEquals(test, expected.minusWeeks(ordinal));
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // firstInMonth()
+    //-----------------------------------------------------------------------
+    @Test
+    public void factory_firstInMonth() {
+        assertNotNull(TemporalAdjuster.firstInMonth(MONDAY));
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void factory_firstInMonth_nullDayOfWeek() {
+        TemporalAdjuster.firstInMonth(null);
+    }
+
+    @Test(dataProvider = "dayOfWeekInMonth_positive")
+    public void test_firstInMonth(int year, int month, DayOfWeek dow, LocalDate expected) {
+        for (int day = 1; day <= Month.of(month).length(false); day++) {
+            LocalDate date = date(year, month, day);
+            LocalDate test = (LocalDate) TemporalAdjuster.firstInMonth(dow).adjustInto(date);
+            assertEquals(test, expected, "day-of-month=" + day);
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // lastInMonth()
+    //-----------------------------------------------------------------------
+    @Test
+    public void factory_lastInMonth() {
+        assertNotNull(TemporalAdjuster.lastInMonth(MONDAY));
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void factory_lastInMonth_nullDayOfWeek() {
+        TemporalAdjuster.lastInMonth(null);
+    }
+
+    @Test(dataProvider = "dayOfWeekInMonth_negative")
+    public void test_lastInMonth(int year, int month, DayOfWeek dow, LocalDate expected) {
+        for (int day = 1; day <= Month.of(month).length(false); day++) {
+            LocalDate date = date(year, month, day);
+            LocalDate test = (LocalDate) TemporalAdjuster.lastInMonth(dow).adjustInto(date);
+            assertEquals(test, expected, "day-of-month=" + day);
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // next()
+    //-----------------------------------------------------------------------
+    @Test
+    public void factory_next() {
+        assertNotNull(TemporalAdjuster.next(MONDAY));
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void factory_next_nullDayOfWeek() {
+        TemporalAdjuster.next(null);
+    }
+
+    @Test
+    public void test_next() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(false); i++) {
+                LocalDate date = date(2007, month, i);
+
+                for (DayOfWeek dow : DayOfWeek.values()) {
+                    LocalDate test = (LocalDate) TemporalAdjuster.next(dow).adjustInto(date);
+
+                    assertSame(test.getDayOfWeek(), dow, date + " " + test);
+
+                    if (test.getYear() == 2007) {
+                        int dayDiff = test.getDayOfYear() - date.getDayOfYear();
+                        assertTrue(dayDiff > 0 && dayDiff < 8);
+                    } else {
+                        assertSame(month, Month.DECEMBER);
+                        assertTrue(date.getDayOfMonth() > 24);
+                        assertEquals(test.getYear(), 2008);
+                        assertSame(test.getMonth(), Month.JANUARY);
+                        assertTrue(test.getDayOfMonth() < 8);
+                    }
+                }
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // nextOrSame()
+    //-----------------------------------------------------------------------
+    @Test
+    public void factory_nextOrCurrent() {
+        assertNotNull(TemporalAdjuster.nextOrSame(MONDAY));
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void factory_nextOrCurrent_nullDayOfWeek() {
+        TemporalAdjuster.nextOrSame(null);
+    }
+
+    @Test
+    public void test_nextOrCurrent() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(false); i++) {
+                LocalDate date = date(2007, month, i);
+
+                for (DayOfWeek dow : DayOfWeek.values()) {
+                    LocalDate test = (LocalDate) TemporalAdjuster.nextOrSame(dow).adjustInto(date);
+
+                    assertSame(test.getDayOfWeek(), dow);
+
+                    if (test.getYear() == 2007) {
+                        int dayDiff = test.getDayOfYear() - date.getDayOfYear();
+                        assertTrue(dayDiff < 8);
+                        assertEquals(date.equals(test), date.getDayOfWeek() == dow);
+                    } else {
+                        assertFalse(date.getDayOfWeek() == dow);
+                        assertSame(month, Month.DECEMBER);
+                        assertTrue(date.getDayOfMonth() > 24);
+                        assertEquals(test.getYear(), 2008);
+                        assertSame(test.getMonth(), Month.JANUARY);
+                        assertTrue(test.getDayOfMonth() < 8);
+                    }
+                }
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // previous()
+    //-----------------------------------------------------------------------
+    @Test
+    public void factory_previous() {
+        assertNotNull(TemporalAdjuster.previous(MONDAY));
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void factory_previous_nullDayOfWeek() {
+        TemporalAdjuster.previous(null);
+    }
+
+    @Test
+    public void test_previous() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(false); i++) {
+                LocalDate date = date(2007, month, i);
+
+                for (DayOfWeek dow : DayOfWeek.values()) {
+                    LocalDate test = (LocalDate) TemporalAdjuster.previous(dow).adjustInto(date);
+
+                    assertSame(test.getDayOfWeek(), dow, date + " " + test);
+
+                    if (test.getYear() == 2007) {
+                        int dayDiff = test.getDayOfYear() - date.getDayOfYear();
+                        assertTrue(dayDiff < 0 && dayDiff > -8, dayDiff + " " + test);
+                    } else {
+                        assertSame(month, Month.JANUARY);
+                        assertTrue(date.getDayOfMonth() < 8);
+                        assertEquals(test.getYear(), 2006);
+                        assertSame(test.getMonth(), Month.DECEMBER);
+                        assertTrue(test.getDayOfMonth() > 24);
+                    }
+                }
+            }
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    // previousOrSame()
+    //-----------------------------------------------------------------------
+    @Test
+    public void factory_previousOrCurrent() {
+        assertNotNull(TemporalAdjuster.previousOrSame(MONDAY));
+    }
+
+    @Test(expectedExceptions = NullPointerException.class)
+    public void factory_previousOrCurrent_nullDayOfWeek() {
+        TemporalAdjuster.previousOrSame(null);
+    }
+
+    @Test
+    public void test_previousOrCurrent() {
+        for (Month month : Month.values()) {
+            for (int i = 1; i <= month.length(false); i++) {
+                LocalDate date = date(2007, month, i);
+
+                for (DayOfWeek dow : DayOfWeek.values()) {
+                    LocalDate test = (LocalDate) TemporalAdjuster.previousOrSame(dow).adjustInto(date);
+
+                    assertSame(test.getDayOfWeek(), dow);
+
+                    if (test.getYear() == 2007) {
+                        int dayDiff = test.getDayOfYear() - date.getDayOfYear();
+                        assertTrue(dayDiff <= 0 && dayDiff > -7);
+                        assertEquals(date.equals(test), date.getDayOfWeek() == dow);
+                    } else {
+                        assertFalse(date.getDayOfWeek() == dow);
+                        assertSame(month, Month.JANUARY);
+                        assertTrue(date.getDayOfMonth() < 7);
+                        assertEquals(test.getYear(), 2006);
+                        assertSame(test.getMonth(), Month.DECEMBER);
+                        assertTrue(test.getDayOfMonth() > 25);
+                    }
+                }
+            }
+        }
+    }
+
+    private LocalDate date(int year, Month month, int day) {
+        return LocalDate.of(year, month, day);
+    }
+
+    private LocalDate date(int year, int month, int day) {
+        return LocalDate.of(year, month, day);
+    }
+
+}
--- a/test/java/time/tck/java/time/temporal/TCKWeekFields.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/temporal/TCKWeekFields.java	Wed Apr 17 21:48:04 2013 -0700
@@ -61,6 +61,7 @@
 import static java.time.temporal.ChronoField.DAY_OF_YEAR;
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
 import static java.time.temporal.ChronoField.YEAR;
+
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertSame;
 
@@ -69,6 +70,8 @@
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.JulianFields;
 import java.time.temporal.TemporalField;
 import java.time.temporal.ValueRange;
 import java.time.temporal.WeekFields;
@@ -92,6 +95,26 @@
     }
 
     //-----------------------------------------------------------------------
+    @Test(dataProvider="weekFields")
+    public void test_basics(DayOfWeek firstDayOfWeek, int minDays) {
+        WeekFields week = WeekFields.of(firstDayOfWeek, minDays);
+        assertEquals(week.dayOfWeek().isDateBased(), true);
+        assertEquals(week.dayOfWeek().isTimeBased(), false);
+
+        assertEquals(week.weekOfMonth().isDateBased(), true);
+        assertEquals(week.weekOfMonth().isTimeBased(), false);
+
+        assertEquals(week.weekOfYear().isDateBased(), true);
+        assertEquals(week.weekOfYear().isTimeBased(), false);
+
+        assertEquals(week.weekOfWeekBasedYear().isDateBased(), true);
+        assertEquals(week.weekOfWeekBasedYear().isTimeBased(), false);
+
+        assertEquals(week.weekBasedYear().isDateBased(), true);
+        assertEquals(week.weekBasedYear().isTimeBased(), false);
+    }
+
+    //-----------------------------------------------------------------------
     @Test
     public void test_dayOfWeekField_simpleGet() {
         LocalDate date = LocalDate.of(2000, 1, 10);  // Known to be ISO Monday
@@ -124,10 +147,8 @@
         LocalDate day = LocalDate.of(2000, 1, 10);  // Known to be ISO Monday
         WeekFields week = WeekFields.of(firstDayOfWeek, minDays);
         TemporalField f = week.dayOfWeek();
-        //System.out.printf("  Week: %s; field: %s%n", week, f);
 
         for (int i = 1; i <= 7; i++) {
-            //System.out.printf("  ISO Dow: %s, WeekDOW ordinal: %s%n", day.getDayOfWeek(), day.get(f));
             assertEquals(day.get(f), (7 + day.getDayOfWeek().getValue() - firstDayOfWeek.getValue()) % 7 + 1);
             day = day.plusDays(1);
         }
@@ -139,7 +160,6 @@
         WeekFields week = WeekFields.of(firstDayOfWeek, minDays);
         TemporalField dowField = week.dayOfWeek();
         TemporalField womField = week.weekOfMonth();
-        //System.err.printf("%n  Week: %s; dowField: %s, domField: %s%n", week, dowField, womField);
 
         DayOfWeek isoDOW = day.getDayOfWeek();
         int dow = (7 + isoDOW.getValue() - firstDayOfWeek.getValue()) % 7 + 1;
@@ -152,23 +172,17 @@
             // to reconstruct the same date.
             LocalDate day1 = day.withDayOfMonth(1);
             int offset = - (day1.get(dowField) - 1);
-            //System.err.printf("   refDay: %s%n", day1.plusDays(offset));
+
             int week1 = day1.get(womField);
             if (week1 == 0) {
                 // week of the 1st is partial; start with first full week
                 offset += 7;
             }
-            //System.err.printf("   refDay2: %s, offset: %d, week1: %d%n", day1.plusDays(offset), offset, week1);
+
             offset += actualDOW - 1;
-            //System.err.printf("   refDay3: %s%n", day1.plusDays(offset));
             offset += (actualWOM - 1) * 7;
-            //System.err.printf("   refDay4: %s%n", day1.plusDays(offset));
             LocalDate result = day1.plusDays(offset);
 
-            if (!day.equals(result)) {
-                System.err.printf("FAIL ISO Dow: %s, offset: %s, actualDOW: %s, actualWOM: %s, expected: %s, result: %s%n",
-                        day.getDayOfWeek(), offset, actualDOW, actualWOM, day, result);
-            }
             assertEquals(result, day, "Incorrect dayOfWeek or weekOfMonth: "
                     + String.format("%s, ISO Dow: %s, offset: %s, actualDOW: %s, actualWOM: %s, expected: %s, result: %s%n",
                     week, day.getDayOfWeek(), offset, actualDOW, actualWOM, day, result));
@@ -182,7 +196,6 @@
         WeekFields week = WeekFields.of(firstDayOfWeek, minDays);
         TemporalField dowField = week.dayOfWeek();
         TemporalField woyField = week.weekOfYear();
-        //System.err.printf("%n  Year: %s; dowField: %s, woyField: %s%n", week, dowField, woyField);
 
         DayOfWeek isoDOW = day.getDayOfWeek();
         int dow = (7 + isoDOW.getValue() - firstDayOfWeek.getValue()) % 7 + 1;
@@ -195,24 +208,15 @@
             // to reconstruct the same date.
             LocalDate day1 = day.withDayOfYear(1);
             int offset = - (day1.get(dowField) - 1);
-            //System.err.printf("   refDay: %s%n", day1.plusDays(offset));
             int week1 = day1.get(woyField);
             if (week1 == 0) {
                 // week of the 1st is partial; start with first full week
                 offset += 7;
             }
-            //System.err.printf("   refDay2: %s, offset: %d, week1: %d%n", day1.plusDays(offset), offset, week1);
             offset += actualDOW - 1;
-            //System.err.printf("   refDay3: %s%n", day1.plusDays(offset));
             offset += (actualWOY - 1) * 7;
-            //System.err.printf("   refDay4: %s%n", day1.plusDays(offset));
             LocalDate result = day1.plusDays(offset);
 
-
-            if (!day.equals(result)) {
-                System.err.printf("FAIL  ISO Dow: %s, offset: %s, actualDOW: %s, actualWOY: %s, expected: %s, result: %s%n",
-                        day.getDayOfWeek(), offset, actualDOW, actualWOY, day, result);
-            }
             assertEquals(result, day, "Incorrect dayOfWeek or weekOfYear "
                     + String.format("%s, ISO Dow: %s, offset: %s, actualDOW: %s, actualWOM: %s, expected: %s, result: %s%n",
                     week, day.getDayOfWeek(), offset, actualDOW, actualWOY, day, result));
@@ -220,6 +224,48 @@
         }
     }
 
+    /**
+     * Verify that the date can be reconstructed from the DOW, WeekOfWeekBasedYear,
+     * and WeekBasedYear for every combination of start of week
+     * and minimal days in week.
+     * @param firstDayOfWeek the first day of the week
+     * @param minDays the minimum number of days in the week
+     */
+    @Test(dataProvider="weekFields")
+    public void test_weekOfWeekBasedYearField(DayOfWeek firstDayOfWeek, int minDays) {
+        LocalDate day = LocalDate.of(2012, 12, 31);  // Known to be ISO Monday
+        WeekFields weekDef = WeekFields.of(firstDayOfWeek, minDays);
+        TemporalField dowField = weekDef.dayOfWeek();
+        TemporalField wowbyField = weekDef.weekOfWeekBasedYear();
+        TemporalField yowbyField = weekDef.weekBasedYear();
+
+        for (int i = 1; i <= 15; i++) {
+            int actualDOW = day.get(dowField);
+            int actualWOWBY = day.get(wowbyField);
+            int actualYOWBY = day.get(yowbyField);
+
+            // Verify that the combination of day of week and week of month can be used
+            // to reconstruct the same date.
+            LocalDate day1 = LocalDate.of(actualYOWBY, 1, 1);
+            DayOfWeek isoDOW = day1.getDayOfWeek();
+            int dow = (7 + isoDOW.getValue() - firstDayOfWeek.getValue()) % 7 + 1;
+
+            int weekStart = Math.floorMod(1 - dow, 7);
+            if (weekStart + 1 > weekDef.getMinimalDaysInFirstWeek()) {
+                // The previous week has the minimum days in the current month to be a 'week'
+                weekStart -= 7;
+            }
+            weekStart += actualDOW - 1;
+            weekStart += (actualWOWBY - 1) * 7;
+            LocalDate result = day1.plusDays(weekStart);
+
+            assertEquals(result, day, "Incorrect dayOfWeek or weekOfYear "
+                    + String.format("%s, ISO Dow: %s, weekStart: %s, actualDOW: %s, actualWOWBY: %s, YearOfWBY: %d, expected day: %s, result: %s%n",
+                    weekDef, day.getDayOfWeek(), weekStart, actualDOW, actualWOWBY, actualYOWBY, day, result));
+            day = day.plusDays(1);
+        }
+    }
+
     @Test(dataProvider="weekFields")
     public void test_fieldRanges(DayOfWeek firstDayOfWeek, int minDays) {
         WeekFields weekDef = WeekFields.of(firstDayOfWeek, minDays);
@@ -272,24 +318,63 @@
         int woy = day.get(woyField);
         for (int dow = 1; dow <= 7; dow++) {
             LocalDate result = day.with(dowField, dow);
-            if (result.get(dowField) != dow) {
-                System.err.printf(" DOW actual: %d, expected: %d, week:%s%n",
-                        result.get(dowField), dow, week);
-            }
-            if (result.get(womField) != wom) {
-                System.err.printf(" WOM actual: %d, expected: %d, week:%s%n",
-                        result.get(womField), wom, week);
-            }
-            if (result.get(woyField) != woy) {
-                System.err.printf(" WOY actual: %d, expected: %d, week:%s%n",
-                        result.get(woyField), woy, week);
-            }
             assertEquals(result.get(dowField), dow, String.format("Incorrect new Day of week: %s", result));
             assertEquals(result.get(womField), wom, "Week of Month should not change");
             assertEquals(result.get(woyField), woy, "Week of Year should not change");
         }
     }
 
+    @Test(dataProvider="weekFields")
+    public void test_rangeWeekOfWeekBasedYear(DayOfWeek firstDayOfWeek, int minDays) {
+        WeekFields weekFields = WeekFields.of(firstDayOfWeek, minDays);
+        TemporalField dowField = weekFields.dayOfWeek();
+        TemporalField wowByField = weekFields.weekOfWeekBasedYear();
+
+        LocalDate day1 = LocalDate.of(2012, 1, weekFields.getMinimalDaysInFirstWeek());
+        day1 = day1.with(wowByField, 1).with(dowField, 1);
+
+        LocalDate day2 = LocalDate.of(2013, 1, weekFields.getMinimalDaysInFirstWeek());
+        day2 = day2.with(wowByField, 1).with(dowField, 1);
+
+        int expectedWeeks = (int)ChronoUnit.DAYS.between(day1, day2) / 7;
+
+        ValueRange range = day1.range(wowByField);
+        assertEquals(range.getMaximum(), expectedWeeks, "Range incorrect");
+    }
+
+    @Test(dataProvider="weekFields")
+    public void test_withWeekOfWeekBasedYear(DayOfWeek firstDayOfWeek, int minDays) {
+        LocalDate day = LocalDate.of(2012, 12, 31);
+        WeekFields week = WeekFields.of(firstDayOfWeek, minDays);
+        TemporalField dowField = week.dayOfWeek();
+        TemporalField wowbyField = week.weekOfWeekBasedYear();
+        TemporalField yowbyField = week.weekBasedYear();
+
+        int dowExpected = (day.get(dowField) - 1) % 7 + 1;
+        LocalDate dowDate = day.with(dowField, dowExpected);
+        int dowResult = dowDate.get(dowField);
+        assertEquals(dowResult, dowExpected, "Localized DayOfWeek not correct; " + day + " -->" + dowDate);
+
+        int weekExpected = day.get(wowbyField) + 1;
+        ValueRange range = day.range(wowbyField);
+        weekExpected = ((weekExpected - 1) % (int)range.getMaximum()) + 1;
+        LocalDate weekDate = day.with(wowbyField, weekExpected);
+        int weekResult = weekDate.get(wowbyField);
+        assertEquals(weekResult, weekExpected, "Localized WeekOfWeekBasedYear not correct; " + day + " -->" + weekDate);
+
+        int yearExpected = day.get(yowbyField) + 1;
+
+        LocalDate yearDate = day.with(yowbyField, yearExpected);
+        int yearResult = yearDate.get(yowbyField);
+        assertEquals(yearResult, yearExpected, "Localized WeekBasedYear not correct; " + day  + " --> " + yearDate);
+
+        range = yearDate.range(wowbyField);
+        weekExpected = Math.min(day.get(wowbyField), (int)range.getMaximum());
+
+        int weekActual = yearDate.get(wowbyField);
+        assertEquals(weekActual, weekExpected, "Localized WeekOfWeekBasedYear week should not change; " + day + " --> " + yearDate + ", actual: " + weekActual + ", weekExpected: " + weekExpected);
+    }
+
     //-----------------------------------------------------------------------
     @Test(dataProvider="weekFields")
     public void test_parse_resolve_localizedWom(DayOfWeek firstDayOfWeek, int minDays) {
@@ -381,6 +466,29 @@
         }
     }
 
+    @Test(dataProvider="weekFields")
+    public void test_parse_resolve_localizedWoWBY(DayOfWeek firstDayOfWeek, int minDays) {
+        LocalDate date = LocalDate.of(2012, 12, 31);
+        WeekFields week = WeekFields.of(firstDayOfWeek, minDays);
+        TemporalField dowField = week.dayOfWeek();
+        TemporalField wowbyField = week.weekOfWeekBasedYear();
+        TemporalField yowbyField = week.weekBasedYear();
+
+        for (int i = 1; i <= 60; i++) {
+            // Test that with dayOfWeek, week of year and year of week-based-year it computes the date
+            DateTimeFormatter f = new DateTimeFormatterBuilder()
+                    .appendValue(yowbyField).appendLiteral('-')
+                    .appendValue(wowbyField).appendLiteral('-')
+                    .appendValue(dowField).toFormatter();
+            String str = date.get(yowbyField) + "-" + date.get(wowbyField) + "-" +
+                    date.get(dowField);
+            LocalDate parsed = LocalDate.parse(str, f);
+            assertEquals(parsed, date, " :: " + str + " " + i);
+
+            date = date.plusDays(1);
+        }
+    }
+
     //-----------------------------------------------------------------------
     @Test(dataProvider="weekFields")
     public void test_serializable_singleton(DayOfWeek firstDayOfWeek, int minDays) throws IOException, ClassNotFoundException {
@@ -401,4 +509,67 @@
         return objects;
     }
 
+    //-----------------------------------------------------------------------
+    @DataProvider(name="WeekBasedYearData")
+    Object[][] provider_WeekBasedYearData() {
+        return new Object[][] {
+            {WeekFields.of(DayOfWeek.SUNDAY, 1),  2008, 52, 7, LocalDate.of(2008, 12, 27)},
+            {WeekFields.of(DayOfWeek.SUNDAY, 1),  2009,  1, 1, LocalDate.of(2008, 12, 28)},
+            {WeekFields.of(DayOfWeek.SUNDAY, 1),  2009,  1, 2, LocalDate.of(2008, 12, 29)},
+            {WeekFields.of(DayOfWeek.SUNDAY, 1),  2009,  1, 3, LocalDate.of(2008, 12, 30)},
+            {WeekFields.of(DayOfWeek.SUNDAY, 1),  2009,  1, 4, LocalDate.of(2008, 12, 31)},
+            {WeekFields.of(DayOfWeek.SUNDAY, 1),  2009,  1, 5, LocalDate.of(2009, 1, 1)},
+            {WeekFields.of(DayOfWeek.SUNDAY, 1),  2009,  2, 1, LocalDate.of(2009, 1, 4)},
+            {WeekFields.of(DayOfWeek.SUNDAY, 1),  2009,  2, 2, LocalDate.of(2009, 1, 5)},
+            {WeekFields.of(DayOfWeek.SUNDAY, 1),  2009,  2, 3, LocalDate.of(2009, 1, 6)},
+       };
+    }
+
+    @Test(dataProvider="WeekBasedYearData")
+    public void test_weekBasedYears(WeekFields weekDef, int weekBasedYear,
+            int weekOfWeekBasedYear, int dayOfWeek, LocalDate date) {
+        TemporalField dowField = weekDef.dayOfWeek();
+        TemporalField wowbyField = weekDef.weekOfWeekBasedYear();
+        TemporalField yowbyField = weekDef.weekBasedYear();
+        assertEquals(date.get(dowField), dayOfWeek, "DayOfWeek mismatch");
+        assertEquals(date.get(wowbyField), weekOfWeekBasedYear, "Week of WeekBasedYear mismatch");
+        assertEquals(date.get(yowbyField), weekBasedYear, "Year of WeekBasedYear mismatch");
+    }
+
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="IsoWeekData")
+    Object[][] data_week() {
+        return new Object[][] {
+                {LocalDate.of(1969, 12, 29), DayOfWeek.MONDAY, 1, 1970},
+                {LocalDate.of(2012, 12, 23), DayOfWeek.SUNDAY, 51, 2012},
+                {LocalDate.of(2012, 12, 24), DayOfWeek.MONDAY, 52, 2012},
+                {LocalDate.of(2012, 12, 27), DayOfWeek.THURSDAY, 52, 2012},
+                {LocalDate.of(2012, 12, 28), DayOfWeek.FRIDAY, 52, 2012},
+                {LocalDate.of(2012, 12, 29), DayOfWeek.SATURDAY, 52, 2012},
+                {LocalDate.of(2012, 12, 30), DayOfWeek.SUNDAY, 52, 2012},
+                {LocalDate.of(2012, 12, 31), DayOfWeek.MONDAY, 1, 2013},
+                {LocalDate.of(2013, 1, 1), DayOfWeek.TUESDAY, 1, 2013},
+                {LocalDate.of(2013, 1, 2), DayOfWeek.WEDNESDAY, 1, 2013},
+                {LocalDate.of(2013, 1, 6), DayOfWeek.SUNDAY, 1, 2013},
+                {LocalDate.of(2013, 1, 7), DayOfWeek.MONDAY, 2, 2013},
+        };
+    }
+
+    //-----------------------------------------------------------------------
+    // WEEK_OF_WEEK_BASED_YEAR
+    // Validate with the same data used by IsoFields.
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="IsoWeekData")
+    public void test_WOWBY(LocalDate date, DayOfWeek dow, int week, int wby) {
+        WeekFields weekDef = WeekFields.ISO;
+        TemporalField dowField = weekDef.dayOfWeek();
+        TemporalField wowbyField = weekDef.weekOfWeekBasedYear();
+        TemporalField yowbyField = weekDef.weekBasedYear();
+
+        assertEquals(date.get(dowField), dow.getValue());
+        assertEquals(date.get(wowbyField), week);
+        assertEquals(date.get(yowbyField), wby);
+    }
+
 }
--- a/test/java/time/tck/java/time/temporal/TestChronoLocalDate.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,503 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package tck.java.time.temporal;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.time.Duration;
-import java.time.LocalDate;
-import java.time.chrono.Chronology;
-import java.time.chrono.ChronoLocalDate;
-import java.time.chrono.IsoChronology;
-import java.time.temporal.ChronoUnit;
-import java.time.temporal.Temporal;
-import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalAdjuster;
-import java.time.temporal.TemporalAmount;
-import java.time.temporal.TemporalField;
-import java.time.temporal.TemporalUnit;
-import java.time.temporal.ValueRange;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.testng.Assert;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Test assertions that must be true for the built-in ISO chronology.
- */
-@Test
-public class TestChronoLocalDate {
-
-    //-----------------------------------------------------------------------
-    // regular data factory for names and descriptions of ISO calendar
-    //-----------------------------------------------------------------------
-    @DataProvider(name = "calendars")
-    Chronology[][] data_of_calendars() {
-        return new Chronology[][]{
-            {IsoChronology.INSTANCE},
-        };
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badWithAdjusterChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDate date = chrono.date(refDate);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDate date2 = chrono2.date(refDate);
-            TemporalAdjuster adjuster = new FixedAdjuster(date2);
-            if (chrono != chrono2) {
-                try {
-                    date.with(adjuster);
-                    Assert.fail("WithAdjuster should have thrown a ClassCastException");
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDate result = date.with(adjuster);
-                assertEquals(result, date2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badPlusAdjusterChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDate date = chrono.date(refDate);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDate date2 = chrono2.date(refDate);
-            TemporalAmount adjuster = new FixedAdjuster(date2);
-            if (chrono != chrono2) {
-                try {
-                    date.plus(adjuster);
-                    Assert.fail("WithAdjuster should have thrown a ClassCastException");
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDate result = date.plus(adjuster);
-                assertEquals(result, date2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badMinusAdjusterChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDate date = chrono.date(refDate);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDate date2 = chrono2.date(refDate);
-            TemporalAmount adjuster = new FixedAdjuster(date2);
-            if (chrono != chrono2) {
-                try {
-                    date.minus(adjuster);
-                    Assert.fail("WithAdjuster should have thrown a ClassCastException");
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDate result = date.minus(adjuster);
-                assertEquals(result, date2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badPlusTemporalUnitChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDate date = chrono.date(refDate);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDate date2 = chrono2.date(refDate);
-            TemporalUnit adjuster = new FixedTemporalUnit(date2);
-            if (chrono != chrono2) {
-                try {
-                    date.plus(1, adjuster);
-                    Assert.fail("TemporalUnit.doPlus plus should have thrown a ClassCastException" + date.getClass()
-                            + ", can not be cast to " + date2.getClass());
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDate result = date.plus(1, adjuster);
-                assertEquals(result, date2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badMinusTemporalUnitChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDate date = chrono.date(refDate);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDate date2 = chrono2.date(refDate);
-            TemporalUnit adjuster = new FixedTemporalUnit(date2);
-            if (chrono != chrono2) {
-                try {
-                    date.minus(1, adjuster);
-                    Assert.fail("TemporalUnit.doPlus minus should have thrown a ClassCastException" + date.getClass()
-                            + ", can not be cast to " + date2.getClass());
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDate result = date.minus(1, adjuster);
-                assertEquals(result, date2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badTemporalFieldChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDate date = chrono.date(refDate);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDate date2 = chrono2.date(refDate);
-            TemporalField adjuster = new FixedTemporalField(date2);
-            if (chrono != chrono2) {
-                try {
-                    date.with(adjuster, 1);
-                    Assert.fail("TemporalField doWith() should have thrown a ClassCastException" + date.getClass()
-                            + ", can not be cast to " + date2.getClass());
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDate result = date.with(adjuster, 1);
-                assertEquals(result, date2, "TemporalField doWith() failed to replace date");
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // isBefore, isAfter, isEqual, DATE_COMPARATOR
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_date_comparisons(Chronology chrono) {
-        List<ChronoLocalDate> dates = new ArrayList<>();
-
-        ChronoLocalDate date = chrono.date(LocalDate.of(1900, 1, 1));
-
-        // Insert dates in order, no duplicates
-        dates.add(date.minus(1000, ChronoUnit.YEARS));
-        dates.add(date.minus(100, ChronoUnit.YEARS));
-        dates.add(date.minus(10, ChronoUnit.YEARS));
-        dates.add(date.minus(1, ChronoUnit.YEARS));
-        dates.add(date.minus(1, ChronoUnit.MONTHS));
-        dates.add(date.minus(1, ChronoUnit.WEEKS));
-        dates.add(date.minus(1, ChronoUnit.DAYS));
-        dates.add(date);
-        dates.add(date.plus(1, ChronoUnit.DAYS));
-        dates.add(date.plus(1, ChronoUnit.WEEKS));
-        dates.add(date.plus(1, ChronoUnit.MONTHS));
-        dates.add(date.plus(1, ChronoUnit.YEARS));
-        dates.add(date.plus(10, ChronoUnit.YEARS));
-        dates.add(date.plus(100, ChronoUnit.YEARS));
-        dates.add(date.plus(1000, ChronoUnit.YEARS));
-
-        // Check these dates against the corresponding dates for every calendar
-        for (Chronology[] clist : data_of_calendars()) {
-            List<ChronoLocalDate> otherDates = new ArrayList<>();
-            Chronology chrono2 = clist[0];
-            for (ChronoLocalDate d : dates) {
-                otherDates.add(chrono2.date(d));
-            }
-
-            // Now compare  the sequence of original dates with the sequence of converted dates
-            for (int i = 0; i < dates.size(); i++) {
-                ChronoLocalDate a = dates.get(i);
-                for (int j = 0; j < otherDates.size(); j++) {
-                    ChronoLocalDate b = otherDates.get(j);
-                    int cmp = ChronoLocalDate.DATE_COMPARATOR.compare(a, b);
-                    if (i < j) {
-                        assertTrue(cmp < 0, a + " compare " + b);
-                        assertEquals(a.isBefore(b), true, a + " isBefore " + b);
-                        assertEquals(a.isAfter(b), false, a + " isAfter " + b);
-                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
-                    } else if (i > j) {
-                        assertTrue(cmp > 0, a + " compare " + b);
-                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
-                        assertEquals(a.isAfter(b), true, a + " isAfter " + b);
-                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
-                    } else {
-                        assertTrue(cmp == 0, a + " compare " + b);
-                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
-                        assertEquals(a.isAfter(b), false, a + " isAfter " + b);
-                        assertEquals(a.isEqual(b), true, a + " isEqual " + b);
-                    }
-                }
-            }
-        }
-    }
-
-    public void test_date_comparator_checkGenerics_ISO() {
-        List<LocalDate> dates = new ArrayList<>();
-        LocalDate date = LocalDate.of(1900, 1, 1);
-
-        // Insert dates in order, no duplicates
-        dates.add(date.minus(10, ChronoUnit.YEARS));
-        dates.add(date.minus(1, ChronoUnit.YEARS));
-        dates.add(date.minus(1, ChronoUnit.MONTHS));
-        dates.add(date.minus(1, ChronoUnit.WEEKS));
-        dates.add(date.minus(1, ChronoUnit.DAYS));
-        dates.add(date);
-        dates.add(date.plus(1, ChronoUnit.DAYS));
-        dates.add(date.plus(1, ChronoUnit.WEEKS));
-        dates.add(date.plus(1, ChronoUnit.MONTHS));
-        dates.add(date.plus(1, ChronoUnit.YEARS));
-        dates.add(date.plus(10, ChronoUnit.YEARS));
-
-        List<LocalDate> copy = new ArrayList<>(dates);
-        Collections.shuffle(copy);
-        Collections.sort(copy, ChronoLocalDate.DATE_COMPARATOR);
-        assertEquals(copy, dates);
-        assertTrue(ChronoLocalDate.DATE_COMPARATOR.compare(copy.get(0), copy.get(1)) < 0);
-    }
-
-    public void test_date_comparator_checkGenerics_LocalDate() {
-        List<LocalDate> dates = new ArrayList<>();
-        LocalDate date = LocalDate.of(1900, 1, 1);
-
-        // Insert dates in order, no duplicates
-        dates.add(date.minus(10, ChronoUnit.YEARS));
-        dates.add(date.minus(1, ChronoUnit.YEARS));
-        dates.add(date.minus(1, ChronoUnit.MONTHS));
-        dates.add(date.minus(1, ChronoUnit.WEEKS));
-        dates.add(date.minus(1, ChronoUnit.DAYS));
-        dates.add(date);
-        dates.add(date.plus(1, ChronoUnit.DAYS));
-        dates.add(date.plus(1, ChronoUnit.WEEKS));
-        dates.add(date.plus(1, ChronoUnit.MONTHS));
-        dates.add(date.plus(1, ChronoUnit.YEARS));
-        dates.add(date.plus(10, ChronoUnit.YEARS));
-
-        List<LocalDate> copy = new ArrayList<>(dates);
-        Collections.shuffle(copy);
-        Collections.sort(copy, ChronoLocalDate.DATE_COMPARATOR);
-        assertEquals(copy, dates);
-        assertTrue(ChronoLocalDate.DATE_COMPARATOR.compare(copy.get(0), copy.get(1)) < 0);
-    }
-
-    //-----------------------------------------------------------------------
-    // Test Serialization of ISO via chrono API
-    //-----------------------------------------------------------------------
-    @Test( groups={"tck"}, dataProvider="calendars")
-    public void test_ChronoSerialization(Chronology chrono) throws Exception {
-        LocalDate ref = LocalDate.of(2000, 1, 5);
-        ChronoLocalDate orginal = chrono.date(ref);
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(orginal);
-        out.close();
-        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        ObjectInputStream in = new ObjectInputStream(bais);
-        @SuppressWarnings("unchecked")
-        ChronoLocalDate ser = (ChronoLocalDate) in.readObject();
-        assertEquals(ser, orginal, "deserialized date is wrong");
-    }
-
-    /**
-     * FixedAdjusted returns a fixed Temporal in all adjustments.
-     * Construct an adjuster with the Temporal that should be returned from adjust.
-     */
-    static class FixedAdjuster implements TemporalAdjuster, TemporalAmount {
-        private Temporal datetime;
-
-        FixedAdjuster(Temporal datetime) {
-            this.datetime = datetime;
-        }
-
-        @Override
-        public Temporal adjustInto(Temporal ignore) {
-            return datetime;
-        }
-
-        @Override
-        public Temporal addTo(Temporal ignore) {
-            return datetime;
-        }
-
-        @Override
-        public Temporal subtractFrom(Temporal ignore) {
-            return datetime;
-        }
-
-        @Override
-        public long get(TemporalUnit unit) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public List<TemporalUnit> getUnits() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-    }
-
-    /**
-     * FixedTemporalUnit returns a fixed Temporal in all adjustments.
-     * Construct an FixedTemporalUnit with the Temporal that should be returned from addTo.
-     */
-    static class FixedTemporalUnit implements TemporalUnit {
-        private Temporal temporal;
-
-        FixedTemporalUnit(Temporal temporal) {
-            this.temporal = temporal;
-        }
-
-        @Override
-        public String getName() {
-            return "FixedTemporalUnit";
-        }
-
-        @Override
-        public Duration getDuration() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public boolean isDurationEstimated() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public boolean isSupportedBy(Temporal temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @SuppressWarnings("unchecked")
-        @Override
-        public <R extends Temporal> R addTo(R temporal, long amount) {
-            return (R) this.temporal;
-        }
-
-        @Override
-        public long between(Temporal temporal1, Temporal temporal2) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-    }
-
-    /**
-     * FixedTemporalField returns a fixed Temporal in all adjustments.
-     * Construct an FixedTemporalField with the Temporal that should be returned from adjustInto.
-     */
-    static class FixedTemporalField implements TemporalField {
-        private Temporal temporal;
-        FixedTemporalField(Temporal temporal) {
-            this.temporal = temporal;
-        }
-
-        @Override
-        public String getName() {
-            return "FixedTemporalField";
-        }
-
-        @Override
-        public TemporalUnit getBaseUnit() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public TemporalUnit getRangeUnit() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public ValueRange range() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public boolean isSupportedBy(TemporalAccessor temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public long getFrom(TemporalAccessor temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @SuppressWarnings("unchecked")
-        @Override
-        public <R extends Temporal> R adjustInto(R temporal, long newValue) {
-            return (R) this.temporal;
-        }
-    }
-}
--- a/test/java/time/tck/java/time/temporal/TestChronoLocalDateTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,471 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package tck.java.time.temporal;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.time.Duration;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.LocalTime;
-import java.time.chrono.HijrahChronology;
-import java.time.chrono.JapaneseChronology;
-import java.time.chrono.MinguoChronology;
-import java.time.chrono.ThaiBuddhistChronology;
-import java.time.chrono.ChronoLocalDate;
-import java.time.chrono.ChronoLocalDateTime;
-import java.time.chrono.Chronology;
-import java.time.chrono.IsoChronology;
-import java.time.temporal.ChronoUnit;
-import java.time.temporal.Temporal;
-import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalAdjuster;
-import java.time.temporal.TemporalAmount;
-import java.time.temporal.TemporalField;
-import java.time.temporal.TemporalUnit;
-import java.time.temporal.ValueRange;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.testng.Assert;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Test assertions that must be true for all built-in chronologies.
- */
-@Test
-public class TestChronoLocalDateTime {
-
-    //-----------------------------------------------------------------------
-    // regular data factory for names and descriptions of available calendars
-    //-----------------------------------------------------------------------
-    @DataProvider(name = "calendars")
-    Chronology[][] data_of_calendars() {
-        return new Chronology[][]{
-                    {HijrahChronology.INSTANCE},
-                    {IsoChronology.INSTANCE},
-                    {JapaneseChronology.INSTANCE},
-                    {MinguoChronology.INSTANCE},
-                    {ThaiBuddhistChronology.INSTANCE}};
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badWithAdjusterChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
-            TemporalAdjuster adjuster = new FixedAdjuster(cdt2);
-            if (chrono != chrono2) {
-                try {
-                    cdt.with(adjuster);
-                    Assert.fail("WithAdjuster should have thrown a ClassCastException, "
-                            + "required: " + cdt + ", supplied: " + cdt2);
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDateTime<?> result = cdt.with(adjuster);
-                assertEquals(result, cdt2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badPlusAdjusterChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
-            TemporalAmount adjuster = new FixedAdjuster(cdt2);
-            if (chrono != chrono2) {
-                try {
-                    cdt.plus(adjuster);
-                    Assert.fail("WithAdjuster should have thrown a ClassCastException, "
-                            + "required: " + cdt + ", supplied: " + cdt2);
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDateTime<?> result = cdt.plus(adjuster);
-                assertEquals(result, cdt2, "WithAdjuster failed to replace date time");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badMinusAdjusterChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
-            TemporalAmount adjuster = new FixedAdjuster(cdt2);
-            if (chrono != chrono2) {
-                try {
-                    cdt.minus(adjuster);
-                    Assert.fail("WithAdjuster should have thrown a ClassCastException, "
-                            + "required: " + cdt + ", supplied: " + cdt2);
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDateTime<?> result = cdt.minus(adjuster);
-                assertEquals(result, cdt2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badPlusTemporalUnitChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
-            TemporalUnit adjuster = new FixedTemporalUnit(cdt2);
-            if (chrono != chrono2) {
-                try {
-                    cdt.plus(1, adjuster);
-                    Assert.fail("TemporalUnit.doPlus plus should have thrown a ClassCastException" + cdt
-                            + ", can not be cast to " + cdt2);
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDateTime<?> result = cdt.plus(1, adjuster);
-                assertEquals(result, cdt2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badMinusTemporalUnitChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
-            TemporalUnit adjuster = new FixedTemporalUnit(cdt2);
-            if (chrono != chrono2) {
-                try {
-                    cdt.minus(1, adjuster);
-                    Assert.fail("TemporalUnit.doPlus minus should have thrown a ClassCastException" + cdt.getClass()
-                            + ", can not be cast to " + cdt2.getClass());
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDateTime<?> result = cdt.minus(1, adjuster);
-                assertEquals(result, cdt2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badTemporalFieldChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON);
-            TemporalField adjuster = new FixedTemporalField(cdt2);
-            if (chrono != chrono2) {
-                try {
-                    cdt.with(adjuster, 1);
-                    Assert.fail("TemporalField doWith() should have thrown a ClassCastException" + cdt.getClass()
-                            + ", can not be cast to " + cdt2.getClass());
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoLocalDateTime<?> result = cdt.with(adjuster, 1);
-                assertEquals(result, cdt2, "TemporalField doWith() failed to replace date");
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // isBefore, isAfter, isEqual
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_datetime_comparisons(Chronology chrono) {
-        List<ChronoLocalDateTime<?>> dates = new ArrayList<>();
-
-        ChronoLocalDateTime<?> date = chrono.date(LocalDate.of(1900, 1, 1)).atTime(LocalTime.MIN);
-
-        // Insert dates in order, no duplicates
-        dates.add(date.minus(100, ChronoUnit.YEARS));
-        dates.add(date.minus(1, ChronoUnit.YEARS));
-        dates.add(date.minus(1, ChronoUnit.MONTHS));
-        dates.add(date.minus(1, ChronoUnit.WEEKS));
-        dates.add(date.minus(1, ChronoUnit.DAYS));
-        dates.add(date.minus(1, ChronoUnit.HOURS));
-        dates.add(date.minus(1, ChronoUnit.MINUTES));
-        dates.add(date.minus(1, ChronoUnit.SECONDS));
-        dates.add(date.minus(1, ChronoUnit.NANOS));
-        dates.add(date);
-        dates.add(date.plus(1, ChronoUnit.NANOS));
-        dates.add(date.plus(1, ChronoUnit.SECONDS));
-        dates.add(date.plus(1, ChronoUnit.MINUTES));
-        dates.add(date.plus(1, ChronoUnit.HOURS));
-        dates.add(date.plus(1, ChronoUnit.DAYS));
-        dates.add(date.plus(1, ChronoUnit.WEEKS));
-        dates.add(date.plus(1, ChronoUnit.MONTHS));
-        dates.add(date.plus(1, ChronoUnit.YEARS));
-        dates.add(date.plus(100, ChronoUnit.YEARS));
-
-        // Check these dates against the corresponding dates for every calendar
-        for (Chronology[] clist : data_of_calendars()) {
-            List<ChronoLocalDateTime<?>> otherDates = new ArrayList<>();
-            Chronology chrono2 = clist[0];
-            for (ChronoLocalDateTime<?> d : dates) {
-                otherDates.add(chrono2.date(d).atTime(d.toLocalTime()));
-            }
-
-            // Now compare  the sequence of original dates with the sequence of converted dates
-            for (int i = 0; i < dates.size(); i++) {
-                ChronoLocalDateTime<?> a = dates.get(i);
-                for (int j = 0; j < otherDates.size(); j++) {
-                    ChronoLocalDateTime<?> b = otherDates.get(j);
-                    int cmp = ChronoLocalDateTime.DATE_TIME_COMPARATOR.compare(a, b);
-                    if (i < j) {
-                        assertTrue(cmp < 0, a + " compare " + b);
-                        assertEquals(a.isBefore(b), true, a + " isBefore " + b);
-                        assertEquals(a.isAfter(b), false, a + " isAfter " + b);
-                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
-                    } else if (i > j) {
-                        assertTrue(cmp > 0, a + " compare " + b);
-                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
-                        assertEquals(a.isAfter(b), true, a + " isAfter " + b);
-                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
-                    } else {
-                        assertTrue(cmp == 0, a + " compare " + b);
-                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
-                        assertEquals(a.isAfter(b), false, a + " isAfter " + b);
-                        assertEquals(a.isEqual(b), true, a + " isEqual " + b);
-                    }
-                }
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // Test Serialization of ISO via chrono API
-    //-----------------------------------------------------------------------
-    @Test( groups={"tck"}, dataProvider="calendars")
-    public void test_ChronoLocalDateTimeSerialization(Chronology chrono) throws Exception {
-        LocalDateTime ref = LocalDate.of(2000, 1, 5).atTime(12, 1, 2, 3);
-        ChronoLocalDateTime<?> orginal = chrono.date(ref).atTime(ref.toLocalTime());
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(orginal);
-        out.close();
-        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        ObjectInputStream in = new ObjectInputStream(bais);
-        @SuppressWarnings("unchecked")
-        ChronoLocalDateTime<?> ser = (ChronoLocalDateTime<?>) in.readObject();
-        assertEquals(ser, orginal, "deserialized date is wrong");
-    }
-
-    /**
-     * FixedAdjusted returns a fixed Temporal in all adjustments.
-     * Construct an adjuster with the Temporal that should be returned from adjust.
-     */
-    static class FixedAdjuster implements TemporalAdjuster, TemporalAmount {
-        private Temporal datetime;
-
-        FixedAdjuster(Temporal datetime) {
-            this.datetime = datetime;
-        }
-
-        @Override
-        public Temporal adjustInto(Temporal ignore) {
-            return datetime;
-        }
-
-        @Override
-        public Temporal addTo(Temporal ignore) {
-            return datetime;
-        }
-
-        @Override
-        public Temporal subtractFrom(Temporal ignore) {
-            return datetime;
-        }
-
-        @Override
-        public long get(TemporalUnit unit) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public List<TemporalUnit> getUnits() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-    }
-
-    /**
-     * FixedTemporalUnit returns a fixed Temporal in all adjustments.
-     * Construct an FixedTemporalUnit with the Temporal that should be returned from addTo.
-     */
-    static class FixedTemporalUnit implements TemporalUnit {
-        private Temporal temporal;
-
-        FixedTemporalUnit(Temporal temporal) {
-            this.temporal = temporal;
-        }
-
-        @Override
-        public String getName() {
-            return "FixedTemporalUnit";
-        }
-
-        @Override
-        public Duration getDuration() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public boolean isDurationEstimated() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public boolean isSupportedBy(Temporal temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @SuppressWarnings("unchecked")
-        @Override
-        public <R extends Temporal> R addTo(R temporal, long amount) {
-            return (R) this.temporal;
-        }
-
-        @Override
-        public long between(Temporal temporal1, Temporal temporal2) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-    }
-
-    /**
-     * FixedTemporalField returns a fixed Temporal in all adjustments.
-     * Construct an FixedTemporalField with the Temporal that should be returned from adjustInto.
-     */
-    static class FixedTemporalField implements TemporalField {
-        private Temporal temporal;
-        FixedTemporalField(Temporal temporal) {
-            this.temporal = temporal;
-        }
-
-        @Override
-        public String getName() {
-            return "FixedTemporalField";
-        }
-
-        @Override
-        public TemporalUnit getBaseUnit() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public TemporalUnit getRangeUnit() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public ValueRange range() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public boolean isSupportedBy(TemporalAccessor temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public long getFrom(TemporalAccessor temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @SuppressWarnings("unchecked")
-        @Override
-        public <R extends Temporal> R adjustInto(R temporal, long newValue) {
-            return (R) this.temporal;
-        }
-    }
-}
--- a/test/java/time/tck/java/time/temporal/TestChronoZonedDateTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,476 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package tck.java.time.temporal;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.time.Duration;
-import java.time.LocalDate;
-import java.time.LocalTime;
-import java.time.ZoneId;
-import java.time.ZoneOffset;
-import java.time.ZonedDateTime;
-import java.time.chrono.HijrahChronology;
-import java.time.chrono.JapaneseChronology;
-import java.time.chrono.MinguoChronology;
-import java.time.chrono.ThaiBuddhistChronology;
-import java.time.chrono.ChronoLocalDate;
-import java.time.chrono.ChronoZonedDateTime;
-import java.time.chrono.Chronology;
-import java.time.chrono.IsoChronology;
-import java.time.temporal.ChronoUnit;
-import java.time.temporal.Temporal;
-import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalAdjuster;
-import java.time.temporal.TemporalAmount;
-import java.time.temporal.TemporalField;
-import java.time.temporal.TemporalUnit;
-import java.time.temporal.ValueRange;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.testng.Assert;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Test assertions that must be true for all built-in chronologies.
- */
-@Test
-public class TestChronoZonedDateTime {
-
-    //-----------------------------------------------------------------------
-    // regular data factory for names and descriptions of available calendars
-    //-----------------------------------------------------------------------
-    @DataProvider(name = "calendars")
-    Chronology[][] data_of_calendars() {
-        return new Chronology[][]{
-                    {HijrahChronology.INSTANCE},
-                    {IsoChronology.INSTANCE},
-                    {JapaneseChronology.INSTANCE},
-                    {MinguoChronology.INSTANCE},
-                    {ThaiBuddhistChronology.INSTANCE},
-        };
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badWithAdjusterChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
-            TemporalAdjuster adjuster = new FixedAdjuster(czdt2);
-            if (chrono != chrono2) {
-                try {
-                    czdt.with(adjuster);
-                    Assert.fail("WithAdjuster should have thrown a ClassCastException, "
-                            + "required: " + czdt + ", supplied: " + czdt2);
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                ChronoZonedDateTime<?> result = czdt.with(adjuster);
-                assertEquals(result, czdt2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badPlusAdjusterChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
-            TemporalAmount adjuster = new FixedAdjuster(czdt2);
-            if (chrono != chrono2) {
-                try {
-                    czdt.plus(adjuster);
-                    Assert.fail("WithAdjuster should have thrown a ClassCastException, "
-                            + "required: " + czdt + ", supplied: " + czdt2);
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoZonedDateTime<?> result = czdt.plus(adjuster);
-                assertEquals(result, czdt2, "WithAdjuster failed to replace date time");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badMinusAdjusterChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
-            TemporalAmount adjuster = new FixedAdjuster(czdt2);
-            if (chrono != chrono2) {
-                try {
-                    czdt.minus(adjuster);
-                    Assert.fail("WithAdjuster should have thrown a ClassCastException, "
-                            + "required: " + czdt + ", supplied: " + czdt2);
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoZonedDateTime<?> result = czdt.minus(adjuster);
-                assertEquals(result, czdt2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badPlusTemporalUnitChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
-            TemporalUnit adjuster = new FixedTemporalUnit(czdt2);
-            if (chrono != chrono2) {
-                try {
-                    czdt.plus(1, adjuster);
-                    Assert.fail("TemporalUnit.doPlus plus should have thrown a ClassCastException, " + czdt
-                            + " can not be cast to " + czdt2);
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoZonedDateTime<?> result = czdt.plus(1, adjuster);
-                assertEquals(result, czdt2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badMinusTemporalUnitChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
-            TemporalUnit adjuster = new FixedTemporalUnit(czdt2);
-            if (chrono != chrono2) {
-                try {
-                    czdt.minus(1, adjuster);
-                    Assert.fail("TemporalUnit.doPlus minus should have thrown a ClassCastException, " + czdt.getClass()
-                            + " can not be cast to " + czdt2.getClass());
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoZonedDateTime<?> result = czdt.minus(1, adjuster);
-                assertEquals(result, czdt2, "WithAdjuster failed to replace date");
-            }
-        }
-    }
-
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_badTemporalFieldChrono(Chronology chrono) {
-        LocalDate refDate = LocalDate.of(1900, 1, 1);
-        ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
-        for (Chronology[] clist : data_of_calendars()) {
-            Chronology chrono2 = clist[0];
-            ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC);
-            TemporalField adjuster = new FixedTemporalField(czdt2);
-            if (chrono != chrono2) {
-                try {
-                    czdt.with(adjuster, 1);
-                    Assert.fail("TemporalField doWith() should have thrown a ClassCastException, " + czdt.getClass()
-                            + " can not be cast to " + czdt2.getClass());
-                } catch (ClassCastException cce) {
-                    // Expected exception; not an error
-                }
-            } else {
-                // Same chronology,
-                ChronoZonedDateTime<?> result = czdt.with(adjuster, 1);
-                assertEquals(result, czdt2, "TemporalField doWith() failed to replace date");
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // isBefore, isAfter, isEqual, INSTANT_COMPARATOR  test a Chronology against the other Chronos
-    //-----------------------------------------------------------------------
-    @Test(groups={"tck"}, dataProvider="calendars")
-    public void test_zonedDateTime_comparisons(Chronology chrono) {
-        List<ChronoZonedDateTime<?>> dates = new ArrayList<>();
-
-        ChronoZonedDateTime<?> date = chrono.date(LocalDate.of(1900, 1, 1))
-                .atTime(LocalTime.MIN)
-                .atZone(ZoneOffset.UTC);
-
-        // Insert dates in order, no duplicates
-        dates.add(date.minus(100, ChronoUnit.YEARS));
-        dates.add(date.minus(1, ChronoUnit.YEARS));
-        dates.add(date.minus(1, ChronoUnit.MONTHS));
-        dates.add(date.minus(1, ChronoUnit.WEEKS));
-        dates.add(date.minus(1, ChronoUnit.DAYS));
-        dates.add(date.minus(1, ChronoUnit.HOURS));
-        dates.add(date.minus(1, ChronoUnit.MINUTES));
-        dates.add(date.minus(1, ChronoUnit.SECONDS));
-        dates.add(date.minus(1, ChronoUnit.NANOS));
-        dates.add(date);
-        dates.add(date.plus(1, ChronoUnit.NANOS));
-        dates.add(date.plus(1, ChronoUnit.SECONDS));
-        dates.add(date.plus(1, ChronoUnit.MINUTES));
-        dates.add(date.plus(1, ChronoUnit.HOURS));
-        dates.add(date.plus(1, ChronoUnit.DAYS));
-        dates.add(date.plus(1, ChronoUnit.WEEKS));
-        dates.add(date.plus(1, ChronoUnit.MONTHS));
-        dates.add(date.plus(1, ChronoUnit.YEARS));
-        dates.add(date.plus(100, ChronoUnit.YEARS));
-
-        // Check these dates against the corresponding dates for every calendar
-        for (Chronology[] clist : data_of_calendars()) {
-            List<ChronoZonedDateTime<?>> otherDates = new ArrayList<>();
-            Chronology chrono2 = IsoChronology.INSTANCE; //clist[0];
-            for (ChronoZonedDateTime<?> d : dates) {
-                otherDates.add(chrono2.date(d).atTime(d.toLocalTime()).atZone(d.getZone()));
-            }
-
-            // Now compare  the sequence of original dates with the sequence of converted dates
-            for (int i = 0; i < dates.size(); i++) {
-                ChronoZonedDateTime<?> a = dates.get(i);
-                for (int j = 0; j < otherDates.size(); j++) {
-                    ChronoZonedDateTime<?> b = otherDates.get(j);
-                    int cmp = ChronoZonedDateTime.INSTANT_COMPARATOR.compare(a, b);
-                    if (i < j) {
-                        assertTrue(cmp < 0, a + " compare " + b);
-                        assertEquals(a.isBefore(b), true, a + " isBefore " + b);
-                        assertEquals(a.isAfter(b), false, a + " ifAfter " + b);
-                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
-                    } else if (i > j) {
-                        assertTrue(cmp > 0, a + " compare " + b);
-                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
-                        assertEquals(a.isAfter(b), true, a + " ifAfter " + b);
-                        assertEquals(a.isEqual(b), false, a + " isEqual " + b);
-                    } else {
-                        assertTrue(cmp == 0, a + " compare " + b);
-                        assertEquals(a.isBefore(b), false, a + " isBefore " + b);
-                        assertEquals(a.isAfter(b), false, a + " ifAfter " + b);
-                        assertEquals(a.isEqual(b), true, a + " isEqual " + b);
-                    }
-                }
-            }
-        }
-    }
-
-    //-----------------------------------------------------------------------
-    // Test Serialization of ISO via chrono API
-    //-----------------------------------------------------------------------
-    @Test( groups={"tck"}, dataProvider="calendars")
-    public void test_ChronoZonedDateTimeSerialization(Chronology chrono) throws Exception {
-        ZonedDateTime ref = LocalDate.of(2000, 1, 5).atTime(12, 1, 2, 3).atZone(ZoneId.of("GMT+01:23"));
-        ChronoZonedDateTime<?> orginal = chrono.date(ref).atTime(ref.toLocalTime()).atZone(ref.getZone());
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(orginal);
-        out.close();
-        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        ObjectInputStream in = new ObjectInputStream(bais);
-        @SuppressWarnings("unchecked")
-        ChronoZonedDateTime<?> ser = (ChronoZonedDateTime<?>) in.readObject();
-        assertEquals(ser, orginal, "deserialized date is wrong");
-    }
-
-
-    /**
-     * FixedAdjusted returns a fixed Temporal in all adjustments.
-     * Construct an adjuster with the Temporal that should be returned from adjust.
-     */
-    static class FixedAdjuster implements TemporalAdjuster, TemporalAmount {
-        private Temporal datetime;
-
-        FixedAdjuster(Temporal datetime) {
-            this.datetime = datetime;
-        }
-
-        @Override
-        public Temporal adjustInto(Temporal ignore) {
-            return datetime;
-        }
-
-        @Override
-        public Temporal addTo(Temporal ignore) {
-            return datetime;
-        }
-
-        @Override
-        public Temporal subtractFrom(Temporal ignore) {
-            return datetime;
-        }
-
-        @Override
-        public long get(TemporalUnit unit) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public List<TemporalUnit> getUnits() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-    }
-
-    /**
-     * FixedTemporalUnit returns a fixed Temporal in all adjustments.
-     * Construct an FixedTemporalUnit with the Temporal that should be returned from addTo.
-     */
-    static class FixedTemporalUnit implements TemporalUnit {
-        private Temporal temporal;
-
-        FixedTemporalUnit(Temporal temporal) {
-            this.temporal = temporal;
-        }
-
-        @Override
-        public String getName() {
-            return "FixedTemporalUnit";
-        }
-
-        @Override
-        public Duration getDuration() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public boolean isDurationEstimated() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public boolean isSupportedBy(Temporal temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @SuppressWarnings("unchecked")
-        @Override
-        public <R extends Temporal> R addTo(R temporal, long amount) {
-            return (R) this.temporal;
-        }
-
-        @Override
-        public long between(Temporal temporal1, Temporal temporal2) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-    }
-
-    /**
-     * FixedTemporalField returns a fixed Temporal in all adjustments.
-     * Construct an FixedTemporalField with the Temporal that should be returned from adjustInto.
-     */
-    static class FixedTemporalField implements TemporalField {
-        private Temporal temporal;
-        FixedTemporalField(Temporal temporal) {
-            this.temporal = temporal;
-        }
-
-        @Override
-        public String getName() {
-            return "FixedTemporalField";
-        }
-
-        @Override
-        public TemporalUnit getBaseUnit() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public TemporalUnit getRangeUnit() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public ValueRange range() {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public boolean isSupportedBy(TemporalAccessor temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @Override
-        public long getFrom(TemporalAccessor temporal) {
-            throw new UnsupportedOperationException("Not supported yet.");
-        }
-
-        @SuppressWarnings("unchecked")
-        @Override
-        public <R extends Temporal> R adjustInto(R temporal, long newValue) {
-            return (R) this.temporal;
-        }
-    }
-}
--- a/test/java/time/tck/java/time/zone/TCKFixedZoneRules.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/zone/TCKFixedZoneRules.java	Wed Apr 17 21:48:04 2013 -0700
@@ -65,7 +65,6 @@
 import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
-
 import java.time.Duration;
 import java.time.Instant;
 import java.time.LocalDateTime;
@@ -108,7 +107,7 @@
     //-----------------------------------------------------------------------
     // Basics
     //-----------------------------------------------------------------------
-    @Test(groups="tck", dataProvider="rules")
+    @Test(dataProvider="rules")
     public void test_serialization(ZoneRules test, ZoneOffset expectedOffset) throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream(baos);
@@ -127,19 +126,19 @@
     //-----------------------------------------------------------------------
     // basics
     //-----------------------------------------------------------------------
-    @Test(groups="tck", dataProvider="rules")
+    @Test(dataProvider="rules")
     public void test_getOffset_Instant(ZoneRules test, ZoneOffset expectedOffset) {
         assertEquals(test.getOffset(INSTANT), expectedOffset);
         assertEquals(test.getOffset((Instant) null), expectedOffset);
     }
 
-    @Test(groups="tck", dataProvider="rules")
+    @Test(dataProvider="rules")
     public void test_getOffset_LocalDateTime(ZoneRules test, ZoneOffset expectedOffset) {
         assertEquals(test.getOffset(LDT), expectedOffset);
         assertEquals(test.getOffset((LocalDateTime) null), expectedOffset);
     }
 
-    @Test(groups="tck", dataProvider="rules")
+    @Test(dataProvider="rules")
     public void test_getValidOffsets_LDT(ZoneRules test, ZoneOffset expectedOffset) {
         assertEquals(test.getValidOffsets(LDT).size(), 1);
         assertEquals(test.getValidOffsets(LDT).get(0), expectedOffset);
@@ -147,13 +146,13 @@
         assertEquals(test.getValidOffsets(null).get(0), expectedOffset);
     }
 
-    @Test(groups="tck", dataProvider="rules")
+    @Test(dataProvider="rules")
     public void test_getTransition_LDT(ZoneRules test, ZoneOffset expectedOffset) {
         assertEquals(test.getTransition(LDT), null);
         assertEquals(test.getTransition(null), null);
     }
 
-    @Test(groups="tck", dataProvider="rules")
+    @Test(dataProvider="rules")
     public void test_isValidOffset_LDT_ZO(ZoneRules test, ZoneOffset expectedOffset) {
         assertEquals(test.isValidOffset(LDT, expectedOffset), true);
         assertEquals(test.isValidOffset(LDT, ZoneOffset.UTC), false);
@@ -164,55 +163,55 @@
         assertEquals(test.isValidOffset(null, null), false);
     }
 
-    @Test(groups="tck", dataProvider="rules")
+    @Test(dataProvider="rules")
     public void test_getStandardOffset_Instant(ZoneRules test, ZoneOffset expectedOffset) {
         assertEquals(test.getStandardOffset(INSTANT), expectedOffset);
         assertEquals(test.getStandardOffset(null), expectedOffset);
     }
 
-    @Test(groups="tck", dataProvider="rules")
+    @Test(dataProvider="rules")
     public void test_getDaylightSavings_Instant(ZoneRules test, ZoneOffset expectedOffset) {
         assertEquals(test.getDaylightSavings(INSTANT), Duration.ZERO);
         assertEquals(test.getDaylightSavings(null), Duration.ZERO);
     }
 
-    @Test(groups="tck", dataProvider="rules")
+    @Test(dataProvider="rules")
     public void test_isDaylightSavings_Instant(ZoneRules test, ZoneOffset expectedOffset) {
         assertEquals(test.isDaylightSavings(INSTANT), false);
         assertEquals(test.isDaylightSavings(null), false);
     }
 
     //-------------------------------------------------------------------------
-    @Test(groups="tck", dataProvider="rules")
+    @Test(dataProvider="rules")
     public void test_nextTransition_Instant(ZoneRules test, ZoneOffset expectedOffset) {
         assertEquals(test.nextTransition(INSTANT), null);
         assertEquals(test.nextTransition(null), null);
     }
 
-    @Test(groups="tck", dataProvider="rules")
+    @Test(dataProvider="rules")
     public void test_previousTransition_Instant(ZoneRules test, ZoneOffset expectedOffset) {
         assertEquals(test.previousTransition(INSTANT), null);
         assertEquals(test.previousTransition(null), null);
     }
 
     //-------------------------------------------------------------------------
-    @Test(groups="tck", dataProvider="rules")
+    @Test(dataProvider="rules")
     public void test_getTransitions(ZoneRules test, ZoneOffset expectedOffset) {
         assertEquals(test.getTransitions().size(), 0);
     }
 
-    @Test(expectedExceptions=UnsupportedOperationException.class, groups="tck")
+    @Test(expectedExceptions=UnsupportedOperationException.class)
     public void test_getTransitions_immutable() {
         ZoneRules test = make(OFFSET_PTWO);
         test.getTransitions().add(ZoneOffsetTransition.of(LDT, OFFSET_PONE, OFFSET_PTWO));
     }
 
-    @Test(groups="tck", dataProvider="rules")
+    @Test(dataProvider="rules")
     public void test_getTransitionRules(ZoneRules test, ZoneOffset expectedOffset) {
         assertEquals(test.getTransitionRules().size(), 0);
     }
 
-    @Test(expectedExceptions=UnsupportedOperationException.class, groups="tck")
+    @Test(expectedExceptions=UnsupportedOperationException.class)
     public void test_getTransitionRules_immutable() {
         ZoneRules test = make(OFFSET_PTWO);
         test.getTransitionRules().add(ZoneOffsetTransitionRule.of(Month.JULY, 2, null, LocalTime.of(12, 30), false, TimeDefinition.STANDARD, OFFSET_PONE, OFFSET_PTWO, OFFSET_PONE));
@@ -221,7 +220,7 @@
     //-----------------------------------------------------------------------
     // equals() / hashCode()
     //-----------------------------------------------------------------------
-    @Test(groups="tck")
+    @Test
     public void test_equalsHashCode() {
         ZoneRules a = make(OFFSET_PONE);
         ZoneRules b = make(OFFSET_PTWO);
--- a/test/java/time/tck/java/time/zone/TCKZoneOffsetTransition.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/zone/TCKZoneOffsetTransition.java	Wed Apr 17 21:48:04 2013 -0700
@@ -62,13 +62,14 @@
 import static java.time.temporal.ChronoUnit.HOURS;
 import static org.testng.Assert.assertEquals;
 
-import tck.java.time.AbstractTCKTest;
 import java.time.Duration;
 import java.time.LocalDateTime;
+import java.time.Year;
 import java.time.ZoneOffset;
-import java.time.Year;
 import java.time.zone.ZoneOffsetTransition;
+
 import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
 
 /**
  * Test ZoneOffsetTransition.
@@ -85,27 +86,27 @@
     //-----------------------------------------------------------------------
     // factory
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_nullTransition() {
         ZoneOffsetTransition.of(null, OFFSET_0100, OFFSET_0200);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_nullOffsetBefore() {
         ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30), null, OFFSET_0200);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_nullOffsetAfter() {
         ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30), OFFSET_0200, null);
     }
 
-    @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"})
+    @Test(expectedExceptions=IllegalArgumentException.class)
     public void test_factory_sameOffset() {
         ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30), OFFSET_0200, OFFSET_0200);
     }
 
-    @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"})
+    @Test(expectedExceptions=IllegalArgumentException.class)
     public void test_factory_noNanos() {
         ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30, 0, 500), OFFSET_0200, OFFSET_0300);
     }
@@ -113,7 +114,7 @@
     //-----------------------------------------------------------------------
     // getters
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_getters_gap() throws Exception {
         LocalDateTime before = LocalDateTime.of(2010, 3, 31, 1, 0);
         LocalDateTime after = LocalDateTime.of(2010, 3, 31, 2, 0);
@@ -129,7 +130,7 @@
         assertSerializable(test);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_getters_overlap() throws Exception {
         LocalDateTime before = LocalDateTime.of(2010, 10, 31, 1, 0);
         LocalDateTime after = LocalDateTime.of(2010, 10, 31, 0, 0);
@@ -163,7 +164,7 @@
     //-----------------------------------------------------------------------
     // isValidOffset()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_isValidOffset_gap() {
         LocalDateTime ldt = LocalDateTime.of(2010, 3, 31, 1, 0);
         ZoneOffsetTransition test = ZoneOffsetTransition.of(ldt, OFFSET_0200, OFFSET_0300);
@@ -174,7 +175,7 @@
         assertEquals(test.isValidOffset(OFFSET_0400), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_isValidOffset_overlap() {
         LocalDateTime ldt = LocalDateTime.of(2010, 10, 31, 1, 0);
         ZoneOffsetTransition test = ZoneOffsetTransition.of(ldt, OFFSET_0300, OFFSET_0200);
@@ -188,7 +189,7 @@
     //-----------------------------------------------------------------------
     // compareTo()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo() {
         ZoneOffsetTransition a = ZoneOffsetTransition.of(
             LocalDateTime.ofEpochSecond(23875287L - 1, 0, OFFSET_0200), OFFSET_0200, OFFSET_0300);
@@ -210,7 +211,7 @@
         assertEquals(c.compareTo(c) == 0, true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_compareTo_sameInstant() {
         ZoneOffsetTransition a = ZoneOffsetTransition.of(
             LocalDateTime.ofEpochSecond(23875287L, 0, OFFSET_0200), OFFSET_0200, OFFSET_0300);
@@ -235,7 +236,7 @@
     //-----------------------------------------------------------------------
     // equals()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_equals() {
         LocalDateTime ldtA = LocalDateTime.of(2010, 3, 31, 1, 0);
         ZoneOffsetTransition a1 = ZoneOffsetTransition.of(ldtA, OFFSET_0200, OFFSET_0300);
@@ -260,7 +261,7 @@
     //-----------------------------------------------------------------------
     // hashCode()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_hashCode_floatingWeek_gap_notEndOfDay() {
         LocalDateTime ldtA = LocalDateTime.of(2010, 3, 31, 1, 0);
         ZoneOffsetTransition a1 = ZoneOffsetTransition.of(ldtA, OFFSET_0200, OFFSET_0300);
@@ -276,14 +277,14 @@
     //-----------------------------------------------------------------------
     // toString()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toString_gap() {
         LocalDateTime ldt = LocalDateTime.of(2010, 3, 31, 1, 0);
         ZoneOffsetTransition test = ZoneOffsetTransition.of(ldt, OFFSET_0200, OFFSET_0300);
         assertEquals(test.toString(), "Transition[Gap at 2010-03-31T01:00+02:00 to +03:00]");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_toString_overlap() {
         LocalDateTime ldt = LocalDateTime.of(2010, 10, 31, 1, 0);
         ZoneOffsetTransition test = ZoneOffsetTransition.of(ldt, OFFSET_0300, OFFSET_0200);
--- a/test/java/time/tck/java/time/zone/TCKZoneOffsetTransitionRule.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/zone/TCKZoneOffsetTransitionRule.java	Wed Apr 17 21:48:04 2013 -0700
@@ -61,7 +61,6 @@
 
 import static org.testng.Assert.assertEquals;
 
-import tck.java.time.AbstractTCKTest;
 import java.time.DayOfWeek;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
@@ -72,6 +71,7 @@
 import java.time.zone.ZoneOffsetTransitionRule.TimeDefinition;
 
 import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
 
 /**
  * Test ZoneOffsetTransitionRule.
@@ -86,70 +86,70 @@
     //-----------------------------------------------------------------------
     // factory
     //-----------------------------------------------------------------------
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_nullMonth() {
         ZoneOffsetTransitionRule.of(
                 null, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
                 OFFSET_0200, OFFSET_0200, OFFSET_0300);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_nullTime() {
         ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, null, false, TimeDefinition.WALL,
                 OFFSET_0200, OFFSET_0200, OFFSET_0300);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_nullTimeDefinition() {
         ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, null,
                 OFFSET_0200, OFFSET_0200, OFFSET_0300);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_nullStandardOffset() {
         ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
                 null, OFFSET_0200, OFFSET_0300);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_nullOffsetBefore() {
         ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
                 OFFSET_0200, null, OFFSET_0300);
     }
 
-    @Test(expectedExceptions=NullPointerException.class, groups={"tck"})
+    @Test(expectedExceptions=NullPointerException.class)
     public void test_factory_nullOffsetAfter() {
         ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
                 OFFSET_0200, OFFSET_0200, null);
     }
 
-    @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"})
+    @Test(expectedExceptions=IllegalArgumentException.class)
     public void test_factory_invalidDayOfMonthIndicator_tooSmall() {
         ZoneOffsetTransitionRule.of(
                 Month.MARCH, -29, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
                 OFFSET_0200, OFFSET_0200, OFFSET_0300);
     }
 
-    @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"})
+    @Test(expectedExceptions=IllegalArgumentException.class)
     public void test_factory_invalidDayOfMonthIndicator_zero() {
         ZoneOffsetTransitionRule.of(
                 Month.MARCH, 0, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
                 OFFSET_0200, OFFSET_0200, OFFSET_0300);
     }
 
-    @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"})
+    @Test(expectedExceptions=IllegalArgumentException.class)
     public void test_factory_invalidDayOfMonthIndicator_tooLarge() {
         ZoneOffsetTransitionRule.of(
                 Month.MARCH, 32, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
                 OFFSET_0200, OFFSET_0200, OFFSET_0300);
     }
 
-    @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"})
+    @Test(expectedExceptions=IllegalArgumentException.class)
     public void test_factory_invalidMidnightFlag() {
         ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, true, TimeDefinition.WALL,
@@ -239,7 +239,7 @@
     //-----------------------------------------------------------------------
     // createTransition()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_createTransition_floatingWeek_gap_notEndOfDay() {
         ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -249,7 +249,7 @@
         assertEquals(test.createTransition(2000), trans);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_createTransition_floatingWeek_overlap_endOfDay() {
         ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, LocalTime.MIDNIGHT, true, TimeDefinition.WALL,
@@ -259,7 +259,7 @@
         assertEquals(test.createTransition(2000), trans);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_createTransition_floatingWeekBackwards_last() {
         ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
                 Month.MARCH, -1, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -269,7 +269,7 @@
         assertEquals(test.createTransition(2000), trans);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_createTransition_floatingWeekBackwards_seventhLast() {
         ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
                 Month.MARCH, -7, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -279,7 +279,7 @@
         assertEquals(test.createTransition(2000), trans);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_createTransition_floatingWeekBackwards_secondLast() {
         ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
                 Month.MARCH, -2, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -289,7 +289,7 @@
         assertEquals(test.createTransition(2000), trans);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_createTransition_fixedDate() {
         ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, null, TIME_0100, false, TimeDefinition.STANDARD,
@@ -302,7 +302,7 @@
     //-----------------------------------------------------------------------
     // equals()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_monthDifferent() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -316,7 +316,7 @@
         assertEquals(b.equals(b), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_dayOfMonthDifferent() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -330,7 +330,7 @@
         assertEquals(b.equals(b), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_dayOfWeekDifferent() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -344,7 +344,7 @@
         assertEquals(b.equals(b), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_dayOfWeekDifferentNull() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -358,7 +358,7 @@
         assertEquals(b.equals(b), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_localTimeDifferent() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -372,7 +372,7 @@
         assertEquals(b.equals(b), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_endOfDayDifferent() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, LocalTime.MIDNIGHT, false, TimeDefinition.WALL,
@@ -386,7 +386,7 @@
         assertEquals(b.equals(b), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_timeDefinitionDifferent() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -400,7 +400,7 @@
         assertEquals(b.equals(b), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_standardOffsetDifferent() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -414,7 +414,7 @@
         assertEquals(b.equals(b), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_offsetBeforeDifferent() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -428,7 +428,7 @@
         assertEquals(b.equals(b), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_offsetAfterDifferent() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -442,7 +442,7 @@
         assertEquals(b.equals(b), true);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_string_false() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -450,7 +450,7 @@
         assertEquals(a.equals("TZDB"), false);
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_equals_null_false() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -461,7 +461,7 @@
     //-----------------------------------------------------------------------
     // hashCode()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_hashCode_floatingWeek_gap_notEndOfDay() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -472,7 +472,7 @@
         assertEquals(a.hashCode(), b.hashCode());
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_hashCode_floatingWeek_overlap_endOfDay_nullDayOfWeek() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.OCTOBER, 20, null, LocalTime.MIDNIGHT, true, TimeDefinition.WALL,
@@ -483,7 +483,7 @@
         assertEquals(a.hashCode(), b.hashCode());
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_hashCode_floatingWeekBackwards() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.MARCH, -1, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -494,7 +494,7 @@
         assertEquals(a.hashCode(), b.hashCode());
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_hashCode_fixedDate() {
         ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, null, TIME_0100, false, TimeDefinition.STANDARD,
@@ -508,7 +508,7 @@
     //-----------------------------------------------------------------------
     // toString()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_toString_floatingWeek_gap_notEndOfDay() {
         ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -516,7 +516,7 @@
         assertEquals(test.toString(), "TransitionRule[Gap +02:00 to +03:00, SUNDAY on or after MARCH 20 at 01:00 WALL, standard offset +02:00]");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_toString_floatingWeek_overlap_endOfDay() {
         ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
                 Month.OCTOBER, 20, DayOfWeek.SUNDAY, LocalTime.MIDNIGHT, true, TimeDefinition.WALL,
@@ -524,7 +524,7 @@
         assertEquals(test.toString(), "TransitionRule[Overlap +03:00 to +02:00, SUNDAY on or after OCTOBER 20 at 24:00 WALL, standard offset +02:00]");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_toString_floatingWeekBackwards_last() {
         ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
                 Month.MARCH, -1, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -532,7 +532,7 @@
         assertEquals(test.toString(), "TransitionRule[Gap +02:00 to +03:00, SUNDAY on or before last day of MARCH at 01:00 WALL, standard offset +02:00]");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_toString_floatingWeekBackwards_secondLast() {
         ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
                 Month.MARCH, -2, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
@@ -540,7 +540,7 @@
         assertEquals(test.toString(), "TransitionRule[Gap +02:00 to +03:00, SUNDAY on or before last day minus 1 of MARCH at 01:00 WALL, standard offset +02:00]");
     }
 
-    @Test(groups={"tck"})
+    @Test
     public void test_toString_fixedDate() {
         ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
                 Month.MARCH, 20, null, TIME_0100, false, TimeDefinition.STANDARD,
--- a/test/java/time/tck/java/time/zone/TCKZoneRules.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/zone/TCKZoneRules.java	Wed Apr 17 21:48:04 2013 -0700
@@ -68,9 +68,6 @@
 import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
-import java.util.Iterator;
-import java.util.List;
-
 import java.time.DayOfWeek;
 import java.time.Duration;
 import java.time.Instant;
@@ -86,6 +83,8 @@
 import java.time.zone.ZoneOffsetTransitionRule;
 import java.time.zone.ZoneOffsetTransitionRule.TimeDefinition;
 import java.time.zone.ZoneRules;
+import java.util.Iterator;
+import java.util.List;
 
 import org.testng.annotations.Test;
 
--- a/test/java/time/tck/java/time/zone/TCKZoneRulesProvider.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/tck/java/time/zone/TCKZoneRulesProvider.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,23 +59,21 @@
  */
 package tck.java.time.zone;
 
-import java.time.ZoneId;
-
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNotNull;
 import static org.testng.Assert.assertTrue;
 
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.zone.ZoneRules;
+import java.time.zone.ZoneRulesException;
+import java.time.zone.ZoneRulesProvider;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.NavigableMap;
 import java.util.Set;
 import java.util.TreeMap;
 
-import java.time.ZoneOffset;
-import java.time.zone.ZoneRules;
-import java.time.zone.ZoneRulesException;
-import java.time.zone.ZoneRulesProvider;
-
 import org.testng.annotations.Test;
 
 /**
@@ -172,7 +170,7 @@
     //-----------------------------------------------------------------------
     // registerProvider()
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_registerProvider() {
         Set<String> pre = ZoneRulesProvider.getAvailableZoneIds();
         assertEquals(pre.contains("FooLocation"), false);
--- a/test/java/time/test/java/time/MockSimplePeriod.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/MockSimplePeriod.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,19 +59,16 @@
  */
 package test.java.time;
 
-import java.time.*;
-
 import static java.time.temporal.ChronoUnit.DAYS;
 import static java.time.temporal.ChronoUnit.FOREVER;
 import static java.time.temporal.ChronoUnit.SECONDS;
 
-import java.util.Objects;
-
+import java.time.DateTimeException;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAmount;
-import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalUnit;
 import java.util.List;
+import java.util.Objects;
 
 /**
  * Mock period of time measured using a single unit, such as {@code 3 Days}.
--- a/test/java/time/test/java/time/TestClock_System.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/TestClock_System.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,11 +59,12 @@
  */
 package test.java.time;
 
-import java.time.*;
-
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertSame;
 
+import java.time.Clock;
+import java.time.ZoneId;
+
 import org.testng.annotations.Test;
 
 /**
--- a/test/java/time/test/java/time/TestDuration.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/TestDuration.java	Wed Apr 17 21:48:04 2013 -0700
@@ -65,11 +65,9 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
-import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
-
 import java.time.Duration;
 
 import org.testng.annotations.Test;
@@ -87,7 +85,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"implementation"})
+    @Test
     public void test_interfaces() {
         assertTrue(Serializable.class.isAssignableFrom(Duration.class));
         assertTrue(Comparable.class.isAssignableFrom(Duration.class));
@@ -96,7 +94,7 @@
     //-----------------------------------------------------------------------
     // serialization
     //-----------------------------------------------------------------------
-    @Test(groups={"implementation"})
+    @Test
     public void test_deserializationSingleton() throws Exception {
         Duration orginal = Duration.ZERO;
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -109,103 +107,103 @@
         assertSame(ser, Duration.ZERO);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void plus_zeroReturnsThis() {
         Duration t = Duration.ofSeconds(-1);
         assertSame(t.plus(Duration.ZERO), t);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void plus_zeroSingleton() {
         Duration t = Duration.ofSeconds(-1);
         assertSame(t.plus(Duration.ofSeconds(1)), Duration.ZERO);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void plusSeconds_zeroReturnsThis() {
         Duration t = Duration.ofSeconds(-1);
         assertSame(t.plusSeconds(0), t);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void plusSeconds_zeroSingleton() {
         Duration t = Duration.ofSeconds(-1);
         assertSame(t.plusSeconds(1), Duration.ZERO);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void plusMillis_zeroReturnsThis() {
         Duration t = Duration.ofSeconds(-1, 2000000);
         assertSame(t.plusMillis(0), t);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void plusMillis_zeroSingleton() {
         Duration t = Duration.ofSeconds(-1, 2000000);
         assertSame(t.plusMillis(998), Duration.ZERO);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void plusNanos_zeroReturnsThis() {
         Duration t = Duration.ofSeconds(-1, 2000000);
         assertSame(t.plusNanos(0), t);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void plusNanos_zeroSingleton() {
         Duration t = Duration.ofSeconds(-1, 2000000);
         assertSame(t.plusNanos(998000000), Duration.ZERO);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void minus_zeroReturnsThis() {
         Duration t = Duration.ofSeconds(1);
         assertSame(t.minus(Duration.ZERO), t);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void minus_zeroSingleton() {
         Duration t = Duration.ofSeconds(1);
         assertSame(t.minus(Duration.ofSeconds(1)), Duration.ZERO);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void minusSeconds_zeroReturnsThis() {
         Duration t = Duration.ofSeconds(1);
         assertSame(t.minusSeconds(0), t);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void minusSeconds_zeroSingleton() {
         Duration t = Duration.ofSeconds(1);
         assertSame(t.minusSeconds(1), Duration.ZERO);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void minusMillis_zeroReturnsThis() {
         Duration t = Duration.ofSeconds(1, 2000000);
         assertSame(t.minusMillis(0), t);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void minusMillis_zeroSingleton() {
         Duration t = Duration.ofSeconds(1, 2000000);
         assertSame(t.minusMillis(1002), Duration.ZERO);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void minusNanos_zeroReturnsThis() {
         Duration t = Duration.ofSeconds(1, 2000000);
         assertSame(t.minusNanos(0), t);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void minusNanos_zeroSingleton() {
         Duration t = Duration.ofSeconds(1, 2000000);
         assertSame(t.minusNanos(1002000000), Duration.ZERO);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_abs_same() {
         Duration base = Duration.ofSeconds(12);
         assertSame(base.abs(), base);
--- a/test/java/time/test/java/time/TestLocalDate.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/TestLocalDate.java	Wed Apr 17 21:48:04 2013 -0700
@@ -80,7 +80,7 @@
 
     private LocalDate TEST_2007_07_15;
 
-    @BeforeMethod(groups={"tck", "implementation"})
+    @BeforeMethod
     public void setUp() {
         TEST_2007_07_15 = LocalDate.of(2007, 7, 15);
     }
@@ -117,55 +117,55 @@
         return date.withDayOfMonth(date.getMonth().length(isIsoLeap(date.getYear())));
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_with_DateTimeField_long_noChange_same() {
         LocalDate t = TEST_2007_07_15.with(YEAR, 2007);
         assertSame(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withYear_int_noChange_same() {
         LocalDate t = TEST_2007_07_15.withYear(2007);
         assertSame(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withMonth_int_noChange_same() {
         LocalDate t = TEST_2007_07_15.withMonth(7);
         assertSame(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withDayOfMonth_noChange_same() {
         LocalDate t = TEST_2007_07_15.withDayOfMonth(15);
         assertSame(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withDayOfYear_noChange_same() {
         LocalDate t = TEST_2007_07_15.withDayOfYear(31 + 28 + 31 + 30 + 31 + 30 + 15);
         assertSame(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plus_Period_zero() {
         LocalDate t = TEST_2007_07_15.plus(MockSimplePeriod.ZERO_DAYS);
         assertSame(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plus_longPeriodUnit_zero() {
         LocalDate t = TEST_2007_07_15.plus(0, ChronoUnit.DAYS);
         assertSame(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusYears_long_noChange_same() {
         LocalDate t = TEST_2007_07_15.plusYears(0);
         assertSame(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusMonths_long_noChange_same() {
         LocalDate t = TEST_2007_07_15.plusMonths(0);
         assertSame(t, TEST_2007_07_15);
@@ -206,7 +206,7 @@
         };
     }
 
-    @Test(dataProvider="samplePlusWeeksSymmetry", groups={"implementation"})
+    @Test(dataProvider="samplePlusWeeksSymmetry")
     public void test_plusWeeks_symmetry(LocalDate reference) {
         for (int weeks = 0; weeks < 365 * 8; weeks++) {
             LocalDate t = reference.plusWeeks(weeks).plusWeeks(-weeks);
@@ -217,7 +217,7 @@
         }
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusWeeks_noChange_same() {
         LocalDate t = TEST_2007_07_15.plusWeeks(0);
         assertSame(t, TEST_2007_07_15);
@@ -258,7 +258,7 @@
         };
     }
 
-    @Test(dataProvider="samplePlusDaysSymmetry", groups={"implementation"})
+    @Test(dataProvider="samplePlusDaysSymmetry")
     public void test_plusDays_symmetry(LocalDate reference) {
         for (int days = 0; days < 365 * 8; days++) {
             LocalDate t = reference.plusDays(days).plusDays(-days);
@@ -269,31 +269,31 @@
         }
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusDays_noChange_same() {
         LocalDate t = TEST_2007_07_15.plusDays(0);
         assertSame(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minus_Period_zero() {
         LocalDate t = TEST_2007_07_15.minus(MockSimplePeriod.ZERO_DAYS);
         assertSame(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minus_longPeriodUnit_zero() {
         LocalDate t = TEST_2007_07_15.minus(0, ChronoUnit.DAYS);
         assertSame(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusYears_long_noChange_same() {
         LocalDate t = TEST_2007_07_15.minusYears(0);
         assertSame(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusMonths_long_noChange_same() {
         LocalDate t = TEST_2007_07_15.minusMonths(0);
         assertSame(t, TEST_2007_07_15);
@@ -334,7 +334,7 @@
         };
     }
 
-    @Test(dataProvider="sampleMinusWeeksSymmetry", groups={"implementation"})
+    @Test(dataProvider="sampleMinusWeeksSymmetry")
     public void test_minusWeeks_symmetry(LocalDate reference) {
         for (int weeks = 0; weeks < 365 * 8; weeks++) {
             LocalDate t = reference.minusWeeks(weeks).minusWeeks(-weeks);
@@ -345,7 +345,7 @@
         }
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusWeeks_noChange_same() {
         LocalDate t = TEST_2007_07_15.minusWeeks(0);
         assertSame(t, TEST_2007_07_15);
@@ -386,7 +386,7 @@
         };
     }
 
-    @Test(dataProvider="sampleMinusDaysSymmetry", groups={"implementation"})
+    @Test(dataProvider="sampleMinusDaysSymmetry")
     public void test_minusDays_symmetry(LocalDate reference) {
         for (int days = 0; days < 365 * 8; days++) {
             LocalDate t = reference.minusDays(days).minusDays(-days);
@@ -397,13 +397,13 @@
         }
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusDays_noChange_same() {
         LocalDate t = TEST_2007_07_15.minusDays(0);
         assertSame(t, TEST_2007_07_15);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_toEpochDay_fromMJDays_symmetry() {
         long date_0000_01_01 = -678941 - 40587;
 
--- a/test/java/time/test/java/time/TestLocalDateTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/TestLocalDateTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -121,365 +121,365 @@
         };
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withYear_int_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withYear(2007);
         assertSame(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate());
         assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime());
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withMonth_int_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withMonth(7);
         assertSame(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate());
         assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime());
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withDayOfMonth_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withDayOfMonth(15);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withDayOfYear_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withDayOfYear(31 + 28 + 31 + 30 + 31 + 30 + 15);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withHour_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withHour(12);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withHour_toMidnight() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(1, 0)).withHour(0);
         assertSame(t.toLocalTime(), LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withHour_toMidday() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(1, 0)).withHour(12);
         assertSame(t.toLocalTime(), LocalTime.NOON);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withMinute_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withMinute(30);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withMinute_toMidnight() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 1)).withMinute(0);
         assertSame(t.toLocalTime(), LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withMinute_toMidday() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 1)).withMinute(0);
         assertSame(t.toLocalTime(), LocalTime.NOON);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withSecond_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withSecond(40);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withSecond_toMidnight() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 0, 1)).withSecond(0);
         assertSame(t.toLocalTime(), LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withSecond_toMidday() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 0, 1)).withSecond(0);
         assertSame(t.toLocalTime(), LocalTime.NOON);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withNanoOfSecond_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withNano(987654321);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withNanoOfSecond_toMidnight() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 0, 0, 1)).withNano(0);
         assertSame(t.toLocalTime(), LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withNanoOfSecond_toMidday() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 0, 0, 1)).withNano(0);
         assertSame(t.toLocalTime(), LocalTime.NOON);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plus_adjuster_zero() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plus(Period.ZERO);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plus_Period_zero() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plus(MockSimplePeriod.ZERO_DAYS);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plus_longPeriodUnit_zero() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plus(0, ChronoUnit.DAYS);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusYears_int_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(0);
         assertSame(TEST_2007_07_15_12_30_40_987654321, t);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusMonths_int_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMonths(0);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusWeeks_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusWeeks(0);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusDays_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusDays(0);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusHours_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusHours(0);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusHours_toMidnight() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(23, 0)).plusHours(1);
         assertSame(t.toLocalTime(), LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusHours_toMidday() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(11, 0)).plusHours(1);
         assertSame(t.toLocalTime(), LocalTime.NOON);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusMinutes_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMinutes(0);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusMinutes_noChange_oneDay_same() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMinutes(24 * 60);
         assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime());
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusMinutes_toMidnight() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(23, 59)).plusMinutes(1);
         assertSame(t.toLocalTime(), LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusMinutes_toMidday() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(11, 59)).plusMinutes(1);
         assertSame(t.toLocalTime(), LocalTime.NOON);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusSeconds_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusSeconds(0);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusSeconds_noChange_oneDay_same() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusSeconds(24 * 60 * 60);
         assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime());
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusSeconds_toMidnight() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(23, 59, 59)).plusSeconds(1);
         assertSame(t.toLocalTime(), LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusSeconds_toMidday() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(11, 59, 59)).plusSeconds(1);
         assertSame(t.toLocalTime(), LocalTime.NOON);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusNanos_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusNanos(0);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusNanos_noChange_oneDay_same() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusNanos(24 * 60 * 60 * 1000000000L);
         assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime());
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusNanos_toMidnight() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(23, 59, 59, 999999999)).plusNanos(1);
         assertSame(t.toLocalTime(), LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusNanos_toMidday() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(11, 59, 59, 999999999)).plusNanos(1);
         assertSame(t.toLocalTime(), LocalTime.NOON);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minus_adjuster_zero() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minus(Period.ZERO);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minus_Period_zero() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minus(MockSimplePeriod.ZERO_DAYS);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minus_longPeriodUnit_zero() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minus(0, ChronoUnit.DAYS);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusYears_int_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusYears(0);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusMonths_int_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMonths(0);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusWeeks_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusWeeks(0);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusDays_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusDays(0);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusHours_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusHours(0);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusHours_toMidnight() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(1, 0)).minusHours(1);
         assertSame(t.toLocalTime(), LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusHours_toMidday() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(13, 0)).minusHours(1);
         assertSame(t.toLocalTime(), LocalTime.NOON);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusMinutes_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMinutes(0);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusMinutes_noChange_oneDay_same() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMinutes(24 * 60);
         assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime());
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusMinutes_toMidnight() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 1)).minusMinutes(1);
         assertSame(t.toLocalTime(), LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusMinutes_toMidday() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 1)).minusMinutes(1);
         assertSame(t.toLocalTime(), LocalTime.NOON);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusSeconds_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusSeconds(0);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusSeconds_noChange_oneDay() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusSeconds(24 * 60 * 60);
         assertEquals(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate().minusDays(1));
         assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime());
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusSeconds_toMidnight() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 0, 1)).minusSeconds(1);
         assertSame(t.toLocalTime(), LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusSeconds_toMidday() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 0, 1)).minusSeconds(1);
         assertSame(t.toLocalTime(), LocalTime.NOON);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusNanos_noChange() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusNanos(0);
         assertSame(t, TEST_2007_07_15_12_30_40_987654321);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusNanos_noChange_oneDay() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusNanos(24 * 60 * 60 * 1000000000L);
         assertEquals(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate().minusDays(1));
         assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime());
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusNanos_toMidnight() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 0, 0, 1)).minusNanos(1);
         assertSame(t.toLocalTime(), LocalTime.MIDNIGHT);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusNanos_toMidday() {
         LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 0, 0, 1)).minusNanos(1);
         assertSame(t.toLocalTime(), LocalTime.NOON);
@@ -488,7 +488,7 @@
     //-----------------------------------------------------------------------
     // toLocalDate()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleDates", groups={"implementation"})
+    @Test(dataProvider="sampleDates")
     public void test_getDate(int year, int month, int day) {
         LocalDate d = LocalDate.of(year, month, day);
         LocalDateTime dt = LocalDateTime.of(d, LocalTime.MIDNIGHT);
@@ -498,7 +498,7 @@
     //-----------------------------------------------------------------------
     // toLocalTime()
     //-----------------------------------------------------------------------
-    @Test(dataProvider="sampleTimes", groups={"implementation"})
+    @Test(dataProvider="sampleTimes")
     public void test_getTime(int h, int m, int s, int ns) {
         LocalTime t = LocalTime.of(h, m, s, ns);
         LocalDateTime dt = LocalDateTime.of(LocalDate.of(2011, 7, 30), t);
--- a/test/java/time/test/java/time/TestLocalTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/TestLocalTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -87,51 +87,51 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck","implementation"})
+    @Test
     public void constant_MIDNIGHT() {
         check(LocalTime.MIDNIGHT, 0, 0, 0, 0);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void constant_MIDNIGHT_same() {
         assertSame(LocalTime.MIDNIGHT, LocalTime.MIDNIGHT);
         assertSame(LocalTime.MIDNIGHT, LocalTime.of(0, 0));
     }
 
-    @Test(groups={"tck","implementation"})
+    @Test
     public void constant_MIDDAY() {
         check(LocalTime.NOON, 12, 0, 0, 0);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void constant_MIDDAY_same() {
         assertSame(LocalTime.NOON, LocalTime.NOON);
         assertSame(LocalTime.NOON, LocalTime.of(12, 0));
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"tck","implementation"})
+    @Test
     public void constant_MIN_TIME() {
         check(LocalTime.MIN, 0, 0, 0, 0);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void constant_MIN_TIME_same() {
         assertSame(LocalTime.MIN, LocalTime.of(0, 0));
     }
 
-    @Test(groups={"tck","implementation"})
+    @Test
     public void constant_MAX_TIME() {
         check(LocalTime.MAX, 23, 59, 59, 999999999);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void constant_MAX_TIME_same() {
         assertSame(LocalTime.NOON, LocalTime.NOON);
         assertSame(LocalTime.NOON, LocalTime.of(12, 0));
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void factory_time_2ints_singletons() {
         for (int i = 0; i < 24; i++) {
             LocalTime test1 = LocalTime.of(i, 0);
@@ -140,7 +140,7 @@
         }
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void factory_time_3ints_singletons() {
         for (int i = 0; i < 24; i++) {
             LocalTime test1 = LocalTime.of(i, 0, 0);
@@ -149,7 +149,7 @@
         }
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void factory_time_4ints_singletons() {
         for (int i = 0; i < 24; i++) {
             LocalTime test1 = LocalTime.of(i, 0, 0, 0);
@@ -158,7 +158,7 @@
         }
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void factory_ofSecondOfDay_singletons() {
         for (int i = 0; i < 24; i++) {
             LocalTime test1 = LocalTime.ofSecondOfDay(i * 60L * 60L);
@@ -167,7 +167,7 @@
         }
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void factory_ofNanoOfDay_singletons() {
         for (int i = 0; i < 24; i++) {
             LocalTime test1 = LocalTime.ofNanoOfDay(i * 1000000000L * 60L * 60L);
--- a/test/java/time/test/java/time/TestMonthDay.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/TestMonthDay.java	Wed Apr 17 21:48:04 2013 -0700
@@ -78,7 +78,7 @@
 
     private MonthDay TEST_07_15;
 
-    @BeforeMethod(groups={"tck","implementation"})
+    @BeforeMethod
     public void setUp() {
         TEST_07_15 = MonthDay.of(7, 15);
     }
@@ -95,24 +95,24 @@
         assertEquals(test.getDayOfMonth(), d);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_with_Month_noChangeSame() {
         MonthDay test = MonthDay.of(6, 30);
         assertSame(test.with(Month.JUNE), test);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withMonth_int_noChangeSame() {
         MonthDay test = MonthDay.of(6, 30);
         assertSame(test.withMonth(6), test);
     }
-    @Test(groups={"implementation"})
+    @Test
     public void test_withDayOfMonth_noChangeSame() {
         MonthDay test = MonthDay.of(6, 30);
         assertSame(test.withDayOfMonth(30), test);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_adjustDate_same() {
         MonthDay test = MonthDay.of(6, 30);
         LocalDate date = LocalDate.of(2007, 6, 30);
--- a/test/java/time/test/java/time/TestOffsetDateTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/TestOffsetDateTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -64,8 +64,8 @@
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
+import java.time.OffsetDateTime;
 import java.time.ZoneOffset;
-import java.time.OffsetDateTime;
 
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
@@ -81,7 +81,7 @@
     private static final ZoneOffset OFFSET_PTWO = ZoneOffset.ofHours(2);
     private OffsetDateTime TEST_2008_6_30_11_30_59_000000500;
 
-    @BeforeMethod(groups={"tck","implementation"})
+    @BeforeMethod
     public void setUp() {
         TEST_2008_6_30_11_30_59_000000500 = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59, 500), OFFSET_PONE);
     }
@@ -104,7 +104,7 @@
         };
     }
 
-    @Test(dataProvider="sampleTimes", groups={"implementation"})
+    @Test(dataProvider="sampleTimes")
     public void test_get_same(int y, int o, int d, int h, int m, int s, int n, ZoneOffset offset) {
         LocalDate localDate = LocalDate.of(y, o, d);
         LocalTime localTime = LocalTime.of(h, m, s, n);
@@ -120,7 +120,7 @@
     //-----------------------------------------------------------------------
     // withOffsetSameLocal()
     //-----------------------------------------------------------------------
-    @Test(groups={"implementation"})
+    @Test
     public void test_withOffsetSameLocal() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withOffsetSameLocal(OFFSET_PTWO);
@@ -128,192 +128,192 @@
         assertSame(test.getOffset(), OFFSET_PTWO);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withOffsetSameLocal_noChange() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withOffsetSameLocal(OFFSET_PONE);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withOffsetSameInstant_noChange() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withOffsetSameInstant(OFFSET_PONE);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withYear_noChange() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withYear(2008);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withMonth_noChange() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withMonth(6);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withDayOfMonth_noChange() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withDayOfMonth(30);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withDayOfYear_noChange() {
         OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.withDayOfYear(31 + 29 + 31 + 30 + 31 + 30);
         assertSame(t, TEST_2008_6_30_11_30_59_000000500);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withHour_noChange() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withHour(11);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withMinute_noChange() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withMinute(30);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withSecond_noChange() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.withSecond(59);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_withNanoOfSecond_noChange() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59, 1), OFFSET_PONE);
         OffsetDateTime test = base.withNano(1);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plus_Period_zero() {
         OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.plus(MockSimplePeriod.ZERO_DAYS);
         assertSame(t, TEST_2008_6_30_11_30_59_000000500);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusYears_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.plusYears(0);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusMonths_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.plusMonths(0);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusWeeks_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.plusWeeks(0);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusDays_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.plusDays(0);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusHours_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.plusHours(0);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusMinutes_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.plusMinutes(0);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusSeconds_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.plusSeconds(0);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_plusNanos_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.plusNanos(0);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minus_Period_zero() {
         OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.minus(MockSimplePeriod.ZERO_DAYS);
         assertSame(t, TEST_2008_6_30_11_30_59_000000500);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusYears_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2007, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.minusYears(0);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusMonths_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.minusMonths(0);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusWeeks_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.minusWeeks(0);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusDays_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.minusDays(0);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusHours_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.minusHours(0);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusMinutes_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.minusMinutes(0);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusSeconds_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.minusSeconds(0);
         assertSame(test, base);
     }
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_minusNanos_zero() {
         OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE);
         OffsetDateTime test = base.minusNanos(0);
--- a/test/java/time/test/java/time/TestOffsetDateTime_instants.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/TestOffsetDateTime_instants.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,17 +59,16 @@
  */
 package test.java.time;
 
+import static org.testng.Assert.assertEquals;
+
 import java.time.DateTimeException;
 import java.time.Instant;
 import java.time.LocalDate;
 import java.time.LocalTime;
 import java.time.Month;
-import java.time.ZoneOffset;
-
 import java.time.OffsetDateTime;
 import java.time.Year;
-
-import static org.testng.Assert.assertEquals;
+import java.time.ZoneOffset;
 
 import org.testng.annotations.Test;
 
--- a/test/java/time/test/java/time/TestPeriod.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/TestPeriod.java	Wed Apr 17 21:48:04 2013 -0700
@@ -80,6 +80,7 @@
     //-----------------------------------------------------------------------
     // factories
     //-----------------------------------------------------------------------
+    @Test
     public void factory_zeroSingleton() {
         assertSame(Period.ZERO, Period.ZERO);
         assertSame(Period.ofYears(0), Period.ZERO);
@@ -91,6 +92,7 @@
     //-----------------------------------------------------------------------
     // hashCode()
     //-----------------------------------------------------------------------
+    @Test
     public void test_hashCode() {
         Period test5 = Period.ofDays(5);
         Period test6 = Period.ofDays(6);
--- a/test/java/time/test/java/time/TestZoneId.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/TestZoneId.java	Wed Apr 17 21:48:04 2013 -0700
@@ -62,7 +62,6 @@
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertSame;
 import static org.testng.Assert.assertTrue;
 
 import java.lang.reflect.Field;
@@ -82,7 +81,6 @@
 import java.util.SimpleTimeZone;
 import java.util.TimeZone;
 
-import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
 /**
@@ -121,7 +119,6 @@
         assertEquals(test.getRules().isFixedOffset(), true);
         assertEquals(test.getRules().getOffset(Instant.ofEpochSecond(0L)), ZoneOffset.UTC);
         checkOffset(test.getRules(), createLDT(2008, 6, 30), ZoneOffset.UTC, 1);
-        assertSame(test, ZoneId.of("UTC+00"));
     }
 
     //-----------------------------------------------------------------------
@@ -129,9 +126,7 @@
     //-----------------------------------------------------------------------
     public void test_systemDefault() {
         ZoneId test = ZoneId.systemDefault();
-        assertEquals(test.getId(), TimeZone.getDefault()
-                                           .getID()
-                                           .replaceAll("GMT|UTC|UT", "Z"));
+        assertEquals(test.getId(), TimeZone.getDefault().getID());
     }
 
     @Test(expectedExceptions = DateTimeException.class)
@@ -157,58 +152,6 @@
     }
 
     //-----------------------------------------------------------------------
-    @DataProvider(name="String_Fixed")
-    Object[][] data_of_string_Fixed() {
-        return new Object[][] {
-            {"+0", "Z"},
-            {"+5", "+05:00"},
-            {"+01", "+01:00"},
-            {"+0100", "+01:00"},{"+01:00", "+01:00"},
-            {"+010000", "+01:00"},{"+01:00:00", "+01:00"},
-            {"+12", "+12:00"},
-            {"+1234", "+12:34"},{"+12:34", "+12:34"},
-            {"+123456", "+12:34:56"},{"+12:34:56", "+12:34:56"},
-            {"-02", "-02:00"},
-            {"-5", "-05:00"},
-            {"-0200", "-02:00"},{"-02:00", "-02:00"},
-            {"-020000", "-02:00"},{"-02:00:00", "-02:00"},
-        };
-    }
-
-    @Test(dataProvider="String_Fixed")
-    public void test_of_string_offset(String input, String id) {
-        ZoneId test = ZoneId.of(input);
-        assertEquals(test.getId(), id);
-        assertEquals(test.getDisplayName(TextStyle.FULL, Locale.UK), id);
-        assertEquals(test.getRules().isFixedOffset(), true);
-        ZoneOffset offset = ZoneOffset.of(id);
-        assertEquals(test.getRules().getOffset(Instant.ofEpochSecond(0L)), offset);
-        checkOffset(test.getRules(), createLDT(2008, 6, 30), offset, 1);
-    }
-
-    @Test(dataProvider="String_Fixed")
-    public void test_of_string_FixedUTC(String input, String id) {
-        ZoneId test = ZoneId.of("UTC" + input);
-        assertEquals(test.getId(), id);
-        assertEquals(test.getDisplayName(TextStyle.FULL, Locale.UK), id);
-        assertEquals(test.getRules().isFixedOffset(), true);
-        ZoneOffset offset = ZoneOffset.of(id);
-        assertEquals(test.getRules().getOffset(Instant.ofEpochSecond(0L)), offset);
-        checkOffset(test.getRules(), createLDT(2008, 6, 30), offset, 1);
-    }
-
-    @Test(dataProvider="String_Fixed")
-    public void test_of_string_FixedGMT(String input, String id) {
-        ZoneId test = ZoneId.of("GMT" + input);
-        assertEquals(test.getId(), id);
-        assertEquals(test.getDisplayName(TextStyle.FULL, Locale.UK), id);
-        assertEquals(test.getRules().isFixedOffset(), true);
-        ZoneOffset offset = ZoneOffset.of(id);
-        assertEquals(test.getRules().getOffset(Instant.ofEpochSecond(0L)), offset);
-        checkOffset(test.getRules(), createLDT(2008, 6, 30), offset, 1);
-    }
-
-    //-----------------------------------------------------------------------
     // Europe/London
     //-----------------------------------------------------------------------
     public void test_London() {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/test/java/time/chrono/TestChronoLocalDate.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,233 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package test.java.time.chrono;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.time.LocalDate;
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.Chronology;
+import java.time.chrono.ThaiBuddhistChronology;
+import java.time.chrono.ThaiBuddhistDate;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.testng.annotations.Test;
+
+/**
+ * Test chrono local date.
+ */
+@Test
+public class TestChronoLocalDate {
+    // this class primarily tests whether the generics work OK
+
+    //-----------------------------------------------------------------------
+    public void test_date_comparator_checkGenerics_ISO() {
+        List<ChronoLocalDate<LocalDate>> dates = new ArrayList<>();
+        ChronoLocalDate<LocalDate> date = LocalDate.of(2013, 1, 1);
+
+        // Insert dates in order, no duplicates
+        dates.add(date.minus(10, ChronoUnit.YEARS));
+        dates.add(date.minus(1, ChronoUnit.YEARS));
+        dates.add(date.minus(1, ChronoUnit.MONTHS));
+        dates.add(date.minus(1, ChronoUnit.WEEKS));
+        dates.add(date.minus(1, ChronoUnit.DAYS));
+        dates.add(date);
+        dates.add(date.plus(1, ChronoUnit.DAYS));
+        dates.add(date.plus(1, ChronoUnit.WEEKS));
+        dates.add(date.plus(1, ChronoUnit.MONTHS));
+        dates.add(date.plus(1, ChronoUnit.YEARS));
+        dates.add(date.plus(10, ChronoUnit.YEARS));
+
+        List<ChronoLocalDate<LocalDate>> copy = new ArrayList<>(dates);
+        Collections.shuffle(copy);
+        Collections.sort(copy, ChronoLocalDate.timeLineOrder());
+        assertEquals(copy, dates);
+        assertTrue(ChronoLocalDate.timeLineOrder().compare(copy.get(0), copy.get(1)) < 0);
+    }
+
+    public void test_date_comparator_checkGenerics_unknown() {
+        List<ChronoLocalDate<?>> dates = new ArrayList<>();
+        ChronoLocalDate<?> date = LocalDate.of(2013, 1, 1);
+
+        // Insert dates in order, no duplicates
+        dates.add(date.minus(10, ChronoUnit.YEARS));
+        dates.add(date.minus(1, ChronoUnit.YEARS));
+        dates.add(date.minus(1, ChronoUnit.MONTHS));
+        dates.add(date.minus(1, ChronoUnit.WEEKS));
+        dates.add(date.minus(1, ChronoUnit.DAYS));
+        dates.add(date);
+        dates.add(date.plus(1, ChronoUnit.DAYS));
+        dates.add(date.plus(1, ChronoUnit.WEEKS));
+        dates.add(date.plus(1, ChronoUnit.MONTHS));
+        dates.add(date.plus(1, ChronoUnit.YEARS));
+        dates.add(date.plus(10, ChronoUnit.YEARS));
+
+        List<ChronoLocalDate<?>> copy = new ArrayList<>(dates);
+        Collections.shuffle(copy);
+        Collections.sort(copy, ChronoLocalDate.timeLineOrder());
+        assertEquals(copy, dates);
+        assertTrue(ChronoLocalDate.timeLineOrder().compare(copy.get(0), copy.get(1)) < 0);
+    }
+
+    public <D extends ChronoLocalDate<D>> void test_date_comparator_checkGenerics_unknownExtends() {
+        List<ChronoLocalDate<D>> dates = new ArrayList<>();
+        ChronoLocalDate<D> date = (ChronoLocalDate) LocalDate.of(2013, 1, 1);  // TODO generics raw type
+
+        // Insert dates in order, no duplicates
+        dates.add(date.minus(10, ChronoUnit.YEARS));
+        dates.add(date.minus(1, ChronoUnit.YEARS));
+        dates.add(date.minus(1, ChronoUnit.MONTHS));
+        dates.add(date.minus(1, ChronoUnit.WEEKS));
+        dates.add(date.minus(1, ChronoUnit.DAYS));
+        dates.add(date);
+        dates.add(date.plus(1, ChronoUnit.DAYS));
+        dates.add(date.plus(1, ChronoUnit.WEEKS));
+        dates.add(date.plus(1, ChronoUnit.MONTHS));
+        dates.add(date.plus(1, ChronoUnit.YEARS));
+        dates.add(date.plus(10, ChronoUnit.YEARS));
+
+        List<ChronoLocalDate<D>> copy = new ArrayList<>(dates);
+        Collections.shuffle(copy);
+        Collections.sort(copy, ChronoLocalDate.timeLineOrder());
+        assertEquals(copy, dates);
+        assertTrue(ChronoLocalDate.timeLineOrder().compare(copy.get(0), copy.get(1)) < 0);
+    }
+
+    public void test_date_comparator_checkGenerics_LocalDate() {
+        List<LocalDate> dates = new ArrayList<>();
+        LocalDate date = LocalDate.of(2013, 1, 1);
+
+        // Insert dates in order, no duplicates
+        dates.add(date.minus(10, ChronoUnit.YEARS));
+        dates.add(date.minus(1, ChronoUnit.YEARS));
+        dates.add(date.minus(1, ChronoUnit.MONTHS));
+        dates.add(date.minus(1, ChronoUnit.WEEKS));
+        dates.add(date.minus(1, ChronoUnit.DAYS));
+        dates.add(date);
+        dates.add(date.plus(1, ChronoUnit.DAYS));
+        dates.add(date.plus(1, ChronoUnit.WEEKS));
+        dates.add(date.plus(1, ChronoUnit.MONTHS));
+        dates.add(date.plus(1, ChronoUnit.YEARS));
+        dates.add(date.plus(10, ChronoUnit.YEARS));
+
+        List<LocalDate> copy = new ArrayList<>(dates);
+        Collections.shuffle(copy);
+        Collections.sort(copy, ChronoLocalDate.timeLineOrder());
+        assertEquals(copy, dates);
+        assertTrue(ChronoLocalDate.timeLineOrder().compare(copy.get(0), copy.get(1)) < 0);
+    }
+
+    //-----------------------------------------------------------------------
+    public void test_date_checkGenerics_genericsMethod() {
+        Chronology chrono = ThaiBuddhistChronology.INSTANCE;
+        ChronoLocalDate<?> date = chrono.dateNow();
+        // date = processOK(date);  // does not compile
+        date = processClassOK(ThaiBuddhistDate.class);
+        date = dateSupplier();
+
+        // date = processWeird(date);  // does not compile (correct)
+        // date = processClassWeird(ThaiBuddhistDate.class);  // does not compile (correct)
+    }
+
+    public void test_date_checkGenerics_genericsMethod_concreteType() {
+        ThaiBuddhistChronology chrono = ThaiBuddhistChronology.INSTANCE;
+        ThaiBuddhistDate date = chrono.dateNow();
+        date = ThaiBuddhistDate.now();
+        date = processOK(date);
+        date = processClassOK(ThaiBuddhistDate.class);
+        date = dateSupplier();
+
+        // date = processWeird(date);  // does not compile (correct)
+        // date = processClassWeird(ThaiBuddhistDate.class);  // does not compile (correct)
+    }
+
+    public <D extends ChronoLocalDate<D>> void test_date_checkGenerics_genericsMethod_withType() {
+        Chronology chrono = ThaiBuddhistChronology.INSTANCE;
+        D date = (D) chrono.dateNow();
+        date = processOK(date);
+        // date = processClassOK(ThaiBuddhistDate.class);  // does not compile (correct)
+        date = dateSupplier();
+
+        // date = processWeird(date);  // does not compile (correct)
+        // date = processClassWeird(ThaiBuddhistDate.class);  // does not compile (correct)
+    }
+
+    private <D extends ChronoLocalDate<D>> D dateSupplier() {
+        return (D) (ChronoLocalDate) ThaiBuddhistChronology.INSTANCE.dateNow();  // TODO raw types
+    }
+
+    // decent generics signatures that need to work
+    private <D extends ChronoLocalDate<D>> D processOK(D date) {
+        return date;
+    }
+    private <D extends ChronoLocalDate<D>> D processClassOK(Class<D> cls) {
+        return null;
+    }
+
+    // weird generics signatures that shouldn't really work
+    private <D extends ChronoLocalDate<D>> ChronoLocalDate<D> processWeird(ChronoLocalDate<D> date) {
+        return date;
+    }
+    private <D extends ChronoLocalDate<D>> ChronoLocalDate<D> processClassWeird(Class<D> cls) {
+        return null;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/test/java/time/chrono/TestChronologyPerf.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.java.time.chrono;
+
+import java.time.Duration;
+import java.time.chrono.Chronology;
+import java.time.temporal.ChronoUnit;
+import java.util.Set;
+
+import org.testng.annotations.Test;
+
+/**
+ * Test the speed of initializing all calendars.
+ */
+public class TestChronologyPerf {
+
+    @Test
+    public void test_chronologyGetAvailablePerf() {
+        long start = System.nanoTime();
+        Set<Chronology> chronos = Chronology.getAvailableChronologies();
+        long end = System.nanoTime();
+        Duration d = Duration.of(end - start, ChronoUnit.NANOS);
+        System.out.printf(" Duration of Chronology.getAvailableChronologies(): %s%n", d);
+    }
+
+}
--- a/test/java/time/test/java/time/chrono/TestExampleCode.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/chrono/TestExampleCode.java	Wed Apr 17 21:48:04 2013 -0700
@@ -57,16 +57,20 @@
 
 package test.java.time.chrono;
 
+import static org.testng.Assert.assertEquals;
+
 import java.time.LocalTime;
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.ChronoLocalDateTime;
+import java.time.chrono.Chronology;
 import java.time.chrono.HijrahDate;
 import java.time.chrono.ThaiBuddhistDate;
-import java.time.chrono.ChronoLocalDateTime;
-import java.time.chrono.ChronoLocalDate;
-import java.time.chrono.Chronology;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
+import java.util.Locale;
 import java.util.Set;
 
+import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
 /**
@@ -104,6 +108,30 @@
                 first, last);
     }
 
+    //-----------------------------------------------------------------------
+    // Data provider for Hijrah Variant names
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "HijrahVariantNames")
+    Object[][] data_of_ummalqura() {
+        return new Object[][]{
+            { "Hijrah-umalqura", "islamic", "umalqura"},
+        };
+    }
+
+    @Test(dataProvider= "HijrahVariantNames")
+    public void test_HijrahVariantViaLocale(String calendarId, String calendarType, String variant) {
+        Locale.Builder builder = new Locale.Builder();
+        builder.setLanguage("en").setRegion("US");
+        builder.setUnicodeLocaleKeyword("ca", calendarType);
+        builder.setUnicodeLocaleKeyword("cv", variant);
+        Locale locale = builder.build();
+        Chronology chrono = Chronology.ofLocale(locale);
+        System.out.printf(" Locale language tag: %s, Chronology ID: %s, type: %s%n",
+                locale.toLanguageTag(), chrono, chrono.getCalendarType());
+        Chronology expected = Chronology.of(calendarId);
+        assertEquals(chrono, expected, "Expected chronology not found");
+    }
+
     @Test
     public void test_calendarPackageExample() {
 
--- a/test/java/time/test/java/time/chrono/TestIsoChronoImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/chrono/TestIsoChronoImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -60,20 +60,17 @@
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
 import static java.time.temporal.ChronoField.YEAR;
 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
-
 import static org.testng.Assert.assertEquals;
 
+import java.time.DayOfWeek;
+import java.time.LocalDate;
+import java.time.chrono.IsoChronology;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.WeekFields;
 import java.util.Calendar;
 import java.util.GregorianCalendar;
 import java.util.TimeZone;
 
-import java.time.DayOfWeek;
-import java.time.LocalDate;
-import java.time.chrono.ChronoLocalDate;
-import java.time.chrono.IsoChronology;
-import java.time.temporal.ChronoUnit;
-import java.time.temporal.WeekFields;
-
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
@@ -86,15 +83,14 @@
     @DataProvider(name = "RangeVersusCalendar")
     Object[][] provider_rangeVersusCalendar() {
         return new Object[][]{
-            {LocalDate.of(1900, 1, 4), LocalDate.of(2100, 1, 8)},
-            //{LocalDate.of(1583, 1, 1), LocalDate.of(2100, 1, 1)},
+            {LocalDate.of(1583, 1, 1), LocalDate.of(2100, 1, 1)},
         };
     }
 
     //-----------------------------------------------------------------------
     // Verify  ISO Calendar matches java.util.Calendar for range
     //-----------------------------------------------------------------------
-    @Test(groups = {"implementation"}, dataProvider = "RangeVersusCalendar")
+    @Test(dataProvider = "RangeVersusCalendar")
     public void test_IsoChrono_vsCalendar(LocalDate isoStartDate, LocalDate isoEndDate) {
         GregorianCalendar cal = new GregorianCalendar();
         assertEquals(cal.getCalendarType(), "gregory", "Unexpected calendar type");
@@ -119,7 +115,7 @@
     // Verify  ISO Calendar matches java.util.Calendar
     // DayOfWeek, WeekOfMonth, WeekOfYear for range
     //-----------------------------------------------------------------------
-    @Test(groups = {"implementation"}, dataProvider = "RangeVersusCalendar")
+    @Test(dataProvider = "RangeVersusCalendar")
     public void test_DayOfWeek_IsoChronology_vsCalendar(LocalDate isoStartDate, LocalDate isoEndDate) {
         GregorianCalendar cal = new GregorianCalendar();
         assertEquals(cal.getCalendarType(), "gregory", "Unexpected calendar type");
@@ -136,32 +132,31 @@
                 cal.set(Calendar.MONTH, isoDate.get(MONTH_OF_YEAR) - 1);
                 cal.set(Calendar.DAY_OF_MONTH, isoDate.get(DAY_OF_MONTH));
 
+                // For every date in the range
                 while (isoDate.isBefore(isoEndDate)) {
                     assertEquals(isoDate.get(DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch in " + isoDate + ";  cal: " + cal);
                     assertEquals(isoDate.get(MONTH_OF_YEAR), cal.get(Calendar.MONTH) + 1, "Month mismatch in " + isoDate);
                     assertEquals(isoDate.get(YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + isoDate);
-                    int jDOW = Math.floorMod(cal.get(Calendar.DAY_OF_WEEK) - 2, 7) + 1;
-                    int isoDOW = isoDate.get(weekDef.dayOfWeek());
-                    if (jDOW != isoDOW) {
-                        System.err.printf(" DOW vs Calendar jdow: %s, isoDate(DOW): %s, isoDate: %s, WeekDef: %s%n", jDOW, isoDOW, isoDate, weekDef);
-                    }
-                    assertEquals(jDOW, isoDOW, "Calendar DayOfWeek does not match ISO DayOfWeek");
+
+                    int jdow = Math.floorMod(cal.get(Calendar.DAY_OF_WEEK) - 2, 7) + 1;
+                    int dow = isoDate.get(weekDef.dayOfWeek());
+                    assertEquals(jdow, dow, "Calendar DayOfWeek does not match ISO DayOfWeek");
 
                     int jweekOfMonth = cal.get(Calendar.WEEK_OF_MONTH);
                     int isoWeekOfMonth = isoDate.get(weekDef.weekOfMonth());
-                    if (jweekOfMonth != isoWeekOfMonth) {
-                        System.err.printf(" WeekOfMonth jWeekOfMonth: %s, isoWeekOfMonth: %s,  isoDate: %s, %s%n",
-                                jweekOfMonth, isoWeekOfMonth, isoDate, weekDef);
-                    }
                     assertEquals(jweekOfMonth, isoWeekOfMonth, "Calendar WeekOfMonth does not match ISO WeekOfMonth");
 
                     int jweekOfYear = cal.get(Calendar.WEEK_OF_YEAR);
-                    int isoWeekOfYear = isoDate.get(weekDef.weekOfYear());
-                    if (jweekOfYear != isoWeekOfYear) {
-                        // TBD: Issue #186 Remove misleading output pending resolution
-                        // System.err.printf(" Mismatch WeekOfYear jweekOfYear: %s, isoWeekOfYear: %s, isoDate: %s, WeekDef: %s%n", jweekOfYear, isoWeekOfYear, isoDate, weekDef);
-                    }
-                    //assertEquals(jweekOfYear, isoWeekOfYear,  "Calendar WeekOfYear does not match ISO WeekOfYear");
+                    int weekOfYear = isoDate.get(weekDef.weekOfWeekBasedYear());
+                    assertEquals(jweekOfYear, weekOfYear,  "GregorianCalendar WeekOfYear does not match WeekOfWeekBasedYear");
+
+                    int jWeekYear = cal.getWeekYear();
+                    int weekBasedYear = isoDate.get(weekDef.weekBasedYear());
+                    assertEquals(jWeekYear, weekBasedYear,  "GregorianCalendar getWeekYear does not match YearOfWeekBasedYear");
+
+                    int jweeksInWeekyear = cal.getWeeksInWeekYear();
+                    int weeksInWeekBasedYear = (int)isoDate.range(weekDef.weekOfWeekBasedYear()).getMaximum();
+                    assertEquals(jweeksInWeekyear, weeksInWeekBasedYear, "length of weekBasedYear");
 
                     isoDate = isoDate.plus(1, ChronoUnit.DAYS);
                     cal.add(Calendar.DAY_OF_MONTH, 1);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/test/java/time/chrono/TestJapaneseChronoImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package test.java.time.chrono;
+
+import static org.testng.Assert.assertEquals;
+
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.time.OffsetDateTime;
+import java.time.ZoneOffset;
+import java.time.chrono.JapaneseChronology;
+import java.time.chrono.JapaneseDate;
+import java.time.temporal.ChronoField;
+import java.time.temporal.ChronoUnit;
+import java.util.Calendar;
+import java.util.Locale;
+import java.util.TimeZone;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test.
+ */
+@Test
+public class TestJapaneseChronoImpl {
+
+    /**
+     * Range of years to check consistency with java.util.Calendar
+     */
+    @DataProvider(name="RangeVersusCalendar")
+    Object[][] provider_rangeVersusCalendar() {
+        return new Object[][] {
+            {LocalDate.of(1868, 1, 1), LocalDate.of(2100, 1, 1)},
+        };
+    }
+
+    //-----------------------------------------------------------------------
+    // Verify  Japanese Calendar matches java.util.Calendar for range
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="RangeVersusCalendar")
+    public void test_JapaneseChrono_vsCalendar(LocalDate isoStartDate, LocalDate isoEndDate) {
+        Locale locale = Locale.forLanguageTag("ja-JP-u-ca-japanese");
+        assertEquals(locale.toString(), "ja_JP_#u-ca-japanese", "Unexpected locale");
+
+        Calendar cal = java.util.Calendar.getInstance(locale);
+        assertEquals(cal.getCalendarType(), "japanese", "Unexpected calendar type");
+
+        JapaneseDate jDate = JapaneseChronology.INSTANCE.date(isoStartDate);
+
+        // Convert to millis and set Japanese Calendar to that start date (at GMT)
+        OffsetDateTime jodt = OffsetDateTime.of(isoStartDate, LocalTime.MIN, ZoneOffset.UTC);
+        long millis = jodt.toInstant().toEpochMilli();
+        cal.setTimeZone(TimeZone.getTimeZone("GMT+00"));
+        cal.setTimeInMillis(millis);
+
+        while (jDate.isBefore(isoEndDate)) {
+            assertEquals(jDate.get(ChronoField.DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch in " + jDate + ";  cal: " + cal);
+            assertEquals(jDate.get(ChronoField.MONTH_OF_YEAR), cal.get(Calendar.MONTH) + 1, "Month mismatch in " + jDate);
+            assertEquals(jDate.get(ChronoField.YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + jDate);
+
+            jDate = jDate.plus(1, ChronoUnit.DAYS);
+            cal.add(Calendar.DAY_OF_MONTH, 1);
+        }
+    }
+
+}
--- a/test/java/time/test/java/time/chrono/TestServiceLoader.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/chrono/TestServiceLoader.java	Wed Apr 17 21:48:04 2013 -0700
@@ -60,10 +60,11 @@
 
 import static org.testng.Assert.assertNotNull;
 
+import java.time.chrono.Chronology;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.ServiceLoader;
-import java.time.chrono.Chronology;
+
 import org.testng.annotations.Test;
 
 /**
@@ -73,7 +74,7 @@
 @Test
 public class TestServiceLoader {
 
-    @Test(groups="implementation")
+    @Test
     public void test_copticServiceLoader() {
         Map<String, Chronology> chronos = new HashMap<>();
         ServiceLoader<Chronology> loader = ServiceLoader.load(Chronology.class, null);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/test/java/time/chrono/TestThaiBuddhistChronoImpl.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package test.java.time.chrono;
+
+import static org.testng.Assert.assertEquals;
+
+import java.time.LocalDate;
+import java.time.chrono.ThaiBuddhistChronology;
+import java.time.chrono.ThaiBuddhistDate;
+import java.time.temporal.ChronoField;
+import java.time.temporal.ChronoUnit;
+import java.util.Calendar;
+import java.util.Locale;
+import java.util.TimeZone;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test.
+ */
+@Test
+public class TestThaiBuddhistChronoImpl {
+
+    /**
+     * Range of years to check consistency with java.util.Calendar
+     */
+    @DataProvider(name="RangeVersusCalendar")
+    Object[][] provider_rangeVersusCalendar() {
+        return new Object[][] {
+            {LocalDate.of(1583, 1, 1), LocalDate.of(2100, 1, 1)},
+        };
+    }
+
+    //-----------------------------------------------------------------------
+    // Verify  ThaiBuddhist Calendar matches java.util.Calendar for range
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="RangeVersusCalendar")
+    public void test_ThaiBuddhistChrono_vsCalendar(LocalDate isoStartDate, LocalDate isoEndDate) {
+        Locale locale = Locale.forLanguageTag("th-TH--u-ca-buddhist");
+        assertEquals(locale.toString(), "th_TH", "Unexpected locale");
+        Calendar cal = java.util.Calendar.getInstance(locale);
+        assertEquals(cal.getCalendarType(), "buddhist", "Unexpected calendar type");
+
+        ThaiBuddhistDate thaiDate = ThaiBuddhistChronology.INSTANCE.date(isoStartDate);
+
+        cal.setTimeZone(TimeZone.getTimeZone("GMT+00"));
+        cal.set(Calendar.YEAR, thaiDate.get(ChronoField.YEAR));
+        cal.set(Calendar.MONTH, thaiDate.get(ChronoField.MONTH_OF_YEAR) - 1);
+        cal.set(Calendar.DAY_OF_MONTH, thaiDate.get(ChronoField.DAY_OF_MONTH));
+
+        while (thaiDate.isBefore(isoEndDate)) {
+            assertEquals(thaiDate.get(ChronoField.DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch in " + thaiDate + ";  cal: " + cal);
+            assertEquals(thaiDate.get(ChronoField.MONTH_OF_YEAR), cal.get(Calendar.MONTH) + 1, "Month mismatch in " + thaiDate);
+            assertEquals(thaiDate.get(ChronoField.YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + thaiDate);
+
+            thaiDate = thaiDate.plus(1, ChronoUnit.DAYS);
+            cal.add(Calendar.DAY_OF_MONTH, 1);
+        }
+    }
+
+    private String calToString(Calendar cal) {
+        return String.format("%04d-%02d-%02d",
+                cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH));
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/test/java/time/chrono/TestUmmAlQuraChronology.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package test.java.time.chrono;
+
+import static java.time.temporal.ChronoField.DAY_OF_MONTH;
+import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoField.YEAR;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.fail;
+
+import java.time.DateTimeException;
+import java.time.LocalDate;
+import java.time.chrono.Chronology;
+import java.time.chrono.HijrahChronology;
+import java.time.chrono.HijrahDate;
+import java.time.temporal.ChronoField;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.ValueRange;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Tests for the Umm alQura chronology and data
+ */
+@Test
+public class TestUmmAlQuraChronology {
+
+    @Test
+    public void test_aliases() {
+        HijrahChronology hc = (HijrahChronology) Chronology.of("Hijrah");
+        assertEquals(hc, HijrahChronology.INSTANCE, "Alias for Hijrah-umalqura");
+        hc = (HijrahChronology) Chronology.of("islamic");
+        assertEquals(hc, HijrahChronology.INSTANCE, "Alias for Hijrah-umalqura");
+    }
+
+    //-----------------------------------------------------------------------
+    // regular data factory for Umm alQura dates and the corresponding ISO dates
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "UmmalQuraVsISODates")
+    Object[][] data_of_ummalqura() {
+        return new Object[][]{
+
+            //{1318, 01, 01,   1900, 04, 30},
+            //{1318, 01, 02,   1900, 05, 01},
+
+            //{1318, 12, 29,   1901, 04, 18},
+            //{1319, 01, 01,   1901, 04, 19},
+
+            //{1433, 12, 29,   2012, 11, 14},
+            //{1434, 01, 01,   2012, 11, 15},
+
+            {1434, 02, 18,   2012, 12, 31},
+            {1434, 02, 19,   2013, 01, 01},
+
+            //{1502, 12, 30,   2079, 10, 25},
+            // not in Umm alQura data {1503, 01, 01,   2079, 10, 26},
+
+            // not in Umm alQura data {1503, 06, 28,   2080, 04, 18},
+            // not in Umm alQura data ~/ws/Downloads
+        };
+    }
+
+    @Test(dataProvider="UmmalQuraVsISODates")
+        public void Test_UmmAlQuraDatesVsISO(int h_year, int h_month, int h_day, int iso_year, int iso_month, int iso_day) {
+        HijrahDate hd = HijrahDate.of(h_year, h_month, h_day);
+        LocalDate ld = LocalDate.of(iso_year, iso_month, iso_day);
+        assertEquals(hd.toEpochDay(), ld.toEpochDay(), "Umm alQura date and ISO date should have same epochDay");
+    }
+
+
+    @Test
+    public void Test_UmmAlQuraChronoRange() {
+        HijrahChronology chrono = HijrahChronology.INSTANCE;
+        ValueRange year = chrono.range(YEAR);
+        assertEquals(year.getMinimum(), 1432, "Minimum year");
+        assertEquals(year.getLargestMinimum(), 1432, "Largest minimum year");
+        assertEquals(year.getMaximum(), 1435, "Largest year");
+        assertEquals(year.getSmallestMaximum(), 1435, "Smallest Maximum year");
+
+        ValueRange month = chrono.range(MONTH_OF_YEAR);
+        assertEquals(month.getMinimum(), 1, "Minimum month");
+        assertEquals(month.getLargestMinimum(), 1, "Largest minimum month");
+        assertEquals(month.getMaximum(), 12, "Largest month");
+        assertEquals(month.getSmallestMaximum(), 12, "Smallest Maximum month");
+
+        ValueRange day = chrono.range(DAY_OF_MONTH);
+        assertEquals(day.getMinimum(), 1, "Minimum day");
+        assertEquals(day.getLargestMinimum(), 1, "Largest minimum day");
+        assertEquals(day.getMaximum(), 30, "Largest day");
+        assertEquals(day.getSmallestMaximum(), 29, "Smallest Maximum day");
+    }
+
+    //-----------------------------------------------------------------------
+    // regular data factory for dates and the corresponding range values
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "dates")
+    Object[][] data_of_calendars() {
+        return new Object[][]{
+            {HijrahDate.of(1434, 5, 1), 1432, 1435, 1, 12, 1, 29, 30},
+            {HijrahDate.of(1434, 6, 1), 1432, 1435, 1, 12, 1, 30, 30},
+        };
+    }
+
+    @Test(dataProvider="dates")
+    public void Test_UmmAlQuraRanges(HijrahDate date,
+                        int minYear, int maxYear,
+                        int minMonth, int maxMonth,
+                        int minDay, int maxDay, int maxChronoDay) {
+        // Check the chronology ranges
+        HijrahChronology chrono = date.getChronology();
+        ValueRange yearRange = chrono.range(YEAR);
+        assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah chronology");
+        assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah chronology");
+        assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah chronology");
+        assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest Maximum year for Hijrah chronology");
+
+        ValueRange monthRange = chrono.range(MONTH_OF_YEAR);
+        assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for Hijrah chronology");
+        assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for Hijrah chronology");
+
+        ValueRange daysRange = chrono.range(DAY_OF_MONTH);
+        assertEquals(daysRange.getMinimum(), minDay, "Minimum day for chronology");
+        assertEquals(daysRange.getMaximum(), maxChronoDay, "Maximum day for Hijrah chronology");
+
+        // Check the date ranges
+        yearRange = date.range(YEAR);
+        assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date");
+        assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum  year for Hijrah date");
+        assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date");
+        assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest maximum year for Hijrah date");
+
+        monthRange = date.range(MONTH_OF_YEAR);
+        assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for HijrahDate");
+        assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for HijrahDate");
+
+        daysRange = date.range(DAY_OF_MONTH);
+        assertEquals(daysRange.getMinimum(), minDay, "Minimum day for HijrahDate");
+        assertEquals(daysRange.getMaximum(), maxDay, "Maximum day for HijrahDate");
+
+    }
+
+    @Test
+    public void test_hijrahDateLimits() {
+        HijrahChronology chrono = HijrahChronology.INSTANCE;
+        ValueRange yearRange = chrono.range(YEAR);
+        ValueRange monthRange = chrono.range(MONTH_OF_YEAR);
+        ValueRange dayRange = chrono.range(DAY_OF_MONTH);
+
+        HijrahDate xx = chrono.date(1434, 1, 1);
+        HijrahDate minDate = chrono.date((int)yearRange.getLargestMinimum(),
+                (int)monthRange.getMinimum(), (int)dayRange.getMinimum());
+        try {
+            HijrahDate before = minDate.minus(1, ChronoUnit.DAYS);
+            fail("Exception did not occur, minDate: " + minDate + ".minus(1, DAYS) = " + before);
+
+        } catch (DateTimeException ex) {
+            // ignore, this exception was expected
+        }
+
+        HijrahDate maxDate = chrono.date((int)yearRange.getSmallestMaximum(),
+                (int)monthRange.getMaximum(), 1);
+        int monthLen = maxDate.lengthOfMonth();
+        maxDate = maxDate.with(DAY_OF_MONTH, monthLen);
+        try {
+            HijrahDate after = maxDate.plus(1, ChronoUnit.DAYS);
+            fail("Exception did not occur, maxDate: " + maxDate + ".plus(1, DAYS) = " + after);
+        } catch (DateTimeException ex) {
+            // ignore, this exception was expected
+        }
+    }
+
+    @DataProvider(name="badDates")
+    Object[][] data_badDates() {
+        return new Object[][] {
+            {1317, 12, 29},
+            {1317, 12, 30},
+
+            {1320, 1, 29 + 1},
+            {1320, 2, 30 + 1},
+            {1320, 3, 29 + 1},
+            {1320, 4, 29 + 1},
+            {1320, 5, 30 + 1},
+            {1320, 6, 29 + 1},
+            {1320, 7, 30 + 1},
+            {1320, 8, 30 + 1},
+            {1320, 9, 29 + 1},
+            {1320, 10, 30 + 1},
+            {1320, 11, 30 + 1},
+            {1320, 12, 30 + 1},
+        };
+    }
+
+    @Test(dataProvider="badDates", expectedExceptions=DateTimeException.class)
+    public void test_badDates(int year, int month, int dom) {
+        HijrahChronology.INSTANCE.date(year, month, dom);
+    }
+
+    void printRange(ValueRange range, Object obj, ChronoField field) {
+        System.err.printf(" range: min: %d, max: %d; of: %s, field: %s%n", range.getMinimum(), range.getMaximum(), obj.toString(), field.toString());
+    }
+}
--- a/test/java/time/test/java/time/format/AbstractTestPrinterParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/AbstractTestPrinterParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,16 +59,18 @@
  */
 package test.java.time.format;
 
-import java.time.format.*;
-
-import java.util.Locale;
-
 import java.time.DateTimeException;
 import java.time.LocalDateTime;
 import java.time.ZoneId;
 import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatSymbols;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.SignStyle;
+import java.time.format.TextStyle;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
+import java.util.Locale;
 
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -86,7 +88,7 @@
     protected DateTimeFormatSymbols symbols;
 
 
-    @BeforeMethod(groups={"tck"})
+    @BeforeMethod
     public void setUp() {
         buf = new StringBuilder();
         builder = new DateTimeFormatterBuilder();
@@ -123,6 +125,10 @@
         return builder.appendLiteral(s).toFormatter(locale).withSymbols(symbols);
     }
 
+    protected DateTimeFormatter getFormatter(TemporalField field) {
+        return builder.appendText(field).toFormatter(locale).withSymbols(symbols);
+    }
+
     protected DateTimeFormatter getFormatter(TemporalField field, TextStyle style) {
         return builder.appendText(field, style).toFormatter(locale).withSymbols(symbols);
     }
@@ -135,6 +141,10 @@
         return builder.appendOffset(pattern, noOffsetText).toFormatter(locale).withSymbols(symbols);
     }
 
+    protected DateTimeFormatter getPatternFormatter(String pattern) {
+        return builder.appendPattern(pattern).toFormatter(locale).withSymbols(symbols);
+    }
+
     protected static final TemporalAccessor EMPTY_DTA = new TemporalAccessor() {
         public boolean isSupported(TemporalField field) {
             return true;
--- a/test/java/time/test/java/time/format/MockIOExceptionAppendable.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/MockIOExceptionAppendable.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,8 +59,6 @@
  */
 package test.java.time.format;
 
-import java.time.format.*;
-
 import java.io.IOException;
 
 /**
--- a/test/java/time/test/java/time/format/TestCharLiteralParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestCharLiteralParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -65,8 +65,8 @@
 import static org.testng.Assert.fail;
 
 import java.text.ParsePosition;
-import java.time.temporal.Queries;
 import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalQuery;
 
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -74,7 +74,7 @@
 /**
  * Test CharLiteralPrinterParser.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestCharLiteralParser extends AbstractTestPrinterParser {
 
     @DataProvider(name="success")
@@ -111,8 +111,8 @@
         } else {
             assertEquals(ppos.getIndex(), expectedPos);
             assertEquals(parsed.isSupported(YEAR), false);
-            assertEquals(parsed.query(Queries.chronology()), null);
-            assertEquals(parsed.query(Queries.zoneId()), null);
+            assertEquals(parsed.query(TemporalQuery.chronology()), null);
+            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
         }
     }
 
--- a/test/java/time/test/java/time/format/TestCharLiteralPrinter.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestCharLiteralPrinter.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,8 +59,6 @@
  */
 package test.java.time.format;
 
-import java.time.format.*;
-
 import static org.testng.Assert.assertEquals;
 
 import org.testng.annotations.Test;
@@ -68,7 +66,7 @@
 /**
  * Test CharLiteralPrinterParser.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestCharLiteralPrinter extends AbstractTestPrinterParser {
 
     //-----------------------------------------------------------------------
--- a/test/java/time/test/java/time/format/TestDateTimeFormatSymbols.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestDateTimeFormatSymbols.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,10 +59,9 @@
  */
 package test.java.time.format;
 
-import java.time.format.*;
-
 import static org.testng.Assert.assertSame;
 
+import java.time.format.DateTimeFormatSymbols;
 import java.util.Locale;
 
 import org.testng.annotations.Test;
@@ -73,7 +72,7 @@
 @Test
 public class TestDateTimeFormatSymbols {
 
-    @Test(groups={"implementation"})
+    @Test
     public void test_of_Locale_cached() {
         DateTimeFormatSymbols loc1 = DateTimeFormatSymbols.of(Locale.CANADA);
         DateTimeFormatSymbols loc2 = DateTimeFormatSymbols.of(Locale.CANADA);
@@ -81,7 +80,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups={"implementation"})
+    @Test
     public void test_ofDefaultLocale_cached() {
         DateTimeFormatSymbols loc1 = DateTimeFormatSymbols.ofDefaultLocale();
         DateTimeFormatSymbols loc2 = DateTimeFormatSymbols.ofDefaultLocale();
--- a/test/java/time/test/java/time/format/TestDateTimeFormatter.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestDateTimeFormatter.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,14 +59,15 @@
  */
 package test.java.time.format;
 
-import java.time.format.*;
-
 import static java.time.temporal.ChronoField.DAY_OF_MONTH;
 import static org.testng.Assert.assertSame;
 
+import java.time.format.DateTimeFormatSymbols;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.SignStyle;
 import java.util.Locale;
 
-import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
 /**
@@ -74,14 +75,8 @@
  */
 @Test
 public class TestDateTimeFormatter {
-    // TODO these tests are not tck, as they refer to a non-public class
-    // rewrite whole test case to use BASIC_FORMATTER or similar
 
-    @BeforeMethod(groups={"tck"})
-    public void setUp() {
-    }
-
-    @Test(groups={"implementation"})
+    @Test
     public void test_withLocale_same() throws Exception {
         DateTimeFormatter base =
             new DateTimeFormatterBuilder().appendLiteral("ONE")
--- a/test/java/time/test/java/time/format/TestDateTimeFormatterBuilder.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestDateTimeFormatterBuilder.java	Wed Apr 17 21:48:04 2013 -0700
@@ -645,17 +645,23 @@
             {"GGGG", "Text(Era)"},
             {"GGGGG", "Text(Era,NARROW)"},
 
-            {"y", "Value(Year)"},
-            {"yy", "ReducedValue(Year,2,2000)"},
-            {"yyy", "Value(Year,3,19,NORMAL)"},
-            {"yyyy", "Value(Year,4,19,EXCEEDS_PAD)"},
-            {"yyyyy", "Value(Year,5,19,EXCEEDS_PAD)"},
+            {"u", "Value(Year)"},
+            {"uu", "ReducedValue(Year,2,2000)"},
+            {"uuu", "Value(Year,3,19,NORMAL)"},
+            {"uuuu", "Value(Year,4,19,EXCEEDS_PAD)"},
+            {"uuuuu", "Value(Year,5,19,EXCEEDS_PAD)"},
 
-//            {"Y", "Value(WeekBasedYear)"},
-//            {"YY", "ReducedValue(WeekBasedYear,2,2000)"},
-//            {"YYY", "Value(WeekBasedYear,3,19,NORMAL)"},
-//            {"YYYY", "Value(WeekBasedYear,4,19,EXCEEDS_PAD)"},
-//            {"YYYYY", "Value(WeekBasedYear,5,19,EXCEEDS_PAD)"},
+            {"y", "Value(YearOfEra)"},
+            {"yy", "ReducedValue(YearOfEra,2,2000)"},
+            {"yyy", "Value(YearOfEra,3,19,NORMAL)"},
+            {"yyyy", "Value(YearOfEra,4,19,EXCEEDS_PAD)"},
+            {"yyyyy", "Value(YearOfEra,5,19,EXCEEDS_PAD)"},
+
+            {"Y", "Localized(WeekBasedYear)"},
+            {"YY", "Localized(ReducedValue(WeekBasedYear,2,2000))"},
+            {"YYY", "Localized(WeekBasedYear,3,19,NORMAL)"},
+            {"YYYY", "Localized(WeekBasedYear,4,19,EXCEEDS_PAD)"},
+            {"YYYYY", "Localized(WeekBasedYear,5,19,EXCEEDS_PAD)"},
 
             {"M", "Value(MonthOfYear)"},
             {"MM", "Value(MonthOfYear,2)"},
@@ -663,17 +669,20 @@
             {"MMMM", "Text(MonthOfYear)"},
             {"MMMMM", "Text(MonthOfYear,NARROW)"},
 
+            {"L", "Value(MonthOfYear)"},
+            {"LL", "Value(MonthOfYear,2)"},
+            {"LLL", "Text(MonthOfYear,SHORT_STANDALONE)"},
+            {"LLLL", "Text(MonthOfYear,FULL_STANDALONE)"},
+            {"LLLLL", "Text(MonthOfYear,NARROW_STANDALONE)"},
+
             {"D", "Value(DayOfYear)"},
             {"DD", "Value(DayOfYear,2)"},
             {"DDD", "Value(DayOfYear,3)"},
 
             {"d", "Value(DayOfMonth)"},
             {"dd", "Value(DayOfMonth,2)"},
-            {"ddd", "Value(DayOfMonth,3)"},
 
-            {"F", "Value(AlignedWeekOfMonth)"},
-            {"FF", "Value(AlignedWeekOfMonth,2)"},
-            {"FFF", "Value(AlignedWeekOfMonth,3)"},
+            {"F", "Value(AlignedDayOfWeekInMonth)"},
 
             {"Q", "Value(QuarterOfYear)"},
             {"QQ", "Value(QuarterOfYear,2)"},
@@ -681,41 +690,48 @@
             {"QQQQ", "Text(QuarterOfYear)"},
             {"QQQQQ", "Text(QuarterOfYear,NARROW)"},
 
-            {"E", "Value(DayOfWeek)"},
-            {"EE", "Value(DayOfWeek,2)"},
+            {"q", "Value(QuarterOfYear)"},
+            {"qq", "Value(QuarterOfYear,2)"},
+            {"qqq", "Text(QuarterOfYear,SHORT_STANDALONE)"},
+            {"qqqq", "Text(QuarterOfYear,FULL_STANDALONE)"},
+            {"qqqqq", "Text(QuarterOfYear,NARROW_STANDALONE)"},
+
+            {"E", "Text(DayOfWeek,SHORT)"},
+            {"EE", "Text(DayOfWeek,SHORT)"},
             {"EEE", "Text(DayOfWeek,SHORT)"},
             {"EEEE", "Text(DayOfWeek)"},
             {"EEEEE", "Text(DayOfWeek,NARROW)"},
 
+            {"e", "Localized(DayOfWeek,1)"},
+            {"ee", "Localized(DayOfWeek,2)"},
+            {"eee", "Text(DayOfWeek,SHORT)"},
+            {"eeee", "Text(DayOfWeek)"},
+            {"eeeee", "Text(DayOfWeek,NARROW)"},
+
+            {"c", "Localized(DayOfWeek,1)"},
+            {"ccc", "Text(DayOfWeek,SHORT_STANDALONE)"},
+            {"cccc", "Text(DayOfWeek,FULL_STANDALONE)"},
+            {"ccccc", "Text(DayOfWeek,NARROW_STANDALONE)"},
+
             {"a", "Text(AmPmOfDay,SHORT)"},
-            {"aa", "Text(AmPmOfDay,SHORT)"},
-            {"aaa", "Text(AmPmOfDay,SHORT)"},
-            {"aaaa", "Text(AmPmOfDay)"},
-            {"aaaaa", "Text(AmPmOfDay,NARROW)"},
 
             {"H", "Value(HourOfDay)"},
             {"HH", "Value(HourOfDay,2)"},
-            {"HHH", "Value(HourOfDay,3)"},
 
             {"K", "Value(HourOfAmPm)"},
             {"KK", "Value(HourOfAmPm,2)"},
-            {"KKK", "Value(HourOfAmPm,3)"},
 
             {"k", "Value(ClockHourOfDay)"},
             {"kk", "Value(ClockHourOfDay,2)"},
-            {"kkk", "Value(ClockHourOfDay,3)"},
 
             {"h", "Value(ClockHourOfAmPm)"},
             {"hh", "Value(ClockHourOfAmPm,2)"},
-            {"hhh", "Value(ClockHourOfAmPm,3)"},
 
             {"m", "Value(MinuteOfHour)"},
             {"mm", "Value(MinuteOfHour,2)"},
-            {"mmm", "Value(MinuteOfHour,3)"},
 
             {"s", "Value(SecondOfMinute)"},
             {"ss", "Value(SecondOfMinute,2)"},
-            {"sss", "Value(SecondOfMinute,3)"},
 
             {"S", "Fraction(NanoOfSecond,1,1)"},
             {"SS", "Fraction(NanoOfSecond,2,2)"},
@@ -760,22 +776,20 @@
             {"ppH", "Pad(Value(HourOfDay),2)"},
             {"pppDD", "Pad(Value(DayOfYear,2),3)"},
 
-            {"yyyy[-MM[-dd", "Value(Year,4,19,EXCEEDS_PAD)['-'Value(MonthOfYear,2)['-'Value(DayOfMonth,2)]]"},
-            {"yyyy[-MM[-dd]]", "Value(Year,4,19,EXCEEDS_PAD)['-'Value(MonthOfYear,2)['-'Value(DayOfMonth,2)]]"},
-            {"yyyy[-MM[]-dd]", "Value(Year,4,19,EXCEEDS_PAD)['-'Value(MonthOfYear,2)'-'Value(DayOfMonth,2)]"},
+            {"yyyy[-MM[-dd", "Value(YearOfEra,4,19,EXCEEDS_PAD)['-'Value(MonthOfYear,2)['-'Value(DayOfMonth,2)]]"},
+            {"yyyy[-MM[-dd]]", "Value(YearOfEra,4,19,EXCEEDS_PAD)['-'Value(MonthOfYear,2)['-'Value(DayOfMonth,2)]]"},
+            {"yyyy[-MM[]-dd]", "Value(YearOfEra,4,19,EXCEEDS_PAD)['-'Value(MonthOfYear,2)'-'Value(DayOfMonth,2)]"},
 
-            {"yyyy-MM-dd'T'HH:mm:ss.SSS", "Value(Year,4,19,EXCEEDS_PAD)'-'Value(MonthOfYear,2)'-'Value(DayOfMonth,2)" +
+            {"yyyy-MM-dd'T'HH:mm:ss.SSS", "Value(YearOfEra,4,19,EXCEEDS_PAD)'-'Value(MonthOfYear,2)'-'Value(DayOfMonth,2)" +
                 "'T'Value(HourOfDay,2)':'Value(MinuteOfHour,2)':'Value(SecondOfMinute,2)'.'Fraction(NanoOfSecond,3,3)"},
 
-            {"e", "WeekBased(e1)"},
-            {"w", "WeekBased(w1)"},
-            {"W", "WeekBased(W1)"},
-            {"WW", "WeekBased(W2)"},
-
+            {"w", "Localized(WeekOfWeekBasedYear,1)"},
+            {"ww", "Localized(WeekOfWeekBasedYear,2)"},
+            {"W", "Localized(WeekOfMonth,1)"},
         };
     }
 
-    @Test(dataProvider="validPatterns", groups={"implementation"})
+    @Test(dataProvider="validPatterns")
     public void test_appendPattern_valid(String input, String expected) throws Exception {
         builder.appendPattern(input);
         DateTimeFormatter f = builder.toFormatter();
@@ -798,12 +812,34 @@
             {"yyyy]MM"},
             {"yyyy[MM]]"},
 
+            {"aa"},
+            {"aaa"},
+            {"aaaa"},
+            {"aaaaa"},
+            {"aaaaaa"},
             {"MMMMMM"},
+            {"LLLLLL"},
             {"QQQQQQ"},
+            {"qqqqqq"},
             {"EEEEEE"},
-            {"aaaaaa"},
-            {"ZZZZ"},
+            {"eeeeee"},
+            {"cc"},
+            {"cccccc"},
+            {"ddd"},
+            {"DDDD"},
+            {"FF"},
+            {"FFF"},
+            {"hhh"},
+            {"HHH"},
+            {"kkk"},
+            {"KKK"},
+            {"mmm"},
+            {"sss"},
+            {"OO"},
+            {"OOO"},
+            {"OOOOO"},
             {"XXXXXX"},
+            {"ZZZZZZ"},
             {"zzzzz"},
             {"V"},
             {"VVV"},
@@ -823,9 +859,8 @@
             {"fa"},
             {"fM"},
 
-            {"ww"},
-            {"ee"},
-            {"WWW"},
+            {"www"},
+            {"WW"},
         };
     }
 
@@ -844,9 +879,9 @@
         return new Object[][] {
             {"Q", date(2012, 2, 10), "1"},
             {"QQ", date(2012, 2, 10), "01"},
-//            {"QQQ", date(2012, 2, 10), "Q1"},  // TODO: data for quarters?
-//            {"QQQQ", date(2012, 2, 10), "Q1"},
-//            {"QQQQQ", date(2012, 2, 10), "Q1"},
+            {"QQQ", date(2012, 2, 10), "Q1"},
+            {"QQQQ", date(2012, 2, 10), "1st quarter"},
+            {"QQQQQ", date(2012, 2, 10), "1"},
         };
     }
 
--- a/test/java/time/test/java/time/format/TestDateTimeTextProvider.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestDateTimeTextProvider.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,25 +59,24 @@
  */
 package test.java.time.format;
 
-import java.time.format.*;
-
 import static java.time.temporal.ChronoField.AMPM_OF_DAY;
 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
 import static org.testng.Assert.assertEquals;
 
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.format.TextStyle;
+import java.time.temporal.TemporalField;
 import java.util.Locale;
 
-import java.time.ZonedDateTime;
-import java.time.temporal.TemporalField;
-
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
 /**
  * Test SimpleDateTimeTextProvider.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestDateTimeTextProvider extends AbstractTestPrinterParser {
 
     Locale enUS = new Locale("en", "US");
--- a/test/java/time/test/java/time/format/TestFractionPrinterParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestFractionPrinterParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -78,7 +78,7 @@
 /**
  * Test FractionPrinterParser.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestFractionPrinterParser extends AbstractTestPrinterParser {
 
     private DateTimeFormatter getFormatter(TemporalField field, int minWidth, int maxWidth, boolean decimalPoint) {
--- a/test/java/time/test/java/time/format/TestNonIsoFormatter.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestNonIsoFormatter.java	Wed Apr 17 21:48:04 2013 -0700
@@ -22,16 +22,29 @@
  */
 package test.java.time.format;
 
-import java.time.*;
-import java.time.chrono.*;
-import java.time.format.*;
-import java.time.temporal.*;
+import static org.testng.Assert.assertEquals;
+
+import java.time.LocalDate;
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.Chronology;
+import java.time.chrono.HijrahChronology;
+import java.time.chrono.IsoChronology;
+import java.time.chrono.JapaneseChronology;
+import java.time.chrono.MinguoChronology;
+import java.time.chrono.ThaiBuddhistChronology;
+import java.time.format.DateTimeFormatSymbols;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.DateTimeParseException;
+import java.time.format.FormatStyle;
+import java.time.format.TextStyle;
+import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalQuery;
 import java.util.Locale;
 
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
-import static org.testng.Assert.assertEquals;
 
 /**
  * Test DateTimeFormatter with non-ISO chronology.
@@ -39,8 +52,9 @@
  * Strings in test data are all dependent on CLDR data which may change
  * in future CLDR releases.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestNonIsoFormatter {
+    private static final Chronology ISO8601 = IsoChronology.INSTANCE;
     private static final Chronology JAPANESE = JapaneseChronology.INSTANCE;
     private static final Chronology HIJRAH = HijrahChronology.INSTANCE;
     private static final Chronology MINGUO = MinguoChronology.INSTANCE;
@@ -50,7 +64,8 @@
 
     private static final Locale ARABIC = new Locale("ar");
     private static final Locale thTH = new Locale("th", "TH");
-    private static final Locale thTHTH = new Locale("th", "TH", "TH");
+    private static final Locale thTHTH = Locale.forLanguageTag("th-TH-u-nu-thai");
+    private static final Locale jaJPJP = Locale.forLanguageTag("ja-JP-u-ca-japanese");
 
     @BeforeMethod
     public void setUp() {
@@ -59,19 +74,22 @@
     @DataProvider(name="format_data")
     Object[][] formatData() {
         return new Object[][] {
-            // Chronology, Locale, ChronoLocalDate, expected string
-            { JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
-              "\u5e73\u621025\u5e742\u670811\u65e5\u6708\u66dc\u65e5" }, // Japanese Heisei 25-02-11 (Mon)
-            { HIJRAH, ARABIC, HIJRAH.date(IsoDate),
-              "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 30 \u0631\u0628\u064a\u0639 "
-              + "\u0627\u0644\u0623\u0648\u0644 1434" }, // Hijrah AH 1434-03-30 (Mon)
-            { MINGUO, Locale.TAIWAN, MINGUO.date(IsoDate),
+            // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
+            { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
+              "\u5e73\u621025\u5e742\u670811\u65e5" }, // Japanese Heisei 25-02-11
+            { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
+              "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 1 \u0631\u0628\u064a\u0639 "
+              + "\u0627\u0644\u0622\u062e\u0631 1434" }, // Hijrah AH 1434-04-01 (Mon)
+            { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
               "\u6c11\u570b102\u5e742\u670811\u65e5\u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
-            { BUDDHIST, thTH, BUDDHIST.date(IsoDate),
+            { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
               "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
               + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
               + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
-         // { BUDDHIST, thTHTH, BUDDHIST.date(IsoDate), "<TBS>" }, // doesn't work
+            { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
+              "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
+              + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
+              + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
         };
     }
 
@@ -79,23 +97,49 @@
     Object[][] invalidText() {
         return new Object[][] {
             // TODO: currently fixed Chronology and Locale.
-            { "\u662d\u548c64\u5e741\u67089\u65e5\u6708\u66dc\u65e5" }, // S64.01.09 (Mon)
+            // line commented out, as S64.01.09 seems like a reasonable thing to parse
+            // (era "S" ended on S64.01.07, but a little leniency is a good thing
+//            { "\u662d\u548c64\u5e741\u67089\u65e5\u6708\u66dc\u65e5" }, // S64.01.09 (Mon)
             { "\u662d\u548c65\u5e741\u67081\u65e5\u6708\u66dc\u65e5" }, // S65.01.01 (Mon)
         };
     }
 
+    @DataProvider(name="chrono_names")
+    Object[][] chronoNamesData() {
+        return new Object[][] {
+            // Chronology, Locale, Chronology Name
+            { ISO8601,  Locale.ENGLISH, "ISO" },    // No data in CLDR; Use Id.
+            { BUDDHIST, Locale.ENGLISH, "Buddhist Calendar" },
+            { HIJRAH,   Locale.ENGLISH, "Hijrah-umalqura" }, // No data in CLDR; Use Id.
+            { JAPANESE, Locale.ENGLISH, "Japanese Calendar" },
+            { MINGUO,   Locale.ENGLISH, "Minguo Calendar" },
+
+            { ISO8601,  Locale.JAPANESE, "ISO" },    // No data in CLDR; Use Id.
+            { JAPANESE, Locale.JAPANESE, "\u548c\u66a6" },
+            { BUDDHIST, Locale.JAPANESE, "\u30bf\u30a4\u4ecf\u6559\u66a6" },
+
+            { ISO8601,  thTH, "ISO" },    // No data in CLDR; Use Id.
+            { JAPANESE, thTH, "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e0d\u0e35\u0e48\u0e1b\u0e38\u0e48\u0e19" },
+            { BUDDHIST, thTH, "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e1e\u0e38\u0e17\u0e18" },
+        };
+    }
+
     @Test(dataProvider="format_data")
-    public void test_formatLocalizedDate(Chronology chrono, Locale locale, ChronoLocalDate<?> date, String expected) {
+    public void test_formatLocalizedDate(Chronology chrono, Locale formatLocale, Locale numberingLocale,
+                                         ChronoLocalDate<?> date, String expected) {
         DateTimeFormatter dtf = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL)
-            .withChronology(chrono).withLocale(locale);
+            .withChronology(chrono).withLocale(formatLocale)
+            .withSymbols(DateTimeFormatSymbols.of(numberingLocale));
         String text = dtf.format(date);
         assertEquals(text, expected);
     }
 
     @Test(dataProvider="format_data")
-    public void test_parseLocalizedText(Chronology chrono, Locale locale, ChronoLocalDate<?> expected, String text) {
+    public void test_parseLocalizedText(Chronology chrono, Locale formatLocale, Locale numberingLocale,
+                                        ChronoLocalDate<?> expected, String text) {
         DateTimeFormatter dtf = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL)
-            .withChronology(chrono).withLocale(locale);
+            .withChronology(chrono).withLocale(formatLocale)
+            .withSymbols(DateTimeFormatSymbols.of(numberingLocale));
         TemporalAccessor temporal = dtf.parse(text);
         ChronoLocalDate<?> date = chrono.date(temporal);
         assertEquals(date, expected);
@@ -105,6 +149,17 @@
     public void test_parseInvalidText(String text) {
         DateTimeFormatter dtf = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL)
             .withChronology(JAPANESE).withLocale(Locale.JAPANESE);
-        TemporalAccessor temporal = dtf.parse(text);
+        dtf.parse(text);
+    }
+
+    @Test(dataProvider="chrono_names")
+    public void test_chronoNames(Chronology chrono, Locale locale, String expected) {
+        DateTimeFormatter dtf = new DateTimeFormatterBuilder().appendChronologyText(TextStyle.SHORT)
+            .toFormatter(locale);
+        String text = dtf.format(chrono.dateNow());
+        assertEquals(text, expected);
+        TemporalAccessor ta = dtf.parse(text);
+        Chronology cal = ta.query(TemporalQuery.chronology());
+        assertEquals(cal, chrono);
     }
 }
--- a/test/java/time/test/java/time/format/TestNumberParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestNumberParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -70,9 +70,9 @@
 import java.text.ParsePosition;
 import java.time.format.DateTimeFormatter;
 import java.time.format.SignStyle;
-import java.time.temporal.Queries;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQuery;
 
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -80,7 +80,7 @@
 /**
  * Test NumberPrinterParser.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestNumberParser extends AbstractTestPrinterParser {
 
     //-----------------------------------------------------------------------
@@ -178,8 +178,8 @@
             assertTrue(subsequentWidth >= 0);
             assertEquals(ppos.getIndex(), expectedPos + subsequentWidth);
             assertEquals(parsed.getLong(DAY_OF_MONTH), expectedValue);
-            assertEquals(parsed.query(Queries.chronology()), null);
-            assertEquals(parsed.query(Queries.zoneId()), null);
+            assertEquals(parsed.query(TemporalQuery.chronology()), null);
+            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
         }
     }
 
@@ -198,8 +198,8 @@
             assertTrue(subsequentWidth >= 0);
             assertEquals(ppos.getIndex(), expectedPos + subsequentWidth);
             assertEquals(parsed.getLong(DAY_OF_WEEK), expectedValue);
-            assertEquals(parsed.query(Queries.chronology()), null);
-            assertEquals(parsed.query(Queries.zoneId()), null);
+            assertEquals(parsed.query(TemporalQuery.chronology()), null);
+            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
         }
     }
 
@@ -313,8 +313,8 @@
         } else {
             assertEquals(pos.getIndex(), parseLen);
             assertEquals(parsed.getLong(DAY_OF_MONTH), (long)parseVal);
-            assertEquals(parsed.query(Queries.chronology()), null);
-            assertEquals(parsed.query(Queries.zoneId()), null);
+            assertEquals(parsed.query(TemporalQuery.chronology()), null);
+            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
         }
     }
 
@@ -423,8 +423,8 @@
         } else {
             assertEquals(pos.getIndex(), parseLen);
             assertEquals(parsed.getLong(DAY_OF_MONTH), (long)parseVal);
-            assertEquals(parsed.query(Queries.chronology()), null);
-            assertEquals(parsed.query(Queries.zoneId()), null);
+            assertEquals(parsed.query(TemporalQuery.chronology()), null);
+            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
         }
     }
 
@@ -514,8 +514,8 @@
         } else {
             assertEquals(pos.getIndex(), parseLen);
             assertEquals(parsed.getLong(DAY_OF_MONTH), (long)parseVal);
-            assertEquals(parsed.query(Queries.chronology()), null);
-            assertEquals(parsed.query(Queries.zoneId()), null);
+            assertEquals(parsed.query(TemporalQuery.chronology()), null);
+            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
         }
     }
 
@@ -552,8 +552,8 @@
             assertEquals(pos.getIndex(), parseLen);
             assertEquals(parsed.getLong(MONTH_OF_YEAR), (long) parseMonth);
             assertEquals(parsed.getLong(DAY_OF_MONTH), (long) parsedDay);
-            assertEquals(parsed.query(Queries.chronology()), null);
-            assertEquals(parsed.query(Queries.zoneId()), null);
+            assertEquals(parsed.query(TemporalQuery.chronology()), null);
+            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
         }
     }
 
--- a/test/java/time/test/java/time/format/TestPadPrinterDecorator.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestPadPrinterDecorator.java	Wed Apr 17 21:48:04 2013 -0700
@@ -69,7 +69,7 @@
 /**
  * Test PadPrinterDecorator.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestPadPrinterDecorator extends AbstractTestPrinterParser {
 
     //-----------------------------------------------------------------------
--- a/test/java/time/test/java/time/format/TestReducedParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestReducedParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -75,7 +75,7 @@
 /**
  * Test ReducedPrinterParser.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestReducedParser extends AbstractTestPrinterParser {
 
     private DateTimeFormatter getFormatter0(TemporalField field, int width, int baseValue) {
--- a/test/java/time/test/java/time/format/TestReducedPrinter.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestReducedPrinter.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,24 +59,23 @@
  */
 package test.java.time.format;
 
-import java.time.format.*;
-
 import static java.time.temporal.ChronoField.YEAR;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.fail;
 
 import java.time.DateTimeException;
 import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
 import java.time.temporal.TemporalField;
-import test.java.time.temporal.MockFieldValue;
 
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
+import test.java.time.temporal.MockFieldValue;
 
 /**
  * Test ReducedPrinterParser.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestReducedPrinter extends AbstractTestPrinterParser {
 
     private DateTimeFormatter getFormatter0(TemporalField field, int width, int baseValue) {
--- a/test/java/time/test/java/time/format/TestSettingsParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestSettingsParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -68,7 +68,7 @@
 /**
  * Test SettingsParser.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestSettingsParser extends AbstractTestPrinterParser {
 
     //-----------------------------------------------------------------------
--- a/test/java/time/test/java/time/format/TestStringLiteralParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestStringLiteralParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -65,8 +65,8 @@
 import static org.testng.Assert.fail;
 
 import java.text.ParsePosition;
-import java.time.temporal.Queries;
 import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalQuery;
 
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -74,7 +74,7 @@
 /**
  * Test StringLiteralPrinterParser.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestStringLiteralParser extends AbstractTestPrinterParser {
 
     @DataProvider(name="success")
@@ -114,8 +114,8 @@
         } else {
             assertEquals(ppos.getIndex(), expectedPos);
             assertEquals(parsed.isSupported(YEAR), false);
-            assertEquals(parsed.query(Queries.chronology()), null);
-            assertEquals(parsed.query(Queries.zoneId()), null);
+            assertEquals(parsed.query(TemporalQuery.chronology()), null);
+            assertEquals(parsed.query(TemporalQuery.zoneId()), null);
         }
     }
 
--- a/test/java/time/test/java/time/format/TestStringLiteralPrinter.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestStringLiteralPrinter.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,8 +59,6 @@
  */
 package test.java.time.format;
 
-import java.time.format.*;
-
 import static org.testng.Assert.assertEquals;
 
 import org.testng.annotations.Test;
@@ -68,7 +66,7 @@
 /**
  * Test StringLiteralPrinterParser.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestStringLiteralPrinter extends AbstractTestPrinterParser {
 
     //-----------------------------------------------------------------------
--- a/test/java/time/test/java/time/format/TestTextParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestTextParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -62,10 +62,13 @@
 import static java.time.temporal.ChronoField.DAY_OF_MONTH;
 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.IsoFields.QUARTER_OF_YEAR;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
 
 import java.text.ParsePosition;
+import java.time.DayOfWeek;
+import java.time.format.DateTimeFormatter;
 import java.time.format.TextStyle;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
@@ -77,8 +80,10 @@
 /**
  * Test TextPrinterParser.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestTextParser extends AbstractTestPrinterParser {
+    static final Locale RUSSIAN = new Locale("ru");
+    static final Locale FINNISH = new Locale("fi");
 
     //-----------------------------------------------------------------------
     @DataProvider(name="error")
@@ -165,6 +170,21 @@
 
             {MONTH_OF_YEAR, TextStyle.SHORT, 1, "Jan"},
             {MONTH_OF_YEAR, TextStyle.SHORT, 12, "Dec"},
+
+            {QUARTER_OF_YEAR, TextStyle.FULL, 1, "1st quarter"},
+            {QUARTER_OF_YEAR, TextStyle.FULL, 2, "2nd quarter"},
+            {QUARTER_OF_YEAR, TextStyle.FULL, 3, "3rd quarter"},
+            {QUARTER_OF_YEAR, TextStyle.FULL, 4, "4th quarter"},
+
+            {QUARTER_OF_YEAR, TextStyle.SHORT, 1, "Q1"},
+            {QUARTER_OF_YEAR, TextStyle.SHORT, 2, "Q2"},
+            {QUARTER_OF_YEAR, TextStyle.SHORT, 3, "Q3"},
+            {QUARTER_OF_YEAR, TextStyle.SHORT, 4, "Q4"},
+
+            {QUARTER_OF_YEAR, TextStyle.NARROW, 1, "1"},
+            {QUARTER_OF_YEAR, TextStyle.NARROW, 2, "2"},
+            {QUARTER_OF_YEAR, TextStyle.NARROW, 3, "3"},
+            {QUARTER_OF_YEAR, TextStyle.NARROW, 4, "4"},
        };
     }
 
@@ -183,6 +203,46 @@
        };
     }
 
+    // Test data is dependent on localized resources.
+    @DataProvider(name="parseStandaloneText")
+    Object[][] providerStandaloneText() {
+        // Locale, TemporalField, TextStyle, expected value, input text
+        return new Object[][] {
+            {RUSSIAN, MONTH_OF_YEAR, TextStyle.FULL_STANDALONE,   1, "\u042f\u043d\u0432\u0430\u0440\u044c"},
+            {RUSSIAN, MONTH_OF_YEAR, TextStyle.FULL_STANDALONE,  12, "\u0414\u0435\u043a\u0430\u0431\u0440\u044c"},
+            {RUSSIAN, MONTH_OF_YEAR, TextStyle.SHORT_STANDALONE,  1, "\u042f\u043d\u0432."},
+            {RUSSIAN, MONTH_OF_YEAR, TextStyle.SHORT_STANDALONE, 12, "\u0414\u0435\u043a."},
+            {FINNISH, DAY_OF_WEEK,   TextStyle.FULL_STANDALONE,   2, "tiistai"},
+            {FINNISH, DAY_OF_WEEK,   TextStyle.SHORT_STANDALONE,  2, "ti"},
+        };
+    }
+
+    @DataProvider(name="parseDayOfWeekText")
+    Object[][] providerDayOfWeekData() {
+        return new Object[][] {
+            // Locale, pattern, input text, expected DayOfWeek
+            {Locale.US, "e",  "1",  DayOfWeek.SUNDAY},
+            {Locale.US, "ee", "01", DayOfWeek.SUNDAY},
+            {Locale.US, "c",  "1",  DayOfWeek.SUNDAY},
+
+            {Locale.UK, "e",  "1",  DayOfWeek.MONDAY},
+            {Locale.UK, "ee", "01", DayOfWeek.MONDAY},
+            {Locale.UK, "c",  "1",  DayOfWeek.MONDAY},
+        };
+    }
+
+    // Test data is dependent on localized resources.
+    @DataProvider(name="parseLenientText")
+    Object[][] providerLenientText() {
+        // Locale, TemporalField, expected value, input text
+        return new Object[][] {
+            {RUSSIAN, MONTH_OF_YEAR, 1, "\u044f\u043d\u0432\u0430\u0440\u044f"}, // full format
+            {RUSSIAN, MONTH_OF_YEAR, 1, "\u042f\u043d\u0432\u0430\u0440\u044c"}, // full standalone
+            {RUSSIAN, MONTH_OF_YEAR, 1, "\u044f\u043d\u0432"},  // short format
+            {RUSSIAN, MONTH_OF_YEAR, 1, "\u042f\u043d\u0432."}, // short standalone
+        };
+    }
+
     @Test(dataProvider="parseText")
     public void test_parseText(TemporalField field, TextStyle style, int value, String input) throws Exception {
         ParsePosition pos = new ParsePosition(0);
@@ -197,12 +257,32 @@
         assertEquals(pos.getIndex(), input.length());
     }
 
+    @Test(dataProvider="parseStandaloneText")
+    public void test_parseStandaloneText(Locale locale, TemporalField field, TextStyle style, int expectedValue, String input) {
+        DateTimeFormatter formatter = getFormatter(field, style).withLocale(locale);
+        ParsePosition pos = new ParsePosition(0);
+        assertEquals(formatter.parseUnresolved(input, pos).getLong(field), (long) expectedValue);
+        assertEquals(pos.getIndex(), input.length());
+    }
+
+    @Test(dataProvider="parseDayOfWeekText")
+    public void test_parseDayOfWeekText(Locale locale, String pattern, String input, DayOfWeek expected) {
+        DateTimeFormatter formatter = getPatternFormatter(pattern).withLocale(locale);
+        ParsePosition pos = new ParsePosition(0);
+        assertEquals(DayOfWeek.from(formatter.parse(input, pos)), expected);
+        assertEquals(pos.getIndex(), input.length());
+    }
+
     //-----------------------------------------------------------------------
     @Test(dataProvider="parseText")
     public void test_parse_strict_caseSensitive_parseUpper(TemporalField field, TextStyle style, int value, String input) throws Exception {
+        if (input.equals(input.toUpperCase(Locale.ROOT))) {
+            // Skip if the given input is all upper case (e.g., "Q1")
+            return;
+        }
         setCaseSensitive(true);
         ParsePosition pos = new ParsePosition(0);
-        getFormatter(field, style).parseUnresolved(input.toUpperCase(), pos);
+        getFormatter(field, style).parseUnresolved(input.toUpperCase(Locale.ROOT), pos);
         assertEquals(pos.getErrorIndex(), 0);
     }
 
@@ -210,16 +290,20 @@
     public void test_parse_strict_caseInsensitive_parseUpper(TemporalField field, TextStyle style, int value, String input) throws Exception {
         setCaseSensitive(false);
         ParsePosition pos = new ParsePosition(0);
-        assertEquals(getFormatter(field, style).parseUnresolved(input.toUpperCase(), pos).getLong(field), (long) value);
+        assertEquals(getFormatter(field, style).parseUnresolved(input.toUpperCase(Locale.ROOT), pos).getLong(field), (long) value);
         assertEquals(pos.getIndex(), input.length());
     }
 
     //-----------------------------------------------------------------------
     @Test(dataProvider="parseText")
     public void test_parse_strict_caseSensitive_parseLower(TemporalField field, TextStyle style, int value, String input) throws Exception {
+        if (input.equals(input.toLowerCase(Locale.ROOT))) {
+            // Skip if the given input is all lower case (e.g., "1st quarter")
+            return;
+        }
         setCaseSensitive(true);
         ParsePosition pos = new ParsePosition(0);
-        getFormatter(field, style).parseUnresolved(input.toLowerCase(), pos);
+        getFormatter(field, style).parseUnresolved(input.toLowerCase(Locale.ROOT), pos);
         assertEquals(pos.getErrorIndex(), 0);
     }
 
@@ -227,7 +311,7 @@
     public void test_parse_strict_caseInsensitive_parseLower(TemporalField field, TextStyle style, int value, String input) throws Exception {
         setCaseSensitive(false);
         ParsePosition pos = new ParsePosition(0);
-        assertEquals(getFormatter(field, style).parseUnresolved(input.toLowerCase(), pos).getLong(field), (long) value);
+        assertEquals(getFormatter(field, style).parseUnresolved(input.toLowerCase(Locale.ROOT), pos).getLong(field), (long) value);
         assertEquals(pos.getIndex(), input.length());
     }
 
@@ -340,4 +424,13 @@
         assertEquals(pos.getIndex(), 1);
     }
 
+    @Test(dataProvider="parseLenientText")
+    public void test_parseLenientText(Locale locale, TemporalField field, int expectedValue, String input) {
+        setStrict(false);
+        ParsePosition pos = new ParsePosition(0);
+        DateTimeFormatter formatter = getFormatter(field).withLocale(locale);
+        assertEquals(formatter.parseUnresolved(input, pos).getLong(field), (long) expectedValue);
+        assertEquals(pos.getIndex(), input.length());
+    }
+
 }
--- a/test/java/time/test/java/time/format/TestTextPrinter.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestTextPrinter.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,30 +59,33 @@
  */
 package test.java.time.format;
 
-import java.time.format.*;
-
 import static java.time.temporal.ChronoField.DAY_OF_MONTH;
 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
+import static java.time.temporal.ChronoField.ERA;
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
-import static java.time.temporal.ChronoField.ERA;
+import static java.time.temporal.IsoFields.QUARTER_OF_YEAR;
 import static org.testng.Assert.assertEquals;
 
-import java.util.Locale;
-
 import java.time.DateTimeException;
+import java.time.DayOfWeek;
 import java.time.LocalDate;
+import java.time.chrono.JapaneseChronology;
+import java.time.format.DateTimeFormatter;
+import java.time.format.TextStyle;
 import java.time.temporal.TemporalField;
-import java.time.chrono.JapaneseChronology;
-import test.java.time.temporal.MockFieldValue;
+import java.util.Locale;
 
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
+import test.java.time.temporal.MockFieldValue;
 
 /**
  * Test TextPrinterParser.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestTextPrinter extends AbstractTestPrinterParser {
+    static final Locale RUSSIAN = new Locale("ru");
+    static final Locale FINNISH = new Locale("fi");
 
     //-----------------------------------------------------------------------
     @Test(expectedExceptions=DateTimeException.class)
@@ -166,15 +169,57 @@
             {MONTH_OF_YEAR, TextStyle.SHORT, 11, "Nov"},
             {MONTH_OF_YEAR, TextStyle.SHORT, 12, "Dec"},
 
+            {MONTH_OF_YEAR, TextStyle.NARROW, 1, "J"},
+            {MONTH_OF_YEAR, TextStyle.NARROW, 2, "F"},
+            {MONTH_OF_YEAR, TextStyle.NARROW, 3, "M"},
+            {MONTH_OF_YEAR, TextStyle.NARROW, 4, "A"},
+            {MONTH_OF_YEAR, TextStyle.NARROW, 5, "M"},
+            {MONTH_OF_YEAR, TextStyle.NARROW, 6, "J"},
+            {MONTH_OF_YEAR, TextStyle.NARROW, 7, "J"},
+            {MONTH_OF_YEAR, TextStyle.NARROW, 8, "A"},
+            {MONTH_OF_YEAR, TextStyle.NARROW, 9, "S"},
+            {MONTH_OF_YEAR, TextStyle.NARROW, 10, "O"},
+            {MONTH_OF_YEAR, TextStyle.NARROW, 11, "N"},
+            {MONTH_OF_YEAR, TextStyle.NARROW, 12, "D"},
+
             {ERA,           TextStyle.FULL, 0, "Before Christ"},
             {ERA,           TextStyle.FULL, 1, "Anno Domini"},
             {ERA,           TextStyle.SHORT, 0, "BC"},
             {ERA,           TextStyle.SHORT, 1, "AD"},
             {ERA,           TextStyle.NARROW, 0, "B"},
             {ERA,           TextStyle.NARROW, 1, "A"},
+
+            {QUARTER_OF_YEAR, TextStyle.FULL, 1, "1st quarter"},
+            {QUARTER_OF_YEAR, TextStyle.FULL, 2, "2nd quarter"},
+            {QUARTER_OF_YEAR, TextStyle.FULL, 3, "3rd quarter"},
+            {QUARTER_OF_YEAR, TextStyle.FULL, 4, "4th quarter"},
+
+            {QUARTER_OF_YEAR, TextStyle.SHORT, 1, "Q1"},
+            {QUARTER_OF_YEAR, TextStyle.SHORT, 2, "Q2"},
+            {QUARTER_OF_YEAR, TextStyle.SHORT, 3, "Q3"},
+            {QUARTER_OF_YEAR, TextStyle.SHORT, 4, "Q4"},
+
+            {QUARTER_OF_YEAR, TextStyle.NARROW, 1, "1"},
+            {QUARTER_OF_YEAR, TextStyle.NARROW, 2, "2"},
+            {QUARTER_OF_YEAR, TextStyle.NARROW, 3, "3"},
+            {QUARTER_OF_YEAR, TextStyle.NARROW, 4, "4"},
        };
     }
 
+    @DataProvider(name="print_DayOfWeekData")
+    Object[][] providerDayOfWeekData() {
+        return new Object[][] {
+            // Locale, pattern, expected text, input DayOfWeek
+            {Locale.US, "e",  "1",  DayOfWeek.SUNDAY},
+            {Locale.US, "ee", "01", DayOfWeek.SUNDAY},
+            {Locale.US, "c",  "1",  DayOfWeek.SUNDAY},
+
+            {Locale.UK, "e",  "1",  DayOfWeek.MONDAY},
+            {Locale.UK, "ee", "01", DayOfWeek.MONDAY},
+            {Locale.UK, "c",  "1",  DayOfWeek.MONDAY},
+        };
+    }
+
     @DataProvider(name="print_JapaneseChronology")
     Object[][] provider_japaneseEra() {
        return new Object[][] {
@@ -184,12 +229,32 @@
        };
     };
 
+    // Test data is dependent on localized resources.
+    @DataProvider(name="print_standalone")
+    Object[][] provider_StandaloneNames() {
+        return new Object[][] {
+            // standalone names for 2013-01-01 (Tue)
+            // Locale, TemporalField, TextStyle, expected text
+            {RUSSIAN, MONTH_OF_YEAR, TextStyle.FULL_STANDALONE,  "\u042f\u043d\u0432\u0430\u0440\u044c"},
+            {RUSSIAN, MONTH_OF_YEAR, TextStyle.SHORT_STANDALONE, "\u042f\u043d\u0432."},
+            {FINNISH, DAY_OF_WEEK,   TextStyle.FULL_STANDALONE,  "tiistai"},
+            {FINNISH, DAY_OF_WEEK,   TextStyle.SHORT_STANDALONE, "ti"},
+        };
+    }
+
     @Test(dataProvider="print")
     public void test_format(TemporalField field, TextStyle style, int value, String expected) throws Exception {
         getFormatter(field, style).formatTo(new MockFieldValue(field, value), buf);
         assertEquals(buf.toString(), expected);
     }
 
+    @Test(dataProvider="print_DayOfWeekData")
+    public void test_formatDayOfWeek(Locale locale, String pattern, String expected, DayOfWeek dayOfWeek) {
+        DateTimeFormatter formatter = getPatternFormatter(pattern).withLocale(locale);
+        String text = formatter.format(dayOfWeek);
+        assertEquals(text, expected);
+    }
+
     @Test(dataProvider="print_JapaneseChronology")
     public void test_formatJapaneseEra(TemporalField field, TextStyle style, int value, String expected) throws Exception {
         LocalDate ld = LocalDate.of(2013, 1, 31);
@@ -197,6 +262,12 @@
         assertEquals(buf.toString(), expected);
     }
 
+    @Test(dataProvider="print_standalone")
+    public void test_standaloneNames(Locale locale, TemporalField field, TextStyle style, String expected) {
+        getFormatter(field, style).withLocale(locale).formatTo(LocalDate.of(2013, 1, 1), buf);
+        assertEquals(buf.toString(), expected);
+    }
+
     //-----------------------------------------------------------------------
     public void test_print_french_long() throws Exception {
         getFormatter(MONTH_OF_YEAR, TextStyle.FULL).withLocale(Locale.FRENCH).formatTo(LocalDate.of(2012, 1, 1), buf);
--- a/test/java/time/test/java/time/format/TestZoneOffsetParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestZoneOffsetParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -73,7 +73,7 @@
 /**
  * Test ZoneOffsetPrinterParser.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestZoneOffsetParser extends AbstractTestPrinterParser {
 
     //-----------------------------------------------------------------------
--- a/test/java/time/test/java/time/format/TestZoneOffsetPrinter.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestZoneOffsetPrinter.java	Wed Apr 17 21:48:04 2013 -0700
@@ -70,7 +70,7 @@
 /**
  * Test ZoneOffsetPrinterParser.
  */
-@Test(groups={"implementation"})
+@Test
 public class TestZoneOffsetPrinter extends AbstractTestPrinterParser {
 
     private static final ZoneOffset OFFSET_0130 = ZoneOffset.of("+01:30");
--- a/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java	Wed Apr 17 21:48:04 2013 -0700
@@ -23,7 +23,18 @@
 
 package test.java.time.format;
 
+import static org.testng.Assert.assertEquals;
+
 import java.text.DateFormatSymbols;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatSymbols;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.TextStyle;
+import java.time.temporal.ChronoField;
+import java.time.temporal.TemporalQuery;
+import java.time.zone.ZoneRulesProvider;
 import java.util.Arrays;
 import java.util.Date;
 import java.util.HashSet;
@@ -32,24 +43,13 @@
 import java.util.Set;
 import java.util.TimeZone;
 
-import java.time.ZonedDateTime;
-import java.time.ZoneId;
-import java.time.temporal.ChronoField;
-import java.time.temporal.Queries;
-import java.time.format.DateTimeFormatSymbols;
-import java.time.format.DateTimeFormatter;
-import java.time.format.DateTimeFormatterBuilder;
-import java.time.format.TextStyle;
-import java.time.zone.ZoneRulesProvider;
-
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
-import static org.testng.Assert.assertEquals;
 
 /**
  * Test ZoneTextPrinterParser
  */
-@Test(groups={"implementation"})
+@Test
 public class TestZoneTextPrinterParser extends AbstractTestPrinterParser {
 
     protected static DateTimeFormatter getFormatter(Locale locale, TextStyle style) {
@@ -70,26 +70,23 @@
             zdt = zdt.withDayOfYear(r.nextInt(365) + 1)
                      .with(ChronoField.SECOND_OF_DAY, r.nextInt(86400));
             for (String zid : zids) {
-                if (zid.equals("ROC") ||
-                    zid.startsWith("UTC") ||
-                    zid.startsWith("GMT") || zid.startsWith("Etc/GMT")) {
-                    // UTC, GMT are treated as zone offset
+                if (zid.equals("ROC") || zid.startsWith("Etc/GMT")) {
                     continue;      // TBD: match jdk behavior?
                 }
                 zdt = zdt.withZoneSameLocal(ZoneId.of(zid));
                 TimeZone tz = TimeZone.getTimeZone(zid);
                 boolean isDST = tz.inDaylightTime(new Date(zdt.toInstant().toEpochMilli()));
                 for (Locale locale : locales) {
-                    printText(locale, zdt, TextStyle.FULL,
-                              tz.getDisplayName(isDST, TimeZone.LONG, locale));
-                    printText(locale, zdt, TextStyle.SHORT,
-                              tz.getDisplayName(isDST, TimeZone.SHORT, locale));
+                    printText(locale, zdt, TextStyle.FULL, tz,
+                            tz.getDisplayName(isDST, TimeZone.LONG, locale));
+                    printText(locale, zdt, TextStyle.SHORT, tz,
+                            tz.getDisplayName(isDST, TimeZone.SHORT, locale));
                 }
             }
         }
     }
 
-    private void printText(Locale locale, ZonedDateTime zdt, TextStyle style, String expected) {
+    private void printText(Locale locale, ZonedDateTime zdt, TextStyle style, TimeZone zone, String expected) {
         String result = getFormatter(locale, style).format(zdt);
         if (!result.equals(expected)) {
             if (result.equals("FooLocation")) { // from rules provider test if same vm
@@ -97,8 +94,8 @@
             }
             System.out.println("----------------");
             System.out.printf("tdz[%s]%n", zdt.toString());
-            System.out.printf("[%-4s, %5s] :[%s]%n", locale.toString(), style.toString(),result);
-            System.out.printf("%4s, %5s  :[%s]%n", "", "", expected);
+            System.out.printf("[%-5s, %5s] :[%s]%n", locale.toString(), style.toString(),result);
+            System.out.printf(" %5s, %5s  :[%s] %s%n", "", "", expected, zone);
         }
         assertEquals(result, expected);
     }
@@ -153,7 +150,7 @@
                                                               .toFormatter(locale)
                                                               .withSymbols(DateTimeFormatSymbols.of(locale));
 
-        String ret = fmt.parse(text, Queries.zone()).getId();
+        String ret = fmt.parse(text, TemporalQuery.zone()).getId();
 
         System.out.printf("[%-5s %s] %24s -> %s(%s)%n",
                           locale.toString(),
@@ -189,7 +186,7 @@
         if (ci) {
             text = text.toUpperCase();
         }
-        String ret = fmt.parse(text, Queries.zone()).getId();
+        String ret = fmt.parse(text, TemporalQuery.zone()).getId();
         // TBD: need an excluding list
         // assertEquals(...);
         if (ret.equals(expected) ||
--- a/test/java/time/test/java/time/format/ZoneName.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/format/ZoneName.java	Wed Apr 17 21:48:04 2013 -0700
@@ -24,11 +24,8 @@
 package test.java.time.format;
 
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Locale;
 import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
 
 class ZoneName {
 
--- a/test/java/time/test/java/time/temporal/MockFieldValue.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/temporal/MockFieldValue.java	Wed Apr 17 21:48:04 2013 -0700
@@ -59,10 +59,11 @@
  */
 package test.java.time.temporal;
 
-import java.time.temporal.*;
-
-import java.time.DateTimeException;
+import java.time.temporal.ChronoField;
 import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalField;
+import java.time.temporal.UnsupportedTemporalTypeException;
+import java.time.temporal.ValueRange;
 
 /**
  * Mock simple date-time with one field-value.
@@ -88,7 +89,7 @@
             if (isSupported(field)) {
                 return field.range();
             }
-            throw new DateTimeException("Unsupported field: " + field.getName());
+            throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
         }
         return field.rangeRefinedBy(this);
     }
@@ -98,7 +99,7 @@
         if (this.field.equals(field)) {
             return value;
         }
-        throw new DateTimeException("Unsupported field: " + field);
+        throw new UnsupportedTemporalTypeException("Unsupported field: " + field);
     }
 
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/time/test/java/time/temporal/TestChronoField.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,159 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2013, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package test.java.time.temporal;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.fail;
+
+import java.time.temporal.ChronoField;
+import java.time.temporal.IsoFields;
+import java.time.temporal.TemporalField;
+import java.time.temporal.WeekFields;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+@Test
+public class TestChronoField {
+    Map<ChronoField, String> fieldMap;
+
+
+    @BeforeClass
+    public void initClass() {
+        fieldMap = new HashMap<>();
+        fieldMap.put(ChronoField.ERA, "era");
+        fieldMap.put(ChronoField.YEAR, "year");
+        fieldMap.put(ChronoField.MONTH_OF_YEAR, "month");
+        fieldMap.put(ChronoField.DAY_OF_MONTH, "day");
+        fieldMap.put(ChronoField.AMPM_OF_DAY, "dayperiod");
+        fieldMap.put(ChronoField.ALIGNED_WEEK_OF_YEAR, "week");
+        fieldMap.put(ChronoField.DAY_OF_WEEK, "weekday");
+        fieldMap.put(ChronoField.HOUR_OF_DAY, "hour");
+        fieldMap.put(ChronoField.MINUTE_OF_HOUR, "minute");
+        fieldMap.put(ChronoField.SECOND_OF_MINUTE, "second");
+        fieldMap.put(ChronoField.OFFSET_SECONDS, "zone");
+    }
+
+    @DataProvider(name = "localeList")
+    Locale[] data_localeList() {
+        return new Locale[] {
+                Locale.US,
+                Locale.GERMAN,
+                Locale.JAPAN,
+                Locale.ROOT,
+        };
+    }
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "localeDisplayNames")
+    Object[][] data_localeDisplayNames() {
+        return new Object[][] {
+                {ChronoField.ERA},
+                {ChronoField.YEAR},
+                {ChronoField.MONTH_OF_YEAR},
+                {ChronoField.DAY_OF_WEEK},
+                // {ChronoField.ALIGNED_WEEK_OF_YEAR},
+                {ChronoField.DAY_OF_MONTH},
+                {ChronoField.AMPM_OF_DAY},
+                {ChronoField.HOUR_OF_DAY},
+                {ChronoField.MINUTE_OF_HOUR},
+                {ChronoField.SECOND_OF_MINUTE},
+        };
+    }
+
+    @Test
+    public void test_IsoFields_week_based_year() {
+        Locale locale = Locale.US;
+        String name = IsoFields.WEEK_OF_WEEK_BASED_YEAR.getDisplayName(locale);
+        assertEquals(name, "Week");
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_nullIsoFields_week_based_year() {
+        String name = IsoFields.WEEK_OF_WEEK_BASED_YEAR.getDisplayName((Locale)null);
+    }
+
+    @Test
+    public void test_WeekFields_week_based_year() {
+        Locale locale = Locale.US;
+        TemporalField weekOfYearField = WeekFields.SUNDAY_START.weekOfYear();
+        String name = weekOfYearField.getDisplayName(locale);
+        assertEquals(name, "Week");
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_nullWeekFields_week_based_year() {
+        TemporalField weekOfYearField = WeekFields.SUNDAY_START.weekOfYear();
+        String name = weekOfYearField.getDisplayName((Locale)null);
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_nullLocaleChronoFieldDisplayName() {
+        ChronoField.YEAR.getDisplayName((Locale)null);
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void test_nullLocaleTemporalFieldDisplayName() {
+        // Test the default method in TemporalField using the
+        // IsoFields.DAY_OF_QUARTER which does not override getDisplayName
+        IsoFields.DAY_OF_QUARTER.getDisplayName((Locale)null);
+    }
+}
--- a/test/java/time/test/java/time/temporal/TestChronoUnit.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/temporal/TestChronoUnit.java	Wed Apr 17 21:48:04 2013 -0700
@@ -121,7 +121,11 @@
 
     @Test(dataProvider = "yearsBetween")
     public void test_yearsBetween_LocalDateTimeLaterTime(LocalDate start, LocalDate end, long expected) {
-        assertEquals(YEARS.between(start.atTime(12, 30), end.atTime(12, 31)), expected);
+        if (expected >= 0) {
+            assertEquals(YEARS.between(start.atTime(12, 30), end.atTime(12, 31)), expected);
+        } else {
+            assertEquals(YEARS.between(start.atTime(12, 30), end.atTime(12, 29)), expected);
+        }
     }
 
     @Test(dataProvider = "yearsBetween")
@@ -132,7 +136,11 @@
     @Test(dataProvider = "yearsBetween")
     public void test_yearsBetween_ZonedDateLaterOffset(LocalDate start, LocalDate end, long expected) {
         // +01:00 is later than +02:00
-        assertEquals(YEARS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(1))), expected);
+        if (expected >= 0) {
+            assertEquals(YEARS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(1))), expected);
+        } else {
+            assertEquals(YEARS.between(start.atStartOfDay(ZoneOffset.ofHours(1)), end.atStartOfDay(ZoneOffset.ofHours(2))), expected);
+        }
     }
 
     //-----------------------------------------------------------------------
@@ -186,7 +194,11 @@
 
     @Test(dataProvider = "monthsBetween")
     public void test_monthsBetween_LocalDateTimeLaterTime(LocalDate start, LocalDate end, long expected) {
-        assertEquals(MONTHS.between(start.atTime(12, 30), end.atTime(12, 31)), expected);
+        if (expected >= 0) {
+            assertEquals(MONTHS.between(start.atTime(12, 30), end.atTime(12, 31)), expected);
+        } else {
+            assertEquals(MONTHS.between(start.atTime(12, 30), end.atTime(12, 29)), expected);
+        }
     }
 
     @Test(dataProvider = "monthsBetween")
@@ -197,7 +209,11 @@
     @Test(dataProvider = "monthsBetween")
     public void test_monthsBetween_ZonedDateLaterOffset(LocalDate start, LocalDate end, long expected) {
         // +01:00 is later than +02:00
-        assertEquals(MONTHS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(1))), expected);
+        if (expected >= 0) {
+            assertEquals(MONTHS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(1))), expected);
+        } else {
+            assertEquals(MONTHS.between(start.atStartOfDay(ZoneOffset.ofHours(1)), end.atStartOfDay(ZoneOffset.ofHours(2))), expected);
+        }
     }
 
     //-----------------------------------------------------------------------
@@ -288,7 +304,11 @@
 
     @Test(dataProvider = "daysBetween")
     public void test_daysBetween_LocalDateTimeLaterTime(LocalDate start, LocalDate end, long expected) {
-        assertEquals(DAYS.between(start.atTime(12, 30), end.atTime(12, 31)), expected);
+        if (expected >= 0) {
+            assertEquals(DAYS.between(start.atTime(12, 30), end.atTime(12, 31)), expected);
+        } else {
+            assertEquals(DAYS.between(start.atTime(12, 30), end.atTime(12, 29)), expected);
+        }
     }
 
     @Test(dataProvider = "daysBetween")
@@ -299,7 +319,11 @@
     @Test(dataProvider = "daysBetween")
     public void test_daysBetween_ZonedDateLaterOffset(LocalDate start, LocalDate end, long expected) {
         // +01:00 is later than +02:00
-        assertEquals(DAYS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(1))), expected);
+        if (expected >= 0) {
+            assertEquals(DAYS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(1))), expected);
+        } else {
+            assertEquals(DAYS.between(start.atStartOfDay(ZoneOffset.ofHours(1)), end.atStartOfDay(ZoneOffset.ofHours(2))), expected);
+        }
     }
 
     //-----------------------------------------------------------------------
--- a/test/java/time/test/java/time/temporal/TestDateTimeAdjusters.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package test.java.time.temporal;
-
-import java.time.temporal.*;
-
-import static org.testng.Assert.assertSame;
-import static org.testng.Assert.assertTrue;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Modifier;
-import java.util.Collections;
-
-import org.testng.annotations.Test;
-
-/**
- * Test Adjusters.
- */
-@Test(groups={"implementation"})
-public class TestDateTimeAdjusters {
-
-    @SuppressWarnings("rawtypes")
-    public void test_constructor() throws Exception {
-        for (Constructor constructor : Adjusters.class.getDeclaredConstructors()) {
-            assertTrue(Modifier.isPrivate(constructor.getModifiers()));
-            constructor.setAccessible(true);
-            constructor.newInstance(Collections.nCopies(constructor.getParameterTypes().length, null).toArray());
-        }
-    }
-
-    public void factory_firstDayOfMonthSame() {
-        assertSame(Adjusters.firstDayOfMonth(), Adjusters.firstDayOfMonth());
-    }
-
-    public void factory_lastDayOfMonthSame() {
-        assertSame(Adjusters.lastDayOfMonth(), Adjusters.lastDayOfMonth());
-    }
-
-    public void factory_firstDayOfNextMonthSame() {
-        assertSame(Adjusters.firstDayOfNextMonth(), Adjusters.firstDayOfNextMonth());
-    }
-
-    public void factory_firstDayOfYearSame() {
-        assertSame(Adjusters.firstDayOfYear(), Adjusters.firstDayOfYear());
-    }
-
-    public void factory_lastDayOfYearSame() {
-        assertSame(Adjusters.lastDayOfYear(), Adjusters.lastDayOfYear());
-    }
-
-    public void factory_firstDayOfNextYearSame() {
-        assertSame(Adjusters.firstDayOfNextYear(), Adjusters.firstDayOfNextYear());
-    }
-
-}
--- a/test/java/time/test/java/time/temporal/TestDateTimeBuilderCombinations.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/temporal/TestDateTimeBuilderCombinations.java	Wed Apr 17 21:48:04 2013 -0700
@@ -67,8 +67,8 @@
 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
 import static java.time.temporal.ChronoField.DAY_OF_YEAR;
 import static java.time.temporal.ChronoField.EPOCH_DAY;
-import static java.time.temporal.ChronoField.EPOCH_MONTH;
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
 import static java.time.temporal.ChronoField.YEAR;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.fail;
@@ -92,7 +92,7 @@
     Object[][] data_combine() {
         return new Object[][] {
             {YEAR, 2012, MONTH_OF_YEAR, 6, DAY_OF_MONTH, 3, null, null, LocalDate.class, LocalDate.of(2012, 6, 3)},
-            {EPOCH_MONTH, (2012 - 1970) * 12 + 6 - 1, DAY_OF_MONTH, 3, null, null, null, null, LocalDate.class, LocalDate.of(2012, 6, 3)},
+            {PROLEPTIC_MONTH, 2012 * 12 + 6 - 1, DAY_OF_MONTH, 3, null, null, null, null, LocalDate.class, LocalDate.of(2012, 6, 3)},
             {YEAR, 2012, ALIGNED_WEEK_OF_YEAR, 6, DAY_OF_WEEK, 3, null, null, LocalDate.class, LocalDate.of(2012, 2, 8)},
             {YEAR, 2012, DAY_OF_YEAR, 155, null, null, null, null, LocalDate.class, LocalDate.of(2012, 6, 3)},
 //            {ERA, 1, YEAR_OF_ERA, 2012, DAY_OF_YEAR, 155, null, null, LocalDate.class, LocalDate.of(2012, 6, 3)},
@@ -176,9 +176,9 @@
             {ALIGNED_DAY_OF_WEEK_IN_YEAR, 4, ALIGNED_DAY_OF_WEEK_IN_YEAR, 4L},
             {ALIGNED_WEEK_OF_MONTH, 4, ALIGNED_WEEK_OF_MONTH, 4},
             {ALIGNED_DAY_OF_WEEK_IN_MONTH, 3, ALIGNED_DAY_OF_WEEK_IN_MONTH, 3},
-            {EPOCH_MONTH, 15, EPOCH_MONTH, null},
-            {EPOCH_MONTH, 15, YEAR, 1971},
-            {EPOCH_MONTH, 15, MONTH_OF_YEAR, 4},
+            {PROLEPTIC_MONTH, 27, PROLEPTIC_MONTH, null},
+            {PROLEPTIC_MONTH, 27, YEAR, 2},
+            {PROLEPTIC_MONTH, 27, MONTH_OF_YEAR, 4},
         };
     }
 
--- a/test/java/time/test/java/time/temporal/TestDateTimeValueRange.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/temporal/TestDateTimeValueRange.java	Wed Apr 17 21:48:04 2013 -0700
@@ -65,7 +65,8 @@
 import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
-
+import java.time.DateTimeException;
+import java.time.temporal.ChronoField;
 import java.time.temporal.ValueRange;
 
 import org.testng.annotations.DataProvider;
@@ -231,6 +232,42 @@
     }
 
     //-----------------------------------------------------------------------
+    // checkValidValue
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="valid")
+    public void test_of_checkValidValue(long sMin, long lMin, long sMax, long lMax) {
+        ValueRange test = ValueRange.of(sMin, lMin, sMax, lMax);
+        assertEquals(test.checkValidIntValue(sMin, null), sMin);
+        assertEquals(test.checkValidIntValue(lMin, null), lMin);
+        assertEquals(test.checkValidIntValue(sMax, null), sMax);
+        assertEquals(test.checkValidIntValue(lMax, null), lMax);
+    }
+
+    @Test(dataProvider="valid", expectedExceptions = DateTimeException.class)
+    public void test_of_checkValidValueMinException(long sMin, long lMin, long sMax, long lMax) {
+        ValueRange test = ValueRange.of(sMin, lMin, sMax, lMax);
+        test.checkValidIntValue(sMin-1, null);
+    }
+
+    @Test(dataProvider="valid", expectedExceptions = DateTimeException.class)
+    public void test_of_checkValidValueMaxException(long sMin, long lMin, long sMax, long lMax) {
+        ValueRange test = ValueRange.of(sMin, lMin, sMax, lMax);
+        test.checkValidIntValue(lMax+1, null);
+    }
+
+    @Test(expectedExceptions = DateTimeException.class)
+    public void test_checkValidValueUnsupported_long_long() {
+        ValueRange test = ValueRange.of(1, 28, Integer.MAX_VALUE + 1L);
+        test.checkValidIntValue(0, (ChronoField)null);
+    }
+
+    @Test(expectedExceptions = DateTimeException.class)
+    public void test_checkValidValueInvalid_long_long() {
+        ValueRange test = ValueRange.of(1, 28, Integer.MAX_VALUE + 1L);
+        test.checkValidIntValue(Integer.MAX_VALUE + 2L, (ChronoField)null);
+    }
+
+    //-----------------------------------------------------------------------
     // equals() / hashCode()
     //-----------------------------------------------------------------------
     public void test_equals1() {
--- a/test/java/time/test/java/time/temporal/TestJapaneseChronoImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package test.java.time.temporal;
-
-import static org.testng.Assert.assertEquals;
-
-import java.util.Calendar;
-import java.util.Locale;
-import java.util.TimeZone;
-import java.time.LocalDate;
-import java.time.LocalTime;
-import java.time.OffsetDateTime;
-import java.time.ZoneOffset;
-import java.time.temporal.ChronoField;
-import java.time.chrono.ChronoLocalDate;
-import java.time.temporal.ChronoUnit;
-import java.time.chrono.JapaneseChronology;
-import java.time.chrono.JapaneseDate;
-
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Test.
- */
-@Test
-public class TestJapaneseChronoImpl {
-
-    /**
-     * Range of years to check consistency with java.util.Calendar
-     */
-    @DataProvider(name="RangeVersusCalendar")
-    Object[][] provider_rangeVersusCalendar() {
-        return new Object[][] {
-            {LocalDate.of(1868, 1, 1), LocalDate.of(2100, 1, 1)},
-        };
-    }
-
-    //-----------------------------------------------------------------------
-    // Verify  Japanese Calendar matches java.util.Calendar for range
-    //-----------------------------------------------------------------------
-    @Test(groups={"implementation"}, dataProvider="RangeVersusCalendar")
-    public void test_JapaneseChrono_vsCalendar(LocalDate isoStartDate, LocalDate isoEndDate) {
-        Locale locale = Locale.forLanguageTag("ja-JP-u-ca-japanese");
-        assertEquals(locale.toString(), "ja_JP_#u-ca-japanese", "Unexpected locale");
-
-        Calendar cal = java.util.Calendar.getInstance(locale);
-        assertEquals(cal.getCalendarType(), "japanese", "Unexpected calendar type");
-
-        JapaneseDate jDate = JapaneseChronology.INSTANCE.date(isoStartDate);
-
-        // Convert to millis and set Japanese Calendar to that start date (at GMT)
-        OffsetDateTime jodt = OffsetDateTime.of(isoStartDate, LocalTime.MIN, ZoneOffset.UTC);
-        long millis = jodt.toInstant().toEpochMilli();
-        cal.setTimeZone(TimeZone.getTimeZone("GMT+00"));
-        cal.setTimeInMillis(millis);
-
-        while (jDate.isBefore(isoEndDate)) {
-            assertEquals(jDate.get(ChronoField.DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch in " + jDate + ";  cal: " + cal);
-            assertEquals(jDate.get(ChronoField.MONTH_OF_YEAR), cal.get(Calendar.MONTH) + 1, "Month mismatch in " + jDate);
-            assertEquals(jDate.get(ChronoField.YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + jDate);
-
-            jDate = jDate.plus(1, ChronoUnit.DAYS);
-            cal.add(Calendar.DAY_OF_MONTH, 1);
-        }
-    }
-
-}
--- a/test/java/time/test/java/time/temporal/TestThaiBuddhistChronoImpl.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- *  * Neither the name of JSR-310 nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package test.java.time.temporal;
-
-import static org.testng.Assert.assertEquals;
-
-import java.util.Calendar;
-import java.util.Locale;
-import java.util.TimeZone;
-
-import java.time.LocalDate;
-import java.time.temporal.ChronoField;
-import java.time.temporal.ChronoUnit;
-import java.time.chrono.ChronoLocalDate;
-import java.time.chrono.ThaiBuddhistChronology;
-import java.time.chrono.ThaiBuddhistDate;
-
-import org.testng.annotations.Test;
-import org.testng.annotations.DataProvider;
-
-/**
- * Test.
- */
-@Test
-public class TestThaiBuddhistChronoImpl {
-
-    /**
-     * Range of years to check consistency with java.util.Calendar
-     */
-    @DataProvider(name="RangeVersusCalendar")
-    Object[][] provider_rangeVersusCalendar() {
-        return new Object[][] {
-            {LocalDate.of(1583, 1, 1), LocalDate.of(2100, 1, 1)},
-        };
-    }
-
-    //-----------------------------------------------------------------------
-    // Verify  ThaiBuddhist Calendar matches java.util.Calendar for range
-    //-----------------------------------------------------------------------
-    @Test(groups={"implementation"}, dataProvider="RangeVersusCalendar")
-    public void test_ThaiBuddhistChrono_vsCalendar(LocalDate isoStartDate, LocalDate isoEndDate) {
-        Locale locale = Locale.forLanguageTag("th-TH--u-ca-buddhist");
-        assertEquals(locale.toString(), "th_TH", "Unexpected locale");
-        Calendar cal = java.util.Calendar.getInstance(locale);
-        assertEquals(cal.getCalendarType(), "buddhist", "Unexpected calendar type");
-
-        ThaiBuddhistDate thaiDate = ThaiBuddhistChronology.INSTANCE.date(isoStartDate);
-
-        cal.setTimeZone(TimeZone.getTimeZone("GMT+00"));
-        cal.set(Calendar.YEAR, thaiDate.get(ChronoField.YEAR));
-        cal.set(Calendar.MONTH, thaiDate.get(ChronoField.MONTH_OF_YEAR) - 1);
-        cal.set(Calendar.DAY_OF_MONTH, thaiDate.get(ChronoField.DAY_OF_MONTH));
-
-        while (thaiDate.isBefore(isoEndDate)) {
-            assertEquals(thaiDate.get(ChronoField.DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch in " + thaiDate + ";  cal: " + cal);
-            assertEquals(thaiDate.get(ChronoField.MONTH_OF_YEAR), cal.get(Calendar.MONTH) + 1, "Month mismatch in " + thaiDate);
-            assertEquals(thaiDate.get(ChronoField.YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + thaiDate);
-
-            thaiDate = thaiDate.plus(1, ChronoUnit.DAYS);
-            cal.add(Calendar.DAY_OF_MONTH, 1);
-        }
-    }
-
-    private String calToString(Calendar cal) {
-        return String.format("%04d-%02d-%02d",
-                cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH));
-    }
-
-}
--- a/test/java/time/test/java/time/zone/TestFixedZoneRules.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/time/zone/TestFixedZoneRules.java	Wed Apr 17 21:48:04 2013 -0700
@@ -83,7 +83,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(groups="implementation")
+    @Test
     public void test_data_nullInput() {
         ZoneRules test = make(OFFSET_PONE);
         assertEquals(test.getOffset((Instant) null), OFFSET_PONE);
--- a/test/java/time/test/java/util/TestFormatter.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/time/test/java/util/TestFormatter.java	Wed Apr 17 21:48:04 2013 -0700
@@ -35,7 +35,7 @@
 /* @test
  * @summary Unit test for j.u.Formatter threeten date/time support
  */
-@Test(groups={"implementation"})
+@Test
 public class TestFormatter {
 
     // time
--- a/test/java/util/Calendar/Bug8007038.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/util/Calendar/Bug8007038.java	Wed Apr 17 21:48:04 2013 -0700
@@ -97,7 +97,7 @@
     }
 
     private static void checkValueRange(String calType, int field, int value, int style, Locale l, boolean isNonNull) {
-        String ret = CalendarDataUtility.retrieveFieldValueName(calType, field, value, style, l);
+        String ret = CalendarDataUtility.retrieveJavaTimeFieldValueName(calType, field, value, style, l);
         System.out.print("retrieveFieldValueName("+calType+", "+field+", "+value+", "+style+", "+l+")");
         if ((ret != null) == isNonNull) {
             System.out.println(" returned "+ret);
--- a/test/java/util/Calendar/CldrFormatNamesTest.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/util/Calendar/CldrFormatNamesTest.java	Wed Apr 17 21:48:04 2013 -0700
@@ -48,13 +48,13 @@
         {
             Locale.JAPAN,
             "field.zone", "\u30bf\u30a4\u30e0\u30be\u30fc\u30f3",
-            "cldr.japanese.DatePatterns", new String[] {
+            "java.time.japanese.DatePatterns", new String[] {
                 "Gy\u5e74M\u6708d\u65e5EEEE",
                 "Gy\u5e74M\u6708d\u65e5",
                 "Gy\u5e74M\u6708d\u65e5",
                 "Gyy/MM/dd",
             },
-            "cldr.roc.DatePatterns", new String[] {
+            "java.time.roc.DatePatterns", new String[] {
                 "Gy\u5e74M\u6708d\u65e5EEEE",
                 "Gy\u5e74M\u6708d\u65e5",
                 "Gy/MM/dd",
@@ -65,7 +65,7 @@
         {
             Locale.PRC,
             "field.zone", "\u533a\u57df",
-            "cldr.islamic.DatePatterns", new String[] {
+            "java.time.islamic.DatePatterns", new String[] {
                 "Gy\u5e74M\u6708d\u65e5EEEE",
                 "Gy\u5e74M\u6708d\u65e5",
                 "Gy\u5e74M\u6708d\u65e5",
@@ -76,7 +76,7 @@
         {
             Locale.GERMANY,
             "field.dayperiod", "Tagesh\u00e4lfte",
-            "cldr.islamic.DatePatterns", new String[] {
+            "java.time.islamic.DatePatterns", new String[] {
                 "EEEE d. MMMM y G",
                 "d. MMMM y G",
                 "d. MMM y G",
@@ -119,7 +119,7 @@
         for (Object[] data : CLDR_DATA) {
             Locale locale = (Locale) data[0];
             ResourceBundle rb = LocaleProviderAdapter.getResourceBundleBased()
-                                    .getLocaleResources(locale).getFormatData();
+                                    .getLocaleResources(locale).getJavaTimeFormatData();
             for (int i = 1; i < data.length; ) {
                 String key = (String) data[i++];
                 Object expected = data[i++];
@@ -167,7 +167,7 @@
                                         int field, int style, String fieldName) {
         for (int i = 0; i < expected.length; i++) {
             String expt = expected[i];
-            String name = CalendarDataUtility.retrieveFieldValueName(calType, field, i, style, locale);
+            String name = CalendarDataUtility.retrieveJavaTimeFieldValueName(calType, field, i, style, locale);
             if (!expt.equals(name)) {
                 errors++;
                 System.err.printf("error: wrong %s %s name in %s: value=%d, got='%s', expected='%s'%n",
--- a/test/java/util/Calendar/JavatimeTest.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/util/Calendar/JavatimeTest.java	Wed Apr 17 21:48:04 2013 -0700
@@ -108,17 +108,20 @@
             // TBD: tzdt intergration
             if (zidStr.startsWith("SystemV") ||
                 zidStr.contains("Riyadh8") ||
-                zidStr.equals("US/Pacific-New")) {
+                zidStr.equals("US/Pacific-New") ||
+                zidStr.equals("EST") ||
+                zidStr.equals("HST") ||
+                zidStr.equals("MST")) {
                 continue;
             }
-            ZoneId zid = ZoneId.of(zidStr, ZoneId.OLD_IDS_POST_2005);
+            ZoneId zid = ZoneId.of(zidStr, ZoneId.OLD_SHORT_IDS);
             if (!zid.equals(TimeZone.getTimeZone(zid).toZoneId())) {
                 throw new RuntimeException("FAILED: zid -> tz -> zid :" + zidStr);
             }
             TimeZone tz = TimeZone.getTimeZone(zidStr);
             // no round-trip for alias and "GMT"
             if (!tz.equals(TimeZone.getTimeZone(tz.toZoneId())) &&
-                !ZoneId.OLD_IDS_POST_2005.containsKey(zidStr) &&
+                !ZoneId.OLD_SHORT_IDS.containsKey(zidStr) &&
                 !zidStr.startsWith("GMT")) {
                 throw new RuntimeException("FAILED: tz -> zid -> tz :" + zidStr);
             }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Comparators/BasicTest.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,412 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8001667 8010279
+ * @run testng BasicTest
+ */
+
+import java.util.Comparator;
+import java.util.Comparators;
+import java.util.AbstractMap;
+import java.util.Map;
+import org.testng.annotations.Test;
+
+import java.util.function.BinaryOperator;
+import java.util.function.Function;
+import java.util.function.ToIntFunction;
+import java.util.function.ToLongFunction;
+import java.util.function.ToDoubleFunction;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.assertSame;
+import static org.testng.Assert.fail;
+
+/**
+ * Unit tests for helper methods in Comparators
+ */
+@Test(groups = "unit")
+public class BasicTest {
+    private static class Thing {
+        public final int intField;
+        public final long longField;
+        public final double doubleField;
+        public final String stringField;
+
+        private Thing(int intField, long longField, double doubleField, String stringField) {
+            this.intField = intField;
+            this.longField = longField;
+            this.doubleField = doubleField;
+            this.stringField = stringField;
+        }
+
+        public int getIntField() {
+            return intField;
+        }
+
+        public long getLongField() {
+            return longField;
+        }
+
+        public double getDoubleField() {
+            return doubleField;
+        }
+
+        public String getStringField() {
+            return stringField;
+        }
+    }
+
+    private final int[] intValues = { -2, -2, -1, -1, 0, 0, 1, 1, 2, 2 };
+    private final long[] longValues = { -2, -2, -1, -1, 0, 0, 1, 1, 2, 2 };
+    private final double[] doubleValues = { -2, -2, -1, -1, 0, 0, 1, 1, 2, 2 };
+    private final String[] stringValues = { "a", "a", "b", "b", "c", "c", "d", "d", "e", "e" };
+    private final int[] comparisons = { 0, -1, 0, -1, 0, -1, 0, -1, 0 };
+
+    private<T> void assertComparisons(T[] things, Comparator<T> comp, int[] comparisons) {
+        for (int i=0; i<comparisons.length; i++) {
+            assertEquals(comparisons.length + 1, things.length);
+            assertEquals(comparisons[i], comp.compare(things[i], things[i+1]));
+            assertEquals(-comparisons[i], comp.compare(things[i+1], things[i]));
+        }
+    }
+
+    public void testIntComparator() {
+        Thing[] things = new Thing[intValues.length];
+        for (int i=0; i<intValues.length; i++)
+            things[i] = new Thing(intValues[i], 0L, 0.0, null);
+        Comparator<Thing> comp = Comparators.comparing(new ToIntFunction<BasicTest.Thing>() {
+            @Override
+            public int applyAsInt(Thing thing) {
+                return thing.getIntField();
+            }
+        });
+
+        assertComparisons(things, comp, comparisons);
+    }
+
+    public void testLongComparator() {
+        Thing[] things = new Thing[longValues.length];
+        for (int i=0; i<longValues.length; i++)
+            things[i] = new Thing(0, longValues[i], 0.0, null);
+        Comparator<Thing> comp = Comparators.comparing(new ToLongFunction<BasicTest.Thing>() {
+            @Override
+            public long applyAsLong(Thing thing) {
+                return thing.getLongField();
+            }
+        });
+
+        assertComparisons(things, comp, comparisons);
+    }
+
+    public void testDoubleComparator() {
+        Thing[] things = new Thing[doubleValues.length];
+        for (int i=0; i<doubleValues.length; i++)
+            things[i] = new Thing(0, 0L, doubleValues[i], null);
+        Comparator<Thing> comp = Comparators.comparing(new ToDoubleFunction<BasicTest.Thing>() {
+            @Override
+            public double applyAsDouble(Thing thing) {
+                return thing.getDoubleField();
+            }
+        });
+
+        assertComparisons(things, comp, comparisons);
+    }
+
+    public void testComparing() {
+        Thing[] things = new Thing[doubleValues.length];
+        for (int i=0; i<doubleValues.length; i++)
+            things[i] = new Thing(0, 0L, 0.0, stringValues[i]);
+        Comparator<Thing> comp = Comparators.comparing(new Function<Thing, String>() {
+            @Override
+            public String apply(Thing thing) {
+                return thing.getStringField();
+            }
+        });
+
+        assertComparisons(things, comp, comparisons);
+    }
+
+    public void testNaturalOrderComparator() {
+        Comparator<String> comp = Comparators.naturalOrder();
+
+        assertComparisons(stringValues, comp, comparisons);
+    }
+
+    public void testReverseComparator() {
+        Comparator<String> cmpr = Comparators.reverseOrder();
+        Comparator<String> cmp = cmpr.reverseOrder();
+
+        assertEquals(cmp.reverseOrder(), cmpr);
+        assertEquals(0, cmp.compare("a", "a"));
+        assertEquals(0, cmpr.compare("a", "a"));
+        assertTrue(cmp.compare("a", "b") < 0);
+        assertTrue(cmpr.compare("a", "b") > 0);
+        assertTrue(cmp.compare("b", "a") > 0);
+        assertTrue(cmpr.compare("b", "a") < 0);
+    }
+
+    public void testReverseComparator2() {
+        Comparator<String> cmp = (s1, s2) -> s1.length() - s2.length();
+        Comparator<String> cmpr = cmp.reverseOrder();
+
+        assertEquals(cmpr.reverseOrder(), cmp);
+        assertEquals(0, cmp.compare("abc", "def"));
+        assertEquals(0, cmpr.compare("abc", "def"));
+        assertTrue(cmp.compare("abcd", "def") > 0);
+        assertTrue(cmpr.compare("abcd", "def") < 0);
+        assertTrue(cmp.compare("abc", "defg") < 0);
+        assertTrue(cmpr.compare("abc", "defg") > 0);
+    }
+
+    @Test(expectedExceptions=NullPointerException.class)
+    public void testReverseComparatorNPE() {
+        Comparator<String> cmp = Comparators.reverseOrder(null);
+    }
+
+    public void testComposeComparator() {
+        // Longer string in front
+        Comparator<String> first = (s1, s2) -> s2.length() - s1.length();
+        Comparator<String> second = Comparators.naturalOrder();
+        Comparator<String> composed = Comparators.compose(first, second);
+
+        assertTrue(composed.compare("abcdefg", "abcdef") < 0);
+        assertTrue(composed.compare("abcdef", "abcdefg") > 0);
+        assertTrue(composed.compare("abcdef", "abcdef") == 0);
+        assertTrue(composed.compare("abcdef", "ghijkl") < 0);
+        assertTrue(composed.compare("ghijkl", "abcdefg") > 0);
+    }
+
+    private <K, V> void assertPairComparison(K k1, V v1, K k2, V v2,
+                                        Comparator<Map.Entry<K, V>> ck,
+                                        Comparator<Map.Entry<K, V>> cv) {
+        final Map.Entry<K, V> p11 = new AbstractMap.SimpleImmutableEntry<>(k1, v1);
+        final Map.Entry<K, V> p12 = new AbstractMap.SimpleImmutableEntry<>(k1, v2);
+        final Map.Entry<K, V> p21 = new AbstractMap.SimpleImmutableEntry<>(k2, v1);
+        final Map.Entry<K, V> p22 = new AbstractMap.SimpleImmutableEntry<>(k2, v2);
+
+        assertTrue(ck.compare(p11, p11) == 0);
+        assertTrue(ck.compare(p12, p11) == 0);
+        assertTrue(ck.compare(p11, p12) == 0);
+        assertTrue(ck.compare(p12, p22) < 0);
+        assertTrue(ck.compare(p12, p21) < 0);
+        assertTrue(ck.compare(p21, p11) > 0);
+        assertTrue(ck.compare(p21, p12) > 0);
+
+        assertTrue(cv.compare(p11, p11) == 0);
+        assertTrue(cv.compare(p12, p11) > 0);
+        assertTrue(cv.compare(p11, p12) < 0);
+        assertTrue(cv.compare(p12, p22) == 0);
+        assertTrue(cv.compare(p12, p21) > 0);
+        assertTrue(cv.compare(p21, p11) == 0);
+        assertTrue(cv.compare(p21, p12) < 0);
+
+        Comparator<Map.Entry<K, V>> cmp = Comparators.compose(ck, cv);
+        assertTrue(cmp.compare(p11, p11) == 0);
+        assertTrue(cmp.compare(p12, p11) > 0);
+        assertTrue(cmp.compare(p11, p12) < 0);
+        assertTrue(cmp.compare(p12, p22) < 0);
+        assertTrue(cmp.compare(p12, p21) < 0);
+        assertTrue(cmp.compare(p21, p11) > 0);
+        assertTrue(cmp.compare(p21, p12) > 0);
+
+        cmp = Comparators.compose(cv, ck);
+        assertTrue(cmp.compare(p11, p11) == 0);
+        assertTrue(cmp.compare(p12, p11) > 0);
+        assertTrue(cmp.compare(p11, p12) < 0);
+        assertTrue(cmp.compare(p12, p22) < 0);
+        assertTrue(cmp.compare(p12, p21) > 0);
+        assertTrue(cmp.compare(p21, p11) > 0);
+        assertTrue(cmp.compare(p21, p12) < 0);
+    }
+
+    public void testKVComparatorable() {
+        assertPairComparison(1, "ABC", 2, "XYZ",
+                         Comparators.<Integer, String>naturalOrderKeys(),
+                         Comparators.<Integer, String>naturalOrderValues());
+    }
+
+    private static class People {
+        final String firstName;
+        final String lastName;
+        final int age;
+
+        People(String first, String last, int age) {
+            firstName = first;
+            lastName = last;
+            this.age = age;
+        }
+
+        String getFirstName() { return firstName; }
+        String getLastName() { return lastName; }
+        int getAge() { return age; }
+        long getAgeAsLong() { return (long) age; };
+        double getAgeAsDouble() { return (double) age; };
+    }
+
+    private final People people[] = {
+        new People("John", "Doe", 34),
+        new People("Mary", "Doe", 30),
+        new People("Maria", "Doe", 14),
+        new People("Jonah", "Doe", 10),
+        new People("John", "Cook", 54),
+        new People("Mary", "Cook", 50),
+    };
+
+    public void testKVComparators() {
+        // Comparator<People> cmp = Comparators.naturalOrder(); // Should fail to compiler as People is not comparable
+        // We can use simple comparator, but those have been tested above.
+        // Thus choose to do compose for some level of interation.
+        Comparator<People> cmp1 = Comparators.comparing((Function<People, String>) People::getFirstName);
+        Comparator<People> cmp2 = Comparators.comparing((Function<People, String>) People::getLastName);
+        Comparator<People> cmp = Comparators.compose(cmp1, cmp2);
+
+        assertPairComparison(people[0], people[0], people[1], people[1],
+                         Comparators.<People, People>byKey(cmp),
+                         Comparators.<People, People>byValue(cmp));
+
+    }
+
+    private <T> void assertComparison(Comparator<T> cmp, T less, T greater) {
+        assertTrue(cmp.compare(less, greater) < 0, "less");
+        assertTrue(cmp.compare(less, less) == 0, "equal");
+        assertTrue(cmp.compare(greater, less) > 0, "greater");
+    }
+
+    public void testComparatorDefaultMethods() {
+        Comparator<People> cmp = Comparators.comparing((Function<People, String>) People::getFirstName);
+        Comparator<People> cmp2 = Comparators.comparing((Function<People, String>) People::getLastName);
+        // reverseOrder
+        assertComparison(cmp.reverseOrder(), people[1], people[0]);
+        // thenComparing(Comparator)
+        assertComparison(cmp.thenComparing(cmp2), people[0], people[1]);
+        assertComparison(cmp.thenComparing(cmp2), people[4], people[0]);
+        // thenComparing(Function)
+        assertComparison(cmp.thenComparing(People::getLastName), people[0], people[1]);
+        assertComparison(cmp.thenComparing(People::getLastName), people[4], people[0]);
+        // thenComparing(ToIntFunction)
+        assertComparison(cmp.thenComparing(People::getAge), people[0], people[1]);
+        assertComparison(cmp.thenComparing(People::getAge), people[1], people[5]);
+        // thenComparing(ToLongFunction)
+        assertComparison(cmp.thenComparing(People::getAgeAsLong), people[0], people[1]);
+        assertComparison(cmp.thenComparing(People::getAgeAsLong), people[1], people[5]);
+        // thenComparing(ToDoubleFunction)
+        assertComparison(cmp.thenComparing(People::getAgeAsDouble), people[0], people[1]);
+        assertComparison(cmp.thenComparing(People::getAgeAsDouble), people[1], people[5]);
+    }
+
+    public void testGreaterOf() {
+        // lesser
+        assertSame(Comparators.greaterOf(Comparators.comparing(
+                                    (Function<People, String>) People::getFirstName))
+                              .apply(people[0], people[1]),
+                   people[1]);
+        // euqal
+        assertSame(Comparators.greaterOf(Comparators.comparing(
+                                    (Function<People, String>) People::getLastName))
+                              .apply(people[0], people[1]),
+                   people[0]);
+        // greater
+        assertSame(Comparators.greaterOf(Comparators.comparing(
+                                    (ToIntFunction<People>) People::getAge))
+                              .apply(people[0], people[1]),
+                   people[0]);
+    }
+
+    public void testLesserOf() {
+        // lesser
+        assertSame(Comparators.lesserOf(Comparators.comparing(
+                                    (Function<People, String>) People::getFirstName))
+                              .apply(people[0], people[1]),
+                   people[0]);
+        // euqal
+        assertSame(Comparators.lesserOf(Comparators.comparing(
+                                    (Function<People, String>) People::getLastName))
+                              .apply(people[0], people[1]),
+                   people[0]);
+        // greater
+        assertSame(Comparators.lesserOf(Comparators.comparing(
+                                    (ToIntFunction<People>) People::getAge))
+                              .apply(people[0], people[1]),
+                   people[1]);
+    }
+
+    public void testNulls() {
+        try {
+            Comparators.<String>naturalOrder().compare("abc", (String) null);
+            fail("expected NPE with naturalOrder");
+        } catch (NullPointerException npe) {}
+        try {
+            Comparators.<String>naturalOrder().compare((String) null, "abc");
+            fail("expected NPE with naturalOrder");
+        } catch (NullPointerException npe) {}
+
+        try {
+            Comparators.<String>reverseOrder().compare("abc", (String) null);
+            fail("expected NPE with naturalOrder");
+        } catch (NullPointerException npe) {}
+        try {
+            Comparators.<String>reverseOrder().compare((String) null, "abc");
+            fail("expected NPE with naturalOrder");
+        } catch (NullPointerException npe) {}
+
+        try {
+            Comparator<Map.Entry<String, String>> cmp = Comparators.byKey(null);
+            fail("byKey(null) should throw NPE");
+        } catch (NullPointerException npe) {}
+
+        try {
+            Comparator<Map.Entry<String, String>> cmp = Comparators.byValue(null);
+            fail("byValue(null) should throw NPE");
+        } catch (NullPointerException npe) {}
+
+        try {
+            Comparator<People> cmp = Comparators.comparing((Function<People, String>) null);
+            fail("comparing(null) should throw NPE");
+        } catch (NullPointerException npe) {}
+        try {
+            Comparator<People> cmp = Comparators.comparing((ToIntFunction<People>) null);
+            fail("comparing(null) should throw NPE");
+        } catch (NullPointerException npe) {}
+        try {
+            Comparator<People> cmp = Comparators.comparing((ToLongFunction<People>) null);
+            fail("comparing(null) should throw NPE");
+        } catch (NullPointerException npe) {}
+        try {
+            Comparator<People> cmp = Comparators.comparing((ToDoubleFunction<People>) null);
+            fail("comparing(null) should throw NPE");
+        } catch (NullPointerException npe) {}
+
+        try {
+            BinaryOperator<String> op = Comparators.lesserOf(null);
+            fail("lesserOf(null) should throw NPE");
+        } catch (NullPointerException npe) {}
+
+        try {
+            BinaryOperator<String> op = Comparators.greaterOf(null);
+            fail("lesserOf(null) should throw NPE");
+        } catch (NullPointerException npe) {}
+    }
+}
--- a/test/java/util/ComparatorsTest.java	Wed Apr 17 21:32:11 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,353 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 8001667
- * @run testng ComparatorsTest
- */
-
-import java.util.Comparator;
-import java.util.Comparators;
-import java.util.AbstractMap;
-import java.util.Map;
-import org.testng.annotations.Test;
-
-import java.util.function.Function;
-import java.util.function.ToIntFunction;
-import java.util.function.ToLongFunction;
-import java.util.function.ToDoubleFunction;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.assertSame;
-
-/**
- * Unit tests for helper methods in Comparators
- */
-@Test(groups = "unit")
-public class ComparatorsTest {
-    private static class Thing {
-        public final int intField;
-        public final long longField;
-        public final double doubleField;
-        public final String stringField;
-
-        private Thing(int intField, long longField, double doubleField, String stringField) {
-            this.intField = intField;
-            this.longField = longField;
-            this.doubleField = doubleField;
-            this.stringField = stringField;
-        }
-
-        public int getIntField() {
-            return intField;
-        }
-
-        public long getLongField() {
-            return longField;
-        }
-
-        public double getDoubleField() {
-            return doubleField;
-        }
-
-        public String getStringField() {
-            return stringField;
-        }
-    }
-
-    private final int[] intValues = { -2, -2, -1, -1, 0, 0, 1, 1, 2, 2 };
-    private final long[] longValues = { -2, -2, -1, -1, 0, 0, 1, 1, 2, 2 };
-    private final double[] doubleValues = { -2, -2, -1, -1, 0, 0, 1, 1, 2, 2 };
-    private final String[] stringValues = { "a", "a", "b", "b", "c", "c", "d", "d", "e", "e" };
-    private final int[] comparisons = { 0, -1, 0, -1, 0, -1, 0, -1, 0 };
-
-    private<T> void assertComparisons(T[] things, Comparator<T> comp, int[] comparisons) {
-        for (int i=0; i<comparisons.length; i++) {
-            assertEquals(comparisons.length + 1, things.length);
-            assertEquals(comparisons[i], comp.compare(things[i], things[i+1]));
-            assertEquals(-comparisons[i], comp.compare(things[i+1], things[i]));
-        }
-    }
-
-    public void testIntComparator() {
-        Thing[] things = new Thing[intValues.length];
-        for (int i=0; i<intValues.length; i++)
-            things[i] = new Thing(intValues[i], 0L, 0.0, null);
-        Comparator<Thing> comp = Comparators.comparing(new ToIntFunction<ComparatorsTest.Thing>() {
-            @Override
-            public int applyAsInt(Thing thing) {
-                return thing.getIntField();
-            }
-        });
-
-        assertComparisons(things, comp, comparisons);
-    }
-
-    public void testLongComparator() {
-        Thing[] things = new Thing[longValues.length];
-        for (int i=0; i<longValues.length; i++)
-            things[i] = new Thing(0, longValues[i], 0.0, null);
-        Comparator<Thing> comp = Comparators.comparing(new ToLongFunction<ComparatorsTest.Thing>() {
-            @Override
-            public long applyAsLong(Thing thing) {
-                return thing.getLongField();
-            }
-        });
-
-        assertComparisons(things, comp, comparisons);
-    }
-
-    public void testDoubleComparator() {
-        Thing[] things = new Thing[doubleValues.length];
-        for (int i=0; i<doubleValues.length; i++)
-            things[i] = new Thing(0, 0L, doubleValues[i], null);
-        Comparator<Thing> comp = Comparators.comparing(new ToDoubleFunction<ComparatorsTest.Thing>() {
-            @Override
-            public double applyAsDouble(Thing thing) {
-                return thing.getDoubleField();
-            }
-        });
-
-        assertComparisons(things, comp, comparisons);
-    }
-
-    public void testComparing() {
-        Thing[] things = new Thing[doubleValues.length];
-        for (int i=0; i<doubleValues.length; i++)
-            things[i] = new Thing(0, 0L, 0.0, stringValues[i]);
-        Comparator<Thing> comp = Comparators.comparing(new Function<Thing, String>() {
-            @Override
-            public String apply(Thing thing) {
-                return thing.getStringField();
-            }
-        });
-
-        assertComparisons(things, comp, comparisons);
-    }
-
-    public void testNaturalOrderComparator() {
-        Comparator<String> comp = Comparators.naturalOrder();
-
-        assertComparisons(stringValues, comp, comparisons);
-    }
-
-    public void testReverseComparator() {
-        Comparator<String> cmpr = Comparators.reverseOrder();
-        Comparator<String> cmp = cmpr.reverseOrder();
-
-        assertEquals(cmp.reverseOrder(), cmpr);
-        assertEquals(0, cmp.compare("a", "a"));
-        assertEquals(0, cmpr.compare("a", "a"));
-        assertTrue(cmp.compare("a", "b") < 0);
-        assertTrue(cmpr.compare("a", "b") > 0);
-        assertTrue(cmp.compare("b", "a") > 0);
-        assertTrue(cmpr.compare("b", "a") < 0);
-    }
-
-    public void testReverseComparator2() {
-        Comparator<String> cmp = (s1, s2) -> s1.length() - s2.length();
-        Comparator<String> cmpr = cmp.reverseOrder();
-
-        assertEquals(cmpr.reverseOrder(), cmp);
-        assertEquals(0, cmp.compare("abc", "def"));
-        assertEquals(0, cmpr.compare("abc", "def"));
-        assertTrue(cmp.compare("abcd", "def") > 0);
-        assertTrue(cmpr.compare("abcd", "def") < 0);
-        assertTrue(cmp.compare("abc", "defg") < 0);
-        assertTrue(cmpr.compare("abc", "defg") > 0);
-    }
-
-    @Test(expectedExceptions=NullPointerException.class)
-    public void testReverseComparatorNPE() {
-        Comparator<String> cmp = Comparators.reverseOrder(null);
-    }
-
-    public void testComposeComparator() {
-        // Longer string in front
-        Comparator<String> first = (s1, s2) -> s2.length() - s1.length();
-        Comparator<String> second = Comparators.naturalOrder();
-        Comparator<String> composed = Comparators.compose(first, second);
-
-        assertTrue(composed.compare("abcdefg", "abcdef") < 0);
-        assertTrue(composed.compare("abcdef", "abcdefg") > 0);
-        assertTrue(composed.compare("abcdef", "abcdef") == 0);
-        assertTrue(composed.compare("abcdef", "ghijkl") < 0);
-        assertTrue(composed.compare("ghijkl", "abcdefg") > 0);
-    }
-
-    private <K, V> void assertPairComparison(K k1, V v1, K k2, V v2,
-                                        Comparator<Map.Entry<K, V>> ck,
-                                        Comparator<Map.Entry<K, V>> cv) {
-        final Map.Entry<K, V> p11 = new AbstractMap.SimpleImmutableEntry<>(k1, v1);
-        final Map.Entry<K, V> p12 = new AbstractMap.SimpleImmutableEntry<>(k1, v2);
-        final Map.Entry<K, V> p21 = new AbstractMap.SimpleImmutableEntry<>(k2, v1);
-        final Map.Entry<K, V> p22 = new AbstractMap.SimpleImmutableEntry<>(k2, v2);
-
-        assertTrue(ck.compare(p11, p11) == 0);
-        assertTrue(ck.compare(p12, p11) == 0);
-        assertTrue(ck.compare(p11, p12) == 0);
-        assertTrue(ck.compare(p12, p22) < 0);
-        assertTrue(ck.compare(p12, p21) < 0);
-        assertTrue(ck.compare(p21, p11) > 0);
-        assertTrue(ck.compare(p21, p12) > 0);
-
-        assertTrue(cv.compare(p11, p11) == 0);
-        assertTrue(cv.compare(p12, p11) > 0);
-        assertTrue(cv.compare(p11, p12) < 0);
-        assertTrue(cv.compare(p12, p22) == 0);
-        assertTrue(cv.compare(p12, p21) > 0);
-        assertTrue(cv.compare(p21, p11) == 0);
-        assertTrue(cv.compare(p21, p12) < 0);
-
-        Comparator<Map.Entry<K, V>> cmp = Comparators.compose(ck, cv);
-        assertTrue(cmp.compare(p11, p11) == 0);
-        assertTrue(cmp.compare(p12, p11) > 0);
-        assertTrue(cmp.compare(p11, p12) < 0);
-        assertTrue(cmp.compare(p12, p22) < 0);
-        assertTrue(cmp.compare(p12, p21) < 0);
-        assertTrue(cmp.compare(p21, p11) > 0);
-        assertTrue(cmp.compare(p21, p12) > 0);
-
-        cmp = Comparators.compose(cv, ck);
-        assertTrue(cmp.compare(p11, p11) == 0);
-        assertTrue(cmp.compare(p12, p11) > 0);
-        assertTrue(cmp.compare(p11, p12) < 0);
-        assertTrue(cmp.compare(p12, p22) < 0);
-        assertTrue(cmp.compare(p12, p21) > 0);
-        assertTrue(cmp.compare(p21, p11) > 0);
-        assertTrue(cmp.compare(p21, p12) < 0);
-    }
-
-    public void testKVComparatorable() {
-        assertPairComparison(1, "ABC", 2, "XYZ",
-                         Comparators.<Integer, String>naturalOrderKeys(),
-                         Comparators.<Integer, String>naturalOrderValues());
-    }
-
-    private static class People {
-        final String firstName;
-        final String lastName;
-        final int age;
-
-        People(String first, String last, int age) {
-            firstName = first;
-            lastName = last;
-            this.age = age;
-        }
-
-        String getFirstName() { return firstName; }
-        String getLastName() { return lastName; }
-        int getAge() { return age; }
-        long getAgeAsLong() { return (long) age; };
-        double getAgeAsDouble() { return (double) age; };
-    }
-
-    private final People people[] = {
-        new People("John", "Doe", 34),
-        new People("Mary", "Doe", 30),
-        new People("Maria", "Doe", 14),
-        new People("Jonah", "Doe", 10),
-        new People("John", "Cook", 54),
-        new People("Mary", "Cook", 50),
-    };
-
-    public void testKVComparators() {
-        // Comparator<People> cmp = Comparators.naturalOrder(); // Should fail to compiler as People is not comparable
-        // We can use simple comparator, but those have been tested above.
-        // Thus choose to do compose for some level of interation.
-        Comparator<People> cmp1 = Comparators.comparing((Function<People, String>) People::getFirstName);
-        Comparator<People> cmp2 = Comparators.comparing((Function<People, String>) People::getLastName);
-        Comparator<People> cmp = Comparators.compose(cmp1, cmp2);
-
-        assertPairComparison(people[0], people[0], people[1], people[1],
-                         Comparators.<People, People>byKey(cmp),
-                         Comparators.<People, People>byValue(cmp));
-
-    }
-
-    private <T> void assertComparison(Comparator<T> cmp, T less, T greater) {
-        assertTrue(cmp.compare(less, greater) < 0, "less");
-        assertTrue(cmp.compare(less, less) == 0, "equal");
-        assertTrue(cmp.compare(greater, less) > 0, "greater");
-    }
-
-    public void testComparatorDefaultMethods() {
-        Comparator<People> cmp = Comparators.comparing((Function<People, String>) People::getFirstName);
-        Comparator<People> cmp2 = Comparators.comparing((Function<People, String>) People::getLastName);
-        // reverseOrder
-        assertComparison(cmp.reverseOrder(), people[1], people[0]);
-        // thenComparing(Comparator)
-        assertComparison(cmp.thenComparing(cmp2), people[0], people[1]);
-        assertComparison(cmp.thenComparing(cmp2), people[4], people[0]);
-        // thenComparing(Function)
-        assertComparison(cmp.thenComparing(People::getLastName), people[0], people[1]);
-        assertComparison(cmp.thenComparing(People::getLastName), people[4], people[0]);
-        // thenComparing(ToIntFunction)
-        assertComparison(cmp.thenComparing(People::getAge), people[0], people[1]);
-        assertComparison(cmp.thenComparing(People::getAge), people[1], people[5]);
-        // thenComparing(ToLongFunction)
-        assertComparison(cmp.thenComparing(People::getAgeAsLong), people[0], people[1]);
-        assertComparison(cmp.thenComparing(People::getAgeAsLong), people[1], people[5]);
-        // thenComparing(ToDoubleFunction)
-        assertComparison(cmp.thenComparing(People::getAgeAsDouble), people[0], people[1]);
-        assertComparison(cmp.thenComparing(People::getAgeAsDouble), people[1], people[5]);
-    }
-
-    public void testGreaterOf() {
-        // lesser
-        assertSame(Comparators.greaterOf(Comparators.comparing(
-                                    (Function<People, String>) People::getFirstName))
-                              .apply(people[0], people[1]),
-                   people[1]);
-        // euqal
-        assertSame(Comparators.greaterOf(Comparators.comparing(
-                                    (Function<People, String>) People::getLastName))
-                              .apply(people[0], people[1]),
-                   people[0]);
-        // greater
-        assertSame(Comparators.greaterOf(Comparators.comparing(
-                                    (ToIntFunction<People>) People::getAge))
-                              .apply(people[0], people[1]),
-                   people[0]);
-    }
-
-    public void testLesserOf() {
-        // lesser
-        assertSame(Comparators.lesserOf(Comparators.comparing(
-                                    (Function<People, String>) People::getFirstName))
-                              .apply(people[0], people[1]),
-                   people[0]);
-        // euqal
-        assertSame(Comparators.lesserOf(Comparators.comparing(
-                                    (Function<People, String>) People::getLastName))
-                              .apply(people[0], people[1]),
-                   people[0]);
-        // greater
-        assertSame(Comparators.lesserOf(Comparators.comparing(
-                                    (ToIntFunction<People>) People::getAge))
-                              .apply(people[0], people[1]),
-                   people[1]);
-    }
-}
\ No newline at end of file
--- a/test/java/util/Currency/tablea1.txt	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/util/Currency/tablea1.txt	Wed Apr 17 21:48:04 2013 -0700
@@ -1,12 +1,12 @@
 #
 #
-# Amendments up until ISO 4217 AMENDMENT NUMBER 154
-#   (As of 31 August 2012)
+# Amendments up until ISO 4217 AMENDMENT NUMBER 155
+#   (As of 11 April 2013)
 #
 
 # Version
 FILEVERSION=1
-DATAVERSION=154
+DATAVERSION=155
 
 # ISO 4217 currency data
 AF	AFN	971	2
@@ -256,7 +256,7 @@
 TM	TMT	934	2
 TC	USD	840	2
 TV	AUD	36	2
-UG	UGX	800	2
+UG	UGX	800	0
 UA	UAH	980	2
 AE	AED	784	2
 GB	GBP	826	2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Map/BasicSerialization.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,221 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8011200
+ * @run testng BasicSerialization
+ * @summary Ensure Maps can be serialized and deserialized.
+ * @author Mike Duigou
+ */
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.ByteArrayInputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentSkipListMap;
+
+import org.testng.annotations.Test;
+import org.testng.annotations.DataProvider;
+import static org.testng.Assert.fail;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertSame;
+
+public class BasicSerialization {
+
+    enum IntegerEnum {
+
+        e0, e1, e2, e3, e4, e5, e6, e7, e8, e9,
+        e10, e11, e12, e13, e14, e15, e16, e17, e18, e19,
+        e20, e21, e22, e23, e24, e25, e26, e27, e28, e29,
+        e30, e31, e32, e33, e34, e35, e36, e37, e38, e39,
+        e40, e41, e42, e43, e44, e45, e46, e47, e48, e49,
+        e50, e51, e52, e53, e54, e55, e56, e57, e58, e59,
+        e60, e61, e62, e63, e64, e65, e66, e67, e68, e69,
+        e70, e71, e72, e73, e74, e75, e76, e77, e78, e79,
+        e80, e81, e82, e83, e84, e85, e86, e87, e88, e89,
+        e90, e91, e92, e93, e94, e95, e96, e97, e98, e99,
+        EXTRA_KEY;
+        public static final int SIZE = values().length;
+    };
+    private static final int TEST_SIZE = IntegerEnum.SIZE - 1;
+    /**
+     * Realized keys ensure that there is always a hard ref to all test objects.
+     */
+    private static final IntegerEnum[] KEYS = new IntegerEnum[TEST_SIZE];
+    /**
+     * Realized values ensure that there is always a hard ref to all test
+     * objects.
+     */
+    private static final String[] VALUES = new String[TEST_SIZE];
+
+    static {
+        IntegerEnum[] keys = IntegerEnum.values();
+        for (int each = 0; each < TEST_SIZE; each++) {
+            KEYS[each] = keys[each];
+            VALUES[each] = keys[each].name();
+        }
+    }
+    private static final IntegerEnum EXTRA_KEY = IntegerEnum.EXTRA_KEY;
+    private static final String EXTRA_VALUE = IntegerEnum.EXTRA_KEY.name();
+
+    public static <K, V> Map<K, V> mapClone(Map<K, V> map) {
+        Method cloneMethod;
+
+        try {
+            cloneMethod = map.getClass().getMethod("clone", new Class[]{});
+        } catch (NoSuchMethodException | SecurityException all) {
+            cloneMethod = null;
+        }
+
+        if (null != cloneMethod) {
+            try {
+                Map<K, V> result = (Map<K, V>)cloneMethod.invoke(map, new Object[]{});
+                return result;
+            } catch (Exception all) {
+                fail("clone() failed " + map.getClass().getSimpleName(), all);
+                return null;
+            }
+        } else {
+            Constructor<? extends Map> copyConstructor;
+            try {
+                copyConstructor = (Constructor<? extends Map>)map.getClass().getConstructor(new Class[]{Map.class});
+
+                Map<K, V> result = (Map<K, V>)copyConstructor.newInstance(new Object[]{map});
+
+                return result;
+            } catch (Exception all) {
+                return serialClone(map);
+            }
+        }
+    }
+
+    @Test(dataProvider = "Map<IntegerEnum,String>")
+    public void testSerialization(String description, Map<IntegerEnum, String> map) {
+        Object foo = new Object();
+
+        Map<IntegerEnum, String> clone = mapClone(map);
+        Map<IntegerEnum, String> serialClone = serialClone(map);
+
+        assertEquals(map, map, description + ":should equal self");
+        assertEquals(clone, map, description + ":should equal clone");
+        assertEquals(map, clone, description + ": should equal orginal map");
+        assertEquals(serialClone, map, description + ": should equal deserialized clone");
+        assertEquals(map, serialClone, description + ": should equal original map");
+        assertEquals(serialClone, clone, description + ": deserialized clone should equal clone");
+        assertEquals(clone, serialClone, description + ": clone should equal deserialized clone");
+
+        assertFalse(map.containsKey(EXTRA_KEY), description + ":unexpected key");
+        assertFalse(clone.containsKey(EXTRA_KEY), description + ":unexpected key");
+        assertFalse(serialClone.containsKey(EXTRA_KEY), description + ":unexpected key");
+        map.put(EXTRA_KEY, EXTRA_VALUE);
+        clone.put(EXTRA_KEY, EXTRA_VALUE);
+        serialClone.put(EXTRA_KEY, EXTRA_VALUE);
+        assertTrue(map.containsKey(EXTRA_KEY), description + ":missing key");
+        assertTrue(clone.containsKey(EXTRA_KEY), description + ":missing key");
+        assertTrue(serialClone.containsKey(EXTRA_KEY), description + ":missing key");
+        assertSame(map.get(EXTRA_KEY), EXTRA_VALUE, description + ":wrong value");
+        assertSame(clone.get(EXTRA_KEY), EXTRA_VALUE, description + ":wrong value");
+        assertSame(serialClone.get(EXTRA_KEY), EXTRA_VALUE, description + ":wrong value");
+
+        assertEquals(map, map, description + ":should equal self");
+        assertEquals(clone, map, description + ":should equal clone");
+        assertEquals(map, clone, description + ": should equal orginal map");
+        assertEquals(serialClone, map, description + ": should equal deserialized clone");
+        assertEquals(map, serialClone, description + ": should equal original map");
+        assertEquals(serialClone, clone, description + ": deserialized clone should equal clone");
+        assertEquals(clone, serialClone, description + ": clone should equal deserialized clone");
+    }
+
+    static byte[] serializedForm(Object obj) {
+        try {
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            new ObjectOutputStream(baos).writeObject(obj);
+            return baos.toByteArray();
+        } catch (IOException e) {
+            fail("Unexpected Exception", e);
+            return null;
+        }
+    }
+
+    static Object readObject(byte[] bytes) throws IOException, ClassNotFoundException {
+        InputStream is = new ByteArrayInputStream(bytes);
+        return new ObjectInputStream(is).readObject();
+    }
+
+    @SuppressWarnings("unchecked")
+    static <T> T serialClone(T obj) {
+        try {
+            return (T)readObject(serializedForm(obj));
+        } catch (IOException | ClassNotFoundException e) {
+            fail("Unexpected Exception", e);
+            return null;
+        }
+    }
+
+    @DataProvider(name = "Map<IntegerEnum,String>", parallel = true)
+    private static Iterator<Object[]> makeMaps() {
+        return Arrays.asList(
+            // empty
+            new Object[]{"HashMap", new HashMap()},
+            new Object[]{"LinkedHashMap", new LinkedHashMap()},
+            new Object[]{"Collections.checkedMap(HashMap)", Collections.checkedMap(new HashMap(), IntegerEnum.class, String.class)},
+            new Object[]{"Collections.synchronizedMap(HashMap)", Collections.synchronizedMap(new HashMap())},
+            // null hostile
+            new Object[]{"EnumMap", new EnumMap(IntegerEnum.class)},
+            new Object[]{"Hashtable", new Hashtable()},
+            new Object[]{"TreeMap", new TreeMap()},
+            new Object[]{"ConcurrentHashMap", new ConcurrentHashMap()},
+            new Object[]{"ConcurrentSkipListMap", new ConcurrentSkipListMap()},
+            new Object[]{"Collections.checkedMap(ConcurrentHashMap)", Collections.checkedMap(new ConcurrentHashMap(), IntegerEnum.class, String.class)},
+            new Object[]{"Collections.synchronizedMap(EnumMap)", Collections.synchronizedMap(new EnumMap(IntegerEnum.class))},
+            // filled
+            new Object[]{"HashMap", fillMap(new HashMap())},
+            new Object[]{"LinkedHashMap", fillMap(new LinkedHashMap())},
+            new Object[]{"Collections.checkedMap(HashMap)", Collections.checkedMap(fillMap(new HashMap()), IntegerEnum.class, String.class)},
+            new Object[]{"Collections.synchronizedMap(HashMap)", Collections.synchronizedMap(fillMap(new HashMap()))},
+            // null hostile
+            new Object[]{"EnumMap", fillMap(new EnumMap(IntegerEnum.class))},
+            new Object[]{"Hashtable", fillMap(new Hashtable())},
+            new Object[]{"TreeMap", fillMap(new TreeMap())},
+            new Object[]{"ConcurrentHashMap", fillMap(new ConcurrentHashMap())},
+            new Object[]{"ConcurrentSkipListMap", fillMap(new ConcurrentSkipListMap())},
+            new Object[]{"Collections.checkedMap(ConcurrentHashMap)", Collections.checkedMap(fillMap(new ConcurrentHashMap()), IntegerEnum.class, String.class)},
+            new Object[]{"Collections.synchronizedMap(EnumMap)", Collections.synchronizedMap(fillMap(new EnumMap(IntegerEnum.class)))}).iterator();
+    }
+
+    private static Map<IntegerEnum, String> fillMap(Map<IntegerEnum, String> result) {
+        for (int each = 0; each < TEST_SIZE; each++) {
+            result.put(KEYS[each], VALUES[each]);
+        }
+
+        return result;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Map/Defaults.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,594 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8010122 8004518
+ * @summary Test Map default methods
+ * @author Mike Duigou
+ * @run testng Defaults
+ */
+import java.util.AbstractMap;
+import java.util.AbstractSet;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EnumMap;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.Set;
+import java.util.WeakHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentSkipListMap;
+import java.util.function.Supplier;
+
+import org.testng.annotations.Test;
+import org.testng.annotations.DataProvider;
+import static org.testng.Assert.fail;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNull;
+import static org.testng.Assert.assertSame;
+
+public class Defaults {
+
+    @Test(dataProvider = "Nulls Map<IntegerEnum,String>")
+    public void testGetOrDefaultNulls(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(null), "null key absent");
+        assertNull(map.get(null), "value not null");
+        assertSame(map.get(null), map.getOrDefault(null, EXTRA_VALUE), "values should match");
+    }
+
+    @Test(dataProvider = "Map<IntegerEnum,String>")
+    public void testGetOrDefault(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(KEYS[1]), "expected key missing");
+        assertSame(map.get(KEYS[1]), map.getOrDefault(KEYS[1], EXTRA_VALUE), "values should match");
+        assertFalse(map.containsKey(EXTRA_KEY), "expected absent key");
+        assertSame(map.getOrDefault(EXTRA_KEY, EXTRA_VALUE), EXTRA_VALUE, "value not returned as default");
+        assertNull(map.getOrDefault(EXTRA_KEY, null), "null not returned as default");
+    }
+
+    @Test(dataProvider = "R/W Nulls Map<IntegerEnum,String>")
+    public void testPutIfAbsentNulls(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(null), "null key absent");
+        assertNull(map.get(null), "value not null");
+        assertNull(map.putIfAbsent(null, EXTRA_VALUE), "previous not null");
+        assertTrue(map.containsKey(null), "null key absent");
+        assertSame(map.get(null), EXTRA_VALUE, "unexpected value");
+        assertSame(map.putIfAbsent(null, null), EXTRA_VALUE, "previous not expected value");
+        assertTrue(map.containsKey(null), "null key absent");
+        assertSame(map.get(null), EXTRA_VALUE, "unexpected value");
+        assertSame(map.remove(null), EXTRA_VALUE, "removed unexpected value");
+
+        assertFalse(map.containsKey(null), description + ": key present after remove");
+        assertNull(map.putIfAbsent(null, null), "previous not null");
+        assertTrue(map.containsKey(null), "null key absent");
+        assertNull(map.get(null), "value not null");
+        assertNull(map.putIfAbsent(null, EXTRA_VALUE), "previous not null");
+        assertSame(map.get(null), EXTRA_VALUE, "value not expected");
+    }
+
+    @Test(dataProvider = "R/W Map<IntegerEnum,String>")
+    public void testPutIfAbsent(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(KEYS[1]));
+        Object expected = map.get(KEYS[1]);
+        assertTrue(null == expected || expected == VALUES[1]);
+        assertSame(map.putIfAbsent(KEYS[1], EXTRA_VALUE), expected);
+        assertSame(map.get(KEYS[1]), expected);
+
+        assertFalse(map.containsKey(EXTRA_KEY));
+        assertSame(map.putIfAbsent(EXTRA_KEY, EXTRA_VALUE), null);
+        assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
+    }
+
+    @Test(dataProvider = "Nulls Map<IntegerEnum,String>")
+    public void testForEach(String description, Map<IntegerEnum, String> map) {
+        IntegerEnum[] EACH_KEY = new IntegerEnum[map.size()];
+
+        map.forEach((k, v) -> {
+            int idx = (null == k) ? 0 : k.ordinal(); // substitute for index.
+            assertNull(EACH_KEY[idx]);
+            EACH_KEY[idx] = (idx == 0) ? KEYS[0] : k; // substitute for comparison.
+            assertSame(v, map.get(k));
+        });
+
+        assertEquals(KEYS, EACH_KEY);
+    }
+
+    @Test(dataProvider = "R/W Nulls Map<IntegerEnum,String>")
+    public static void testRemoveNulls(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(null), "null key absent");
+        assertNull(map.get(null), "value not null");
+        assertFalse(map.remove(null, EXTRA_VALUE), description);
+        assertTrue(map.containsKey(null));
+        assertNull(map.get(null));
+        assertTrue(map.remove(null, null));
+        assertFalse(map.containsKey(null));
+        assertNull(map.get(null));
+        assertFalse(map.remove(null, null));
+    }
+
+    @Test(dataProvider = "R/W Map<IntegerEnum,String>")
+    public static void testRemove(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(KEYS[1]));
+        Object expected = map.get(KEYS[1]);
+        assertTrue(null == expected || expected == VALUES[1]);
+        assertFalse(map.remove(KEYS[1], EXTRA_VALUE), description);
+        assertSame(map.get(KEYS[1]), expected);
+        assertTrue(map.remove(KEYS[1], expected));
+        assertNull(map.get(KEYS[1]));
+        assertFalse(map.remove(KEYS[1], expected));
+
+        assertFalse(map.containsKey(EXTRA_KEY));
+        assertFalse(map.remove(EXTRA_KEY, EXTRA_VALUE));
+    }
+
+    @Test(dataProvider = "R/W Nulls Map<IntegerEnum,String>")
+    public void testReplaceKVNulls(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(null), "null key absent");
+        assertNull(map.get(null), "value not null");
+        assertSame(map.replace(null, EXTRA_VALUE), null);
+        assertSame(map.get(null), EXTRA_VALUE);
+    }
+
+    @Test(dataProvider = "R/W Map<IntegerEnum,String>")
+    public void testReplaceKV(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(KEYS[1]));
+        Object expected = map.get(KEYS[1]);
+        assertTrue(null == expected || expected == VALUES[1]);
+        assertSame(map.replace(KEYS[1], EXTRA_VALUE), expected);
+        assertSame(map.get(KEYS[1]), EXTRA_VALUE);
+
+        assertFalse(map.containsKey(EXTRA_KEY));
+        assertNull(map.replace(EXTRA_KEY, EXTRA_VALUE));
+        assertFalse(map.containsKey(EXTRA_KEY));
+        assertNull(map.get(EXTRA_KEY));
+        assertNull(map.put(EXTRA_KEY, EXTRA_VALUE));
+        assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
+        assertSame(map.replace(EXTRA_KEY, (String)expected), EXTRA_VALUE);
+        assertSame(map.get(EXTRA_KEY), expected);
+    }
+
+    @Test(dataProvider = "R/W Nulls Map<IntegerEnum,String>")
+    public void testReplaceKVVNulls(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(null), "null key absent");
+        assertNull(map.get(null), "value not null");
+        assertFalse(map.replace(null, EXTRA_VALUE, EXTRA_VALUE));
+        assertNull(map.get(null));
+        assertTrue(map.replace(null, null, EXTRA_VALUE));
+        assertSame(map.get(null), EXTRA_VALUE);
+        assertTrue(map.replace(null, EXTRA_VALUE, EXTRA_VALUE));
+        assertSame(map.get(null), EXTRA_VALUE);
+    }
+
+    @Test(dataProvider = "R/W Map<IntegerEnum,String>")
+    public void testReplaceKVV(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(KEYS[1]));
+        Object expected = map.get(KEYS[1]);
+        assertTrue(null == expected || expected == VALUES[1]);
+        assertFalse(map.replace(KEYS[1], EXTRA_VALUE, EXTRA_VALUE));
+        assertSame(map.get(KEYS[1]), expected);
+        assertTrue(map.replace(KEYS[1], (String)expected, EXTRA_VALUE));
+        assertSame(map.get(KEYS[1]), EXTRA_VALUE);
+        assertTrue(map.replace(KEYS[1], EXTRA_VALUE, EXTRA_VALUE));
+        assertSame(map.get(KEYS[1]), EXTRA_VALUE);
+
+        assertFalse(map.containsKey(EXTRA_KEY));
+        assertFalse(map.replace(EXTRA_KEY, EXTRA_VALUE, EXTRA_VALUE));
+        assertFalse(map.containsKey(EXTRA_KEY));
+        assertNull(map.get(EXTRA_KEY));
+        assertNull(map.put(EXTRA_KEY, EXTRA_VALUE));
+        assertTrue(map.containsKey(EXTRA_KEY));
+        assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
+        assertTrue(map.replace(EXTRA_KEY, EXTRA_VALUE, EXTRA_VALUE));
+        assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
+    }
+
+    @Test(dataProvider = "R/W Nulls Map<IntegerEnum,String>")
+    public void testComputeIfAbsentNulls(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(null), "null key absent");
+        assertNull(map.get(null), "value not null");
+        assertSame(map.computeIfAbsent(null, (k) -> EXTRA_VALUE), EXTRA_VALUE, description);
+        assertSame(map.get(null), EXTRA_VALUE, description);
+    }
+
+    @Test(dataProvider = "R/W Map<IntegerEnum,String>")
+    public void testComputeIfAbsent(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(KEYS[1]));
+        Object expected = map.get(KEYS[1]);
+        assertTrue(null == expected || expected == VALUES[1], description + String.valueOf(expected));
+        expected = (null == expected) ? EXTRA_VALUE : expected;
+        assertSame(map.computeIfAbsent(KEYS[1], (k) -> EXTRA_VALUE), expected, description);
+        assertSame(map.get(KEYS[1]), expected, description);
+
+        assertFalse(map.containsKey(EXTRA_KEY));
+        assertSame(map.computeIfAbsent(EXTRA_KEY, (k) -> EXTRA_VALUE), EXTRA_VALUE);
+        assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
+    }
+
+    @Test(dataProvider = "R/W Nulls Map<IntegerEnum,String>")
+    public void testComputeIfPresentNulls(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(null));
+        assertNull(map.get(null));
+        assertSame(map.computeIfPresent(null, (k, v) -> {
+            fail();
+            return EXTRA_VALUE;
+        }), null, description);
+        assertTrue(map.containsKey(null));
+        assertSame(map.get(null), null, description);
+    }
+
+    @Test(dataProvider = "R/W Map<IntegerEnum,String>")
+    public void testComputeIfPresent(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(KEYS[1]));
+        Object value = map.get(KEYS[1]);
+        assertTrue(null == value || value == VALUES[1], description + String.valueOf(value));
+        Object expected = (null == value) ? null : EXTRA_VALUE;
+        assertSame(map.computeIfPresent(KEYS[1], (k, v) -> {
+            assertSame(v, value);
+            return EXTRA_VALUE;
+        }), expected, description);
+        assertSame(map.get(KEYS[1]), expected, description);
+
+        assertFalse(map.containsKey(EXTRA_KEY));
+        assertSame(map.computeIfPresent(EXTRA_KEY, (k, v) -> {
+            fail();
+            return EXTRA_VALUE;
+        }), null);
+        assertFalse(map.containsKey(EXTRA_KEY));
+        assertSame(map.get(EXTRA_KEY), null);
+    }
+
+    @Test(dataProvider = "R/W Nulls Map<IntegerEnum,String>")
+    public void testComputeNulls(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(null), "null key absent");
+        assertNull(map.get(null), "value not null");
+        assertSame(map.compute(null, (k, v) -> {
+            assertSame(k, null);
+            assertNull(v);
+            return EXTRA_VALUE;
+        }), EXTRA_VALUE, description);
+        assertTrue(map.containsKey(null));
+        assertSame(map.get(null), EXTRA_VALUE, description);
+        assertSame(map.remove(null), EXTRA_VALUE, "removed value not expected");
+        assertFalse(map.containsKey(null), "null key present");
+        assertSame(map.compute(null, (k, v) -> {
+            assertSame(k, null);
+            assertNull(v);
+            return null;
+        }), null, description);
+    }
+
+    @Test(dataProvider = "R/W Map<IntegerEnum,String>")
+    public void testCompute(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(KEYS[1]));
+        Object value = map.get(KEYS[1]);
+        assertTrue(null == value || value == VALUES[1], description + String.valueOf(value));
+        assertSame(map.compute(KEYS[1], (k, v) -> {
+            assertSame(k, KEYS[1]);
+            assertSame(v, value);
+            return EXTRA_VALUE;
+        }), EXTRA_VALUE, description);
+        assertSame(map.get(KEYS[1]), EXTRA_VALUE, description);
+        assertNull(map.compute(KEYS[1], (k, v) -> {
+            assertSame(v, EXTRA_VALUE);
+            return null;
+        }), description);
+        assertFalse(map.containsKey(KEYS[1]));
+
+        assertFalse(map.containsKey(EXTRA_KEY));
+        assertSame(map.compute(EXTRA_KEY, (k, v) -> {
+            assertNull(v);
+            return EXTRA_VALUE;
+        }), EXTRA_VALUE);
+        assertTrue(map.containsKey(EXTRA_KEY));
+        assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
+    }
+
+
+    @Test(dataProvider = "R/W Nulls Map<IntegerEnum,String>")
+    public void testMergeNulls(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(null), "null key absent");
+        assertNull(map.get(null), "value not null");
+        assertSame(map.merge(null, EXTRA_VALUE, (v, vv) -> {
+            assertNull(v);
+            assertSame(vv, EXTRA_VALUE);
+            return vv;
+        }), EXTRA_VALUE, description);
+        assertTrue(map.containsKey(null));
+        assertSame(map.get(null), EXTRA_VALUE, description);
+    }
+
+    @Test(dataProvider = "R/W Map<IntegerEnum,String>")
+    public void testMerge(String description, Map<IntegerEnum, String> map) {
+        assertTrue(map.containsKey(KEYS[1]));
+        Object value = map.get(KEYS[1]);
+        assertTrue(null == value || value == VALUES[1], description + String.valueOf(value));
+        assertSame(map.merge(KEYS[1], EXTRA_VALUE, (v, vv) -> {
+            assertSame(v, value);
+            assertSame(vv, EXTRA_VALUE);
+            return vv;
+        }), EXTRA_VALUE, description);
+        assertSame(map.get(KEYS[1]), EXTRA_VALUE, description);
+        assertNull(map.merge(KEYS[1], EXTRA_VALUE, (v, vv) -> {
+            assertSame(v, EXTRA_VALUE);
+            assertSame(vv, EXTRA_VALUE);
+            return null;
+        }), description);
+        assertFalse(map.containsKey(KEYS[1]));
+
+        assertFalse(map.containsKey(EXTRA_KEY));
+        assertSame(map.merge(EXTRA_KEY, EXTRA_VALUE, (v, vv) -> {
+            assertNull(v);
+            assertSame(vv, EXTRA_VALUE);
+            return EXTRA_VALUE;
+        }), EXTRA_VALUE);
+        assertTrue(map.containsKey(EXTRA_KEY));
+        assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
+    }
+
+    enum IntegerEnum {
+
+        e0, e1, e2, e3, e4, e5, e6, e7, e8, e9,
+        e10, e11, e12, e13, e14, e15, e16, e17, e18, e19,
+        e20, e21, e22, e23, e24, e25, e26, e27, e28, e29,
+        e30, e31, e32, e33, e34, e35, e36, e37, e38, e39,
+        e40, e41, e42, e43, e44, e45, e46, e47, e48, e49,
+        e50, e51, e52, e53, e54, e55, e56, e57, e58, e59,
+        e60, e61, e62, e63, e64, e65, e66, e67, e68, e69,
+        e70, e71, e72, e73, e74, e75, e76, e77, e78, e79,
+        e80, e81, e82, e83, e84, e85, e86, e87, e88, e89,
+        e90, e91, e92, e93, e94, e95, e96, e97, e98, e99,
+        EXTRA_KEY;
+        public static final int SIZE = values().length;
+    };
+    private static final int TEST_SIZE = IntegerEnum.SIZE - 1;
+    /**
+     * Realized keys ensure that there is always a hard ref to all test objects.
+     */
+    private static final IntegerEnum[] KEYS = new IntegerEnum[TEST_SIZE];
+    /**
+     * Realized values ensure that there is always a hard ref to all test
+     * objects.
+     */
+    private static final String[] VALUES = new String[TEST_SIZE];
+
+    static {
+        IntegerEnum[] keys = IntegerEnum.values();
+        for (int each = 0; each < TEST_SIZE; each++) {
+            KEYS[each] = keys[each];
+            VALUES[each] = String.valueOf(each);
+        }
+    }
+    private static final IntegerEnum EXTRA_KEY = IntegerEnum.EXTRA_KEY;
+    private static final String EXTRA_VALUE = String.valueOf(TEST_SIZE);
+
+    @DataProvider(name = "Map<IntegerEnum,String>", parallel = true)
+    public static Iterator<Object[]> allNullsMapProvider() {
+        return makeAllMaps().iterator();
+    }
+
+    @DataProvider(name = "Nulls Map<IntegerEnum,String>", parallel = true)
+    public static Iterator<Object[]> allMapProvider() {
+        return makeRWMaps(true).iterator();
+    }
+
+    @DataProvider(name = "R/W Map<IntegerEnum,String>", parallel = true)
+    public static Iterator<Object[]> rwMapProvider() {
+        return makeRWMapsNoNulls().iterator();
+    }
+
+    @DataProvider(name = "R/W Nulls Map<IntegerEnum,String>", parallel = true)
+    public static Iterator<Object[]> rwNullsMapProvider() {
+        return makeRWMaps(true).iterator();
+    }
+
+    private static Collection<Object[]> makeAllMapsNoNulls() {
+        Collection<Object[]> all = new ArrayList<>();
+
+        all.addAll(makeRWMaps(false));
+        all.addAll(makeRWNoNullsMaps());
+        all.addAll(makeROMaps(false));
+
+        return all;
+    }
+
+    private static Collection<Object[]> makeRWMapsNoNulls() {
+        Collection<Object[]> all = new ArrayList<>();
+
+        all.addAll(makeRWMaps(false));
+        all.addAll(makeRWNoNullsMaps());
+
+        return all;
+    }
+
+    private static Collection<Object[]> makeAllMaps() {
+        Collection<Object[]> all = new ArrayList<>();
+
+        all.addAll(makeROMaps(false));
+        all.addAll(makeRWMaps(false));
+        all.addAll(makeRWNoNullsMaps());
+        all.addAll(makeRWMaps(true));
+        all.addAll(makeROMaps(true));
+
+        return all;
+    }
+
+    private static Collection<Object[]> makeAllRWMaps() {
+        Collection<Object[]> all = new ArrayList<>();
+
+        all.addAll(makeRWMaps(false));
+        all.addAll(makeRWNoNullsMaps());
+        all.addAll(makeRWMaps(true));
+
+        return all;
+    }
+
+    private static Collection<Object[]> makeRWMaps(boolean nulls) {
+        return Arrays.asList(
+            new Object[]{"HashMap", makeMap(HashMap::new, nulls)},
+            new Object[]{"IdentityHashMap", makeMap(IdentityHashMap::new, nulls)},
+            new Object[]{"LinkedHashMap", makeMap(LinkedHashMap::new, nulls)},
+            new Object[]{"WeakHashMap", makeMap(WeakHashMap::new, nulls)},
+            new Object[]{"Collections.checkedMap(HashMap)", Collections.checkedMap(makeMap(HashMap::new, nulls), IntegerEnum.class, String.class)},
+            new Object[]{"Collections.synchronizedMap(HashMap)", Collections.synchronizedMap(makeMap(HashMap::new, nulls))},
+            new Object[]{"ExtendsAbstractMap", makeMap(ExtendsAbstractMap::new, nulls)});
+    }
+
+    private static Collection<Object[]> makeRWNoNullsMaps() {
+        return Arrays.asList(
+            // null hostile
+            new Object[]{"EnumMap", makeMap(() -> new EnumMap(IntegerEnum.class), false)},
+            new Object[]{"Hashtable", makeMap(Hashtable::new, false)},
+            new Object[]{"TreeMap", makeMap(TreeMap::new, false)},
+            new Object[]{"ConcurrentHashMap", makeMap(ConcurrentHashMap::new, false)},
+            new Object[]{"ConcurrentSkipListMap", makeMap(ConcurrentSkipListMap::new, false)},
+            new Object[]{"Collections.checkedMap(ConcurrentHashMap)", Collections.checkedMap(makeMap(ConcurrentHashMap::new, false), IntegerEnum.class, String.class)},
+            new Object[]{"Collections.synchronizedMap(EnumMap)", Collections.synchronizedMap(makeMap(() -> new EnumMap(IntegerEnum.class), false))},
+            new Object[]{"ImplementsConcurrentMap", makeMap(ImplementsConcurrentMap::new, false)});
+    }
+
+    private static Collection<Object[]> makeROMaps(boolean nulls) {
+        return Arrays.asList(new Object[][]{
+            new Object[]{"Collections.unmodifiableMap(HashMap)", Collections.unmodifiableMap(makeMap(HashMap::new, nulls))}
+        });
+    }
+
+    private static Map<IntegerEnum, String> makeMap(Supplier<Map<IntegerEnum, String>> supplier, boolean nulls) {
+        Map<IntegerEnum, String> result = supplier.get();
+
+        for (int each = 0; each < TEST_SIZE; each++) {
+            if (nulls) {
+                result.put((each == 0) ? null : KEYS[each], null);
+            } else {
+                result.put(KEYS[each], VALUES[each]);
+            }
+        }
+
+        return result;
+    }
+
+    public interface Thrower<T extends Throwable> {
+
+        public void run() throws T;
+    }
+
+    public static <T extends Throwable> void assertThrows(Thrower<T> thrower, Class<T> throwable) {
+        assertThrows(thrower, throwable, null);
+    }
+
+    public static <T extends Throwable> void assertThrows(Thrower<T> thrower, Class<T> throwable, String message) {
+        Throwable result;
+        try {
+            thrower.run();
+            result = null;
+        } catch (Throwable caught) {
+            result = caught;
+        }
+
+        assertInstance(result, throwable,
+            (null != message)
+            ? message
+            : "Failed to throw " + throwable.getCanonicalName());
+    }
+
+    public static <T> void assertInstance(T actual, Class<? extends T> expected) {
+        assertInstance(expected.isInstance(actual), null);
+    }
+
+    public static <T> void assertInstance(T actual, Class<? extends T> expected, String message) {
+        assertTrue(expected.isInstance(actual), message);
+    }
+
+    /**
+     * A simple mutable map implementation that provides only default
+     * implementations of all methods. ie. none of the Map interface default
+     * methods have overridden implementations.
+     *
+     * @param <K> Type of keys
+     * @param <V> Type of values
+     */
+    public static class ExtendsAbstractMap<M extends Map<K,V>, K, V> extends AbstractMap<K, V> {
+
+        protected final M map;
+
+        public ExtendsAbstractMap() { this( (M) new HashMap<K,V>()); }
+
+        protected ExtendsAbstractMap(M map) { this.map = map; }
+
+        public Set<Map.Entry<K, V>> entrySet() {
+            return new AbstractSet<Map.Entry<K, V>>() {
+                public int size() {
+                    return map.size();
+                }
+
+                public Iterator<Map.Entry<K,V>> iterator() {
+                    final Iterator<Map.Entry<K,V>> source = map.entrySet().iterator();
+                    return new Iterator<Map.Entry<K,V>>() {
+                       public boolean hasNext() { return source.hasNext(); }
+                       public Map.Entry<K,V> next() { return source.next(); }
+                       public void remove() { source.remove(); }
+                    };
+                }
+
+                public boolean add(Map.Entry<K,V> e) {
+                    return map.entrySet().add(e);
+                }
+            };
+        }
+
+        public V put(K key, V value) {
+            return map.put(key, value);
+        }
+    }
+
+    /**
+     * A simple mutable concurrent map implementation that provides only default
+     * implementations of all methods. ie. none of the ConcurrentMap interface
+     * default methods have overridden implementations.
+     *
+     * @param <K> Type of keys
+     * @param <V> Type of values
+     */
+    public static class ImplementsConcurrentMap<K, V> extends ExtendsAbstractMap<ConcurrentMap<K,V>, K, V> implements ConcurrentMap<K,V> {
+        public ImplementsConcurrentMap() { super(new ConcurrentHashMap<K,V>()); }
+
+        // ConcurrentMap reabstracts these methods
+
+        public V replace(K k, V v) { return map.replace(k, v); };
+
+        public boolean replace(K k, V v, V vv) { return map.replace(k, v, vv); };
+
+        public boolean remove(Object k, Object v) { return map.remove(k, v); }
+
+        public V putIfAbsent(K k, V v) { return map.putIfAbsent(k, v); }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Spliterator/SpliteratorLateBindingFailFastTest.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,357 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.ConcurrentModificationException;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.PriorityQueue;
+import java.util.Set;
+import java.util.Spliterator;
+import java.util.Stack;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.Vector;
+import java.util.WeakHashMap;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.function.Supplier;
+
+import static org.testng.Assert.*;
+
+/**
+ * @test
+ * @summary Spliterator last-binding and fail-fast tests
+ * @run testng SpliteratorLateBindingFailFastTest
+ */
+
+@Test
+public class SpliteratorLateBindingFailFastTest {
+
+    private interface Source<T> {
+        Collection<T> asCollection();
+        void update();
+    }
+
+    private static class SpliteratorDataBuilder<T> {
+        final List<Object[]> data;
+
+        final T newValue;
+
+        final List<T> exp;
+
+        final Map<T, T> mExp;
+
+        SpliteratorDataBuilder(List<Object[]> data, T newValue, List<T> exp) {
+            this.data = data;
+            this.newValue = newValue;
+            this.exp = exp;
+            this.mExp = createMap(exp);
+        }
+
+        Map<T, T> createMap(List<T> l) {
+            Map<T, T> m = new LinkedHashMap<>();
+            for (T t : l) {
+                m.put(t, t);
+            }
+            return m;
+        }
+
+        void add(String description, Supplier<Source<?>> s) {
+            description = joiner(description).toString();
+            data.add(new Object[]{description, s});
+        }
+
+        void addCollection(Function<Collection<T>, ? extends Collection<T>> f) {
+            class CollectionSource implements Source<T> {
+                final Collection<T> c = f.apply(exp);
+
+                final Consumer<Collection<T>> updater;
+
+                CollectionSource(Consumer<Collection<T>> updater) {
+                    this.updater = updater;
+                }
+
+                @Override
+                public Collection<T> asCollection() {
+                    return c;
+                }
+
+                @Override
+                public void update() {
+                    updater.accept(c);
+                }
+            }
+
+            String description = "new " + f.apply(Collections.<T>emptyList()).getClass().getName() + ".spliterator() ";
+            add(description + "ADD", () -> new CollectionSource(c -> c.add(newValue)));
+            add(description + "REMOVE", () -> new CollectionSource(c -> c.remove(c.iterator().next())));
+        }
+
+        void addList(Function<Collection<T>, ? extends List<T>> l) {
+            // @@@ If collection is instance of List then add sub-list tests
+            addCollection(l);
+        }
+
+        void addMap(Function<Map<T, T>, ? extends Map<T, T>> mapConstructor) {
+            class MapSource<U> implements Source<U> {
+                final Map<T, T> m = mapConstructor.apply(mExp);
+
+                final Collection<U> c;
+
+                final Consumer<Map<T, T>> updater;
+
+                MapSource(Function<Map<T, T>, Collection<U>> f, Consumer<Map<T, T>> updater) {
+                    this.c = f.apply(m);
+                    this.updater = updater;
+                }
+
+                @Override
+                public Collection<U> asCollection() {
+                    return c;
+                }
+
+                @Override
+                public void update() {
+                    updater.accept(m);
+                }
+            }
+
+            Map<String, Consumer<Map<T, T>>> actions = new HashMap<>();
+            actions.put("ADD", m -> m.put(newValue, newValue));
+            actions.put("REMOVE", m -> m.remove(m.keySet().iterator().next()));
+
+            String description = "new " + mapConstructor.apply(Collections.<T, T>emptyMap()).getClass().getName();
+            for (Map.Entry<String, Consumer<Map<T, T>>> e : actions.entrySet()) {
+                add(description + ".keySet().spliterator() " + e.getKey(),
+                    () -> new MapSource<T>(m -> m.keySet(), e.getValue()));
+                add(description + ".values().spliterator() " + e.getKey(),
+                    () -> new MapSource<T>(m -> m.values(), e.getValue()));
+                add(description + ".entrySet().spliterator() " + e.getKey(),
+                    () -> new MapSource<Map.Entry<T, T>>(m -> m.entrySet(), e.getValue()));
+            }
+        }
+
+        StringBuilder joiner(String description) {
+            return new StringBuilder(description).
+                    append(" {").
+                    append("size=").append(exp.size()).
+                    append("}");
+        }
+    }
+
+    static Object[][] spliteratorDataProvider;
+
+    @DataProvider(name = "Source")
+    public static Object[][] spliteratorDataProvider() {
+        if (spliteratorDataProvider != null) {
+            return spliteratorDataProvider;
+        }
+
+        List<Object[]> data = new ArrayList<>();
+        SpliteratorDataBuilder<Integer> db = new SpliteratorDataBuilder<>(data, 5, Arrays.asList(1, 2, 3, 4));
+
+        // Collections
+
+        db.addList(ArrayList::new);
+
+        db.addList(LinkedList::new);
+
+        db.addList(Vector::new);
+
+
+        db.addCollection(HashSet::new);
+
+        db.addCollection(LinkedHashSet::new);
+
+        db.addCollection(TreeSet::new);
+
+
+        db.addCollection(c -> { Stack<Integer> s = new Stack<>(); s.addAll(c); return s;});
+
+        db.addCollection(PriorityQueue::new);
+
+        // ArrayDeque fails some tests since it's fail-fast support is weaker
+        // than other collections and limited to detecting most, but not all,
+        // removals.  It probably requires it's own test since it is difficult
+        // to abstract out the conditions under which it fails-fast.
+//        db.addCollection(ArrayDeque::new);
+
+        // Maps
+
+        db.addMap(HashMap::new);
+
+        db.addMap(LinkedHashMap::new);
+
+        // This fails when run through jrteg but passes when run though
+        // ant
+//        db.addMap(IdentityHashMap::new);
+
+        db.addMap(WeakHashMap::new);
+
+        // @@@  Descending maps etc
+        db.addMap(TreeMap::new);
+
+        return spliteratorDataProvider = data.toArray(new Object[0][]);
+    }
+
+    @Test(dataProvider = "Source")
+    public <T> void lateBindingTestWithForEach(String description, Supplier<Source<T>> ss) {
+        Source<T> source = ss.get();
+        Collection<T> c = source.asCollection();
+        Spliterator<T> s = c.spliterator();
+
+        source.update();
+
+        Set<T> r = new HashSet<>();
+        s.forEachRemaining(r::add);
+
+        assertEquals(r, new HashSet<>(c));
+    }
+
+    @Test(dataProvider = "Source")
+    public <T> void lateBindingTestWithTryAdvance(String description, Supplier<Source<T>> ss) {
+        Source<T> source = ss.get();
+        Collection<T> c = source.asCollection();
+        Spliterator<T> s = c.spliterator();
+
+        source.update();
+
+        Set<T> r = new HashSet<>();
+        while (s.tryAdvance(r::add)) { }
+
+        assertEquals(r, new HashSet<>(c));
+    }
+
+    @Test(dataProvider = "Source")
+    public <T> void lateBindingTestWithCharacteritics(String description, Supplier<Source<T>> ss) {
+        Source<T> source = ss.get();
+        Collection<T> c = source.asCollection();
+        Spliterator<T> s = c.spliterator();
+        s.characteristics();
+
+        Set<T> r = new HashSet<>();
+        s.forEachRemaining(r::add);
+
+        assertEquals(r, new HashSet<>(c));
+    }
+
+
+    @Test(dataProvider = "Source")
+    public <T> void testFailFastTestWithTryAdvance(String description, Supplier<Source<T>> ss) {
+        {
+            Source<T> source = ss.get();
+            Collection<T> c = source.asCollection();
+            Spliterator<T> s = c.spliterator();
+
+            s.tryAdvance(e -> {
+            });
+            source.update();
+
+            executeAndCatch(() -> s.tryAdvance(e -> { }));
+        }
+
+        {
+            Source<T> source = ss.get();
+            Collection<T> c = source.asCollection();
+            Spliterator<T> s = c.spliterator();
+
+            s.tryAdvance(e -> {
+            });
+            source.update();
+
+            executeAndCatch(() -> s.forEachRemaining(e -> {
+            }));
+        }
+    }
+
+    @Test(dataProvider = "Source")
+    public <T> void testFailFastTestWithForEach(String description, Supplier<Source<T>> ss) {
+        Source<T> source = ss.get();
+        Collection<T> c = source.asCollection();
+        Spliterator<T> s = c.spliterator();
+
+        executeAndCatch(() -> s.forEachRemaining(e -> {
+            source.update();
+        }));
+    }
+
+    @Test(dataProvider = "Source")
+    public <T> void testFailFastTestWithEstimateSize(String description, Supplier<Source<T>> ss) {
+        {
+            Source<T> source = ss.get();
+            Collection<T> c = source.asCollection();
+            Spliterator<T> s = c.spliterator();
+
+            s.estimateSize();
+            source.update();
+
+            executeAndCatch(() -> s.tryAdvance(e -> { }));
+        }
+
+        {
+            Source<T> source = ss.get();
+            Collection<T> c = source.asCollection();
+            Spliterator<T> s = c.spliterator();
+
+            s.estimateSize();
+            source.update();
+
+            executeAndCatch(() -> s.forEachRemaining(e -> {
+            }));
+        }
+    }
+
+    private void executeAndCatch(Runnable r) {
+        executeAndCatch(ConcurrentModificationException.class, r);
+    }
+
+    private void executeAndCatch(Class<? extends Exception> expected, Runnable r) {
+        Exception caught = null;
+        try {
+            r.run();
+        }
+        catch (Exception e) {
+            caught = e;
+        }
+
+        assertNotNull(caught,
+                      String.format("No Exception was thrown, expected an Exception of %s to be thrown",
+                                    expected.getName()));
+        assertTrue(expected.isInstance(caught),
+                   String.format("Exception thrown %s not an instance of %s",
+                                 caught.getClass().getName(), expected.getName()));
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,1257 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @summary Spliterator traversing and splitting tests
+ * @run testng SpliteratorTraversingAndSplittingTest
+ */
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.util.AbstractCollection;
+import java.util.AbstractList;
+import java.util.AbstractSet;
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.PriorityQueue;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.Spliterator;
+import java.util.Spliterators;
+import java.util.Stack;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.Vector;
+import java.util.WeakHashMap;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.ConcurrentSkipListMap;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.CopyOnWriteArraySet;
+import java.util.concurrent.LinkedBlockingDeque;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.LinkedTransferQueue;
+import java.util.concurrent.PriorityBlockingQueue;
+import java.util.function.Consumer;
+import java.util.function.DoubleConsumer;
+import java.util.function.Function;
+import java.util.function.IntConsumer;
+import java.util.function.LongConsumer;
+import java.util.function.Supplier;
+import java.util.function.UnaryOperator;
+
+import static org.testng.Assert.*;
+import static org.testng.Assert.assertEquals;
+
+@Test
+public class SpliteratorTraversingAndSplittingTest {
+
+    private static List<Integer> SIZES = Arrays.asList(0, 1, 10, 100, 1000);
+
+    private static class SpliteratorDataBuilder<T> {
+        List<Object[]> data;
+
+        List<T> exp;
+
+        Map<T, T> mExp;
+
+        SpliteratorDataBuilder(List<Object[]> data, List<T> exp) {
+            this.data = data;
+            this.exp = exp;
+            this.mExp = createMap(exp);
+        }
+
+        Map<T, T> createMap(List<T> l) {
+            Map<T, T> m = new LinkedHashMap<>();
+            for (T t : l) {
+                m.put(t, t);
+            }
+            return m;
+        }
+
+        void add(String description, Collection<?> expected, Supplier<Spliterator<?>> s) {
+            description = joiner(description).toString();
+            data.add(new Object[]{description, expected, s});
+        }
+
+        void add(String description, Supplier<Spliterator<?>> s) {
+            add(description, exp, s);
+        }
+
+        void addCollection(Function<Collection<T>, ? extends Collection<T>> c) {
+            add("new " + c.apply(Collections.<T>emptyList()).getClass().getName() + ".spliterator()",
+                () -> c.apply(exp).spliterator());
+        }
+
+        void addList(Function<Collection<T>, ? extends List<T>> l) {
+            // @@@ If collection is instance of List then add sub-list tests
+            addCollection(l);
+        }
+
+        void addMap(Function<Map<T, T>, ? extends Map<T, T>> m) {
+            String description = "new " + m.apply(Collections.<T, T>emptyMap()).getClass().getName();
+            add(description + ".keySet().spliterator()", () -> m.apply(mExp).keySet().spliterator());
+            add(description + ".values().spliterator()", () -> m.apply(mExp).values().spliterator());
+            add(description + ".entrySet().spliterator()", mExp.entrySet(), () -> m.apply(mExp).entrySet().spliterator());
+        }
+
+        StringBuilder joiner(String description) {
+            return new StringBuilder(description).
+                    append(" {").
+                    append("size=").append(exp.size()).
+                    append("}");
+        }
+    }
+
+    static Object[][] spliteratorDataProvider;
+
+    @DataProvider(name = "Spliterator<Integer>")
+    public static Object[][] spliteratorDataProvider() {
+        if (spliteratorDataProvider != null) {
+            return spliteratorDataProvider;
+        }
+
+        List<Object[]> data = new ArrayList<>();
+        for (int size : SIZES) {
+            List<Integer> exp = listIntRange(size);
+            SpliteratorDataBuilder<Integer> db = new SpliteratorDataBuilder<>(data, exp);
+
+            // Direct spliterator methods
+
+            db.add("Spliterators.spliterator(Collection, ...)",
+                   () -> Spliterators.spliterator(exp, 0));
+
+            db.add("Spliterators.spliterator(Iterator, ...)",
+                   () -> Spliterators.spliterator(exp.iterator(), exp.size(), 0));
+
+            db.add("Spliterators.spliteratorUnknownSize(Iterator, ...)",
+                   () -> Spliterators.spliteratorUnknownSize(exp.iterator(), 0));
+
+            db.add("Spliterators.spliterator(Spliterators.iteratorFromSpliterator(Spliterator ), ...)",
+                   () -> Spliterators.spliterator(Spliterators.iteratorFromSpliterator(exp.spliterator()), exp.size(), 0));
+
+            db.add("Spliterators.spliterator(T[], ...)",
+                   () -> Spliterators.spliterator(exp.toArray(new Integer[0]), 0));
+
+            db.add("Arrays.spliterator(T[], ...)",
+                   () -> Arrays.spliterator(exp.toArray(new Integer[0])));
+
+            class SpliteratorFromIterator extends Spliterators.AbstractSpliterator<Integer> {
+                Iterator<Integer> it;
+
+                SpliteratorFromIterator(Iterator<Integer> it, long est) {
+                    super(est, Spliterator.SIZED);
+                    this.it = it;
+                }
+
+                @Override
+                public boolean tryAdvance(Consumer<? super Integer> action) {
+                    if (it.hasNext()) {
+                        action.accept(it.next());
+                        return true;
+                    }
+                    else {
+                        return false;
+                    }
+                }
+            }
+            db.add("new Spliterators.AbstractAdvancingSpliterator()",
+                   () -> new SpliteratorFromIterator(exp.iterator(), exp.size()));
+
+            // Collections
+
+            // default method implementations
+
+            class AbstractCollectionImpl extends AbstractCollection<Integer> {
+                Collection<Integer> c;
+
+                AbstractCollectionImpl(Collection<Integer> c) {
+                    this.c = c;
+                }
+
+                @Override
+                public Iterator<Integer> iterator() {
+                    return c.iterator();
+                }
+
+                @Override
+                public int size() {
+                    return c.size();
+                }
+            }
+            db.addCollection(
+                    c -> new AbstractCollectionImpl(c));
+
+            class AbstractListImpl extends AbstractList<Integer> {
+                List<Integer> l;
+
+                AbstractListImpl(Collection<Integer> c) {
+                    this.l = new ArrayList<>(c);
+                }
+
+                @Override
+                public Integer get(int index) {
+                    return l.get(index);
+                }
+
+                @Override
+                public int size() {
+                    return l.size();
+                }
+            }
+            db.addCollection(
+                    c -> new AbstractListImpl(c));
+
+            class AbstractSetImpl extends AbstractSet<Integer> {
+                Set<Integer> s;
+
+                AbstractSetImpl(Collection<Integer> c) {
+                    this.s = new HashSet<>(c);
+                }
+
+                @Override
+                public Iterator<Integer> iterator() {
+                    return s.iterator();
+                }
+
+                @Override
+                public int size() {
+                    return s.size();
+                }
+            }
+            db.addCollection(
+                    c -> new AbstractSetImpl(c));
+
+            class AbstractSortedSetImpl extends AbstractSet<Integer> implements SortedSet<Integer> {
+                SortedSet<Integer> s;
+
+                AbstractSortedSetImpl(Collection<Integer> c) {
+                    this.s = new TreeSet<>(c);
+                }
+
+                @Override
+                public Iterator<Integer> iterator() {
+                    return s.iterator();
+                }
+
+                @Override
+                public int size() {
+                    return s.size();
+                }
+
+                @Override
+                public Comparator<? super Integer> comparator() {
+                    return s.comparator();
+                }
+
+                @Override
+                public SortedSet<Integer> subSet(Integer fromElement, Integer toElement) {
+                    return s.subSet(fromElement, toElement);
+                }
+
+                @Override
+                public SortedSet<Integer> headSet(Integer toElement) {
+                    return s.headSet(toElement);
+                }
+
+                @Override
+                public SortedSet<Integer> tailSet(Integer fromElement) {
+                    return s.tailSet(fromElement);
+                }
+
+                @Override
+                public Integer first() {
+                    return s.first();
+                }
+
+                @Override
+                public Integer last() {
+                    return s.last();
+                }
+
+                @Override
+                public Spliterator<Integer> spliterator() {
+                    return SortedSet.super.spliterator();
+                }
+            }
+            db.addCollection(
+                    c -> new AbstractSortedSetImpl(c));
+
+            //
+
+            db.add("Arrays.asList().spliterator()",
+                   () -> Spliterators.spliterator(Arrays.asList(exp.toArray(new Integer[0])), 0));
+
+            db.addList(ArrayList::new);
+
+            db.addList(LinkedList::new);
+
+            db.addList(Vector::new);
+
+
+            db.addCollection(HashSet::new);
+
+            db.addCollection(LinkedHashSet::new);
+
+            db.addCollection(TreeSet::new);
+
+
+            db.addCollection(c -> { Stack<Integer> s = new Stack<>(); s.addAll(c); return s;});
+
+            db.addCollection(PriorityQueue::new);
+
+            db.addCollection(ArrayDeque::new);
+
+
+            db.addCollection(ConcurrentSkipListSet::new);
+
+            if (size > 0) {
+                db.addCollection(c -> {
+                    ArrayBlockingQueue<Integer> abq = new ArrayBlockingQueue<>(size);
+                    abq.addAll(c);
+                    return abq;
+                });
+            }
+
+            db.addCollection(PriorityBlockingQueue::new);
+
+            db.addCollection(LinkedBlockingQueue::new);
+
+            db.addCollection(LinkedTransferQueue::new);
+
+            db.addCollection(ConcurrentLinkedQueue::new);
+
+            db.addCollection(LinkedBlockingDeque::new);
+
+            db.addCollection(CopyOnWriteArrayList::new);
+
+            db.addCollection(CopyOnWriteArraySet::new);
+
+            if (size == 1) {
+                db.addCollection(c -> Collections.singleton(exp.get(0)));
+                db.addCollection(c -> Collections.singletonList(exp.get(0)));
+            }
+
+            // @@@ Collections.synchronized/unmodifiable/checked wrappers
+
+            // Maps
+
+            db.addMap(HashMap::new);
+
+            db.addMap(LinkedHashMap::new);
+
+            db.addMap(IdentityHashMap::new);
+
+            db.addMap(WeakHashMap::new);
+
+            // @@@  Descending maps etc
+            db.addMap(TreeMap::new);
+
+            db.addMap(ConcurrentHashMap::new);
+
+            db.addMap(ConcurrentSkipListMap::new);
+        }
+
+        return spliteratorDataProvider = data.toArray(new Object[0][]);
+    }
+
+    private static List<Integer> listIntRange(int upTo) {
+        List<Integer> exp = new ArrayList<>();
+        for (int i = 0; i < upTo; i++)
+            exp.add(i);
+        return Collections.unmodifiableList(exp);
+    }
+
+    @Test(dataProvider = "Spliterator<Integer>")
+    @SuppressWarnings({"unchecked", "rawtypes"})
+    public void testForEach(String description, Collection exp, Supplier<Spliterator> s) {
+        testForEach(exp, s, (Consumer<Object> b) -> b);
+    }
+
+    @Test(dataProvider = "Spliterator<Integer>")
+    @SuppressWarnings({"unchecked", "rawtypes"})
+    public void testTryAdvance(String description, Collection exp, Supplier<Spliterator> s) {
+        testTryAdvance(exp, s, (Consumer<Object> b) -> b);
+    }
+
+    @Test(dataProvider = "Spliterator<Integer>")
+    @SuppressWarnings({"unchecked", "rawtypes"})
+    public void testMixedTryAdvanceForEach(String description, Collection exp, Supplier<Spliterator> s) {
+        testMixedTryAdvanceForEach(exp, s, (Consumer<Object> b) -> b);
+    }
+
+    @Test(dataProvider = "Spliterator<Integer>")
+    @SuppressWarnings({"unchecked", "rawtypes"})
+    public void testSplitAfterFullTraversal(String description, Collection exp, Supplier<Spliterator> s) {
+        testSplitAfterFullTraversal(s, (Consumer<Object> b) -> b);
+    }
+
+    @Test(dataProvider = "Spliterator<Integer>")
+    @SuppressWarnings({"unchecked", "rawtypes"})
+    public void testSplitOnce(String description, Collection exp, Supplier<Spliterator> s) {
+        testSplitOnce(exp, s, (Consumer<Object> b) -> b);
+    }
+
+    @Test(dataProvider = "Spliterator<Integer>")
+    @SuppressWarnings({"unchecked", "rawtypes"})
+    public void testSplitSixDeep(String description, Collection exp, Supplier<Spliterator> s) {
+        testSplitSixDeep(exp, s, (Consumer<Object> b) -> b);
+    }
+
+    @Test(dataProvider = "Spliterator<Integer>")
+    @SuppressWarnings({"unchecked", "rawtypes"})
+    public void testSplitUntilNull(String description, Collection exp, Supplier<Spliterator> s) {
+        testSplitUntilNull(exp, s, (Consumer<Object> b) -> b);
+    }
+
+    //
+
+    private static class SpliteratorOfIntDataBuilder {
+        List<Object[]> data;
+
+        List<Integer> exp;
+
+        SpliteratorOfIntDataBuilder(List<Object[]> data, List<Integer> exp) {
+            this.data = data;
+            this.exp = exp;
+        }
+
+        void add(String description, List<Integer> expected, Supplier<Spliterator.OfInt> s) {
+            description = joiner(description).toString();
+            data.add(new Object[]{description, expected, s});
+        }
+
+        void add(String description, Supplier<Spliterator.OfInt> s) {
+            add(description, exp, s);
+        }
+
+        StringBuilder joiner(String description) {
+            return new StringBuilder(description).
+                    append(" {").
+                    append("size=").append(exp.size()).
+                    append("}");
+        }
+    }
+
+    static Object[][] spliteratorOfIntDataProvider;
+
+    @DataProvider(name = "Spliterator.OfInt")
+    public static Object[][] spliteratorOfIntDataProvider() {
+        if (spliteratorOfIntDataProvider != null) {
+            return spliteratorOfIntDataProvider;
+        }
+
+        List<Object[]> data = new ArrayList<>();
+        for (int size : SIZES) {
+            int exp[] = arrayIntRange(size);
+            SpliteratorOfIntDataBuilder db = new SpliteratorOfIntDataBuilder(data, listIntRange(size));
+
+            db.add("Spliterators.spliterator(int[], ...)",
+                   () -> Spliterators.spliterator(exp, 0));
+
+            db.add("Arrays.spliterator(int[], ...)",
+                   () -> Arrays.spliterator(exp));
+
+            db.add("Spliterators.spliterator(PrimitiveIterator.OfInt, ...)",
+                   () -> Spliterators.spliterator(Spliterators.iteratorFromSpliterator(Arrays.spliterator(exp)), exp.length, 0));
+
+            db.add("Spliterators.spliteratorUnknownSize(PrimitiveIterator.OfInt, ...)",
+                   () -> Spliterators.spliteratorUnknownSize(Spliterators.iteratorFromSpliterator(Arrays.spliterator(exp)), 0));
+
+            class IntSpliteratorFromArray extends Spliterators.AbstractIntSpliterator {
+                int[] a;
+                int index = 0;
+
+                IntSpliteratorFromArray(int[] a) {
+                    super(a.length, Spliterator.SIZED);
+                    this.a = a;
+                }
+
+                @Override
+                public boolean tryAdvance(IntConsumer action) {
+                    if (index < a.length) {
+                        action.accept(a[index++]);
+                        return true;
+                    }
+                    else {
+                        return false;
+                    }
+                }
+            }
+            db.add("new Spliterators.AbstractIntAdvancingSpliterator()",
+                   () -> new IntSpliteratorFromArray(exp));
+        }
+
+        return spliteratorOfIntDataProvider = data.toArray(new Object[0][]);
+    }
+
+    private static int[] arrayIntRange(int upTo) {
+        int[] exp = new int[upTo];
+        for (int i = 0; i < upTo; i++)
+            exp[i] = i;
+        return exp;
+    }
+
+    private static UnaryOperator<Consumer<Integer>> intBoxingConsumer() {
+        class BoxingAdapter implements Consumer<Integer>, IntConsumer {
+            private final Consumer<Integer> b;
+
+            BoxingAdapter(Consumer<Integer> b) {
+                this.b = b;
+            }
+
+            @Override
+            public void accept(Integer value) {
+                throw new IllegalStateException();
+            }
+
+            @Override
+            public void accept(int value) {
+                b.accept(value);
+            }
+        }
+
+        return b -> new BoxingAdapter(b);
+    }
+
+    @Test(dataProvider = "Spliterator.OfInt")
+    public void testIntForEach(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
+        testForEach(exp, s, intBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfInt")
+    public void testIntTryAdvance(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
+        testTryAdvance(exp, s, intBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfInt")
+    public void testIntMixedTryAdvanceForEach(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
+        testMixedTryAdvanceForEach(exp, s, intBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfInt")
+    public void testIntSplitAfterFullTraversal(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
+        testSplitAfterFullTraversal(s, intBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfInt")
+    public void testIntSplitOnce(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
+        testSplitOnce(exp, s, intBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfInt")
+    public void testIntSplitSixDeep(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
+        testSplitSixDeep(exp, s, intBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfInt")
+    public void testIntSplitUntilNull(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
+        testSplitUntilNull(exp, s, intBoxingConsumer());
+    }
+
+    //
+
+    private static class SpliteratorOfLongDataBuilder {
+        List<Object[]> data;
+
+        List<Long> exp;
+
+        SpliteratorOfLongDataBuilder(List<Object[]> data, List<Long> exp) {
+            this.data = data;
+            this.exp = exp;
+        }
+
+        void add(String description, List<Long> expected, Supplier<Spliterator.OfLong> s) {
+            description = joiner(description).toString();
+            data.add(new Object[]{description, expected, s});
+        }
+
+        void add(String description, Supplier<Spliterator.OfLong> s) {
+            add(description, exp, s);
+        }
+
+        StringBuilder joiner(String description) {
+            return new StringBuilder(description).
+                    append(" {").
+                    append("size=").append(exp.size()).
+                    append("}");
+        }
+    }
+
+    static Object[][] spliteratorOfLongDataProvider;
+
+    @DataProvider(name = "Spliterator.OfLong")
+    public static Object[][] spliteratorOfLongDataProvider() {
+        if (spliteratorOfLongDataProvider != null) {
+            return spliteratorOfLongDataProvider;
+        }
+
+        List<Object[]> data = new ArrayList<>();
+        for (int size : SIZES) {
+            long exp[] = arrayLongRange(size);
+            SpliteratorOfLongDataBuilder db = new SpliteratorOfLongDataBuilder(data, listLongRange(size));
+
+            db.add("Spliterators.spliterator(long[], ...)",
+                   () -> Spliterators.spliterator(exp, 0));
+
+            db.add("Arrays.spliterator(long[], ...)",
+                   () -> Arrays.spliterator(exp));
+
+            db.add("Spliterators.spliterator(PrimitiveIterator.OfLong, ...)",
+                   () -> Spliterators.spliterator(Spliterators.iteratorFromSpliterator(Arrays.spliterator(exp)), exp.length, 0));
+
+            db.add("Spliterators.spliteratorUnknownSize(PrimitiveIterator.OfLong, ...)",
+                   () -> Spliterators.spliteratorUnknownSize(Spliterators.iteratorFromSpliterator(Arrays.spliterator(exp)), 0));
+
+            class LongSpliteratorFromArray extends Spliterators.AbstractLongSpliterator {
+                long[] a;
+                int index = 0;
+
+                LongSpliteratorFromArray(long[] a) {
+                    super(a.length, Spliterator.SIZED);
+                    this.a = a;
+                }
+
+                @Override
+                public boolean tryAdvance(LongConsumer action) {
+                    if (index < a.length) {
+                        action.accept(a[index++]);
+                        return true;
+                    }
+                    else {
+                        return false;
+                    }
+                }
+            }
+            db.add("new Spliterators.AbstractLongAdvancingSpliterator()",
+                   () -> new LongSpliteratorFromArray(exp));
+        }
+
+        return spliteratorOfLongDataProvider = data.toArray(new Object[0][]);
+    }
+
+    private static List<Long> listLongRange(int upTo) {
+        List<Long> exp = new ArrayList<>();
+        for (long i = 0; i < upTo; i++)
+            exp.add(i);
+        return Collections.unmodifiableList(exp);
+    }
+
+    private static long[] arrayLongRange(int upTo) {
+        long[] exp = new long[upTo];
+        for (int i = 0; i < upTo; i++)
+            exp[i] = i;
+        return exp;
+    }
+
+    private static UnaryOperator<Consumer<Long>> longBoxingConsumer() {
+        class BoxingAdapter implements Consumer<Long>, LongConsumer {
+            private final Consumer<Long> b;
+
+            BoxingAdapter(Consumer<Long> b) {
+                this.b = b;
+            }
+
+            @Override
+            public void accept(Long value) {
+                throw new IllegalStateException();
+            }
+
+            @Override
+            public void accept(long value) {
+                b.accept(value);
+            }
+        }
+
+        return b -> new BoxingAdapter(b);
+    }
+
+    @Test(dataProvider = "Spliterator.OfLong")
+    public void testLongForEach(String description, Collection<Long> exp, Supplier<Spliterator.OfLong> s) {
+        testForEach(exp, s, longBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfLong")
+    public void testLongTryAdvance(String description, Collection<Long> exp, Supplier<Spliterator.OfLong> s) {
+        testTryAdvance(exp, s, longBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfLong")
+    public void testLongMixedTryAdvanceForEach(String description, Collection<Long> exp, Supplier<Spliterator.OfLong> s) {
+        testMixedTryAdvanceForEach(exp, s, longBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfLong")
+    public void testLongSplitAfterFullTraversal(String description, Collection<Long> exp, Supplier<Spliterator.OfLong> s) {
+        testSplitAfterFullTraversal(s, longBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfLong")
+    public void testLongSplitOnce(String description, Collection<Long> exp, Supplier<Spliterator.OfLong> s) {
+        testSplitOnce(exp, s, longBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfLong")
+    public void testLongSplitSixDeep(String description, Collection<Long> exp, Supplier<Spliterator.OfLong> s) {
+        testSplitSixDeep(exp, s, longBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfLong")
+    public void testLongSplitUntilNull(String description, Collection<Long> exp, Supplier<Spliterator.OfLong> s) {
+        testSplitUntilNull(exp, s, longBoxingConsumer());
+    }
+
+    //
+
+    private static class SpliteratorOfDoubleDataBuilder {
+        List<Object[]> data;
+
+        List<Double> exp;
+
+        SpliteratorOfDoubleDataBuilder(List<Object[]> data, List<Double> exp) {
+            this.data = data;
+            this.exp = exp;
+        }
+
+        void add(String description, List<Double> expected, Supplier<Spliterator.OfDouble> s) {
+            description = joiner(description).toString();
+            data.add(new Object[]{description, expected, s});
+        }
+
+        void add(String description, Supplier<Spliterator.OfDouble> s) {
+            add(description, exp, s);
+        }
+
+        StringBuilder joiner(String description) {
+            return new StringBuilder(description).
+                    append(" {").
+                    append("size=").append(exp.size()).
+                    append("}");
+        }
+    }
+
+    static Object[][] spliteratorOfDoubleDataProvider;
+
+    @DataProvider(name = "Spliterator.OfDouble")
+    public static Object[][] spliteratorOfDoubleDataProvider() {
+        if (spliteratorOfDoubleDataProvider != null) {
+            return spliteratorOfDoubleDataProvider;
+        }
+
+        List<Object[]> data = new ArrayList<>();
+        for (int size : SIZES) {
+            double exp[] = arrayDoubleRange(size);
+            SpliteratorOfDoubleDataBuilder db = new SpliteratorOfDoubleDataBuilder(data, listDoubleRange(size));
+
+            db.add("Spliterators.spliterator(double[], ...)",
+                   () -> Spliterators.spliterator(exp, 0));
+
+            db.add("Arrays.spliterator(double[], ...)",
+                   () -> Arrays.spliterator(exp));
+
+            db.add("Spliterators.spliterator(PrimitiveIterator.OfDouble, ...)",
+                   () -> Spliterators.spliterator(Spliterators.iteratorFromSpliterator(Arrays.spliterator(exp)), exp.length, 0));
+
+            db.add("Spliterators.spliteratorUnknownSize(PrimitiveIterator.OfDouble, ...)",
+                   () -> Spliterators.spliteratorUnknownSize(Spliterators.iteratorFromSpliterator(Arrays.spliterator(exp)), 0));
+
+            class DoubleSpliteratorFromArray extends Spliterators.AbstractDoubleSpliterator {
+                double[] a;
+                int index = 0;
+
+                DoubleSpliteratorFromArray(double[] a) {
+                    super(a.length, Spliterator.SIZED);
+                    this.a = a;
+                }
+
+                @Override
+                public boolean tryAdvance(DoubleConsumer action) {
+                    if (index < a.length) {
+                        action.accept(a[index++]);
+                        return true;
+                    }
+                    else {
+                        return false;
+                    }
+                }
+            }
+            db.add("new Spliterators.AbstractDoubleAdvancingSpliterator()",
+                   () -> new DoubleSpliteratorFromArray(exp));
+        }
+
+        return spliteratorOfDoubleDataProvider = data.toArray(new Object[0][]);
+    }
+
+    private static List<Double> listDoubleRange(int upTo) {
+        List<Double> exp = new ArrayList<>();
+        for (double i = 0; i < upTo; i++)
+            exp.add(i);
+        return Collections.unmodifiableList(exp);
+    }
+
+    private static double[] arrayDoubleRange(int upTo) {
+        double[] exp = new double[upTo];
+        for (int i = 0; i < upTo; i++)
+            exp[i] = i;
+        return exp;
+    }
+
+    private static UnaryOperator<Consumer<Double>> doubleBoxingConsumer() {
+        class BoxingAdapter implements Consumer<Double>, DoubleConsumer {
+            private final Consumer<Double> b;
+
+            BoxingAdapter(Consumer<Double> b) {
+                this.b = b;
+            }
+
+            @Override
+            public void accept(Double value) {
+                throw new IllegalStateException();
+            }
+
+            @Override
+            public void accept(double value) {
+                b.accept(value);
+            }
+        }
+
+        return b -> new BoxingAdapter(b);
+    }
+
+    @Test(dataProvider = "Spliterator.OfDouble")
+    public void testDoubleForEach(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
+        testForEach(exp, s, doubleBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfDouble")
+    public void testDoubleTryAdvance(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
+        testTryAdvance(exp, s, doubleBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfDouble")
+    public void testDoubleMixedTryAdvanceForEach(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
+        testMixedTryAdvanceForEach(exp, s, doubleBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfDouble")
+    public void testDoubleSplitAfterFullTraversal(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
+        testSplitAfterFullTraversal(s, doubleBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfDouble")
+    public void testDoubleSplitOnce(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
+        testSplitOnce(exp, s, doubleBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfDouble")
+    public void testDoubleSplitSixDeep(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
+        testSplitSixDeep(exp, s, doubleBoxingConsumer());
+    }
+
+    @Test(dataProvider = "Spliterator.OfDouble")
+    public void testDoubleSplitUntilNull(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
+        testSplitUntilNull(exp, s, doubleBoxingConsumer());
+    }
+
+    //
+
+    private static <T, S extends Spliterator<T>> void testForEach(
+            Collection<T> exp,
+            Supplier<S> supplier,
+            UnaryOperator<Consumer<T>> boxingAdapter) {
+        S spliterator = supplier.get();
+        long sizeIfKnown = spliterator.getExactSizeIfKnown();
+        boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED);
+
+        ArrayList<T> fromForEach = new ArrayList<>();
+        spliterator = supplier.get();
+        Consumer<T> addToFromForEach = boxingAdapter.apply(fromForEach::add);
+        spliterator.forEachRemaining(addToFromForEach);
+
+        // Assert that forEach now produces no elements
+        spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e)));
+        // Assert that tryAdvance now produce no elements
+        spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e)));
+
+        // assert that size, tryAdvance, and forEach are consistent
+        if (sizeIfKnown >= 0) {
+            assertEquals(sizeIfKnown, exp.size());
+        }
+        assertEquals(fromForEach.size(), exp.size());
+
+        assertContents(fromForEach, exp, isOrdered);
+    }
+
+    private static <T, S extends Spliterator<T>> void testTryAdvance(
+            Collection<T> exp,
+            Supplier<S> supplier,
+            UnaryOperator<Consumer<T>> boxingAdapter) {
+        S spliterator = supplier.get();
+        long sizeIfKnown = spliterator.getExactSizeIfKnown();
+        boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED);
+
+        spliterator = supplier.get();
+        ArrayList<T> fromTryAdvance = new ArrayList<>();
+        Consumer<T> addToFromTryAdvance = boxingAdapter.apply(fromTryAdvance::add);
+        while (spliterator.tryAdvance(addToFromTryAdvance)) { }
+
+        // Assert that forEach now produces no elements
+        spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e)));
+        // Assert that tryAdvance now produce no elements
+        spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e)));
+
+        // assert that size, tryAdvance, and forEach are consistent
+        if (sizeIfKnown >= 0) {
+            assertEquals(sizeIfKnown, exp.size());
+        }
+        assertEquals(fromTryAdvance.size(), exp.size());
+
+        assertContents(fromTryAdvance, exp, isOrdered);
+    }
+
+    private static <T, S extends Spliterator<T>> void testMixedTryAdvanceForEach(
+            Collection<T> exp,
+            Supplier<S> supplier,
+            UnaryOperator<Consumer<T>> boxingAdapter) {
+        S spliterator = supplier.get();
+        long sizeIfKnown = spliterator.getExactSizeIfKnown();
+        boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED);
+
+        // tryAdvance first few elements, then forEach rest
+        ArrayList<T> dest = new ArrayList<>();
+        spliterator = supplier.get();
+        Consumer<T> addToDest = boxingAdapter.apply(dest::add);
+        for (int i = 0; i < 10 && spliterator.tryAdvance(addToDest); i++) { }
+        spliterator.forEachRemaining(addToDest);
+
+        // Assert that forEach now produces no elements
+        spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e)));
+        // Assert that tryAdvance now produce no elements
+        spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e)));
+
+        if (sizeIfKnown >= 0) {
+            assertEquals(sizeIfKnown, dest.size());
+        }
+        assertEquals(dest.size(), exp.size());
+
+        if (isOrdered) {
+            assertEquals(dest, exp);
+        }
+        else {
+            assertContentsUnordered(dest, exp);
+        }
+    }
+
+    private static <T, S extends Spliterator<T>> void testSplitAfterFullTraversal(
+            Supplier<S> supplier,
+            UnaryOperator<Consumer<T>> boxingAdapter) {
+        // Full traversal using tryAdvance
+        Spliterator<T> spliterator = supplier.get();
+        while (spliterator.tryAdvance(boxingAdapter.apply(e -> { }))) { }
+        Spliterator<T> split = spliterator.trySplit();
+        assertNull(split);
+
+        // Full traversal using forEach
+        spliterator = supplier.get();
+        spliterator.forEachRemaining(boxingAdapter.apply(e -> {
+        }));
+        split = spliterator.trySplit();
+        assertNull(split);
+
+        // Full traversal using tryAdvance then forEach
+        spliterator = supplier.get();
+        spliterator.tryAdvance(boxingAdapter.apply(e -> { }));
+        spliterator.forEachRemaining(boxingAdapter.apply(e -> {
+        }));
+        split = spliterator.trySplit();
+        assertNull(split);
+    }
+
+    private static <T, S extends Spliterator<T>> void testSplitOnce(
+            Collection<T> exp,
+            Supplier<S> supplier,
+            UnaryOperator<Consumer<T>> boxingAdapter) {
+        S spliterator = supplier.get();
+        long sizeIfKnown = spliterator.getExactSizeIfKnown();
+        boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED);
+
+        ArrayList<T> fromSplit = new ArrayList<>();
+        Spliterator<T> s1 = supplier.get();
+        Spliterator<T> s2 = s1.trySplit();
+        long s1Size = s1.getExactSizeIfKnown();
+        long s2Size = (s2 != null) ? s2.getExactSizeIfKnown() : 0;
+        Consumer<T> addToFromSplit = boxingAdapter.apply(fromSplit::add);
+        if (s2 != null)
+            s2.forEachRemaining(addToFromSplit);
+        s1.forEachRemaining(addToFromSplit);
+
+        if (sizeIfKnown >= 0) {
+            assertEquals(sizeIfKnown, fromSplit.size());
+            if (s1Size >= 0 && s2Size >= 0)
+                assertEquals(sizeIfKnown, s1Size + s2Size);
+        }
+        assertContents(fromSplit, exp, isOrdered);
+    }
+
+    private static <T, S extends Spliterator<T>> void testSplitSixDeep(
+            Collection<T> exp,
+            Supplier<S> supplier,
+            UnaryOperator<Consumer<T>> boxingAdapter) {
+        S spliterator = supplier.get();
+        boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED);
+
+        for (int depth=0; depth < 6; depth++) {
+            List<T> dest = new ArrayList<>();
+            spliterator = supplier.get();
+
+            assertSpliterator(spliterator);
+
+            // verify splitting with forEach
+            visit(depth, 0, dest, spliterator, boxingAdapter, spliterator.characteristics(), false);
+            assertContents(dest, exp, isOrdered);
+
+            // verify splitting with tryAdvance
+            dest.clear();
+            spliterator = supplier.get();
+            visit(depth, 0, dest, spliterator, boxingAdapter, spliterator.characteristics(), true);
+            assertContents(dest, exp, isOrdered);
+        }
+    }
+
+    private static <T, S extends Spliterator<T>> void visit(int depth, int curLevel,
+                              List<T> dest, S spliterator, UnaryOperator<Consumer<T>> boxingAdapter,
+                              int rootCharacteristics, boolean useTryAdvance) {
+        if (curLevel < depth) {
+            long beforeSize = spliterator.getExactSizeIfKnown();
+            Spliterator<T> split = spliterator.trySplit();
+            if (split != null) {
+                assertSpliterator(split, rootCharacteristics);
+                assertSpliterator(spliterator, rootCharacteristics);
+
+                if ((rootCharacteristics & Spliterator.SUBSIZED) != 0 &&
+                    (rootCharacteristics & Spliterator.SIZED) != 0) {
+                    assertEquals(beforeSize, split.estimateSize() + spliterator.estimateSize());
+                }
+                visit(depth, curLevel + 1, dest, split, boxingAdapter, rootCharacteristics, useTryAdvance);
+            }
+            visit(depth, curLevel + 1, dest, spliterator, boxingAdapter, rootCharacteristics, useTryAdvance);
+        }
+        else {
+            long sizeIfKnown = spliterator.getExactSizeIfKnown();
+            if (useTryAdvance) {
+                Consumer<T> addToDest = boxingAdapter.apply(dest::add);
+                int count = 0;
+                while (spliterator.tryAdvance(addToDest)) {
+                    ++count;
+                }
+
+                if (sizeIfKnown >= 0)
+                    assertEquals(sizeIfKnown, count);
+
+                // Assert that forEach now produces no elements
+                spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e)));
+
+                Spliterator<T> split = spliterator.trySplit();
+                assertNull(split);
+            }
+            else {
+                List<T> leafDest = new ArrayList<>();
+                Consumer<T> addToLeafDest = boxingAdapter.apply(leafDest::add);
+                spliterator.forEachRemaining(addToLeafDest);
+
+                if (sizeIfKnown >= 0)
+                    assertEquals(sizeIfKnown, leafDest.size());
+
+                // Assert that forEach now produces no elements
+                spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e)));
+
+                Spliterator<T> split = spliterator.trySplit();
+                assertNull(split);
+
+                dest.addAll(leafDest);
+            }
+        }
+    }
+
+    private static <T, S extends Spliterator<T>> void testSplitUntilNull(
+            Collection<T> exp,
+            Supplier<S> supplier,
+            UnaryOperator<Consumer<T>> boxingAdapter) {
+        Spliterator<T> s = supplier.get();
+        boolean isOrdered = s.hasCharacteristics(Spliterator.ORDERED);
+        assertSpliterator(s);
+
+        List<T> splits = new ArrayList<>();
+        Consumer<T> c = boxingAdapter.apply(splits::add);
+
+        testSplitUntilNull(new SplitNode<T>(c, s));
+        assertContents(splits, exp, isOrdered);
+    }
+
+    private static class SplitNode<T> {
+        // Constant for every node
+        final Consumer<T> c;
+        final int rootCharacteristics;
+
+        final Spliterator<T> s;
+
+        SplitNode(Consumer<T> c, Spliterator<T> s) {
+            this(c, s.characteristics(), s);
+        }
+
+        private SplitNode(Consumer<T> c, int rootCharacteristics, Spliterator<T> s) {
+            this.c = c;
+            this.rootCharacteristics = rootCharacteristics;
+            this.s = s;
+        }
+
+        SplitNode<T> fromSplit(Spliterator<T> split) {
+            return new SplitNode<>(c, rootCharacteristics, split);
+        }
+    }
+
+    /**
+     * Set the maximum stack capacity to 0.25MB. This should be more than enough to detect a bad spliterator
+     * while not unduly disrupting test infrastructure given the test data sizes that are used are small.
+     * Note that j.u.c.ForkJoinPool sets the max queue size to 64M (1 << 26).
+     */
+    private static final int MAXIMUM_STACK_CAPACITY = 1 << 18; // 0.25MB
+
+    private static <T> void testSplitUntilNull(SplitNode<T> e) {
+        // Use an explicit stack to avoid a StackOverflowException when testing a Spliterator
+        // that when repeatedly split produces a right-balanced (and maybe degenerate) tree, or
+        // for a spliterator that is badly behaved.
+        Deque<SplitNode<T>> stack = new ArrayDeque<>();
+        stack.push(e);
+
+        int iteration = 0;
+        while (!stack.isEmpty()) {
+            assertTrue(iteration++ < MAXIMUM_STACK_CAPACITY, "Exceeded maximum stack modification count of 1 << 18");
+
+            e = stack.pop();
+            Spliterator<T> parentAndRightSplit = e.s;
+
+            long parentEstimateSize = parentAndRightSplit.estimateSize();
+            assertTrue(parentEstimateSize >= 0,
+                       String.format("Split size estimate %d < 0", parentEstimateSize));
+
+            long parentSize = parentAndRightSplit.getExactSizeIfKnown();
+            Spliterator<T> leftSplit = parentAndRightSplit.trySplit();
+            if (leftSplit == null) {
+                parentAndRightSplit.forEachRemaining(e.c);
+                continue;
+            }
+
+            assertSpliterator(leftSplit, e.rootCharacteristics);
+            assertSpliterator(parentAndRightSplit, e.rootCharacteristics);
+
+            if (parentEstimateSize != Long.MAX_VALUE && leftSplit.estimateSize() > 0 && parentAndRightSplit.estimateSize() > 0) {
+                assertTrue(leftSplit.estimateSize() < parentEstimateSize,
+                           String.format("Left split size estimate %d >= parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize));
+                assertTrue(parentAndRightSplit.estimateSize() < parentEstimateSize,
+                            String.format("Right split size estimate %d >= parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize));
+            }
+            else {
+                assertTrue(leftSplit.estimateSize() <= parentEstimateSize,
+                    String.format("Left split size estimate %d > parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize));
+                assertTrue(parentAndRightSplit.estimateSize() <= parentEstimateSize,
+                    String.format("Right split size estimate %d > parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize));
+            }
+
+            long leftSize = leftSplit.getExactSizeIfKnown();
+            long rightSize = parentAndRightSplit.getExactSizeIfKnown();
+            if (parentSize >= 0 && leftSize >= 0 && rightSize >= 0)
+                assertEquals(parentSize, leftSize + rightSize,
+                             String.format("exact left split size %d + exact right split size %d != parent exact split size %d",
+                                           leftSize, rightSize, parentSize));
+
+            // Add right side to stack first so left side is popped off first
+            stack.push(e.fromSplit(parentAndRightSplit));
+            stack.push(e.fromSplit(leftSplit));
+        }
+    }
+
+    private static void assertSpliterator(Spliterator<?> s, int rootCharacteristics) {
+        if ((rootCharacteristics & Spliterator.SUBSIZED) != 0) {
+            assertTrue(s.hasCharacteristics(Spliterator.SUBSIZED),
+                       "Child split is not SUBSIZED when root split is SUBSIZED");
+        }
+        assertSpliterator(s);
+    }
+
+    private static void assertSpliterator(Spliterator<?> s) {
+        if (s.hasCharacteristics(Spliterator.SUBSIZED)) {
+            assertTrue(s.hasCharacteristics(Spliterator.SIZED));
+        }
+        if (s.hasCharacteristics(Spliterator.SIZED)) {
+            assertTrue(s.estimateSize() != Long.MAX_VALUE);
+            assertTrue(s.getExactSizeIfKnown() >= 0);
+        }
+        try {
+            s.getComparator();
+            assertTrue(s.hasCharacteristics(Spliterator.SORTED));
+        } catch (IllegalStateException e) {
+            assertFalse(s.hasCharacteristics(Spliterator.SORTED));
+        }
+    }
+
+    private static<T> void assertContents(Collection<T> actual, Collection<T> expected, boolean isOrdered) {
+        if (isOrdered) {
+            assertEquals(actual, expected);
+        }
+        else {
+            assertContentsUnordered(actual, expected);
+        }
+    }
+
+    private static<T> void assertContentsUnordered(Iterable<T> actual, Iterable<T> expected) {
+        assertEquals(toBoxedMultiset(actual), toBoxedMultiset(expected));
+    }
+
+    private static <T> Map<T, Integer> toBoxedMultiset(Iterable<T> c) {
+        Map<T, Integer> result = new HashMap<>();
+        c.forEach(e -> {
+            if (result.containsKey(e)) result.put(e, result.get(e) + 1);
+            else result.put(e, 1);
+        });
+        return result;
+    }
+}
--- a/test/java/util/concurrent/CompletableFuture/Basic.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/java/util/concurrent/CompletableFuture/Basic.java	Wed Apr 17 21:48:04 2013 -0700
@@ -486,40 +486,61 @@
             CompletableFuture<Integer> cf1 = supplyAsync(() -> 1);
             CompletableFuture<Integer> cf2 = supplyAsync(() -> 2);
             cf3 = cf1.applyToEither(cf2, (x) -> { check(x == 1 || x == 2); return x; });
+            checkCompletedNormally(cf3, new Object[] {1, 2});
             check(cf1.isDone() || cf2.isDone());
-            checkCompletedNormally(cf3, new Object[] {1, 2});
 
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> 2);
             cf3 = cf1.applyToEitherAsync(cf2, (x) -> { check(x == 1 || x == 2); return x; });
+            checkCompletedNormally(cf3, new Object[] {1, 2});
             check(cf1.isDone() || cf2.isDone());
-            checkCompletedNormally(cf3, new Object[] {1, 2});
 
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> 2);
             cf3 = cf1.applyToEitherAsync(cf2, (x) -> { check(x == 1 || x == 2); return x; }, executor);
+            checkCompletedNormally(cf3, new Object[] {1, 2});
             check(cf1.isDone() || cf2.isDone());
-            checkCompletedNormally(cf3, new Object[] {1, 2});
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
             cf2 = supplyAsync(() -> 2);
             cf3 = cf1.applyToEither(cf2, (x) -> { check(x == 2); return x; });
+            try { check(cf3.join() == 2); } catch (CompletionException x) { pass(); }
+            check(cf3.isDone());
             check(cf1.isDone() || cf2.isDone());
-            try { check(cf3.join() == 1); } catch (CompletionException x) { pass(); }
-            check(cf3.isDone());
 
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> { throw new RuntimeException(); });
             cf3 = cf1.applyToEitherAsync(cf2, (x) -> { check(x == 1); return x; });
-            check(cf1.isDone() || cf2.isDone());
             try { check(cf3.join() == 1); } catch (CompletionException x) { pass(); }
             check(cf3.isDone());
+            check(cf1.isDone() || cf2.isDone());
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
             cf2 = supplyAsync(() -> { throw new RuntimeException(); });
             cf3 = cf1.applyToEitherAsync(cf2, (x) -> { fail(); return x; });
+            checkCompletedExceptionally(cf3);
             check(cf1.isDone() || cf2.isDone());
-            checkCompletedExceptionally(cf3);
+
+            final Phaser cf3Done = new Phaser(2);
+            cf1 = supplyAsync(() -> { cf3Done.arriveAndAwaitAdvance(); return 1; });
+            cf2 = supplyAsync(() -> 2);
+            cf3 = cf1.applyToEither(cf2, (x) -> { check(x == 2); return x; });
+            checkCompletedNormally(cf3, 2);
+            checkCompletedNormally(cf2, 2);
+            check(!cf1.isDone());
+            cf3Done.arrive();
+            checkCompletedNormally(cf1, 1);
+            checkCompletedNormally(cf3, 2);
+
+            cf1 = supplyAsync(() -> 1);
+            cf2 = supplyAsync(() -> { cf3Done.arriveAndAwaitAdvance(); return 2; });
+            cf3 = cf1.applyToEitherAsync(cf2, (x) -> { check(x == 1); return x; });
+            checkCompletedNormally(cf3, 1);
+            checkCompletedNormally(cf1, 1);
+            check(!cf2.isDone());
+            cf3Done.arrive();
+            checkCompletedNormally(cf2, 2);
+            checkCompletedNormally(cf3, 1);
         } catch (Throwable t) { unexpected(t); }
 
         //----------------------------------------------------------------
@@ -531,45 +552,66 @@
             CompletableFuture<Integer> cf1 = supplyAsync(() -> 1);
             CompletableFuture<Integer> cf2 = supplyAsync(() -> 2);
             cf3 = cf1.acceptEither(cf2, (x) -> { check(x == 1 || x == 2); atomicInt.incrementAndGet(); });
+            checkCompletedNormally(cf3, null);
             check(cf1.isDone() || cf2.isDone());
-            checkCompletedNormally(cf3, null);
             check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> 2);
             cf3 = cf1.acceptEitherAsync(cf2, (x) -> { check(x == 1 || x == 2); atomicInt.incrementAndGet(); });
+            checkCompletedNormally(cf3, null);
             check(cf1.isDone() || cf2.isDone());
-            checkCompletedNormally(cf3, null);
             check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> 2);
             cf3 = cf2.acceptEitherAsync(cf1, (x) -> { check(x == 1 || x == 2); atomicInt.incrementAndGet(); }, executor);
+            checkCompletedNormally(cf3, null);
             check(cf1.isDone() || cf2.isDone());
-            checkCompletedNormally(cf3, null);
             check(atomicInt.get() == (before + 1));
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
             cf2 = supplyAsync(() -> 2);
             cf3 = cf2.acceptEitherAsync(cf1, (x) -> { check(x == 2); }, executor);
-            check(cf1.isDone() || cf2.isDone());
             try { check(cf3.join() == null); } catch (CompletionException x) { pass(); }
             check(cf3.isDone());
+            check(cf1.isDone() || cf2.isDone());
 
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> { throw new RuntimeException(); });
             cf3 = cf2.acceptEitherAsync(cf1, (x) -> { check(x == 1); });
-            check(cf1.isDone() || cf2.isDone());
             try { check(cf3.join() == null); } catch (CompletionException x) { pass(); }
             check(cf3.isDone());
+            check(cf1.isDone() || cf2.isDone());
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
             cf2 = supplyAsync(() -> { throw new RuntimeException(); });
             cf3 = cf2.acceptEitherAsync(cf1, (x) -> { fail(); });
+            checkCompletedExceptionally(cf3);
             check(cf1.isDone() || cf2.isDone());
-            checkCompletedExceptionally(cf3);
+
+            final Phaser cf3Done = new Phaser(2);
+            cf1 = supplyAsync(() -> { cf3Done.arriveAndAwaitAdvance(); return 1; });
+            cf2 = supplyAsync(() -> 2);
+            cf3 = cf1.acceptEither(cf2, (x) -> { check(x == 2); });
+            checkCompletedNormally(cf3, null);
+            checkCompletedNormally(cf2, 2);
+            check(!cf1.isDone());
+            cf3Done.arrive();
+            checkCompletedNormally(cf1, 1);
+            checkCompletedNormally(cf3, null);
+
+            cf1 = supplyAsync(() -> 1);
+            cf2 = supplyAsync(() -> { cf3Done.arriveAndAwaitAdvance(); return 2; });
+            cf3 = cf1.acceptEitherAsync(cf2, (x) -> { check(x == 1); });
+            checkCompletedNormally(cf3, null);
+            checkCompletedNormally(cf1, 1);
+            check(!cf2.isDone());
+            cf3Done.arrive();
+            checkCompletedNormally(cf2, 2);
+            checkCompletedNormally(cf3, null);
         } catch (Throwable t) { unexpected(t); }
 
         //----------------------------------------------------------------
@@ -581,51 +623,80 @@
             CompletableFuture<Void> cf1 = runAsync(() -> { });
             CompletableFuture<Void> cf2 = runAsync(() -> { });
             cf3 = cf1.runAfterEither(cf2, () -> { atomicInt.incrementAndGet(); });
+            checkCompletedNormally(cf3, null);
             check(cf1.isDone() || cf2.isDone());
-            checkCompletedNormally(cf3, null);
             check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
             cf1 = runAsync(() -> { });
             cf2 = runAsync(() -> { });
             cf3 = cf1.runAfterEitherAsync(cf2, () -> { atomicInt.incrementAndGet(); });
+            checkCompletedNormally(cf3, null);
             check(cf1.isDone() || cf2.isDone());
-            checkCompletedNormally(cf3, null);
             check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
             cf1 = runAsync(() -> { });
             cf2 = runAsync(() -> { });
             cf3 = cf2.runAfterEitherAsync(cf1, () -> { atomicInt.incrementAndGet(); }, executor);
+            checkCompletedNormally(cf3, null);
             check(cf1.isDone() || cf2.isDone());
-            checkCompletedNormally(cf3, null);
             check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
             cf1 = runAsync(() -> { throw new RuntimeException(); });
             cf2 = runAsync(() -> { });
             cf3 = cf2.runAfterEither(cf1, () -> { atomicInt.incrementAndGet(); });
+            try {
+                check(cf3.join() == null);
+                check(atomicInt.get() == (before + 1));
+            } catch (CompletionException x) { pass(); }
+            check(cf3.isDone());
             check(cf1.isDone() || cf2.isDone());
-            try { check(cf3.join() == null); } catch (CompletionException x) { pass(); }
-            check(cf3.isDone());
-            check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
             cf1 = runAsync(() -> { });
             cf2 = runAsync(() -> { throw new RuntimeException(); });
             cf3 = cf1.runAfterEitherAsync(cf2, () -> { atomicInt.incrementAndGet(); });
+            try {
+                check(cf3.join() == null);
+                check(atomicInt.get() == (before + 1));
+            } catch (CompletionException x) { pass(); }
+            check(cf3.isDone());
             check(cf1.isDone() || cf2.isDone());
-            try { check(cf3.join() == null); } catch (CompletionException x) { pass(); }
-            check(cf3.isDone());
-            check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
             cf1 = runAsync(() -> { throw new RuntimeException(); });
             cf2 = runAsync(() -> { throw new RuntimeException(); });
             cf3 = cf2.runAfterEitherAsync(cf1, () -> { atomicInt.incrementAndGet(); }, executor);
+            checkCompletedExceptionally(cf3);
             check(cf1.isDone() || cf2.isDone());
-            checkCompletedExceptionally(cf3);
             check(atomicInt.get() == before);
+
+            final Phaser cf3Done = new Phaser(2);
+            before = atomicInt.get();
+            cf1 = runAsync(() -> { cf3Done.arriveAndAwaitAdvance(); });
+            cf2 = runAsync(() -> { });
+            cf3 = cf1.runAfterEither(cf2, () -> { atomicInt.incrementAndGet(); });
+            checkCompletedNormally(cf3, null);
+            checkCompletedNormally(cf2, null);
+            check(!cf1.isDone());
+            check(atomicInt.get() == (before + 1));
+            cf3Done.arrive();
+            checkCompletedNormally(cf1, null);
+            checkCompletedNormally(cf3, null);
+
+            before = atomicInt.get();
+            cf1 = runAsync(() -> { });
+            cf2 = runAsync(() -> { cf3Done.arriveAndAwaitAdvance(); });
+            cf3 = cf1.runAfterEitherAsync(cf2, () -> { atomicInt.incrementAndGet(); });
+            checkCompletedNormally(cf3, null);
+            checkCompletedNormally(cf1, null);
+            check(!cf2.isDone());
+            check(atomicInt.get() == (before + 1));
+            cf3Done.arrive();
+            checkCompletedNormally(cf2, null);
+            checkCompletedNormally(cf3, null);
         } catch (Throwable t) { unexpected(t); }
 
         //----------------------------------------------------------------
@@ -670,16 +741,16 @@
         //----------------------------------------------------------------
         // anyOf tests
         //----------------------------------------------------------------
-        //try {
-        //    CompletableFuture<Object> cf3;
-        //    for (int k=0; k < 10; k++){
-        //        CompletableFuture<Integer> cf1 = supplyAsync(() -> 1);
-        //        CompletableFuture<Integer> cf2 = supplyAsync(() -> 2);
-        //        cf3 = CompletableFuture.anyOf(cf1, cf2);
-        //        check(cf1.isDone() || cf2.isDone());
-        //        checkCompletedNormally(cf3, new Object[] {1, 2});
-        //    }
-        //} catch (Throwable t) { unexpected(t); }
+        try {
+            CompletableFuture<Object> cf3;
+            for (int k=0; k < 10; k++){
+                CompletableFuture<Integer> cf1 = supplyAsync(() -> 1);
+                CompletableFuture<Integer> cf2 = supplyAsync(() -> 2);
+                cf3 = CompletableFuture.anyOf(cf1, cf2);
+                checkCompletedNormally(cf3, new Object[] {1, 2});
+                check(cf1.isDone() || cf2.isDone());
+            }
+        } catch (Throwable t) { unexpected(t); }
 
         //----------------------------------------------------------------
         // allOf tests
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,216 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.sun.tools.classfile.*;
+import com.sun.tools.jdeps.ClassFileReader;
+import static com.sun.tools.classfile.ConstantPool.*;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.FileVisitResult;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.SimpleFileVisitor;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.FutureTask;
+
+/*
+ * @test
+ * @bug 8010117
+ * @summary Verify if CallerSensitive methods are annotated with
+ *          sun.reflect.CallerSensitive annotation
+ * @build CallerSensitiveFinder MethodFinder
+ * @run main/othervm/timeout=900 -mx600m CallerSensitiveFinder
+ */
+public class CallerSensitiveFinder extends MethodFinder {
+    private static int numThreads = 3;
+    private static boolean verbose = false;
+    public static void main(String[] args) throws Exception {
+        List<Path> classes = new ArrayList<>();
+        String testclasses = System.getProperty("test.classes", ".");
+        int i = 0;
+        while (i < args.length) {
+            String arg = args[i++];
+            if (arg.equals("-v")) {
+                verbose = true;
+            } else {
+                Path p = Paths.get(testclasses, arg);
+                if (!p.toFile().exists()) {
+                    throw new IllegalArgumentException(arg + " does not exist");
+                }
+                classes.add(p);
+            }
+        }
+        if (classes.isEmpty()) {
+            classes.addAll(PlatformClassPath.getJREClasses());
+        }
+        final String method = "sun/reflect/Reflection.getCallerClass";
+        CallerSensitiveFinder csfinder = new CallerSensitiveFinder(method);
+
+        List<String> errors = csfinder.run(classes);
+        if (!errors.isEmpty()) {
+            throw new RuntimeException(errors.size() +
+                    " caller-sensitive methods are missing @CallerSensitive annotation");
+        }
+    }
+
+    private final List<String> csMethodsMissingAnnotation = new ArrayList<>();
+    public CallerSensitiveFinder(String... methods) {
+        super(methods);
+    }
+
+    public List<String> run(List<Path> classes) throws IOException, InterruptedException,
+            ExecutionException, ConstantPoolException
+    {
+        ExecutorService pool = Executors.newFixedThreadPool(numThreads);
+        for (Path path : classes) {
+            ClassFileReader reader = ClassFileReader.newInstance(path.toFile());
+            for (ClassFile cf : reader.getClassFiles()) {
+                String classFileName = cf.getName();
+                // for each ClassFile
+                //    parse constant pool to find matching method refs
+                //      parse each method (caller)
+                //      - visit and find method references matching the given method name
+                pool.submit(getTask(cf));
+            }
+        }
+        waitForCompletion();
+        pool.shutdown();
+        return csMethodsMissingAnnotation;
+    }
+
+    private static final String CALLER_SENSITIVE_ANNOTATION = "Lsun/reflect/CallerSensitive;";
+    private static boolean isCallerSensitive(Method m, ConstantPool cp)
+            throws ConstantPoolException
+    {
+        RuntimeAnnotations_attribute attr =
+            (RuntimeAnnotations_attribute)m.attributes.get(Attribute.RuntimeVisibleAnnotations);
+        int index = 0;
+        if (attr != null) {
+            for (int i = 0; i < attr.annotations.length; i++) {
+                Annotation ann = attr.annotations[i];
+                String annType = cp.getUTF8Value(ann.type_index);
+                if (CALLER_SENSITIVE_ANNOTATION.equals(annType)) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    public void referenceFound(ClassFile cf, Method m, Set<Integer> refs)
+            throws ConstantPoolException
+    {
+        String name = String.format("%s#%s %s", cf.getName(),
+                                    m.getName(cf.constant_pool),
+                                    m.descriptor.getValue(cf.constant_pool));
+        if (!CallerSensitiveFinder.isCallerSensitive(m, cf.constant_pool)) {
+            csMethodsMissingAnnotation.add(name);
+            System.err.println("Missing @CallerSensitive: " + name);
+        } else {
+            if (verbose) {
+                System.out.format("@CS  %s%n", name);
+            }
+        }
+    }
+
+    private final List<FutureTask<String>> tasks = new ArrayList<FutureTask<String>>();
+    private FutureTask<String> getTask(final ClassFile cf) {
+        FutureTask<String> task = new FutureTask<String>(new Callable<String>() {
+            public String call() throws Exception {
+                return parse(cf);
+            }
+        });
+        tasks.add(task);
+        return task;
+    }
+
+    private void waitForCompletion() throws InterruptedException, ExecutionException {
+        for (FutureTask<String> t : tasks) {
+            String s = t.get();
+        }
+        System.out.println("Parsed " + tasks.size() + " classfiles");
+    }
+
+    static class PlatformClassPath {
+        static List<Path> getJREClasses() throws IOException {
+            List<Path> result = new ArrayList<Path>();
+            Path home = Paths.get(System.getProperty("java.home"));
+
+            if (home.endsWith("jre")) {
+                // jar files in <javahome>/jre/lib
+                // skip <javahome>/lib
+                result.addAll(addJarFiles(home.resolve("lib")));
+            } else if (home.resolve("lib").toFile().exists()) {
+                // either a JRE or a jdk build image
+                File classes = home.resolve("classes").toFile();
+                if (classes.exists() && classes.isDirectory()) {
+                    // jdk build outputdir
+                    result.add(classes.toPath());
+                }
+                // add other JAR files
+                result.addAll(addJarFiles(home.resolve("lib")));
+            } else {
+                throw new RuntimeException("\"" + home + "\" not a JDK home");
+            }
+            return result;
+        }
+
+        static List<Path> addJarFiles(final Path root) throws IOException {
+            final List<Path> result = new ArrayList<Path>();
+            final Path ext = root.resolve("ext");
+            Files.walkFileTree(root, new SimpleFileVisitor<Path>() {
+                @Override
+                public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs)
+                        throws IOException {
+                    if (dir.equals(root) || dir.equals(ext)) {
+                        return FileVisitResult.CONTINUE;
+                    } else {
+                        // skip other cobundled JAR files
+                        return FileVisitResult.SKIP_SUBTREE;
+                    }
+                }
+
+                @Override
+                public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
+                        throws IOException {
+                    File f = file.toFile();
+                    String fn = f.getName();
+                    // parse alt-rt.jar as well
+                    if (fn.endsWith(".jar") && !fn.equals("jfxrt.jar")) {
+                        result.add(file);
+                    }
+                    return FileVisitResult.CONTINUE;
+                }
+            });
+            return result;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/reflect/CallerSensitive/MethodFinder.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.*;
+import com.sun.tools.classfile.*;
+import static com.sun.tools.classfile.ConstantPool.*;
+import com.sun.tools.classfile.Instruction.TypeKind;
+
+/**
+ * MethodFinder utility class to find references to the given methods.
+ */
+public abstract class MethodFinder {
+    final List<String> methods;
+    public MethodFinder(String... methods) {
+        this.methods = Arrays.asList(methods);
+    }
+
+    /**
+     * A callback method will be invoked when a method referencing
+     * any of the lookup methods.
+     *
+     * @param cf ClassFile
+     * @param m Method
+     * @param refs Set of constant pool indices that reference the methods
+     *             matching the given lookup method names
+     */
+    public abstract void referenceFound(ClassFile cf, Method m, Set<Integer> refs)
+            throws ConstantPoolException;
+
+    public String parse(ClassFile cf) throws ConstantPoolException {
+        List<Integer> cprefs = new ArrayList<Integer>();
+        int index = 1;
+        for (ConstantPool.CPInfo cpInfo : cf.constant_pool.entries()) {
+            if (cpInfo.accept(cpVisitor, null)) {
+                cprefs.add(index);
+            }
+            index += cpInfo.size();
+        }
+
+        if (!cprefs.isEmpty()) {
+            for (Method m : cf.methods) {
+                Set<Integer> refs = new HashSet<Integer>();
+                Code_attribute c_attr = (Code_attribute) m.attributes.get(Attribute.Code);
+                if (c_attr != null) {
+                    for (Instruction instr : c_attr.getInstructions()) {
+                        int idx = instr.accept(codeVisitor, cprefs);
+                        if (idx > 0) {
+                            refs.add(idx);
+                        }
+                    }
+                }
+                if (refs.size() > 0) {
+                    referenceFound(cf, m, refs);
+                }
+            }
+        }
+        return cprefs.isEmpty() ? "" : cf.getName();
+    }
+
+    private ConstantPool.Visitor<Boolean,Void> cpVisitor =
+            new ConstantPool.Visitor<Boolean,Void>()
+    {
+        private boolean matches(CPRefInfo info) {
+            try {
+                CONSTANT_NameAndType_info nat = info.getNameAndTypeInfo();
+                return matches(info.getClassName(), nat.getName(), nat.getType());
+            } catch (ConstantPoolException ex) {
+                return false;
+            }
+        }
+
+        private boolean matches(String cn, String name, String type) {
+            return methods.contains(cn + "." + name);
+        }
+
+        public Boolean visitClass(CONSTANT_Class_info info, Void p) {
+            return false;
+        }
+
+        public Boolean visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, Void p) {
+            return matches(info);
+        }
+
+        public Boolean visitMethodref(CONSTANT_Methodref_info info, Void p) {
+            return matches(info);
+        }
+
+        public Boolean visitDouble(CONSTANT_Double_info info, Void p) {
+            return false;
+        }
+
+        public Boolean visitFieldref(CONSTANT_Fieldref_info info, Void p) {
+            return false;
+        }
+
+        public Boolean visitFloat(CONSTANT_Float_info info, Void p) {
+            return false;
+        }
+
+        public Boolean visitInteger(CONSTANT_Integer_info info, Void p) {
+            return false;
+        }
+
+        public Boolean visitInvokeDynamic(CONSTANT_InvokeDynamic_info info, Void p) {
+            return false;
+        }
+
+        public Boolean visitLong(CONSTANT_Long_info info, Void p) {
+            return false;
+        }
+
+        public Boolean visitNameAndType(CONSTANT_NameAndType_info info, Void p) {
+            return false;
+        }
+
+        public Boolean visitMethodHandle(CONSTANT_MethodHandle_info info, Void p) {
+            return false;
+        }
+
+        public Boolean visitMethodType(CONSTANT_MethodType_info info, Void p) {
+            return false;
+        }
+
+        public Boolean visitString(CONSTANT_String_info info, Void p) {
+            return false;
+        }
+
+        public Boolean visitUtf8(CONSTANT_Utf8_info info, Void p) {
+            return false;
+        }
+    };
+
+    private Instruction.KindVisitor<Integer, List<Integer>> codeVisitor =
+            new Instruction.KindVisitor<Integer, List<Integer>>()
+    {
+        public Integer visitNoOperands(Instruction instr, List<Integer> p) {
+            return 0;
+        }
+
+        public Integer visitArrayType(Instruction instr, TypeKind kind, List<Integer> p) {
+            return 0;
+        }
+
+        public Integer visitBranch(Instruction instr, int offset, List<Integer> p) {
+            return 0;
+        }
+
+        public Integer visitConstantPoolRef(Instruction instr, int index, List<Integer> p) {
+            return p.contains(index) ? index : 0;
+        }
+
+        public Integer visitConstantPoolRefAndValue(Instruction instr, int index, int value, List<Integer> p) {
+            return p.contains(index) ? index : 0;
+        }
+
+        public Integer visitLocal(Instruction instr, int index, List<Integer> p) {
+            return 0;
+        }
+
+        public Integer visitLocalAndValue(Instruction instr, int index, int value, List<Integer> p) {
+            return 0;
+        }
+
+        public Integer visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets, List<Integer> p) {
+            return 0;
+        }
+
+        public Integer visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets, List<Integer> p) {
+            return 0;
+        }
+
+        public Integer visitValue(Instruction instr, int value, List<Integer> p) {
+            return 0;
+        }
+
+        public Integer visitUnknown(Instruction instr, List<Integer> p) {
+            return 0;
+        }
+    };
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/reflect/CallerSensitive/MissingCallerSensitive.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+/*
+ * @test
+ * @bug 8010117
+ * @summary Test CallerSensitiveFinder to find missing annotation
+ * @compile -XDignore.symbol.file MissingCallerSensitive.java
+ * @build CallerSensitiveFinder MethodFinder
+ * @run main MissingCallerSensitive
+ */
+
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.*;
+public class MissingCallerSensitive {
+    public static void main(String[] args) throws Exception {
+        String testclasses = System.getProperty("test.classes", ".");
+        List<Path> classes = new ArrayList<>();
+        classes.add(Paths.get(testclasses, "MissingCallerSensitive.class"));
+
+        final String method = "sun/reflect/Reflection.getCallerClass";
+        CallerSensitiveFinder csfinder = new CallerSensitiveFinder(method);
+        List<String> errors = csfinder.run(classes);
+        if (errors.size() != 1) {
+            throw new RuntimeException("Unexpected number of methods found: " + errors.size());
+        }
+        String m = errors.get(0);
+        if (!m.startsWith("MissingCallerSensitive#missingCallerSensitiveAnnotation")) {
+            throw new RuntimeException("Unexpected method missing annotation: " + m);
+        }
+    }
+
+    @sun.reflect.CallerSensitive
+    public ClassLoader getCallerLoader() {
+        Class<?> c = sun.reflect.Reflection.getCallerClass();
+        return c.getClassLoader();
+    }
+
+    public ClassLoader missingCallerSensitiveAnnotation() {
+        Class<?> c = sun.reflect.Reflection.getCallerClass();
+        return c.getClassLoader();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/reflect/Reflection/GetCallerClass.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package boot;
+
+public class GetCallerClass {
+    @sun.reflect.CallerSensitive
+    public ClassLoader getCallerLoader() {
+        Class<?> c = sun.reflect.Reflection.getCallerClass();
+        return c.getClassLoader();
+    }
+
+    public ClassLoader missingCallerSensitiveAnnotation() {
+        Class<?> c = sun.reflect.Reflection.getCallerClass();
+        return c.getClassLoader();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/reflect/Reflection/GetCallerClassTest.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import boot.GetCallerClass;
+import java.lang.reflect.*;
+import sun.reflect.CallerSensitive;
+import sun.reflect.Reflection;
+
+public class GetCallerClassTest {
+    private final GetCallerClass gcc;   // boot.GetCallerClass is in bootclasspath
+    GetCallerClassTest() {
+        this.gcc = new GetCallerClass();
+    }
+
+    public static void main(String[] args) throws Exception {
+        GetCallerClassTest gcct = new GetCallerClassTest();
+        // ensure methods are annotated with @CallerSensitive
+        ensureAnnotationPresent(boot.GetCallerClass.class, "getCallerLoader", true);
+        ensureAnnotationPresent(GetCallerClassTest.class, "testNonSystemMethod", false);
+        // call Reflection.getCallerClass from bootclasspath with and without @CS
+        gcct.testCallerSensitiveMethods();
+        // call Reflection.getCallerClass from classpath with @CS
+        gcct.testNonSystemMethod();
+    }
+
+    private static void ensureAnnotationPresent(Class<?> c, String name, boolean cs)
+        throws NoSuchMethodException
+    {
+        Method m = c.getDeclaredMethod(name);
+        if (!m.isAnnotationPresent(CallerSensitive.class)) {
+            throw new RuntimeException("@CallerSensitive not present in method " + m);
+        }
+        if (Reflection.isCallerSensitive(m) != cs) {
+            throw new RuntimeException("Unexpected: isCallerSensitive returns " +
+                Reflection.isCallerSensitive(m));
+        }
+    }
+
+    private void testCallerSensitiveMethods() {
+        try {
+            ClassLoader cl = gcc.getCallerLoader();
+            if (cl != GetCallerClassTest.class.getClassLoader()) {
+                throw new RuntimeException("mismatched class loader");
+            }
+            gcc.missingCallerSensitiveAnnotation();
+            throw new RuntimeException("getCallerLoader not marked with @CallerSensitive");
+        } catch (InternalError e) {
+            StackTraceElement[] stackTrace = e.getStackTrace();
+            checkStackTrace(stackTrace, e);
+            if (!stackTrace[1].getClassName().equals(GetCallerClass.class.getName()) ||
+                !stackTrace[1].getMethodName().equals("missingCallerSensitiveAnnotation")) {
+                throw new RuntimeException("Unexpected error: " + e.getMessage(), e);
+            }
+            if (!stackTrace[2].getClassName().equals(GetCallerClassTest.class.getName()) ||
+                !stackTrace[2].getMethodName().equals("testCallerSensitiveMethods")) {
+                throw new RuntimeException("Unexpected error: " + e.getMessage(), e);
+            }
+            System.out.println("Expected error: " + e.getMessage());
+        }
+    }
+
+    @CallerSensitive
+    private void testNonSystemMethod() {
+        try {
+            Class<?> c = Reflection.getCallerClass();
+            throw new RuntimeException("@CallerSensitive testNonSystemMethods not supported");
+        } catch (InternalError e) {
+            StackTraceElement[] stackTrace = e.getStackTrace();
+            checkStackTrace(stackTrace, e);
+            if (!stackTrace[1].getClassName().equals(GetCallerClassTest.class.getName()) ||
+                !stackTrace[1].getMethodName().equals("testNonSystemMethod")) {
+                throw new RuntimeException("Unexpected error: " + e.getMessage(), e);
+            }
+            if (!stackTrace[2].getClassName().equals(GetCallerClassTest.class.getName()) ||
+                !stackTrace[2].getMethodName().equals("main")) {
+                throw new RuntimeException("Unexpected error: " + e.getMessage(), e);
+            }
+            System.out.println("Expected error: " + e.getMessage());
+        }
+    }
+
+    private void checkStackTrace(StackTraceElement[] stackTrace, Error e) {
+        if (stackTrace.length < 3) {
+            throw new RuntimeException("Unexpected error: " + e.getMessage(), e);
+        }
+
+        if (!stackTrace[0].getClassName().equals("sun.reflect.Reflection") ||
+            !stackTrace[0].getMethodName().equals("getCallerClass")) {
+            throw new RuntimeException("Unexpected error: " + e.getMessage(), e);
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/reflect/Reflection/GetCallerClassTest.sh	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,68 @@
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# @test
+# @bug 8010117
+# @summary Test if the VM enforces sun.reflect.Reflection.getCallerClass 
+#          be called by methods annotated with sun.reflect.CallerSensitive
+#
+# @run shell GetCallerClassTest.sh
+
+if [ "${TESTSRC}" = "" ]
+then
+  echo "TESTSRC not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+echo "TESTSRC=${TESTSRC}"
+if [ "${TESTJAVA}" = "" ]
+then
+  echo "TESTJAVA not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+echo "TESTJAVA=${TESTJAVA}"
+if [ "${COMPILEJAVA}" = "" ]
+then
+  COMPILEJAVA="${TESTJAVA}"
+fi
+echo "COMPILEJAVA=${COMPILEJAVA}"
+if [ "${TESTCLASSES}" = "" ]
+then
+  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+BCP=${TESTCLASSES}/bcp
+rm -rf ${BCP}
+mkdir ${BCP}
+
+# Compile GetCallerClass in bootclasspath
+${COMPILEJAVA}/bin/javac ${TESTTOOLVMOPTS} \
+     -XDignore.symbol.file \
+     -d ${BCP} ${TESTSRC}/GetCallerClass.java  || exit 1
+
+${COMPILEJAVA}/bin/javac ${TESTTOOLVMOPTS} \
+     -XDignore.symbol.file -Xbootclasspath/a:${BCP} \
+     -d ${TESTCLASSES} ${TESTSRC}/GetCallerClassTest.java  || exit 2
+
+${TESTJAVA}/bin/java ${TESTVMOPTS} -Xbootclasspath/a:${BCP} \
+     -cp ${TESTCLASSES} GetCallerClassTest || exit 3
--- a/test/sun/security/ec/TestEC.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/sun/security/ec/TestEC.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -21,6 +21,11 @@
  * questions.
  */
 
+//
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+//
+
 /**
  * @test
  * @bug 6840752
@@ -30,7 +35,7 @@
  * @library ../pkcs11/sslecc
  * @library ../../../java/security/testlibrary
  * @compile -XDignore.symbol.file TestEC.java
- * @run main TestEC
+ * @run main/othervm TestEC
  */
 
 import java.security.NoSuchProviderException;
--- a/test/sun/security/krb5/MicroTime.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/sun/security/krb5/MicroTime.java	Wed Apr 17 21:48:04 2013 -0700
@@ -22,7 +22,7 @@
  */
 /*
  * @test
- * @bug 6882687
+ * @bug 6882687 8011124
  * @summary KerberosTime too imprecise
  */
 
@@ -32,11 +32,11 @@
     public static void main(String[] args) throws Exception {
         // We count how many different KerberosTime values
         // can be acquired within one second.
-        KerberosTime t1 = new KerberosTime(true);
+        KerberosTime t1 = KerberosTime.now();
         KerberosTime last = t1;
         int count = 0;
         while (true) {
-            KerberosTime t2 = new KerberosTime(true);
+            KerberosTime t2 = KerberosTime.now();
             if (t2.getTime() - t1.getTime() > 1000) break;
             if (!last.equals(t2)) {
                 last = t2;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/krb5/name/Immutable.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8005460
+ * @summary [findbugs] Probably returned array should be cloned
+ */
+
+import sun.security.krb5.PrincipalName;
+
+public class Immutable {
+    public static void main(String[] args) throws Exception {
+        PrincipalName pn1 = new PrincipalName("host/service@REALM");
+        PrincipalName pn2 = (PrincipalName)pn1.clone();
+        pn1.getNameStrings()[0] = "http";
+        if (!pn1.equals(pn2)) {
+            throw new Exception();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/pkcs/pkcs9/UnknownAttribute.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8011867
+ * @summary Accept unknown PKCS #9 attributes
+ */
+
+import java.io.*;
+import java.util.Arrays;
+
+import sun.misc.HexDumpEncoder;
+import sun.security.pkcs.PKCS9Attribute;
+import sun.security.util.DerValue;
+import sun.security.util.ObjectIdentifier;
+
+public class UnknownAttribute {
+
+    public static void main(String[] args) throws Exception {
+        // Unknown attr
+        PKCS9Attribute p1 = new PKCS9Attribute(
+                PKCS9Attribute.CHALLENGE_PASSWORD_STR, "t0p5ecr3t");
+        if (!p1.isKnown()) {
+            throw new Exception();
+        }
+        // Unknown attr from DER
+        byte[] data = {
+                0x30, 0x08,                 // SEQUENCE OF
+                0x06, 0x02, 0x2A, 0x03,     // OID 1.2.3 and
+                0x31, 0x02, 0x05, 0x00      // an empty SET
+        };
+        PKCS9Attribute p2 = new PKCS9Attribute(new DerValue(data));
+        if (p2.isKnown()) {
+            throw new Exception();
+        }
+        ByteArrayOutputStream bout = new ByteArrayOutputStream();
+        p2.derEncode(bout);
+        new HexDumpEncoder().encodeBuffer(bout.toByteArray(), System.err);
+        if (!Arrays.equals(data, bout.toByteArray())) {
+            throw new Exception();
+        }
+        // Unknown attr from value
+        try {
+            new PKCS9Attribute(new ObjectIdentifier("1.2.3"), "hello");
+            throw new Exception();
+        } catch (IllegalArgumentException iae) {
+            // Good. Unknown attr must have byte[] value type
+        }
+        PKCS9Attribute p3 = new PKCS9Attribute(
+                new ObjectIdentifier("1.2.3"), new byte[]{0x31,0x02,0x05,0x00});
+        if (p3.isKnown()) {
+            throw new Exception();
+        }
+        bout = new ByteArrayOutputStream();
+        p3.derEncode(bout);
+        if (!Arrays.equals(data, bout.toByteArray())) {
+            throw new Exception();
+        }
+    }
+}
--- a/test/sun/security/pkcs11/fips/CipherTest.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/sun/security/pkcs11/fips/CipherTest.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -147,6 +147,25 @@
             CS_16("TLS_DH_anon_WITH_AES_128_CBC_SHA256",     0x0303, 0xFFFF),
             CS_17("TLS_RSA_WITH_NULL_SHA256",                0x0303, 0xFFFF),
 
+            CS_20("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", 0x0303, 0xFFFF),
+            CS_21("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", 0x0303, 0xFFFF),
+            CS_22("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",   0x0303, 0xFFFF),
+            CS_23("TLS_RSA_WITH_AES_256_GCM_SHA384",         0x0303, 0xFFFF),
+            CS_24("TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384",  0x0303, 0xFFFF),
+            CS_25("TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384",    0x0303, 0xFFFF),
+            CS_26("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",     0x0303, 0xFFFF),
+            CS_27("TLS_DHE_DSS_WITH_AES_256_GCM_SHA384",     0x0303, 0xFFFF),
+
+            CS_28("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",   0x0303, 0xFFFF),
+            CS_29("TLS_RSA_WITH_AES_128_GCM_SHA256",         0x0303, 0xFFFF),
+            CS_30("TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",  0x0303, 0xFFFF),
+            CS_31("TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",    0x0303, 0xFFFF),
+            CS_32("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",     0x0303, 0xFFFF),
+            CS_33("TLS_DHE_DSS_WITH_AES_128_GCM_SHA256",     0x0303, 0xFFFF),
+
+            CS_34("TLS_DH_anon_WITH_AES_256_GCM_SHA384",     0x0303, 0xFFFF),
+            CS_35("TLS_DH_anon_WITH_AES_128_GCM_SHA256",     0x0303, 0xFFFF),
+
             // cipher suites obsoleted since TLS 1.2
             CS_50("SSL_RSA_WITH_DES_CBC_SHA",                0x0000, 0x0303),
             CS_51("SSL_DHE_RSA_WITH_DES_CBC_SHA",            0x0000, 0x0303),
--- a/test/sun/security/pkcs11/sslecc/CipherTest.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/sun/security/pkcs11/sslecc/CipherTest.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -147,6 +147,25 @@
             CS_16("TLS_DH_anon_WITH_AES_128_CBC_SHA256",     0x0303, 0xFFFF),
             CS_17("TLS_RSA_WITH_NULL_SHA256",                0x0303, 0xFFFF),
 
+            CS_20("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", 0x0303, 0xFFFF),
+            CS_21("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", 0x0303, 0xFFFF),
+            CS_22("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",   0x0303, 0xFFFF),
+            CS_23("TLS_RSA_WITH_AES_256_GCM_SHA384",         0x0303, 0xFFFF),
+            CS_24("TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384",  0x0303, 0xFFFF),
+            CS_25("TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384",    0x0303, 0xFFFF),
+            CS_26("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",     0x0303, 0xFFFF),
+            CS_27("TLS_DHE_DSS_WITH_AES_256_GCM_SHA384",     0x0303, 0xFFFF),
+
+            CS_28("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",   0x0303, 0xFFFF),
+            CS_29("TLS_RSA_WITH_AES_128_GCM_SHA256",         0x0303, 0xFFFF),
+            CS_30("TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",  0x0303, 0xFFFF),
+            CS_31("TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",    0x0303, 0xFFFF),
+            CS_32("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",     0x0303, 0xFFFF),
+            CS_33("TLS_DHE_DSS_WITH_AES_128_GCM_SHA256",     0x0303, 0xFFFF),
+
+            CS_34("TLS_DH_anon_WITH_AES_256_GCM_SHA384",     0x0303, 0xFFFF),
+            CS_35("TLS_DH_anon_WITH_AES_128_GCM_SHA256",     0x0303, 0xFFFF),
+
             // cipher suites obsoleted since TLS 1.2
             CS_50("SSL_RSA_WITH_DES_CBC_SHA",                0x0000, 0x0303),
             CS_51("SSL_DHE_RSA_WITH_DES_CBC_SHA",            0x0000, 0x0303),
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/provider/SecureRandom/StrongSecureRandom.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,232 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 6425477
+ * @summary Better support for generation of high entropy random numbers
+ * @run main/othervm StrongSecureRandom
+ */
+import java.security.*;
+import java.util.*;
+
+/**
+ * This test assumes that the standard Sun providers are installed.
+ */
+public class StrongSecureRandom {
+
+    private static String os = System.getProperty("os.name", "unknown");
+
+    private static void testDefaultEgd() throws Exception {
+        // No SecurityManager installed.
+        String s = Security.getProperty("securerandom.source");
+
+        System.out.println("Testing:  default EGD: " + s);
+        if (!s.equals("file:/dev/random")) {
+            throw new Exception("Default is not 'file:/dev/random'");
+        }
+    }
+
+    private static void testSHA1PRNGImpl() throws Exception {
+        SecureRandom sr;
+        byte[] ba;
+
+        String urandom = "file:/dev/urandom";
+
+        System.out.println("Testing new SeedGenerator and EGD");
+
+        Security.setProperty("securerandom.source", urandom);
+        if (!Security.getProperty("securerandom.source").equals(urandom)) {
+            throw new Exception("Couldn't set securerandom.source");
+        }
+
+        /*
+         * Take out a large number of bytes in hopes of blocking.
+         * Don't expect this to happen, unless something is broken on Linux
+         */
+        sr = SecureRandom.getInstance("SHA1PRNG");
+        if (!sr.getAlgorithm().equals("SHA1PRNG")) {
+            throw new Exception("sr.getAlgorithm(): " + sr.getAlgorithm());
+        }
+
+        ba = sr.generateSeed(4096);
+        sr.nextBytes(ba);
+        sr.setSeed(ba);
+    }
+
+    private static void testNativePRNGImpls() throws Exception {
+        SecureRandom sr;
+        byte[] ba;
+
+        System.out.println("Testing new NativePRNGImpls");
+
+        if (os.startsWith("Windows")) {
+            System.out.println("Skip windows testing.");
+            return;
+        }
+
+        System.out.println("    Testing regular");
+        sr = SecureRandom.getInstance("NativePRNG");
+        if (!sr.getAlgorithm().equals("NativePRNG")) {
+            throw new Exception("sr.getAlgorithm(): " + sr.getAlgorithm());
+        }
+        ba = sr.generateSeed(1);
+        sr.nextBytes(ba);
+        sr.setSeed(ba);
+
+        System.out.println("    Testing NonBlocking");
+        sr = SecureRandom.getInstance("NativePRNGNonBlocking");
+        if (!sr.getAlgorithm().equals("NativePRNGNonBlocking")) {
+            throw new Exception("sr.getAlgorithm(): " + sr.getAlgorithm());
+        }
+        ba = sr.generateSeed(1);
+        sr.nextBytes(ba);
+        sr.setSeed(ba);
+
+        if (os.equals("Linux")) {
+            System.out.println("Skip Linux blocking test.");
+            return;
+        }
+
+        System.out.println("    Testing Blocking");
+        sr = SecureRandom.getInstance("NativePRNGBlocking");
+        if (!sr.getAlgorithm().equals("NativePRNGBlocking")) {
+            throw new Exception("sr.getAlgorithm(): " + sr.getAlgorithm());
+        }
+        ba = sr.generateSeed(1);
+        sr.nextBytes(ba);
+        sr.setSeed(ba);
+    }
+
+    private static void testStrongInstance(boolean expected) throws Exception {
+
+        boolean result = (SecureRandom.getStrongSecureRandom() != null);
+
+        if (expected != result) {
+            throw new Exception("Received: " + result);
+        }
+    }
+
+    /*
+     * This test assumes that the standard providers are installed.
+     */
+    private static void testProperty(String property, boolean expected)
+            throws Exception {
+
+        System.out.println("Testing: '" + property + "' " + expected);
+
+        Security.setProperty("securerandom.strongAlgorithms", property);
+        testStrongInstance(expected);
+    }
+
+    private static void testProperties() throws Exception {
+        // Sets securerandom.strongAlgorithms, and then tests various combos.
+        testProperty("", false);
+
+        testProperty("SHA1PRNG", true);
+        testProperty(" SHA1PRNG", true);
+        testProperty("SHA1PRNG ", true);
+        testProperty(" SHA1PRNG ", true);
+
+        // Impls are case-insenstive, providers are sensitive.
+        testProperty("SHA1PRNG:SUN", true);
+        testProperty("Sha1PRNG:SUN", true);
+        testProperty("SHA1PRNG:Sun", false);
+
+        testProperty(" SHA1PRNG:SUN", true);
+        testProperty("SHA1PRNG:SUN ", true);
+        testProperty(" SHA1PRNG:SUN ", true);
+
+        testProperty(" SHA1PRNG:SUn", false);
+        testProperty("SHA1PRNG:SUn ", false);
+        testProperty(" SHA1PRNG:SUn ", false);
+
+        testProperty(",,,SHA1PRNG", true);
+        testProperty(",,, SHA1PRNG", true);
+        testProperty(" , , ,SHA1PRNG ", true);
+
+        testProperty(",,,, SHA1PRNG ,,,", true);
+        testProperty(",,,, SHA1PRNG:SUN ,,,", true);
+        testProperty(",,,, SHA1PRNG:SUn ,,,", false);
+
+        testProperty(",,,SHA1PRNG:Sun,, SHA1PRNG:SUN", true);
+        testProperty(",,,Sha1PRNG:Sun, SHA1PRNG:SUN", true);
+        testProperty(" SHA1PRNG:Sun, Sha1PRNG:Sun,,,,Sha1PRNG:SUN", true);
+
+        testProperty(",,,SHA1PRNG:Sun,, SHA1PRNG:SUn", false);
+        testProperty(",,,Sha1PRNG:Sun, SHA1PRNG:SUn", false);
+        testProperty(" SHA1PRNG:Sun, Sha1PRNG:Sun,,,,Sha1PRNG:SUn", false);
+
+        testProperty(
+                " @#%,%$#:!%^, NativePRNG:Sun, Sha1PRNG:Sun,,Sha1PRNG:SUN",
+                true);
+        testProperty(" @#%,%$#!%^, NativePRNG:Sun, Sha1PRNG:Sun,,Sha1PRNG:SUn",
+                false);
+    }
+
+    /*
+     * Linux tends to block, so ignore anything that reads /dev/random.
+     */
+    private static void handleLinuxRead(SecureRandom sr) throws Exception {
+        if (os.equals("Linux")) {
+            if (!sr.getAlgorithm().equalsIgnoreCase("NativePRNGBlocking")) {
+                sr.nextBytes(new byte[34]);
+            }
+        } else {
+            sr.nextBytes(new byte[34]);
+            sr.generateSeed(34);
+            sr.setSeed(new byte[34]);
+        }
+    }
+
+    /*
+     * This is duplicating stuff above, but just iterate over all impls
+     * just in case we missed something.
+     */
+    private static void testAllImpls() throws Exception {
+        System.out.print("Testing:  AllImpls:  ");
+
+        Iterator<String> i = Security.getAlgorithms("SecureRandom").iterator();
+
+        while (i.hasNext()) {
+            String s = i.next();
+            System.out.print("/" + s);
+            SecureRandom sr = SecureRandom.getInstance(s);
+
+            handleLinuxRead(sr);
+            handleLinuxRead(sr);
+        }
+        System.out.println("/");
+    }
+
+    public static void main(String args[]) throws Exception {
+        testDefaultEgd();
+        testSHA1PRNGImpl();
+        testNativePRNGImpls();
+        testAllImpls();
+
+        // test default.
+        testStrongInstance(true);
+        testProperties();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/provider/SecureRandom/StrongSeedReader.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,81 @@
+ /*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 6425477
+ * @summary Better support for generation of high entropy random numbers
+ * @run main/othervm StrongSeedReader
+ */
+
+import java.io.*;
+import java.net.*;
+import java.security.SecureRandom;
+
+/**
+ * A simple test which takes into account knowledge about the underlying
+ * implementation. This may change if the implementations change.
+ *
+ * Create a new EGD file with known bytes, then set the EGD System property. The
+ * data read should be the same as what was written.
+ */
+public class StrongSeedReader {
+
+    public static void main(String[] args) throws Exception {
+        // Skip Windows, the SHA1PRNG uses CryptGenRandom.
+        if (System.getProperty("os.name", "unknown").startsWith("Windows")) {
+            return;
+        }
+
+        File file = null;
+        try {
+            file = new File(System.getProperty("java.io.tmpdir") +
+                    "StrongSeedReader.tmpdata");
+
+            // write a bunch of 0's to the file.
+            FileOutputStream fos = new FileOutputStream(file);
+            fos.write(new byte[2048]);
+
+            System.setProperty("java.security.egd", file.toURI().toString());
+            testSeed("NativePRNG");
+            testSeed("SHA1PRNG");
+        } finally {
+            if (file != null) {
+                file.delete();
+            }
+        }
+    }
+
+    private static void testSeed(String alg) throws Exception {
+        System.out.println("Testing: " + alg);
+        SecureRandom sr = SecureRandom.getInstance(alg);
+        byte[] ba = sr.generateSeed(20);
+
+        // We should get back a bunch of zeros from the file.
+        for (byte b : ba) {
+            if (b != 0) {
+                throw new Exception("Byte != 0");
+            }
+        }
+    }
+}
--- a/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLEngineImpl/SSLEngineBadBufferArrayAccess.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLEngineImpl/SSLEngineBadBufferArrayAccess.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -21,14 +21,16 @@
  * questions.
  */
 
+//
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+//
+
 /*
  * @test
  * @bug 7031830
  * @summary bad_record_mac failure on TLSv1.2 enabled connection with SSLEngine
  * @run main/othervm SSLEngineBadBufferArrayAccess
- *
- *     SunJSSE does not support dynamic system properties, no way to re-use
- *     system properties in samevm/agentvm mode.
  */
 
 /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/ssl/javax/net/ssl/TLSv12/ShortRSAKeyGCM.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,445 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+//
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+//
+
+/*
+ * @test
+ * @bug 7030966
+ * @summary Support AEAD CipherSuites
+ * @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
+ * @run main/othervm ShortRSAKeyGCM PKIX TLS_RSA_WITH_AES_128_GCM_SHA256
+ * @run main/othervm ShortRSAKeyGCM PKIX TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
+ * @run main/othervm ShortRSAKeyGCM PKIX TLS_DH_anon_WITH_AES_128_GCM_SHA256
+ */
+
+/*
+ * Need additional key materials to run the following cases.
+ *
+ * @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
+ * @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
+ * @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
+ *
+ * Need unlimited JCE Unlimited Strength Jurisdiction Policy to run the
+ * following cases.
+ *
+ * @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
+ * @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
+ * @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
+ * @run main/othervm ShortRSAKeyGCM PKIX TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
+ * @run main/othervm ShortRSAKeyGCM PKIX TLS_RSA_WITH_AES_256_GCM_SHA384
+ * @run main/othervm ShortRSAKeyGCM PKIX TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
+ * @run main/othervm ShortRSAKeyGCM PKIX TLS_DH_anon_WITH_AES_256_GCM_SHA384
+ */
+
+import java.net.*;
+import java.util.*;
+import java.io.*;
+import javax.net.ssl.*;
+import java.security.Security;
+import java.security.KeyStore;
+import java.security.KeyFactory;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateFactory;
+import java.security.spec.*;
+import java.security.interfaces.*;
+import sun.misc.BASE64Decoder;
+
+
+public class ShortRSAKeyGCM {
+
+    /*
+     * =============================================================
+     * Set the various variables needed for the tests, then
+     * specify what tests to run on each side.
+     */
+
+    /*
+     * Should we run the client or server in a separate thread?
+     * Both sides can throw exceptions, but do you have a preference
+     * as to which side should be the main thread.
+     */
+    static boolean separateServerThread = true;
+
+    /*
+     * Where do we find the keystores?
+     */
+    // Certificates and key used in the test.
+    static String trustedCertStr =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIICkjCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADA7MQswCQYDVQQGEwJVUzEN\n" +
+        "MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwHhcN\n" +
+        "MTEwODE5MDE1MjE5WhcNMzIwNzI5MDE1MjE5WjA7MQswCQYDVQQGEwJVUzENMAsG\n" +
+        "A1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwgZ8wDQYJ\n" +
+        "KoZIhvcNAQEBBQADgY0AMIGJAoGBAM8orG08DtF98TMSscjGsidd1ZoN4jiDpi8U\n" +
+        "ICz+9dMm1qM1d7O2T+KH3/mxyox7Rc2ZVSCaUD0a3CkhPMnlAx8V4u0H+E9sqso6\n" +
+        "iDW3JpOyzMExvZiRgRG/3nvp55RMIUV4vEHOZ1QbhuqG4ebN0Vz2DkRft7+flthf\n" +
+        "vDld6f5JAgMBAAGjgaUwgaIwHQYDVR0OBBYEFLl81dnfp0wDrv0OJ1sxlWzH83Xh\n" +
+        "MGMGA1UdIwRcMFqAFLl81dnfp0wDrv0OJ1sxlWzH83XhoT+kPTA7MQswCQYDVQQG\n" +
+        "EwJVUzENMAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2\n" +
+        "Y2WCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEE\n" +
+        "BQADgYEALlgaH1gWtoBZ84EW8Hu6YtGLQ/L9zIFmHonUPZwn3Pr//icR9Sqhc3/l\n" +
+        "pVTxOINuFHLRz4BBtEylzRIOPzK3tg8XwuLb1zd0db90x3KBCiAL6E6cklGEPwLe\n" +
+        "XYMHDn9eDsaq861Tzn6ZwzMgw04zotPMoZN0mVd/3Qca8UJFucE=\n" +
+        "-----END CERTIFICATE-----";
+
+    static String targetCertStr =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIICNDCCAZ2gAwIBAgIBDDANBgkqhkiG9w0BAQQFADA7MQswCQYDVQQGEwJVUzEN\n" +
+        "MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwHhcN\n" +
+        "MTExMTA3MTM1NTUyWhcNMzEwNzI1MTM1NTUyWjBPMQswCQYDVQQGEwJVUzENMAsG\n" +
+        "A1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UxEjAQBgNV\n" +
+        "BAMTCWxvY2FsaG9zdDBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQC3Pb49OSPfOD2G\n" +
+        "HSXFCFx1GJEZfqG9ZUf7xuIi/ra5dLjPGAaoY5QF2QOa8VnOriQCXDfyXHxsuRnE\n" +
+        "OomxL7EVAgMBAAGjeDB2MAsGA1UdDwQEAwID6DAdBgNVHQ4EFgQUXNCJK3/dtCIc\n" +
+        "xb+zlA/JINlvs/MwHwYDVR0jBBgwFoAUuXzV2d+nTAOu/Q4nWzGVbMfzdeEwJwYD\n" +
+        "VR0lBCAwHgYIKwYBBQUHAwEGCCsGAQUFBwMCBggrBgEFBQcDAzANBgkqhkiG9w0B\n" +
+        "AQQFAAOBgQB2qIDUxA2caMPpGtUACZAPRUtrGssCINIfItETXJZCx/cRuZ5sP4D9\n" +
+        "N1acoNDn0hCULe3lhXAeTC9NZ97680yJzregQMV5wATjo1FGsKY30Ma+sc/nfzQW\n" +
+        "+h/7RhYtoG0OTsiaDCvyhI6swkNJzSzrAccPY4+ZgU8HiDLzZTmM3Q==\n" +
+        "-----END CERTIFICATE-----";
+
+    // Private key in the format of PKCS#8, key size is 512 bits.
+    static String targetPrivateKey =
+        "MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAtz2+PTkj3zg9hh0l\n" +
+        "xQhcdRiRGX6hvWVH+8biIv62uXS4zxgGqGOUBdkDmvFZzq4kAlw38lx8bLkZxDqJ\n" +
+        "sS+xFQIDAQABAkByx/5Oo2hQ/w2q4L8z+NTRlJ3vdl8iIDtC/4XPnfYfnGptnpG6\n" +
+        "ZThQRvbMZiai0xHQPQMszvAHjZVme1eDl3EBAiEA3aKJHynPVCEJhpfCLWuMwX5J\n" +
+        "1LntwJO7NTOyU5m8rPECIQDTpzn5X44r2rzWBDna/Sx7HW9IWCxNgUD2Eyi2nA7W\n" +
+        "ZQIgJerEorw4aCAuzQPxiGu57PB6GRamAihEAtoRTBQlH0ECIQDN08FgTtnesgCU\n" +
+        "DFYLLcw1CiHvc7fZw4neBDHCrC8NtQIgA8TOUkGnpCZlQ0KaI8KfKWI+vxFcgFnH\n" +
+        "3fnqsTgaUs4=";
+
+    static char passphrase[] = "passphrase".toCharArray();
+
+    /*
+     * Is the server ready to serve?
+     */
+    volatile static boolean serverReady = false;
+
+    /*
+     * Turn on SSL debugging?
+     */
+    static boolean debug = false;
+
+    /*
+     * Define the server side of the test.
+     *
+     * If the server prematurely exits, serverReady will be set to true
+     * to avoid infinite hangs.
+     */
+    void doServerSide() throws Exception {
+        SSLContext context = generateSSLContext(null, targetCertStr,
+                                            targetPrivateKey);
+        SSLServerSocketFactory sslssf = context.getServerSocketFactory();
+        SSLServerSocket sslServerSocket =
+            (SSLServerSocket)sslssf.createServerSocket(serverPort);
+        serverPort = sslServerSocket.getLocalPort();
+
+        /*
+         * Signal Client, we're ready for his connect.
+         */
+        serverReady = true;
+
+        SSLSocket sslSocket = (SSLSocket)sslServerSocket.accept();
+        sslSocket.setEnabledCipherSuites(sslSocket.getSupportedCipherSuites());
+        InputStream sslIS = sslSocket.getInputStream();
+        OutputStream sslOS = sslSocket.getOutputStream();
+
+        sslIS.read();
+        sslOS.write('A');
+        sslOS.flush();
+
+        sslSocket.close();
+    }
+
+    /*
+     * Define the client side of the test.
+     *
+     * If the server prematurely exits, serverReady will be set to true
+     * to avoid infinite hangs.
+     */
+    void doClientSide() throws Exception {
+
+        /*
+         * Wait for server to get started.
+         */
+        while (!serverReady) {
+            Thread.sleep(50);
+        }
+
+        SSLContext context = generateSSLContext(trustedCertStr, null, null);
+        SSLSocketFactory sslsf = context.getSocketFactory();
+
+        SSLSocket sslSocket =
+            (SSLSocket)sslsf.createSocket("localhost", serverPort);
+
+        // enable TLSv1.2 only
+        sslSocket.setEnabledProtocols(new String[] {"TLSv1.2"});
+
+        // enable a block cipher
+        sslSocket.setEnabledCipherSuites(new String[] {cipherSuite});
+
+        InputStream sslIS = sslSocket.getInputStream();
+        OutputStream sslOS = sslSocket.getOutputStream();
+
+        sslOS.write('B');
+        sslOS.flush();
+        sslIS.read();
+
+        sslSocket.close();
+    }
+
+    /*
+     * =============================================================
+     * The remainder is just support stuff
+     */
+    private static String tmAlgorithm;        // trust manager
+    private static String cipherSuite;        // cipher suite
+
+    private static void parseArguments(String[] args) {
+        tmAlgorithm = args[0];
+        cipherSuite = args[1];
+    }
+
+    private static SSLContext generateSSLContext(String trustedCertStr,
+            String keyCertStr, String keySpecStr) throws Exception {
+
+        // generate certificate from cert string
+        CertificateFactory cf = CertificateFactory.getInstance("X.509");
+
+        // create a key store
+        KeyStore ks = KeyStore.getInstance("JKS");
+        ks.load(null, null);
+
+        // import the trused cert
+        Certificate trusedCert = null;
+        ByteArrayInputStream is = null;
+        if (trustedCertStr != null) {
+            is = new ByteArrayInputStream(trustedCertStr.getBytes());
+            trusedCert = cf.generateCertificate(is);
+            is.close();
+
+            ks.setCertificateEntry("RSA Export Signer", trusedCert);
+        }
+
+        if (keyCertStr != null) {
+            // generate the private key.
+            PKCS8EncodedKeySpec priKeySpec = new PKCS8EncodedKeySpec(
+                                new BASE64Decoder().decodeBuffer(keySpecStr));
+            KeyFactory kf = KeyFactory.getInstance("RSA");
+            RSAPrivateKey priKey =
+                    (RSAPrivateKey)kf.generatePrivate(priKeySpec);
+
+            // generate certificate chain
+            is = new ByteArrayInputStream(keyCertStr.getBytes());
+            Certificate keyCert = cf.generateCertificate(is);
+            is.close();
+
+            Certificate[] chain = null;
+            if (trusedCert != null) {
+                chain = new Certificate[2];
+                chain[0] = keyCert;
+                chain[1] = trusedCert;
+            } else {
+                chain = new Certificate[1];
+                chain[0] = keyCert;
+            }
+
+            // import the key entry.
+            ks.setKeyEntry("Whatever", priKey, passphrase, chain);
+        }
+
+        // create SSL context
+        TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmAlgorithm);
+        tmf.init(ks);
+
+        SSLContext ctx = SSLContext.getInstance("TLS");
+        if (keyCertStr != null && !keyCertStr.isEmpty()) {
+            KeyManagerFactory kmf = KeyManagerFactory.getInstance("NewSunX509");
+            kmf.init(ks, passphrase);
+
+            ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
+            ks = null;
+        } else {
+            ctx.init(null, tmf.getTrustManagers(), null);
+        }
+
+        return ctx;
+    }
+
+
+    // use any free port by default
+    volatile int serverPort = 0;
+
+    volatile Exception serverException = null;
+    volatile Exception clientException = null;
+
+    public static void main(String[] args) throws Exception {
+        // reset the security property to make sure that the algorithms
+        // and keys used in this test are not disabled.
+        Security.setProperty("jdk.certpath.disabledAlgorithms", "MD2");
+
+        if (debug) {
+            System.setProperty("javax.net.debug", "all");
+        }
+
+        /*
+         * Get the customized arguments.
+         */
+        parseArguments(args);
+
+        /*
+         * Start the tests.
+         */
+        new ShortRSAKeyGCM();
+    }
+
+    Thread clientThread = null;
+    Thread serverThread = null;
+
+    /*
+     * Primary constructor, used to drive remainder of the test.
+     *
+     * Fork off the other side, then do your work.
+     */
+    ShortRSAKeyGCM() throws Exception {
+        try {
+            if (separateServerThread) {
+                startServer(true);
+                startClient(false);
+            } else {
+                startClient(true);
+                startServer(false);
+            }
+        } catch (Exception e) {
+            // swallow for now.  Show later
+        }
+
+        /*
+         * Wait for other side to close down.
+         */
+        if (separateServerThread) {
+            serverThread.join();
+        } else {
+            clientThread.join();
+        }
+
+        /*
+         * When we get here, the test is pretty much over.
+         * Which side threw the error?
+         */
+        Exception local;
+        Exception remote;
+        String whichRemote;
+
+        if (separateServerThread) {
+            remote = serverException;
+            local = clientException;
+            whichRemote = "server";
+        } else {
+            remote = clientException;
+            local = serverException;
+            whichRemote = "client";
+        }
+
+        /*
+         * If both failed, return the curthread's exception, but also
+         * print the remote side Exception
+         */
+        if ((local != null) && (remote != null)) {
+            System.out.println(whichRemote + " also threw:");
+            remote.printStackTrace();
+            System.out.println();
+            throw local;
+        }
+
+        if (remote != null) {
+            throw remote;
+        }
+
+        if (local != null) {
+            throw local;
+        }
+    }
+
+    void startServer(boolean newThread) throws Exception {
+        if (newThread) {
+            serverThread = new Thread() {
+                public void run() {
+                    try {
+                        doServerSide();
+                    } catch (Exception e) {
+                        /*
+                         * Our server thread just died.
+                         *
+                         * Release the client, if not active already...
+                         */
+                        System.err.println("Server died..." + e);
+                        serverReady = true;
+                        serverException = e;
+                    }
+                }
+            };
+            serverThread.start();
+        } else {
+            try {
+                doServerSide();
+            } catch (Exception e) {
+                serverException = e;
+            } finally {
+                serverReady = true;
+            }
+        }
+    }
+
+    void startClient(boolean newThread) throws Exception {
+        if (newThread) {
+            clientThread = new Thread() {
+                public void run() {
+                    try {
+                        doClientSide();
+                    } catch (Exception e) {
+                        /*
+                         * Our client thread just died.
+                         */
+                        System.err.println("Client died..." + e);
+                        clientException = e;
+                    }
+                }
+            };
+            clientThread.start();
+        } else {
+            try {
+                doClientSide();
+            } catch (Exception e) {
+                clientException = e;
+            }
+        }
+    }
+}
--- a/test/sun/security/ssl/sanity/ciphersuites/CipherSuitesInOrder.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/sun/security/ssl/sanity/ciphersuites/CipherSuitesInOrder.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -21,13 +21,15 @@
  * questions.
  */
 
+//
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+//
+
 /*
  * @test
  * @bug 7174244
  * @summary NPE in Krb5ProxyImpl.getServerKeys()
- *
- *     SunJSSE does not support dynamic system properties, no way to re-use
- *     system properties in samevm/agentvm mode.
  * @run main/othervm CipherSuitesInOrder
  */
 
@@ -72,6 +74,22 @@
         "SSL_RSA_WITH_RC4_128_SHA",
         "TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
         "TLS_ECDH_RSA_WITH_RC4_128_SHA",
+
+        "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+        "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+        "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+        "TLS_RSA_WITH_AES_256_GCM_SHA384",
+        "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384",
+        "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384",
+        "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",
+        "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384",
+        "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+        "TLS_RSA_WITH_AES_128_GCM_SHA256",
+        "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",
+        "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",
+        "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
+        "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256",
+
         "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
         "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
         "SSL_RSA_WITH_3DES_EDE_CBC_SHA",
@@ -83,6 +101,9 @@
 
         "TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
 
+        "TLS_DH_anon_WITH_AES_256_GCM_SHA384",
+        "TLS_DH_anon_WITH_AES_128_GCM_SHA256",
+
         "TLS_DH_anon_WITH_AES_256_CBC_SHA256",
         "TLS_ECDH_anon_WITH_AES_256_CBC_SHA",
         "TLS_DH_anon_WITH_AES_256_CBC_SHA",
--- a/test/sun/security/ssl/sanity/interop/CipherTest.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/sun/security/ssl/sanity/interop/CipherTest.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -148,6 +148,25 @@
             CS_16("TLS_DH_anon_WITH_AES_128_CBC_SHA256",     0x0303, 0xFFFF),
             CS_17("TLS_RSA_WITH_NULL_SHA256",                0x0303, 0xFFFF),
 
+            CS_20("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", 0x0303, 0xFFFF),
+            CS_21("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", 0x0303, 0xFFFF),
+            CS_22("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",   0x0303, 0xFFFF),
+            CS_23("TLS_RSA_WITH_AES_256_GCM_SHA384",         0x0303, 0xFFFF),
+            CS_24("TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384",  0x0303, 0xFFFF),
+            CS_25("TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384",    0x0303, 0xFFFF),
+            CS_26("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",     0x0303, 0xFFFF),
+            CS_27("TLS_DHE_DSS_WITH_AES_256_GCM_SHA384",     0x0303, 0xFFFF),
+
+            CS_28("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",   0x0303, 0xFFFF),
+            CS_29("TLS_RSA_WITH_AES_128_GCM_SHA256",         0x0303, 0xFFFF),
+            CS_30("TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",  0x0303, 0xFFFF),
+            CS_31("TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",    0x0303, 0xFFFF),
+            CS_32("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",     0x0303, 0xFFFF),
+            CS_33("TLS_DHE_DSS_WITH_AES_128_GCM_SHA256",     0x0303, 0xFFFF),
+
+            CS_34("TLS_DH_anon_WITH_AES_256_GCM_SHA384",     0x0303, 0xFFFF),
+            CS_35("TLS_DH_anon_WITH_AES_128_GCM_SHA256",     0x0303, 0xFFFF),
+
             // cipher suites obsoleted since TLS 1.2
             CS_50("SSL_RSA_WITH_DES_CBC_SHA",                0x0000, 0x0303),
             CS_51("SSL_DHE_RSA_WITH_DES_CBC_SHA",            0x0000, 0x0303),
--- a/test/sun/security/ssl/templates/SSLSocketSSLEngineTemplate.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/sun/security/ssl/templates/SSLSocketSSLEngineTemplate.java	Wed Apr 17 21:48:04 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -21,14 +21,15 @@
  * questions.
  */
 
+//
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+//
+
 /*
  * @test
  * @bug 7105780
  * @summary Add SSLSocket client/SSLEngine server to templates directory.
- *
- *     SunJSSE does not support dynamic system properties, no way to re-use
- *     system properties in samevm/agentvm mode.
- *
  * @run main/othervm SSLSocketSSLEngineTemplate
  */
 
--- a/test/sun/text/resources/LocaleData	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/sun/text/resources/LocaleData	Wed Apr 17 21:48:04 2013 -0700
@@ -7661,1139 +7661,5 @@
 # bug 7195759
 CurrencyNames//ZMW=ZMW
 
-# rfe 8004489, 8006509
-FormatData//calendarname.buddhist=Buddhist Calendar
-FormatData//calendarname.gregorian=Gregorian Calendar
-FormatData//calendarname.gregory=Gregorian Calendar
-FormatData//calendarname.islamic-civil=Islamic-Civil Calendar
-FormatData//calendarname.islamic=Islamic Calendar
-FormatData//calendarname.islamicc=Islamic-Civil Calendar
-FormatData//calendarname.japanese=Japanese Calendar
-FormatData//calendarname.roc=Minguo Calendar
-FormatData//field.dayperiod=Dayperiod
-FormatData//field.era=Era
-FormatData//field.hour=Hour
-FormatData//field.minute=Minute
-FormatData//field.month=Month
-FormatData//field.second=Second
-FormatData//field.week=Week
-FormatData//field.weekday=Day of the Week
-FormatData//field.year=Year
-FormatData//field.zone=Zone
-FormatData//islamic.Eras/0=
-FormatData//islamic.Eras/1=AH
-FormatData//islamic.MonthNames/0=Muharram
-FormatData//islamic.MonthNames/1=Safar
-FormatData//islamic.MonthNames/2=Rabi\u02bb I
-FormatData//islamic.MonthNames/3=Rabi\u02bb II
-FormatData//islamic.MonthNames/4=Jumada I
-FormatData//islamic.MonthNames/5=Jumada II
-FormatData//islamic.MonthNames/6=Rajab
-FormatData//islamic.MonthNames/7=Sha\u02bbban
-FormatData//islamic.MonthNames/8=Ramadan
-FormatData//islamic.MonthNames/9=Shawwal
-FormatData//islamic.MonthNames/10=Dhu\u02bbl-Qi\u02bbdah
-FormatData//islamic.MonthNames/11=Dhu\u02bbl-Hijjah
-FormatData//islamic.MonthNames/12=
-FormatData//islamic.MonthAbbreviations/0=Muh.
-FormatData//islamic.MonthAbbreviations/1=Saf.
-FormatData//islamic.MonthAbbreviations/2=Rab. I
-FormatData//islamic.MonthAbbreviations/3=Rab. II
-FormatData//islamic.MonthAbbreviations/4=Jum. I
-FormatData//islamic.MonthAbbreviations/5=Jum. II
-FormatData//islamic.MonthAbbreviations/6=Raj.
-FormatData//islamic.MonthAbbreviations/7=Sha.
-FormatData//islamic.MonthAbbreviations/8=Ram.
-FormatData//islamic.MonthAbbreviations/9=Shaw.
-FormatData//islamic.MonthAbbreviations/10=Dhu\u02bbl-Q.
-FormatData//islamic.MonthAbbreviations/11=Dhu\u02bbl-H.
-FormatData//islamic.MonthAbbreviations/12=
-FormatData//islamic.DatePatterns/0=EEEE, MMMM d, y GGGG
-FormatData//islamic.DatePatterns/1=MMMM d, y GGGG
-FormatData//islamic.DatePatterns/2=MMM d, y GGGG
-FormatData//islamic.DatePatterns/3=M/d/yy GGGG
-FormatData//roc.Eras/0=Before R.O.C.
-FormatData//roc.Eras/1=R.O.C.
-FormatData//roc.DatePatterns/0=EEEE, GGGG y MMMM dd
-FormatData//roc.DatePatterns/1=GGGG y MMMM d
-FormatData//roc.DatePatterns/2=GGGG y MMM d
-FormatData//roc.DatePatterns/3=G yyy-MM-dd
-FormatData/ar/calendarname.buddhist=\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a
-FormatData/ar/calendarname.gregorian=\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0645\u064a\u0644\u0627\u062f\u064a
-FormatData/ar/calendarname.gregory=\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0645\u064a\u0644\u0627\u062f\u064a
-FormatData/ar/calendarname.islamic-civil=\u062a\u0642\u0648\u064a\u0645 \u0627\u0633\u0644\u0627\u0645\u064a \u0645\u062f\u0646\u064a
-FormatData/ar/calendarname.islamic=\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0647\u062c\u0631\u064a
-FormatData/ar/calendarname.islamicc=\u062a\u0642\u0648\u064a\u0645 \u0627\u0633\u0644\u0627\u0645\u064a \u0645\u062f\u0646\u064a
-FormatData/ar/calendarname.japanese=\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u064a\u0627\u0628\u0627\u0646\u064a
-FormatData/ar/calendarname.roc=\u062a\u0642\u0648\u064a\u0645 \u0645\u064a\u0646\u062c\u0648
-FormatData/ar/field.dayperiod=\u0635/\u0645
-FormatData/ar/field.era=\u0627\u0644\u0639\u0635\u0631
-FormatData/ar/field.hour=\u0627\u0644\u0633\u0627\u0639\u0627\u062a
-FormatData/ar/field.minute=\u0627\u0644\u062f\u0642\u0627\u0626\u0642
-FormatData/ar/field.month=\u0627\u0644\u0634\u0647\u0631
-FormatData/ar/field.second=\u0627\u0644\u062b\u0648\u0627\u0646\u064a
-FormatData/ar/field.week=\u0627\u0644\u0623\u0633\u0628\u0648\u0639
-FormatData/ar/field.weekday=\u0627\u0644\u064a\u0648\u0645
-FormatData/ar/field.year=\u0627\u0644\u0633\u0646\u0629
-FormatData/ar/field.zone=\u0627\u0644\u062a\u0648\u0642\u064a\u062a
-FormatData/ar/islamic.MonthNames/0=\u0645\u062d\u0631\u0645
-FormatData/ar/islamic.MonthNames/1=\u0635\u0641\u0631
-FormatData/ar/islamic.MonthNames/2=\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644
-FormatData/ar/islamic.MonthNames/3=\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631
-FormatData/ar/islamic.MonthNames/4=\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649
-FormatData/ar/islamic.MonthNames/5=\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629
-FormatData/ar/islamic.MonthNames/6=\u0631\u062c\u0628
-FormatData/ar/islamic.MonthNames/7=\u0634\u0639\u0628\u0627\u0646
-FormatData/ar/islamic.MonthNames/8=\u0631\u0645\u0636\u0627\u0646
-FormatData/ar/islamic.MonthNames/9=\u0634\u0648\u0627\u0644
-FormatData/ar/islamic.MonthNames/10=\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629
-FormatData/ar/islamic.MonthNames/11=\u0630\u0648 \u0627\u0644\u062d\u062c\u0629
-FormatData/ar/islamic.MonthNames/12=
-FormatData/ar/islamic.MonthAbbreviations/0=\u0645\u062d\u0631\u0645
-FormatData/ar/islamic.MonthAbbreviations/1=\u0635\u0641\u0631
-FormatData/ar/islamic.MonthAbbreviations/2=\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644
-FormatData/ar/islamic.MonthAbbreviations/3=\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631
-FormatData/ar/islamic.MonthAbbreviations/4=\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649
-FormatData/ar/islamic.MonthAbbreviations/5=\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629
-FormatData/ar/islamic.MonthAbbreviations/6=\u0631\u062c\u0628
-FormatData/ar/islamic.MonthAbbreviations/7=\u0634\u0639\u0628\u0627\u0646
-FormatData/ar/islamic.MonthAbbreviations/8=\u0631\u0645\u0636\u0627\u0646
-FormatData/ar/islamic.MonthAbbreviations/9=\u0634\u0648\u0627\u0644
-FormatData/ar/islamic.MonthAbbreviations/10=\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629
-FormatData/ar/islamic.MonthAbbreviations/11=\u0630\u0648 \u0627\u0644\u062d\u062c\u0629
-FormatData/ar/islamic.MonthAbbreviations/12=
-FormatData/ar/islamic.Eras/0=
-FormatData/ar/islamic.Eras/1=\u0647\u0640
-FormatData//islamic.DatePatterns/0=EEEE, MMMM d, y GGGG
-FormatData//islamic.DatePatterns/1=MMMM d, y GGGG
-FormatData//islamic.DatePatterns/2=MMM d, y GGGG
-FormatData//islamic.DatePatterns/3=M/d/yy GGGG
-FormatData/ar/roc.DatePatterns/0=EEEE\u060c d MMMM\u060c y GGGG
-FormatData/ar/roc.DatePatterns/1=d MMMM\u060c y GGGG
-FormatData/ar/roc.DatePatterns/2=dd\u200f/MM\u200f/y GGGG
-FormatData/ar/roc.DatePatterns/3=d\u200f/M\u200f/y GGGG
-FormatData/be/calendarname.buddhist=\u0431\u0443\u0434\u044b\u0441\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440
-FormatData/be/calendarname.gregorian=\u0433\u0440\u044d\u0433\u0430\u0440\u044b\u044f\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440
-FormatData/be/calendarname.gregory=\u0433\u0440\u044d\u0433\u0430\u0440\u044b\u044f\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440
-FormatData/be/calendarname.islamic-civil=\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u0441\u0432\u0435\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440
-FormatData/be/calendarname.islamic=\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440
-FormatData/be/calendarname.islamicc=\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u0441\u0432\u0435\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440
-FormatData/be/calendarname.japanese=\u044f\u043f\u043e\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440
-FormatData/be/field.era=\u044d\u0440\u0430
-FormatData/be/field.hour=\u0433\u0430\u0434\u0437\u0456\u043d\u0430
-FormatData/be/field.minute=\u0445\u0432\u0456\u043b\u0456\u043d\u0430
-FormatData/be/field.month=\u043c\u0435\u0441\u044f\u0446
-FormatData/be/field.second=\u0441\u0435\u043a\u0443\u043d\u0434\u0430
-FormatData/be/field.week=\u0442\u044b\u0434\u0437\u0435\u043d\u044c
-FormatData/be/field.weekday=\u0434\u0437\u0435\u043d\u044c \u0442\u044b\u0434\u043d\u044f
-FormatData/be/field.year=\u0433\u043e\u0434
-FormatData/bg/calendarname.buddhist=\u0411\u0443\u0434\u0438\u0441\u0442\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/bg/calendarname.gregorian=\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/bg/calendarname.gregory=\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/bg/calendarname.islamic-civil=\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u0435\u043d \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/bg/calendarname.islamic=\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/bg/calendarname.islamicc=\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u0435\u043d \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/bg/calendarname.japanese=\u042f\u043f\u043e\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/bg/calendarname.roc=\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u043d\u0430 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u041a\u0438\u0442\u0430\u0439
-FormatData/bg/field.dayperiod=\u0434\u0435\u043d
-FormatData/bg/field.era=\u0435\u0440\u0430
-FormatData/bg/field.hour=\u0447\u0430\u0441
-FormatData/bg/field.minute=\u043c\u0438\u043d\u0443\u0442\u0430
-FormatData/bg/field.month=\u043c\u0435\u0441\u0435\u0446
-FormatData/bg/field.second=\u0441\u0435\u043a\u0443\u043d\u0434\u0430
-FormatData/bg/field.week=\u0441\u0435\u0434\u043c\u0438\u0446\u0430
-FormatData/bg/field.weekday=\u0414\u0435\u043d \u043e\u0442 \u0441\u0435\u0434\u043c\u0438\u0446\u0430\u0442\u0430
-FormatData/bg/field.year=\u0433\u043e\u0434\u0438\u043d\u0430
-FormatData/bg/field.zone=\u0437\u043e\u043d\u0430
-FormatData/bg/islamic.MonthNames/0=\u043c\u0443\u0445\u0430\u0440\u0430\u043c
-FormatData/bg/islamic.MonthNames/1=\u0441\u0430\u0444\u0430\u0440
-FormatData/bg/islamic.MonthNames/2=\u0440\u0430\u0431\u0438-1
-FormatData/bg/islamic.MonthNames/3=\u0440\u0430\u0431\u0438-2
-FormatData/bg/islamic.MonthNames/4=\u0434\u0436\u0443\u043c\u0430\u0434\u0430-1
-FormatData/bg/islamic.MonthNames/5=\u0434\u0436\u0443\u043c\u0430\u0434\u0430-2
-FormatData/bg/islamic.MonthNames/6=\u0440\u0430\u0434\u0436\u0430\u0431
-FormatData/bg/islamic.MonthNames/7=\u0448\u0430\u0431\u0430\u043d
-FormatData/bg/islamic.MonthNames/8=\u0440\u0430\u043c\u0430\u0437\u0430\u043d
-FormatData/bg/islamic.MonthNames/9=\u0428\u0430\u0432\u0430\u043b
-FormatData/bg/islamic.MonthNames/10=\u0414\u0445\u0443\u043b-\u041a\u0430\u0430\u0434\u0430
-FormatData/bg/islamic.MonthNames/11=\u0414\u0445\u0443\u043b-\u0445\u0438\u0434\u0436\u0430
-FormatData/bg/islamic.MonthNames/12=
-FormatData/ca/calendarname.buddhist=calendari budista
-FormatData/ca/calendarname.gregorian=calendari gregori\u00e0
-FormatData/ca/calendarname.gregory=calendari gregori\u00e0
-FormatData/ca/calendarname.islamic-civil=calendari civil isl\u00e0mic
-FormatData/ca/calendarname.islamic=calendari musulm\u00e0
-FormatData/ca/calendarname.islamicc=calendari civil isl\u00e0mic
-FormatData/ca/calendarname.japanese=calendari japon\u00e8s
-FormatData/ca/calendarname.roc=calendari de la Rep\u00fablica de Xina
-FormatData/ca/field.dayperiod=a.m./p.m.
-FormatData/ca/field.era=era
-FormatData/ca/field.hour=hora
-FormatData/ca/field.minute=minut
-FormatData/ca/field.month=mes
-FormatData/ca/field.second=segon
-FormatData/ca/field.week=setmana
-FormatData/ca/field.weekday=dia de la setmana
-FormatData/ca/field.year=any
-FormatData/ca/field.zone=zona
-FormatData/cs/calendarname.buddhist=Buddhistick\u00fd kalend\u00e1\u0159
-FormatData/cs/calendarname.gregorian=Gregori\u00e1nsk\u00fd kalend\u00e1\u0159
-FormatData/cs/calendarname.gregory=Gregori\u00e1nsk\u00fd kalend\u00e1\u0159
-FormatData/cs/calendarname.islamic-civil=Muslimsk\u00fd ob\u010dansk\u00fd kalend\u00e1\u0159
-FormatData/cs/calendarname.islamic=Muslimsk\u00fd kalend\u00e1\u0159
-FormatData/cs/calendarname.islamicc=Muslimsk\u00fd ob\u010dansk\u00fd kalend\u00e1\u0159
-FormatData/cs/calendarname.japanese=Japonsk\u00fd kalend\u00e1\u0159
-FormatData/cs/field.dayperiod=AM/PM
-FormatData/cs/field.hour=Hodina
-FormatData/cs/field.minute=Minuta
-FormatData/cs/field.month=M\u011bs\u00edc
-FormatData/cs/field.second=Sekunda
-FormatData/cs/field.week=T\u00fdden
-FormatData/cs/field.weekday=Den v t\u00fddnu
-FormatData/cs/field.year=Rok
-FormatData/cs/field.zone=\u010casov\u00e9 p\u00e1smo
-FormatData/da/calendarname.buddhist=buddhistisk kalender
-FormatData/da/calendarname.gregorian=gregoriansk kalender
-FormatData/da/calendarname.gregory=gregoriansk kalender
-FormatData/da/calendarname.islamic-civil=verdslig islamisk kalender
-FormatData/da/calendarname.islamic=islamisk kalender
-FormatData/da/calendarname.islamicc=verdslig islamisk kalender
-FormatData/da/calendarname.japanese=japansk kalender
-FormatData/da/calendarname.roc=kalender for Republikken Kina
-FormatData/da/field.dayperiod=dagtid
-FormatData/da/field.era=\u00e6ra
-FormatData/da/field.hour=time
-FormatData/da/field.minute=minut
-FormatData/da/field.month=m\u00e5ned
-FormatData/da/field.second=sekund
-FormatData/da/field.week=uge
-FormatData/da/field.weekday=ugedag
-FormatData/da/field.year=\u00e5r
-FormatData/da/field.zone=tidszone
-FormatData/da/roc.DatePatterns/0=EEEE d. MMMM y GGGG
-FormatData/da/roc.DatePatterns/1=d. MMMM y GGGG
-FormatData/da/roc.DatePatterns/2=d. MMM y GGGG
-FormatData/da/roc.DatePatterns/3=d/M/y G
-FormatData/da/islamic.DatePatterns/0=EEEE d. MMMM y GGGG
-FormatData/da/islamic.DatePatterns/1=d. MMMM y GGGG
-FormatData/da/islamic.DatePatterns/2=d. MMM y GGGG
-FormatData/da/islamic.DatePatterns/3=d/M/y GGGG
-FormatData/de/calendarname.buddhist=Buddhistischer Kalender
-FormatData/de/calendarname.gregorian=Gregorianischer Kalender
-FormatData/de/calendarname.gregory=Gregorianischer Kalender
-FormatData/de/calendarname.islamic-civil=B\u00fcrgerlicher islamischer Kalender
-FormatData/de/calendarname.islamic=Islamischer Kalender
-FormatData/de/calendarname.islamicc=B\u00fcrgerlicher islamischer Kalender
-FormatData/de/calendarname.japanese=Japanischer Kalender
-FormatData/de/calendarname.roc=Kalender der Republik China
-FormatData/de/field.dayperiod=Tagesh\u00e4lfte
-FormatData/de/field.era=Epoche
-FormatData/de/field.hour=Stunde
-FormatData/de/field.minute=Minute
-FormatData/de/field.month=Monat
-FormatData/de/field.second=Sekunde
-FormatData/de/field.week=Woche
-FormatData/de/field.weekday=Wochentag
-FormatData/de/field.year=Jahr
-FormatData/de/field.zone=Zone
-FormatData/de/roc.DatePatterns/0=EEEE d. MMMM y GGGG
-FormatData/de/roc.DatePatterns/1=d. MMMM y GGGG
-FormatData/de/roc.DatePatterns/2=d. MMM y GGGG
-FormatData/de/roc.DatePatterns/3=d.M.y G
-FormatData/de/islamic.DatePatterns/0=EEEE d. MMMM y GGGG
-FormatData/de/islamic.DatePatterns/1=d. MMMM y GGGG
-FormatData/de/islamic.DatePatterns/2=d. MMM y GGGG
-FormatData/de/islamic.DatePatterns/3=d.M.y GGGG
-FormatData/el/calendarname.buddhist=\u0392\u03bf\u03c5\u03b4\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf
-FormatData/el/calendarname.gregorian=\u0393\u03c1\u03b7\u03b3\u03bf\u03c1\u03b9\u03b1\u03bd\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf
-FormatData/el/calendarname.gregory=\u0393\u03c1\u03b7\u03b3\u03bf\u03c1\u03b9\u03b1\u03bd\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf
-FormatData/el/calendarname.islamic-civil=\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b1\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf
-FormatData/el/calendarname.islamic=\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf
-FormatData/el/calendarname.islamicc=\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b1\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf
-FormatData/el/calendarname.japanese=\u0399\u03b1\u03c0\u03c9\u03bd\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf
-FormatData/el/calendarname.roc=\u0397\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf \u03c4\u03b7\u03c2 \u0394\u03b7\u03bc\u03bf\u03ba\u03c1\u03b1\u03c4\u03af\u03b1\u03c2 \u03c4\u03b7\u03c2 \u039a\u03af\u03bd\u03b1\u03c2
-FormatData/el/field.dayperiod=\u03c0.\u03bc./\u03bc.\u03bc.
-FormatData/el/field.era=\u03a0\u03b5\u03c1\u03af\u03bf\u03b4\u03bf\u03c2
-FormatData/el/field.hour=\u038f\u03c1\u03b1
-FormatData/el/field.minute=\u039b\u03b5\u03c0\u03c4\u03cc
-FormatData/el/field.month=\u039c\u03ae\u03bd\u03b1\u03c2
-FormatData/el/field.second=\u0394\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03bf
-FormatData/el/field.week=\u0395\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1
-FormatData/el/field.weekday=\u0397\u03bc\u03ad\u03c1\u03b1 \u03b5\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1\u03c2
-FormatData/el/field.year=\u0388\u03c4\u03bf\u03c2
-FormatData/el/field.zone=\u0396\u03ce\u03bd\u03b7
-FormatData/el/roc.DatePatterns/0=EEEE, d MMMM, y GGGG
-FormatData/el/roc.DatePatterns/1=d MMMM, y GGGG
-FormatData/el/roc.DatePatterns/2=d MMM, y GGGG
-FormatData/el/roc.DatePatterns/3=d/M/y GGGG
-FormatData/es/calendarname.buddhist=calendario budista
-FormatData/es/calendarname.gregorian=calendario gregoriano
-FormatData/es/calendarname.gregory=calendario gregoriano
-FormatData/es/calendarname.islamic-civil=calendario civil isl\u00e1mico
-FormatData/es/calendarname.islamic=calendario isl\u00e1mico
-FormatData/es/calendarname.islamicc=calendario civil isl\u00e1mico
-FormatData/es/calendarname.japanese=calendario japon\u00e9s
-FormatData/es/calendarname.roc=calendario de la Rep\u00fablica de China
-FormatData/es/field.dayperiod=periodo del d\u00eda
-FormatData/es/field.era=era
-FormatData/es/field.hour=hora
-FormatData/es/field.minute=minuto
-FormatData/es/field.month=mes
-FormatData/es/field.second=segundo
-FormatData/es/field.week=semana
-FormatData/es/field.weekday=d\u00eda de la semana
-FormatData/es/field.year=a\u00f1o
-FormatData/es/field.zone=zona
-FormatData/es/roc.DatePatterns/0=EEEE, d 'de' MMMM 'de' y GGGG
-FormatData/es/roc.DatePatterns/1=d 'de' MMMM 'de' y GGGG
-FormatData/es/roc.DatePatterns/2=dd/MM/y GGGG
-FormatData/es/roc.DatePatterns/3=dd/MM/y G
-FormatData/es/islamic.DatePatterns/0=EEEE, d 'de' MMMM 'de' y GGGG
-FormatData/es/islamic.DatePatterns/1=d 'de' MMMM 'de' y GGGG
-FormatData/es/islamic.DatePatterns/2=dd/MM/y GGGG
-FormatData/es/islamic.DatePatterns/3=dd/MM/y GGGG
-FormatData/et/calendarname.buddhist=budistlik kalender
-FormatData/et/calendarname.gregorian=Gregoriuse kalender
-FormatData/et/calendarname.gregory=Gregoriuse kalender
-FormatData/et/calendarname.islamic-civil=islami ilmalik kalender
-FormatData/et/calendarname.islamic=islamikalender
-FormatData/et/calendarname.islamicc=islami ilmalik kalender
-FormatData/et/calendarname.japanese=Jaapani kalender
-FormatData/et/calendarname.roc=Hiina Vabariigi kalender
-FormatData/et/field.dayperiod=enne/p\u00e4rast l\u00f5unat
-FormatData/et/field.era=ajastu
-FormatData/et/field.hour=tund
-FormatData/et/field.minute=minut
-FormatData/et/field.month=kuu
-FormatData/et/field.second=sekund
-FormatData/et/field.week=n\u00e4dal
-FormatData/et/field.weekday=n\u00e4dalap\u00e4ev
-FormatData/et/field.year=aasta
-FormatData/et/field.zone=v\u00f6\u00f6nd
-FormatData/fi/calendarname.buddhist=buddhalainen kalenteri
-FormatData/fi/calendarname.gregorian=gregoriaaninen kalenteri
-FormatData/fi/calendarname.gregory=gregoriaaninen kalenteri
-FormatData/fi/calendarname.islamic-civil=islamilainen siviilikalenteri
-FormatData/fi/calendarname.islamic=islamilainen kalenteri
-FormatData/fi/calendarname.islamicc=islamilainen siviilikalenteri
-FormatData/fi/calendarname.japanese=japanilainen kalenteri
-FormatData/fi/calendarname.roc=Kiinan tasavallan kalenteri
-FormatData/fi/field.dayperiod=vuorokaudenaika
-FormatData/fi/field.era=aikakausi
-FormatData/fi/field.hour=tunti
-FormatData/fi/field.minute=minuutti
-FormatData/fi/field.month=kuukausi
-FormatData/fi/field.second=sekunti
-FormatData/fi/field.week=viikko
-FormatData/fi/field.weekday=viikonp\u00e4iv\u00e4
-FormatData/fi/field.year=vuosi
-FormatData/fi/field.zone=aikavy\u00f6hyke
-FormatData/fi/islamic.MonthNames/0=muharram
-FormatData/fi/islamic.MonthNames/1=safar
-FormatData/fi/islamic.MonthNames/2=rabi\u2019 al-awwal
-FormatData/fi/islamic.MonthNames/3=rabi\u2019 al-akhir
-FormatData/fi/islamic.MonthNames/4=d\u017eumada-l-ula
-FormatData/fi/islamic.MonthNames/5=d\u017eumada-l-akhira
-FormatData/fi/islamic.MonthNames/6=rad\u017eab
-FormatData/fi/islamic.MonthNames/7=\u0161a\u2019ban
-FormatData/fi/islamic.MonthNames/8=ramadan
-FormatData/fi/islamic.MonthNames/9=\u0161awwal
-FormatData/fi/islamic.MonthNames/10=dhu-l-qa\u2019da
-FormatData/fi/islamic.MonthNames/11=dhu-l-hidd\u017ea
-FormatData/fi/islamic.MonthNames/12=
-FormatData/fi/roc.DatePatterns/0=EEEE d. MMMM y GGGG
-FormatData/fi/roc.DatePatterns/1=d. MMMM y GGGG
-FormatData/fi/roc.DatePatterns/2=d.M.y GGGG
-FormatData/fi/roc.DatePatterns/3=d.M.y GGGG
-FormatData/fi/islamic.DatePatterns/0=EEEE d. MMMM y GGGG
-FormatData/fi/islamic.DatePatterns/1=d. MMMM y GGGG
-FormatData/fi/islamic.DatePatterns/2=d.M.y GGGG
-FormatData/fi/islamic.DatePatterns/3=d.M.y GGGG
-FormatData/fr/calendarname.buddhist=Calendrier bouddhiste
-FormatData/fr/calendarname.gregorian=Calendrier gr\u00e9gorien
-FormatData/fr/calendarname.gregory=Calendrier gr\u00e9gorien
-FormatData/fr/calendarname.islamic-civil=Calendrier civil musulman
-FormatData/fr/calendarname.islamic=Calendrier musulman
-FormatData/fr/calendarname.islamicc=Calendrier civil musulman
-FormatData/fr/calendarname.japanese=Calendrier japonais
-FormatData/fr/calendarname.roc=Calendrier r\u00e9publicain chinois
-FormatData/fr/field.dayperiod=cadran
-FormatData/fr/field.era=\u00e8re
-FormatData/fr/field.hour=heure
-FormatData/fr/field.minute=minute
-FormatData/fr/field.month=mois
-FormatData/fr/field.second=seconde
-FormatData/fr/field.week=semaine
-FormatData/fr/field.weekday=jour de la semaine
-FormatData/fr/field.year=ann\u00e9e
-FormatData/fr/field.zone=fuseau horaire
-FormatData/fr/islamic.MonthNames/0=Mouharram
-FormatData/fr/islamic.MonthNames/1=Safar
-FormatData/fr/islamic.MonthNames/2=Rabi\u02bb-oul-Aououal
-FormatData/fr/islamic.MonthNames/3=Rabi\u02bb-out-Tani
-FormatData/fr/islamic.MonthNames/4=Djoumada-l-Oula
-FormatData/fr/islamic.MonthNames/5=Djoumada-t-Tania
-FormatData/fr/islamic.MonthNames/6=Radjab
-FormatData/fr/islamic.MonthNames/7=Cha\u02bbban
-FormatData/fr/islamic.MonthNames/8=Ramadan
-FormatData/fr/islamic.MonthNames/9=Chaououal
-FormatData/fr/islamic.MonthNames/10=Dou-l-Qa\u02bbda
-FormatData/fr/islamic.MonthNames/11=Dou-l-Hidjja
-FormatData/fr/islamic.MonthNames/12=
-FormatData/fr/islamic.MonthAbbreviations/0=Mouh.
-FormatData/fr/islamic.MonthAbbreviations/1=Saf.
-FormatData/fr/islamic.MonthAbbreviations/2=Rabi\u02bb-oul-A.
-FormatData/fr/islamic.MonthAbbreviations/3=Rabi\u02bb-out-T.
-FormatData/fr/islamic.MonthAbbreviations/4=Djoum.-l-O.
-FormatData/fr/islamic.MonthAbbreviations/5=Djoum.-t-T.
-FormatData/fr/islamic.MonthAbbreviations/6=Radj.
-FormatData/fr/islamic.MonthAbbreviations/7=Cha.
-FormatData/fr/islamic.MonthAbbreviations/8=Ram.
-FormatData/fr/islamic.MonthAbbreviations/9=Chaou.
-FormatData/fr/islamic.MonthAbbreviations/10=Dou-l-Q.
-FormatData/fr/islamic.MonthAbbreviations/11=Dou-l-H.
-FormatData/fr/islamic.MonthAbbreviations/12=
-FormatData/fr/islamic.Eras/0=
-FormatData/fr/islamic.Eras/1=AH
-FormatData/fr/roc.DatePatterns/0=EEEE d MMMM y GGGG
-FormatData/fr/roc.DatePatterns/1=d MMMM y GGGG
-FormatData/fr/roc.DatePatterns/2=d MMM, y GGGG
-FormatData/fr/roc.DatePatterns/3=d/M/y G
-FormatData/fr/islamic.DatePatterns/0=EEEE d MMMM y GGGG
-FormatData/fr/islamic.DatePatterns/1=d MMMM y GGGG
-FormatData/fr/islamic.DatePatterns/2=d MMM, y GGGG
-FormatData/fr/islamic.DatePatterns/3=d/M/y GGGG
-FormatData/hi_IN/calendarname.buddhist=\u092c\u094c\u0926\u094d\u0927 \u092a\u0902\u091a\u093e\u0902\u0917
-FormatData/hi_IN/calendarname.gregorian=\u0917\u094d\u0930\u0947\u0917\u0930\u0940 \u092a\u0902\u091a\u093e\u0902\u0917
-FormatData/hi_IN/calendarname.gregory=\u0917\u094d\u0930\u0947\u0917\u0930\u0940 \u092a\u0902\u091a\u093e\u0902\u0917
-FormatData/hi_IN/calendarname.islamic-civil=\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u0928\u093e\u0917\u0930\u093f\u0915 \u092a\u0902\u091a\u093e\u0902\u0917
-FormatData/hi_IN/calendarname.islamic=\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u092a\u0902\u091a\u093e\u0902\u0917
-FormatData/hi_IN/calendarname.islamicc=\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u0928\u093e\u0917\u0930\u093f\u0915 \u092a\u0902\u091a\u093e\u0902\u0917
-FormatData/hi_IN/calendarname.japanese=\u091c\u093e\u092a\u093e\u0928\u0940 \u092a\u0902\u091a\u093e\u0902\u0917
-FormatData/hi_IN/calendarname.roc=\u091a\u0940\u0928\u0940 \u0917\u0923\u0924\u0902\u0924\u094d\u0930 \u092a\u0902\u091a\u093e\u0902\u0917
-FormatData/hi_IN/field.dayperiod=\u0938\u092e\u092f \u0905\u0935\u0927\u093f
-FormatData/hi_IN/field.era=\u092f\u0941\u0917
-FormatData/hi_IN/field.hour=\u0918\u0902\u091f\u093e
-FormatData/hi_IN/field.minute=\u092e\u093f\u0928\u091f
-FormatData/hi_IN/field.month=\u092e\u093e\u0938
-FormatData/hi_IN/field.second=\u0938\u0947\u0915\u0947\u0902\u0921
-FormatData/hi_IN/field.week=\u0938\u092a\u094d\u0924\u093e\u0939
-FormatData/hi_IN/field.weekday=\u0938\u092a\u094d\u0924\u093e\u0939 \u0915\u093e \u0926\u093f\u0928
-FormatData/hi_IN/field.year=\u0935\u0930\u094d\u0937
-FormatData/hi_IN/field.zone=\u0915\u094d\u0937\u0947\u0924\u094d\u0930
-FormatData/hr/calendarname.buddhist=budisti\u010dki kalendar
-FormatData/hr/calendarname.gregorian=gregorijanski kalendar
-FormatData/hr/calendarname.gregory=gregorijanski kalendar
-FormatData/hr/calendarname.islamic-civil=islamski civilni kalendar
-FormatData/hr/calendarname.islamic=islamski kalendar
-FormatData/hr/calendarname.islamicc=islamski civilni kalendar
-FormatData/hr/calendarname.japanese=japanski kalendar
-FormatData/hr/calendarname.roc=kalendar Republike Kine
-FormatData/hr/field.dayperiod=dio dana
-FormatData/hr/field.era=era
-FormatData/hr/field.hour=sat
-FormatData/hr/field.minute=minuta
-FormatData/hr/field.month=mjesec
-FormatData/hr/field.second=sekunda
-FormatData/hr/field.week=tjedan
-FormatData/hr/field.weekday=dan u tjednu
-FormatData/hr/field.year=godina
-FormatData/hr/field.zone=zona
-FormatData/hr/roc.DatePatterns/0=EEEE, d. MMMM y. GGGG
-FormatData/hr/roc.DatePatterns/1=d. MMMM y. GGGG
-FormatData/hr/roc.DatePatterns/2=d. M. y. GGGG
-FormatData/hr/roc.DatePatterns/3=d.M.y. GGGG
-FormatData/hu/calendarname.buddhist=buddhista napt\u00e1r
-FormatData/hu/calendarname.gregorian=Gergely-napt\u00e1r
-FormatData/hu/calendarname.gregory=Gergely-napt\u00e1r
-FormatData/hu/calendarname.islamic-civil=iszl\u00e1m civil napt\u00e1r
-FormatData/hu/calendarname.islamic=iszl\u00e1m napt\u00e1r
-FormatData/hu/calendarname.islamicc=iszl\u00e1m civil napt\u00e1r
-FormatData/hu/calendarname.japanese=jap\u00e1n napt\u00e1r
-FormatData/hu/calendarname.roc=K\u00ednai k\u00f6zt\u00e1rsas\u00e1gi napt\u00e1r
-FormatData/hu/field.dayperiod=napszak
-FormatData/hu/field.era=\u00e9ra
-FormatData/hu/field.hour=\u00f3ra
-FormatData/hu/field.minute=perc
-FormatData/hu/field.month=h\u00f3nap
-FormatData/hu/field.second=m\u00e1sodperc
-FormatData/hu/field.week=h\u00e9t
-FormatData/hu/field.weekday=h\u00e9t napja
-FormatData/hu/field.year=\u00e9v
-FormatData/hu/field.zone=z\u00f3na
-FormatData/hu/islamic.MonthNames/0=Moharrem
-FormatData/hu/islamic.MonthNames/1=Safar
-FormatData/hu/islamic.MonthNames/2=R\u00e9bi el avvel
-FormatData/hu/islamic.MonthNames/3=R\u00e9bi el accher
-FormatData/hu/islamic.MonthNames/4=Dsem\u00e1di el avvel
-FormatData/hu/islamic.MonthNames/5=Dsem\u00e1di el accher
-FormatData/hu/islamic.MonthNames/6=Redseb
-FormatData/hu/islamic.MonthNames/7=Sab\u00e1n
-FormatData/hu/islamic.MonthNames/8=Ramad\u00e1n
-FormatData/hu/islamic.MonthNames/9=Sevv\u00e1l
-FormatData/hu/islamic.MonthNames/10=Ds\u00fcl kade
-FormatData/hu/islamic.MonthNames/11=Ds\u00fcl hedse
-FormatData/hu/islamic.MonthNames/12=
-FormatData/hu/islamic.Eras/0=
-FormatData/hu/islamic.Eras/1=MF
-FormatData/is/calendarname.buddhist=B\u00fadd\u00edskt dagatal
-FormatData/is/calendarname.gregorian=Gregor\u00edskt dagatal
-FormatData/is/calendarname.gregory=Gregor\u00edskt dagatal
-FormatData/is/calendarname.islamic-civil=\u00cdslamskt borgaradagatal
-FormatData/is/calendarname.islamic=\u00cdslamskt dagatal
-FormatData/is/calendarname.islamicc=\u00cdslamskt borgaradagatal
-FormatData/is/calendarname.japanese=Japanskt dagatal
-FormatData/it/calendarname.buddhist=calendario buddista
-FormatData/it/calendarname.gregorian=calendario gregoriano
-FormatData/it/calendarname.gregory=calendario gregoriano
-FormatData/it/calendarname.islamic-civil=calendario civile islamico
-FormatData/it/calendarname.islamic=calendario islamico
-FormatData/it/calendarname.islamicc=calendario civile islamico
-FormatData/it/calendarname.japanese=calendario giapponese
-FormatData/it/field.dayperiod=periodo del giorno
-FormatData/it/field.era=era
-FormatData/it/field.hour=ora
-FormatData/it/field.minute=minuto
-FormatData/it/field.month=mese
-FormatData/it/field.second=secondo
-FormatData/it/field.week=settimana
-FormatData/it/field.weekday=giorno della settimana
-FormatData/it/field.year=anno
-FormatData/it/field.zone=zona
-FormatData/it/roc.DatePatterns/0=EEEE d MMMM y GGGG
-FormatData/it/roc.DatePatterns/1=dd MMMM y GGGG
-FormatData/it/roc.DatePatterns/2=dd/MMM/y GGGG
-FormatData/it/roc.DatePatterns/3=dd/MM/y GGGG
-FormatData/it/islamic.DatePatterns/0=EEEE d MMMM y GGGG
-FormatData/it/islamic.DatePatterns/1=dd MMMM y GGGG
-FormatData/it/islamic.DatePatterns/2=dd/MMM/y GGGG
-FormatData/it/islamic.DatePatterns/3=dd/MM/y GGGG
-FormatData/iw/calendarname.buddhist=\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d1\u05d5\u05d3\u05d4\u05d9\u05e1\u05d8\u05d9
-FormatData/iw/calendarname.gregorian=\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9
-FormatData/iw/calendarname.gregory=\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9
-FormatData/iw/calendarname.islamic-civil=\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9
-FormatData/iw/calendarname.islamic=\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9
-FormatData/iw/calendarname.islamicc=\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9
-FormatData/iw/calendarname.japanese=\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d9\u05e4\u05e0\u05d9
-FormatData/iw/field.dayperiod=\u05dc\u05e4\u05d4\u05f4\u05e6/\u05d0\u05d7\u05d4\u05f4\u05e6
-FormatData/iw/field.era=\u05ea\u05e7\u05d5\u05e4\u05d4
-FormatData/iw/field.hour=\u05e9\u05e2\u05d4
-FormatData/iw/field.minute=\u05d3\u05e7\u05d4
-FormatData/iw/field.month=\u05d7\u05d5\u05d3\u05e9
-FormatData/iw/field.second=\u05e9\u05e0\u05d9\u05d9\u05d4
-FormatData/iw/field.week=\u05e9\u05d1\u05d5\u05e2
-FormatData/iw/field.weekday=\u05d9\u05d5\u05dd \u05d1\u05e9\u05d1\u05d5\u05e2
-FormatData/iw/field.year=\u05e9\u05e0\u05d4
-FormatData/iw/field.zone=\u05d0\u05d6\u05d5\u05e8
-FormatData/iw/islamic.MonthNames/0=\u05de\u05d5\u05d7\u05e8\u05dd
-FormatData/iw/islamic.MonthNames/1=\u05e1\u05e4\u05e8
-FormatData/iw/islamic.MonthNames/2=\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc
-FormatData/iw/islamic.MonthNames/3=\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05ea\u05e0\u05d9
-FormatData/iw/islamic.MonthNames/4=\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc
-FormatData/iw/islamic.MonthNames/5=\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05ea\u05e0\u05d9
-FormatData/iw/islamic.MonthNames/6=\u05e8\u05d2\u05f3\u05d0\u05d1
-FormatData/iw/islamic.MonthNames/7=\u05e9\u05e2\u05d1\u05d0\u05df
-FormatData/iw/islamic.MonthNames/8=\u05e8\u05d0\u05de\u05d3\u05df
-FormatData/iw/islamic.MonthNames/9=\u05e9\u05d5\u05d5\u05d0\u05dc
-FormatData/iw/islamic.MonthNames/10=\u05d6\u05d5 \u05d0\u05dc-QI'DAH
-FormatData/iw/islamic.MonthNames/11=\u05d6\u05d5 \u05d0\u05dc-\u05d7\u05d9\u05d2\u05f3\u05d4
-FormatData/iw/islamic.MonthNames/12=
-FormatData/iw/islamic.Eras/0=
-FormatData/iw/islamic.Eras/1=\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4
-FormatData/ja/calendarname.buddhist=\u30bf\u30a4\u4ecf\u6559\u66a6
-FormatData/ja/calendarname.gregorian=\u897f\u66a6[\u30b0\u30ec\u30b4\u30ea\u30aa\u66a6]
-FormatData/ja/calendarname.gregory=\u897f\u66a6[\u30b0\u30ec\u30b4\u30ea\u30aa\u66a6]
-FormatData/ja/calendarname.islamic-civil=\u592a\u967d\u30a4\u30b9\u30e9\u30e0\u66a6
-FormatData/ja/calendarname.islamic=\u30a4\u30b9\u30e9\u30e0\u66a6
-FormatData/ja/calendarname.islamicc=\u592a\u967d\u30a4\u30b9\u30e9\u30e0\u66a6
-FormatData/ja/calendarname.japanese=\u548c\u66a6
-FormatData/ja/calendarname.roc=\u4e2d\u83ef\u6c11\u56fd\u66a6
-FormatData/ja/field.dayperiod=\u5348\u524d/\u5348\u5f8c
-FormatData/ja/field.era=\u6642\u4ee3
-FormatData/ja/field.hour=\u6642
-FormatData/ja/field.minute=\u5206
-FormatData/ja/field.month=\u6708
-FormatData/ja/field.second=\u79d2
-FormatData/ja/field.week=\u9031
-FormatData/ja/field.weekday=\u66dc\u65e5
-FormatData/ja/field.year=\u5e74
-FormatData/ja/field.zone=\u30bf\u30a4\u30e0\u30be\u30fc\u30f3
-FormatData/ja/roc.DatePatterns/0=GGGGy\u5e74M\u6708d\u65e5EEEE
-FormatData/ja/roc.DatePatterns/1=GGGGy\u5e74M\u6708d\u65e5
-FormatData/ja/roc.DatePatterns/2=GGGGy/MM/dd
-FormatData/ja/roc.DatePatterns/3=GGGGy/MM/dd
-FormatData/ko/calendarname.buddhist=\ubd88\uad50\ub825
-FormatData/ko/calendarname.gregorian=\ud0dc\uc591\ub825
-FormatData/ko/calendarname.gregory=\ud0dc\uc591\ub825
-FormatData/ko/calendarname.islamic-civil=\uc774\uc2ac\ub78c \uc0c1\uc6a9\ub825
-FormatData/ko/calendarname.islamic=\uc774\uc2ac\ub78c\ub825
-FormatData/ko/calendarname.islamicc=\uc774\uc2ac\ub78c \uc0c1\uc6a9\ub825
-FormatData/ko/calendarname.japanese=\uc77c\ubcf8\ub825
-FormatData/ko/calendarname.roc=\ub300\ub9cc\ub825
-FormatData/ko/field.dayperiod=\uc624\uc804/\uc624\ud6c4
-FormatData/ko/field.era=\uc5f0\ud638
-FormatData/ko/field.hour=\uc2dc
-FormatData/ko/field.minute=\ubd84
-FormatData/ko/field.month=\uc6d4
-FormatData/ko/field.second=\ucd08
-FormatData/ko/field.week=\uc8fc
-FormatData/ko/field.weekday=\uc694\uc77c
-FormatData/ko/field.year=\ub144
-FormatData/ko/field.zone=\uc2dc\uac04\ub300
-FormatData/ko/roc.DatePatterns/0=GGGG y\ub144 M\uc6d4 d\uc77c EEEE
-FormatData/ko/roc.DatePatterns/1=GGGG y\ub144 M\uc6d4 d\uc77c
-FormatData/ko/roc.DatePatterns/2=GGGG y. M. d
-FormatData/ko/roc.DatePatterns/3=GGGG y. M. d
-FormatData/lt/calendarname.buddhist=Budist\u0173 kalendorius
-FormatData/lt/calendarname.gregorian=Grigaliaus kalendorius
-FormatData/lt/calendarname.gregory=Grigaliaus kalendorius
-FormatData/lt/calendarname.islamic-civil=Pilietinis islamo kalendorius
-FormatData/lt/calendarname.islamic=Islamo kalendorius
-FormatData/lt/calendarname.islamicc=Pilietinis islamo kalendorius
-FormatData/lt/calendarname.japanese=Japon\u0173 kalendorius
-FormatData/lt/calendarname.roc=Kinijos Respublikos kalendorius
-FormatData/lt/field.dayperiod=dienos metas
-FormatData/lt/field.era=era
-FormatData/lt/field.hour=valanda
-FormatData/lt/field.minute=minut\u0117
-FormatData/lt/field.month=m\u0117nuo
-FormatData/lt/field.second=sekund\u0117
-FormatData/lt/field.week=savait\u0117
-FormatData/lt/field.weekday=savait\u0117s diena
-FormatData/lt/field.year=metai
-FormatData/lt/field.zone=laiko juosta
-FormatData/lv/calendarname.buddhist=budistu kalend\u0101rs
-FormatData/lv/calendarname.gregorian=Gregora kalend\u0101rs
-FormatData/lv/calendarname.gregory=Gregora kalend\u0101rs
-FormatData/lv/calendarname.islamic-civil=isl\u0101ma pilso\u0146u kalend\u0101rs
-FormatData/lv/calendarname.islamic=isl\u0101ma kalend\u0101rs
-FormatData/lv/calendarname.islamicc=isl\u0101ma pilso\u0146u kalend\u0101rs
-FormatData/lv/calendarname.japanese=jap\u0101\u0146u kalend\u0101rs
-FormatData/lv/calendarname.roc=\u0136\u012bnas Republikas kalend\u0101rs
-FormatData/lv/field.dayperiod=Dayperiod
-FormatData/lv/field.era=\u0113ra
-FormatData/lv/field.hour=Stundas
-FormatData/lv/field.minute=Min\u016btes
-FormatData/lv/field.month=M\u0113nesis
-FormatData/lv/field.second=Sekundes
-FormatData/lv/field.week=Ned\u0113\u013ca
-FormatData/lv/field.weekday=Ned\u0113\u013cas diena
-FormatData/lv/field.year=Gads
-FormatData/lv/field.zone=Josla
-FormatData/lv/islamic.MonthNames/0=muharams
-FormatData/lv/islamic.MonthNames/1=safars
-FormatData/lv/islamic.MonthNames/2=1. rab\u012b
-FormatData/lv/islamic.MonthNames/3=2. rab\u012b
-FormatData/lv/islamic.MonthNames/4=1. d\u017eum\u0101d\u0101
-FormatData/lv/islamic.MonthNames/5=2. d\u017eum\u0101d\u0101
-FormatData/lv/islamic.MonthNames/6=rad\u017eabs
-FormatData/lv/islamic.MonthNames/7=\u0161abans
-FormatData/lv/islamic.MonthNames/8=ramad\u0101ns
-FormatData/lv/islamic.MonthNames/9=\u0161auvals
-FormatData/lv/islamic.MonthNames/10=du al-kid\u0101
-FormatData/lv/islamic.MonthNames/11=du al-hid\u017e\u0101
-FormatData/lv/islamic.MonthNames/12=
-FormatData/mk/calendarname.buddhist=\u0411\u0443\u0434\u0438\u0441\u0442\u0438\u0447\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/mk/calendarname.gregorian=\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/mk/calendarname.gregory=\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/mk/calendarname.islamic-civil=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0433\u0440\u0430\u0453\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/mk/calendarname.islamic=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/mk/calendarname.islamicc=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0433\u0440\u0430\u0453\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/mk/calendarname.japanese=\u0408\u0430\u043f\u043e\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/mk/calendarname.roc=\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u043d\u0430 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u041a\u0438\u043d\u0430
-FormatData/mk/field.dayperiod=\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435/\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435
-FormatData/mk/field.era=\u0415\u0440\u0430
-FormatData/mk/field.hour=\u0427\u0430\u0441
-FormatData/mk/field.minute=\u041c\u0438\u043d\u0443\u0442\u0430
-FormatData/mk/field.month=\u041c\u0435\u0441\u0435\u0446
-FormatData/mk/field.second=\u0421\u0435\u043a\u0443\u043d\u0434\u0430
-FormatData/mk/field.week=\u041d\u0435\u0434\u0435\u043b\u0430
-FormatData/mk/field.weekday=\u0414\u0435\u043d \u0432\u043e \u043d\u0435\u0434\u0435\u043b\u0430\u0442\u0430
-FormatData/mk/field.year=\u0433\u043e\u0434\u0438\u043d\u0430
-FormatData/mk/field.zone=\u0437\u043e\u043d\u0430
-FormatData/ms/calendarname.buddhist=Kalendar Buddha
-FormatData/ms/calendarname.gregorian=Kalendar Gregory
-FormatData/ms/calendarname.gregory=Kalendar Gregory
-FormatData/ms/calendarname.islamic-civil=Kalendar Sivil Islam
-FormatData/ms/calendarname.islamic=Kalendar Islam
-FormatData/ms/calendarname.islamicc=Kalendar Sivil Islam
-FormatData/ms/calendarname.japanese=Kalendar Jepun
-FormatData/ms/calendarname.roc=Kalendar Minguo
-FormatData/ms/field.dayperiod=PG/PTG
-FormatData/ms/field.hour=Jam
-FormatData/ms/field.minute=Minit
-FormatData/ms/field.month=Bulan
-FormatData/ms/field.second=Kedua
-FormatData/ms/field.week=Minggu
-FormatData/ms/field.weekday=Hari dalam Minggu
-FormatData/ms/field.year=Tahun
-FormatData/ms/field.zone=Zon Waktu
-FormatData/ms/roc.DatePatterns/0=EEEE, d MMMM y GGGG
-FormatData/ms/roc.DatePatterns/1=d MMMM y GGGG
-FormatData/ms/roc.DatePatterns/2=dd/MM/y GGGG
-FormatData/ms/roc.DatePatterns/3=d/MM/y GGGG
-FormatData/ms/islamic.DatePatterns/0=EEEE, d MMMM y GGGG
-FormatData/ms/islamic.DatePatterns/1=d MMMM y GGGG
-FormatData/ms/islamic.DatePatterns/2=dd/MM/y GGGG
-FormatData/ms/islamic.DatePatterns/3=d/MM/y GGGG
-FormatData/mt/calendarname.buddhist=Kalendarju Buddist
-FormatData/mt/calendarname.gregorian=Kalendarju Gregorjan
-FormatData/mt/calendarname.gregory=Kalendarju Gregorjan
-FormatData/mt/calendarname.islamic-civil=Kalendarju Islamiku-\u010aivili
-FormatData/mt/calendarname.islamic=Kalendarju Islamiku
-FormatData/mt/calendarname.islamicc=Kalendarju Islamiku-\u010aivili
-FormatData/mt/calendarname.japanese=Kalendarju \u0120appuni\u017c
-FormatData/mt/field.era=Epoka
-FormatData/mt/field.hour=Sieg\u0127a
-FormatData/mt/field.minute=Minuta
-FormatData/mt/field.month=Xahar
-FormatData/mt/field.second=Sekonda
-FormatData/mt/field.week=\u0120img\u0127a
-FormatData/mt/field.weekday=Jum tal-\u0120img\u0127a
-FormatData/mt/field.year=Sena
-FormatData/mt/field.zone=\u017bona
-FormatData/nl/calendarname.buddhist=Boeddhistische kalender
-FormatData/nl/calendarname.gregorian=Gregoriaanse kalender
-FormatData/nl/calendarname.gregory=Gregoriaanse kalender
-FormatData/nl/calendarname.islamic-civil=Islamitische kalender (cyclisch)
-FormatData/nl/calendarname.islamic=Islamitische kalender
-FormatData/nl/calendarname.islamicc=Islamitische kalender (cyclisch)
-FormatData/nl/calendarname.japanese=Japanse kalender
-FormatData/nl/calendarname.roc=Kalender van de Chinese Republiek
-FormatData/nl/field.dayperiod=AM/PM
-FormatData/nl/field.era=Tijdperk
-FormatData/nl/field.hour=Uur
-FormatData/nl/field.minute=Minuut
-FormatData/nl/field.month=Maand
-FormatData/nl/field.second=Seconde
-FormatData/nl/field.weekday=Dag van de week
-FormatData/nl/field.year=Jaar
-FormatData/nl/field.zone=Zone
-FormatData/nl/islamic.MonthNames/0=Moeharram
-FormatData/nl/islamic.MonthNames/1=Safar
-FormatData/nl/islamic.MonthNames/2=Rabi\u02bba al awal
-FormatData/nl/islamic.MonthNames/3=Rabi\u02bba al thani
-FormatData/nl/islamic.MonthNames/4=Joemad\u02bbal awal
-FormatData/nl/islamic.MonthNames/5=Joemad\u02bbal thani
-FormatData/nl/islamic.MonthNames/6=Rajab
-FormatData/nl/islamic.MonthNames/7=Sja\u02bbaban
-FormatData/nl/islamic.MonthNames/8=Ramadan
-FormatData/nl/islamic.MonthNames/9=Sjawal
-FormatData/nl/islamic.MonthNames/10=Doe al ka\u02bbaba
-FormatData/nl/islamic.MonthNames/11=Doe al hizja
-FormatData/nl/islamic.MonthNames/12=
-FormatData/nl/islamic.MonthAbbreviations/0=Moeh.
-FormatData/nl/islamic.MonthAbbreviations/1=Saf.
-FormatData/nl/islamic.MonthAbbreviations/2=Rab. I
-FormatData/nl/islamic.MonthAbbreviations/3=Rab. II
-FormatData/nl/islamic.MonthAbbreviations/4=Joem. I
-FormatData/nl/islamic.MonthAbbreviations/5=Joem. II
-FormatData/nl/islamic.MonthAbbreviations/6=Raj.
-FormatData/nl/islamic.MonthAbbreviations/7=Sja.
-FormatData/nl/islamic.MonthAbbreviations/8=Ram.
-FormatData/nl/islamic.MonthAbbreviations/9=Sjaw.
-FormatData/nl/islamic.MonthAbbreviations/10=Doe al k.
-FormatData/nl/islamic.MonthAbbreviations/11=Doe al h.
-FormatData/nl/islamic.MonthAbbreviations/12=
-FormatData/nl/islamic.Eras/0=
-FormatData/nl/islamic.Eras/1=Sa\u02bbna Hizjria
-FormatData/nl/roc.DatePatterns/0=EEEE d MMMM y GGGG
-FormatData/nl/roc.DatePatterns/1=d MMMM y GGGG
-FormatData/nl/roc.DatePatterns/2=d MMM y GGGG
-FormatData/nl/roc.DatePatterns/3=dd-MM-yy G
-FormatData/nl/islamic.DatePatterns/0=EEEE d MMMM y GGGG
-FormatData/nl/islamic.DatePatterns/1=d MMMM y GGGG
-FormatData/nl/islamic.DatePatterns/2=d MMM y GGGG
-FormatData/nl/islamic.DatePatterns/3=dd-MM-yy GGGG
-FormatData/pl/calendarname.buddhist=kalendarz buddyjski
-FormatData/pl/calendarname.gregorian=kalendarz gregoria\u0144ski
-FormatData/pl/calendarname.gregory=kalendarz gregoria\u0144ski
-FormatData/pl/calendarname.islamic-civil=kalendarz islamski (metoda obliczeniowa)
-FormatData/pl/calendarname.islamic=kalendarz islamski (metoda wzrokowa)
-FormatData/pl/calendarname.islamicc=kalendarz islamski (metoda obliczeniowa)
-FormatData/pl/calendarname.japanese=kalendarz japo\u0144ski
-FormatData/pl/calendarname.roc=kalendarz Republiki Chi\u0144skiej
-FormatData/pl/field.era=Era
-FormatData/pl/field.hour=Godzina
-FormatData/pl/field.minute=Minuta
-FormatData/pl/field.month=Miesi\u0105c
-FormatData/pl/field.second=Sekunda
-FormatData/pl/field.week=Tydzie\u0144
-FormatData/pl/field.weekday=Dzie\u0144 tygodnia
-FormatData/pl/field.year=Rok
-FormatData/pl/field.zone=Strefa
-FormatData/pl/roc.DatePatterns/0=EEEE, d MMMM, y GGGG
-FormatData/pl/roc.DatePatterns/1=d MMMM, y GGGG
-FormatData/pl/roc.DatePatterns/2=d MMM y GGGG
-FormatData/pl/roc.DatePatterns/3=dd.MM.yyyy GGGG
-FormatData/pl/islamic.DatePatterns/0=EEEE, d MMMM, y GGGG
-FormatData/pl/islamic.DatePatterns/1=d MMMM, y GGGG
-FormatData/pl/islamic.DatePatterns/2=d MMM y GGGG
-FormatData/pl/islamic.DatePatterns/3=dd.MM.yyyy GGGG
-FormatData/pt/calendarname.buddhist=Calend\u00e1rio Budista
-FormatData/pt/calendarname.gregorian=Calend\u00e1rio Gregoriano
-FormatData/pt/calendarname.gregory=Calend\u00e1rio Gregoriano
-FormatData/pt/calendarname.islamic-civil=Calend\u00e1rio Civil Isl\u00e2mico
-FormatData/pt/calendarname.islamic=Calend\u00e1rio Isl\u00e2mico
-FormatData/pt/calendarname.islamicc=Calend\u00e1rio Civil Isl\u00e2mico
-FormatData/pt/calendarname.japanese=Calend\u00e1rio Japon\u00eas
-FormatData/pt/calendarname.roc=Calend\u00e1rio da Rep\u00fablica da China
-FormatData/pt/field.dayperiod=Per\u00edodo do dia
-FormatData/pt/field.era=Era
-FormatData/pt/field.hour=Hora
-FormatData/pt/field.minute=Minuto
-FormatData/pt/field.month=M\u00eas
-FormatData/pt/field.second=Segundo
-FormatData/pt/field.week=Semana
-FormatData/pt/field.weekday=Dia da semana
-FormatData/pt/field.year=Ano
-FormatData/pt/field.zone=Fuso
-FormatData/pt/roc.DatePatterns/0=EEEE, d 'de' MMMM 'de' y GGGG
-FormatData/pt/roc.DatePatterns/1=d 'de' MMMM 'de' y GGGG
-FormatData/pt/roc.DatePatterns/2=dd/MM/yyyy GGGG
-FormatData/pt/roc.DatePatterns/3=d/M/yyyy
-FormatData/pt/islamic.DatePatterns/0=EEEE, d 'de' MMMM 'de' y GGGG
-FormatData/pt/islamic.DatePatterns/1=d 'de' MMMM 'de' y GGGG
-FormatData/pt/islamic.DatePatterns/2=dd/MM/yyyy GGGG
-FormatData/pt/islamic.DatePatterns/3=d/M/yyyy
-FormatData/ro/calendarname.buddhist=calendar budist
-FormatData/ro/calendarname.gregorian=calendar gregorian
-FormatData/ro/calendarname.gregory=calendar gregorian
-FormatData/ro/calendarname.islamic-civil=calendar islamic civil
-FormatData/ro/calendarname.islamic=calendar islamic
-FormatData/ro/calendarname.islamicc=calendar islamic civil
-FormatData/ro/calendarname.japanese=calendar japonez
-FormatData/ro/calendarname.roc=calendar al Republicii Chineze
-FormatData/ro/field.dayperiod=perioada zilei
-FormatData/ro/field.era=er\u0103
-FormatData/ro/field.hour=or\u0103
-FormatData/ro/field.minute=minut
-FormatData/ro/field.month=lun\u0103
-FormatData/ro/field.second=secund\u0103
-FormatData/ro/field.week=s\u0103pt\u0103m\u00e2n\u0103
-FormatData/ro/field.weekday=zi a s\u0103pt\u0103m\u00e2nii
-FormatData/ro/field.year=an
-FormatData/ro/field.zone=zon\u0103
-FormatData/ru/calendarname.buddhist=\u0411\u0443\u0434\u0434\u0438\u0439\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c
-FormatData/ru/calendarname.gregorian=\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c
-FormatData/ru/calendarname.gregory=\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c
-FormatData/ru/calendarname.islamic-civil=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c
-FormatData/ru/calendarname.islamic=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c
-FormatData/ru/calendarname.islamicc=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c
-FormatData/ru/calendarname.japanese=\u042f\u043f\u043e\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c
-FormatData/ru/calendarname.roc=\u041a\u0438\u0442\u0430\u0439\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c
-FormatData/ru/field.era=\u042d\u0440\u0430
-FormatData/ru/field.hour=\u0427\u0430\u0441
-FormatData/ru/field.minute=\u041c\u0438\u043d\u0443\u0442\u0430
-FormatData/ru/field.month=\u041c\u0435\u0441\u044f\u0446
-FormatData/ru/field.second=\u0421\u0435\u043a\u0443\u043d\u0434\u0430
-FormatData/ru/field.week=\u041d\u0435\u0434\u0435\u043b\u044f
-FormatData/ru/field.weekday=\u0414\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438
-FormatData/ru/field.year=\u0413\u043e\u0434
-FormatData/ru/field.zone=\u0427\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441
-FormatData/ru/islamic.MonthNames/0=\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c
-FormatData/ru/islamic.MonthNames/1=\u0421\u0430\u0444\u0430\u0440
-FormatData/ru/islamic.MonthNames/2=\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c
-FormatData/ru/islamic.MonthNames/3=\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440
-FormatData/ru/islamic.MonthNames/4=\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c
-FormatData/ru/islamic.MonthNames/5=\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440
-FormatData/ru/islamic.MonthNames/6=\u0420\u0430\u0434\u0436\u0430\u0431
-FormatData/ru/islamic.MonthNames/7=\u0428\u0430\u0430\u0431\u0430\u043d
-FormatData/ru/islamic.MonthNames/8=\u0420\u0430\u043c\u0430\u0434\u0430\u043d
-FormatData/ru/islamic.MonthNames/9=\u0428\u0430\u0432\u0432\u0430\u043b\u044c
-FormatData/ru/islamic.MonthNames/10=\u0417\u0443\u043b\u044c-\u041a\u0430\u0430\u0434\u0430
-FormatData/ru/islamic.MonthNames/11=\u0417\u0443\u043b\u044c-\u0425\u0438\u0434\u0436\u0436\u0430
-FormatData/ru/islamic.MonthNames/12=
-FormatData/ru/roc.DatePatterns/0=EEEE, d MMMM y\u00a0'\u0433'. GGGG
-FormatData/ru/roc.DatePatterns/1=d MMMM y\u00a0'\u0433'. GGGG
-FormatData/ru/roc.DatePatterns/2=dd.MM.yyyy GGGG
-FormatData/ru/roc.DatePatterns/3=dd.MM.yy GGGG
-FormatData/ru/islamic.DatePatterns/0=EEEE, d MMMM y\u00a0'\u0433'. GGGG
-FormatData/ru/islamic.DatePatterns/1=d MMMM y\u00a0'\u0433'. GGGG
-FormatData/ru/islamic.DatePatterns/2=dd.MM.yyyy GGGG
-FormatData/ru/islamic.DatePatterns/3=dd.MM.yy GGGG
-FormatData/sk/calendarname.buddhist=Buddhistick\u00fd kalend\u00e1r
-FormatData/sk/calendarname.gregorian=Gregori\u00e1nsky kalend\u00e1r
-FormatData/sk/calendarname.gregory=Gregori\u00e1nsky kalend\u00e1r
-FormatData/sk/calendarname.islamic-civil=Islamsk\u00fd ob\u010diansky kalend\u00e1r
-FormatData/sk/calendarname.islamic=Islamsk\u00fd kalend\u00e1r
-FormatData/sk/calendarname.islamicc=Islamsk\u00fd ob\u010diansky kalend\u00e1r
-FormatData/sk/calendarname.japanese=Japonsk\u00fd kalend\u00e1r
-FormatData/sk/field.dayperiod=\u010cas\u0165 d\u0148a
-FormatData/sk/field.era=\u00c9ra
-FormatData/sk/field.hour=Hodina
-FormatData/sk/field.minute=Min\u00fata
-FormatData/sk/field.month=Mesiac
-FormatData/sk/field.second=Sekunda
-FormatData/sk/field.week=T\u00fd\u017ede\u0148
-FormatData/sk/field.weekday=De\u0148 v t\u00fd\u017edni
-FormatData/sk/field.year=Rok
-FormatData/sk/field.zone=P\u00e1smo
-FormatData/sl/calendarname.buddhist=budisti\u010dni koledar
-FormatData/sl/calendarname.gregorian=gregorijanski koledar
-FormatData/sl/calendarname.gregory=gregorijanski koledar
-FormatData/sl/calendarname.islamic-civil=islamski civilni koledar
-FormatData/sl/calendarname.islamic=islamski koledar
-FormatData/sl/calendarname.islamicc=islamski civilni koledar
-FormatData/sl/calendarname.japanese=japonski koledar
-FormatData/sl/calendarname.roc=kitajski dr\u017eavni koledar
-FormatData/sl/field.dayperiod=\u010cas dneva
-FormatData/sl/field.era=Doba
-FormatData/sl/field.hour=Ura
-FormatData/sl/field.minute=Minuta
-FormatData/sl/field.month=Mesec
-FormatData/sl/field.second=Sekunda
-FormatData/sl/field.week=Teden
-FormatData/sl/field.weekday=Dan v tednu
-FormatData/sl/field.year=Leto
-FormatData/sl/field.zone=Obmo\u010dje
-FormatData/sr/calendarname.buddhist=\u0411\u0443\u0434\u0438\u0441\u0442\u0438\u0447\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/sr/calendarname.gregorian=\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/sr/calendarname.gregory=\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/sr/calendarname.islamic-civil=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u043d\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/sr/calendarname.islamic=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/sr/calendarname.islamicc=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u043d\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/sr/calendarname.japanese=\u0408\u0430\u043f\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/sr/calendarname.roc=\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0435 \u041a\u0438\u043d\u0435
-FormatData/sr/field.dayperiod=\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435/\u043f\u043e\u043f\u043e\u0434\u043d\u0435
-FormatData/sr/field.era=\u0435\u0440\u0430
-FormatData/sr/field.hour=\u0447\u0430\u0441
-FormatData/sr/field.minute=\u043c\u0438\u043d\u0443\u0442
-FormatData/sr/field.month=\u043c\u0435\u0441\u0435\u0446
-FormatData/sr/field.second=\u0441\u0435\u043a\u0443\u043d\u0434
-FormatData/sr/field.week=\u043d\u0435\u0434\u0435\u0459\u0430
-FormatData/sr/field.weekday=\u0434\u0430\u043d \u0443 \u043d\u0435\u0434\u0435\u0459\u0438
-FormatData/sr/field.year=\u0433\u043e\u0434\u0438\u043d\u0430
-FormatData/sr/field.zone=\u0437\u043e\u043d\u0430
-FormatData/sr/islamic.MonthNames/0=\u041c\u0443\u0440\u0430\u0445\u0430\u043c
-FormatData/sr/islamic.MonthNames/1=\u0421\u0430\u0444\u0430\u0440
-FormatData/sr/islamic.MonthNames/2=\u0420\u0430\u0431\u0438\u02bb I
-FormatData/sr/islamic.MonthNames/3=\u0420\u0430\u0431\u0438\u02bb II
-FormatData/sr/islamic.MonthNames/4=\u0408\u0443\u043c\u0430\u0434\u0430 I
-FormatData/sr/islamic.MonthNames/5=\u0408\u0443\u043c\u0430\u0434\u0430 II
-FormatData/sr/islamic.MonthNames/6=\u0420\u0430\u0452\u0430\u0431
-FormatData/sr/islamic.MonthNames/7=\u0428\u0430\u02bb\u0431\u0430\u043d
-FormatData/sr/islamic.MonthNames/8=\u0420\u0430\u043c\u0430\u0434\u0430\u043d
-FormatData/sr/islamic.MonthNames/9=\u0428\u0430\u0432\u0430\u043b
-FormatData/sr/islamic.MonthNames/10=\u0414\u0443\u02bb\u043b-\u041a\u0438\u02bb\u0434\u0430
-FormatData/sr/islamic.MonthNames/11=\u0414\u0443\u02bb\u043b-\u0445\u0438\u0452\u0430
-FormatData/sr/islamic.MonthNames/12=
-FormatData/sr/islamic.Eras/0=
-FormatData/sr/islamic.Eras/1=\u0410\u0425
-FormatData/sv/calendarname.buddhist=buddistisk kalender
-FormatData/sv/calendarname.gregorian=gregoriansk kalender
-FormatData/sv/calendarname.gregory=gregoriansk kalender
-FormatData/sv/calendarname.islamic-civil=islamisk civil kalender
-FormatData/sv/calendarname.islamic=islamisk kalender
-FormatData/sv/calendarname.islamicc=islamisk civil kalender
-FormatData/sv/calendarname.japanese=japansk kalender
-FormatData/sv/calendarname.roc=kinesiska republikens kalender
-FormatData/sv/field.dayperiod=fm/em
-FormatData/sv/field.era=era
-FormatData/sv/field.hour=timme
-FormatData/sv/field.minute=minut
-FormatData/sv/field.month=m\u00e5nad
-FormatData/sv/field.second=sekund
-FormatData/sv/field.week=vecka
-FormatData/sv/field.weekday=veckodag
-FormatData/sv/field.year=\u00e5r
-FormatData/sv/field.zone=tidszon
-FormatData/sv/roc.Eras/0=f\u00f6re R.K.
-FormatData/sv/roc.Eras/1=R.K.
-FormatData/sv/roc.DatePatterns/0=EEEE d MMMM y GGGG
-FormatData/sv/roc.DatePatterns/1=d MMMM y GGGG
-FormatData/sv/roc.DatePatterns/2=d MMM y GGGG
-FormatData/sv/roc.DatePatterns/3=GGGG y-MM-dd
-FormatData/sv/islamic.DatePatterns/0=EEEE d MMMM y GGGG
-FormatData/sv/islamic.DatePatterns/1=d MMMM y GGGG
-FormatData/sv/islamic.DatePatterns/2=d MMM y GGGG
-FormatData/sv/islamic.DatePatterns/3=GGGG y-MM-dd
-FormatData/th/calendarname.buddhist=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e1e\u0e38\u0e17\u0e18
-FormatData/th/calendarname.gregorian=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e40\u0e01\u0e23\u0e01\u0e2d\u0e40\u0e23\u0e35\u0e22\u0e19
-FormatData/th/calendarname.gregory=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e40\u0e01\u0e23\u0e01\u0e2d\u0e40\u0e23\u0e35\u0e22\u0e19
-FormatData/th/calendarname.islamic-civil=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21\u0e0b\u0e35\u0e27\u0e34\u0e25
-FormatData/th/calendarname.islamic=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21
-FormatData/th/calendarname.islamicc=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21\u0e0b\u0e35\u0e27\u0e34\u0e25
-FormatData/th/calendarname.japanese=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e0d\u0e35\u0e48\u0e1b\u0e38\u0e48\u0e19
-FormatData/th/calendarname.roc=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19
-FormatData/th/field.dayperiod=\u0e0a\u0e48\u0e27\u0e07\u0e27\u0e31\u0e19
-FormatData/th/field.era=\u0e2a\u0e21\u0e31\u0e22
-FormatData/th/field.hour=\u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07
-FormatData/th/field.minute=\u0e19\u0e32\u0e17\u0e35
-FormatData/th/field.month=\u0e40\u0e14\u0e37\u0e2d\u0e19
-FormatData/th/field.second=\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35
-FormatData/th/field.week=\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c
-FormatData/th/field.weekday=\u0e27\u0e31\u0e19\u0e43\u0e19\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c
-FormatData/th/field.year=\u0e1b\u0e35
-FormatData/th/field.zone=\u0e40\u0e02\u0e15
-FormatData/th/islamic.MonthNames/0=\u0e21\u0e38\u0e2e\u0e30\u0e23\u0e4c\u0e23\u0e2d\u0e21
-FormatData/th/islamic.MonthNames/1=\u0e0b\u0e2d\u0e1f\u0e32\u0e23\u0e4c
-FormatData/th/islamic.MonthNames/2=\u0e23\u0e2d\u0e1a\u0e35 I
-FormatData/th/islamic.MonthNames/3=\u0e23\u0e2d\u0e1a\u0e35 II
-FormatData/th/islamic.MonthNames/4=\u0e08\u0e38\u0e21\u0e32\u0e14\u0e32 I
-FormatData/th/islamic.MonthNames/5=\u0e08\u0e38\u0e21\u0e32\u0e14\u0e32 II
-FormatData/th/islamic.MonthNames/6=\u0e23\u0e2d\u0e08\u0e31\u0e1a
-FormatData/th/islamic.MonthNames/7=\u0e0a\u0e30\u0e2d\u0e30\u0e1a\u0e32\u0e19
-FormatData/th/islamic.MonthNames/8=\u0e23\u0e2d\u0e21\u0e30\u0e14\u0e2d\u0e19
-FormatData/th/islamic.MonthNames/9=\u0e40\u0e0a\u0e32\u0e27\u0e31\u0e25
-FormatData/th/islamic.MonthNames/10=\u0e14\u0e2e\u0e38\u0e38\u0e2d\u0e31\u0e25\u0e01\u0e34\u0e14\u0e30\u0e2b\u0e4c
-FormatData/th/islamic.MonthNames/11=\u0e14\u0e2e\u0e38\u0e2d\u0e31\u0e25\u0e2e\u0e34\u0e08\u0e08\u0e30\u0e2b\u0e4c
-FormatData/th/islamic.MonthNames/12=
-FormatData/th/islamic.long.Eras/0=
-FormatData/th/islamic.long.Eras/1=\u0e2e\u0e34\u0e08\u0e40\u0e23\u0e32\u0e30\u0e2b\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a
-FormatData/th/islamic.Eras/0=
-FormatData/th/islamic.Eras/1=\u0e2e.\u0e28.
-FormatData/th/roc.DatePatterns/0=EEEE\u0e17\u0e35\u0e48 d MMMM \u0e1b\u0e35GGGG\u0e17\u0e35\u0e48 y
-FormatData/th/roc.DatePatterns/1=d MMMM \u0e1b\u0e35GGGG y
-FormatData/th/roc.DatePatterns/2=d MMM GGGG y
-FormatData/th/roc.DatePatterns/3=d/M/yy
-FormatData/tr/calendarname.buddhist=Budist Takvimi
-FormatData/tr/calendarname.gregorian=Miladi Takvim
-FormatData/tr/calendarname.gregory=Miladi Takvim
-FormatData/tr/calendarname.islamic-civil=Arap Takvimi
-FormatData/tr/calendarname.islamic=Hicri Takvim
-FormatData/tr/calendarname.islamicc=Arap Takvimi
-FormatData/tr/calendarname.japanese=Japon Takvimi
-FormatData/tr/calendarname.roc=\u00c7in Cumhuriyeti Takvimi
-FormatData/tr/field.dayperiod=AM/PM
-FormatData/tr/field.era=Miladi D\u00f6nem
-FormatData/tr/field.hour=Saat
-FormatData/tr/field.minute=Dakika
-FormatData/tr/field.month=Ay
-FormatData/tr/field.second=Saniye
-FormatData/tr/field.week=Hafta
-FormatData/tr/field.weekday=Haftan\u0131n G\u00fcn\u00fc
-FormatData/tr/field.year=Y\u0131l
-FormatData/tr/field.zone=Saat Dilimi
-FormatData/tr/islamic.MonthNames/0=Muharrem
-FormatData/tr/islamic.MonthNames/1=Safer
-FormatData/tr/islamic.MonthNames/2=Rebi\u00fclevvel
-FormatData/tr/islamic.MonthNames/3=Rebi\u00fclahir
-FormatData/tr/islamic.MonthNames/4=Cemaziyelevvel
-FormatData/tr/islamic.MonthNames/5=Cemaziyelahir
-FormatData/tr/islamic.MonthNames/6=Recep
-FormatData/tr/islamic.MonthNames/7=\u015eaban
-FormatData/tr/islamic.MonthNames/8=Ramazan
-FormatData/tr/islamic.MonthNames/9=\u015eevval
-FormatData/tr/islamic.MonthNames/10=Zilkade
-FormatData/tr/islamic.MonthNames/11=Zilhicce
-FormatData/tr/islamic.MonthNames/12=
-FormatData/tr/roc.DatePatterns/0=dd MMMM y GGGG EEEE
-FormatData/tr/roc.DatePatterns/1=dd MMMM y GGGG
-FormatData/tr/roc.DatePatterns/2=dd MMM y GGGG
-FormatData/tr/roc.DatePatterns/3=dd.MM.yyyy GGGG
-FormatData/tr/islamic.DatePatterns/0=dd MMMM y GGGG EEEE
-FormatData/tr/islamic.DatePatterns/1=dd MMMM y GGGG
-FormatData/tr/islamic.DatePatterns/2=dd MMM y GGGG
-FormatData/tr/islamic.DatePatterns/3=dd.MM.yyyy GGGG
-FormatData/uk/calendarname.buddhist=\u0411\u0443\u0434\u0434\u0456\u0439\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/uk/calendarname.gregorian=\u0413\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/uk/calendarname.gregory=\u0413\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/uk/calendarname.islamic-civil=\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u0441\u0432\u0456\u0442\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/uk/calendarname.islamic=\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/uk/calendarname.islamicc=\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u0441\u0432\u0456\u0442\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/uk/calendarname.japanese=\u042f\u043f\u043e\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440
-FormatData/uk/calendarname.roc=\u041a\u0438\u0442\u0430\u0439\u0441\u044c\u043a\u0438\u0439 \u0433\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439
-FormatData/uk/field.dayperiod=\u0427\u0430\u0441\u0442\u0438\u043d\u0430 \u0434\u043e\u0431\u0438
-FormatData/uk/field.era=\u0415\u0440\u0430
-FormatData/uk/field.hour=\u0413\u043e\u0434\u0438\u043d\u0430
-FormatData/uk/field.minute=\u0425\u0432\u0438\u043b\u0438\u043d\u0430
-FormatData/uk/field.month=\u041c\u0456\u0441\u044f\u0446\u044c
-FormatData/uk/field.second=\u0421\u0435\u043a\u0443\u043d\u0434\u0430
-FormatData/uk/field.week=\u0422\u0438\u0436\u0434\u0435\u043d\u044c
-FormatData/uk/field.weekday=\u0414\u0435\u043d\u044c \u0442\u0438\u0436\u043d\u044f
-FormatData/uk/field.year=\u0420\u0456\u043a
-FormatData/uk/field.zone=\u0417\u043e\u043d\u0430
-FormatData/uk/islamic.MonthNames/0=\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c
-FormatData/uk/islamic.MonthNames/1=\u0421\u0430\u0444\u0430\u0440
-FormatData/uk/islamic.MonthNames/2=\u0420\u0430\u0431\u0456 I
-FormatData/uk/islamic.MonthNames/3=\u0420\u0430\u0431\u0456 II
-FormatData/uk/islamic.MonthNames/4=\u0414\u0436\u0443\u043c\u0430\u0434\u0430 I
-FormatData/uk/islamic.MonthNames/5=\u0414\u0436\u0443\u043c\u0430\u0434\u0430 II
-FormatData/uk/islamic.MonthNames/6=\u0420\u0430\u0434\u0436\u0430\u0431
-FormatData/uk/islamic.MonthNames/7=\u0428\u0430\u0430\u0431\u0430\u043d
-FormatData/uk/islamic.MonthNames/8=\u0420\u0430\u043c\u0430\u0434\u0430\u043d
-FormatData/uk/islamic.MonthNames/9=\u0414\u0430\u0432\u0432\u0430\u043b
-FormatData/uk/islamic.MonthNames/10=\u0417\u0443-\u043b\u044c-\u043a\u0430\u0430\u0434\u0430
-FormatData/uk/islamic.MonthNames/11=\u0417\u0443-\u043b\u044c-\u0445\u0456\u0434\u0436\u0430
-FormatData/uk/islamic.MonthNames/12=
-FormatData/vi/calendarname.buddhist=L\u1ecbch Ph\u1eadt Gi\u00e1o
-FormatData/vi/calendarname.gregorian=L\u1ecbch Gregory
-FormatData/vi/calendarname.gregory=L\u1ecbch Gregory
-FormatData/vi/calendarname.islamic-civil=L\u1ecbch Islamic-Civil
-FormatData/vi/calendarname.islamic=L\u1ecbch Islamic
-FormatData/vi/calendarname.islamicc=L\u1ecbch Islamic-Civil
-FormatData/vi/calendarname.japanese=L\u1ecbch Nh\u1eadt B\u1ea3n
-FormatData/vi/calendarname.roc=L\u1ecbch Trung Hoa D\u00e2n Qu\u1ed1c
-FormatData/vi/field.dayperiod=SA/CH
-FormatData/vi/field.era=Th\u1eddi \u0111\u1ea1i
-FormatData/vi/field.hour=Gi\u1edd
-FormatData/vi/field.minute=Ph\u00fat
-FormatData/vi/field.month=Th\u00e1ng
-FormatData/vi/field.second=Gi\u00e2y
-FormatData/vi/field.week=Tu\u1ea7n
-FormatData/vi/field.weekday=Ng\u00e0y trong tu\u1ea7n
-FormatData/vi/field.year=N\u0103m
-FormatData/vi/field.zone=M\u00fai gi\u1edd
-FormatData/vi/roc.DatePatterns/0=EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y GGGG
-FormatData/vi/roc.DatePatterns/1='Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y GGGG
-FormatData/vi/roc.DatePatterns/2=dd-MM-y GGGG
-FormatData/vi/roc.DatePatterns/3=dd/MM/y GGGG
-FormatData/vi/islamic.DatePatterns/0=EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y GGGG
-FormatData/vi/islamic.DatePatterns/1='Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y GGGG
-FormatData/vi/islamic.DatePatterns/2=dd-MM-y GGGG
-FormatData/vi/islamic.DatePatterns/3=dd/MM/y GGGG
-FormatData/zh/calendarname.buddhist=\u4f5b\u6559\u65e5\u5386
-FormatData/zh/calendarname.gregorian=\u516c\u5386
-FormatData/zh/calendarname.gregory=\u516c\u5386
-FormatData/zh/calendarname.islamic-civil=\u4f0a\u65af\u5170\u5e0c\u5409\u6765\u5386
-FormatData/zh/calendarname.islamic=\u4f0a\u65af\u5170\u65e5\u5386
-FormatData/zh/calendarname.islamicc=\u4f0a\u65af\u5170\u5e0c\u5409\u6765\u5386
-FormatData/zh/calendarname.japanese=\u65e5\u672c\u65e5\u5386
-FormatData/zh/calendarname.roc=\u6c11\u56fd\u65e5\u5386
-FormatData/zh/field.dayperiod=\u4e0a\u5348/\u4e0b\u5348
-FormatData/zh/field.era=\u65f6\u671f
-FormatData/zh/field.hour=\u5c0f\u65f6
-FormatData/zh/field.minute=\u5206\u949f
-FormatData/zh/field.month=\u6708
-FormatData/zh/field.second=\u79d2\u949f
-FormatData/zh/field.week=\u5468
-FormatData/zh/field.weekday=\u5468\u5929
-FormatData/zh/field.year=\u5e74
-FormatData/zh/field.zone=\u533a\u57df
-FormatData/zh/roc.DatePatterns/0=GGGGy\u5e74M\u6708d\u65e5EEEE
-FormatData/zh/roc.DatePatterns/1=GGGGy\u5e74M\u6708d\u65e5
-FormatData/zh/roc.DatePatterns/2=GGGGy-M-d
-FormatData/zh/roc.DatePatterns/3=GGGGy-M-d
-FormatData/zh/islamic.DatePatterns/0=GGGGy\u5e74M\u6708d\u65e5EEEE
-FormatData/zh/islamic.DatePatterns/1=GGGGy\u5e74M\u6708d\u65e5
-FormatData/zh/islamic.DatePatterns/2=GGGGy\u5e74M\u6708d\u65e5
-FormatData/zh/islamic.DatePatterns/3=GGGGyy-MM-dd
-FormatData/zh_TW/calendarname.buddhist=\u4f5b\u6559\u66c6\u6cd5
-FormatData/zh_TW/calendarname.gregorian=\u516c\u66c6
-FormatData/zh_TW/calendarname.gregory=\u516c\u66c6
-FormatData/zh_TW/calendarname.islamic-civil=\u4f0a\u65af\u862d\u57ce\u5e02\u66c6\u6cd5
-FormatData/zh_TW/calendarname.islamic=\u4f0a\u65af\u862d\u66c6\u6cd5
-FormatData/zh_TW/calendarname.islamicc=\u4f0a\u65af\u862d\u57ce\u5e02\u66c6\u6cd5
-FormatData/zh_TW/calendarname.japanese=\u65e5\u672c\u66c6\u6cd5
-FormatData/zh_TW/calendarname.roc=\u6c11\u570b\u66c6
-FormatData/zh_TW/field.dayperiod=\u4e0a\u5348/\u4e0b\u5348
-FormatData/zh_TW/field.era=\u5e74\u4ee3
-FormatData/zh_TW/field.hour=\u5c0f\u6642
-FormatData/zh_TW/field.minute=\u5206\u9418
-FormatData/zh_TW/field.month=\u6708
-FormatData/zh_TW/field.second=\u79d2
-FormatData/zh_TW/field.week=\u9031
-FormatData/zh_TW/field.weekday=\u9031\u5929
-FormatData/zh_TW/field.year=\u5e74
-FormatData/zh_TW/roc.DatePatterns/0=GGGGy\u5e74M\u6708d\u65e5EEEE
-FormatData/zh_TW/roc.DatePatterns/1=GGGGy\u5e74M\u6708d\u65e5
-FormatData/zh_TW/roc.DatePatterns/2=GGGGy/M/d
-FormatData/zh_TW/roc.DatePatterns/3=GGGGy/M/d
-FormatData/zh_TW/islamic.DatePatterns/0=GGGGy\u5e74M\u6708d\u65e5EEEE
-FormatData/zh_TW/islamic.DatePatterns/1=GGGGy\u5e74M\u6708d\u65e5
-FormatData/zh_TW/islamic.DatePatterns/2=GGGGy/M/d
-FormatData/zh_TW/islamic.DatePatterns/3=GGGGy/M/d
-
 # bug 7114053
 LocaleNames/sq/sq=shqip
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/java/CFCTest.java	Wed Apr 17 21:48:04 2013 -0700
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8011805
+ * @summary Update sun.tools.java class file reading/writing support to include the new constant pool entries (including invokedynamic)
+ */
+
+import java.io.DataInputStream;
+import java.io.EOFException;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import sun.tools.java.ClassDeclaration;
+import sun.tools.java.Identifier;
+import sun.rmi.rmic.BatchEnvironment;
+
+public class CFCTest {
+
+    /* Constant table */
+    private static final int CONSTANT_UTF8 = 1;
+    private static final int CONSTANT_INTEGER = 3;
+    private static final int CONSTANT_FLOAT = 4;
+    private static final int CONSTANT_LONG = 5;
+    private static final int CONSTANT_DOUBLE = 6;
+    private static final int CONSTANT_CLASS = 7;
+    private static final int CONSTANT_STRING = 8;
+    private static final int CONSTANT_FIELD = 9;
+    private static final int CONSTANT_METHOD = 10;
+    private static final int CONSTANT_INTERFACEMETHOD = 11;
+    private static final int CONSTANT_NAMEANDTYPE = 12;
+    private static final int CONSTANT_METHODHANDLE = 15;
+    private static final int CONSTANT_METHODTYPE = 16;
+    private static final int CONSTANT_INVOKEDYNAMIC = 18;
+
+    String testClassName = this.getClass().getCanonicalName();
+    String testClassPath = System.getProperty("test.classes", ".");
+
+    interface I {
+        int get();
+    }
+
+    public static void main(String[] args) throws Exception {
+        new CFCTest().testNewConstants();
+    }
+
+    void testNewConstants() throws Exception {
+        // Presence of lambda causes new constant pool constant types to be used
+        I lam = () -> 88;
+        if (lam.get() == 88) {
+            System.out.println("Sanity passed: Lambda worked.");
+        } else {
+            throw new RuntimeException("Sanity failed: bad lambda execution");
+        }
+
+        // Verify that all the new constant pool constant types are present
+        String clsName = testClassPath + File.separator + testClassName + ".class";
+        ClassConstantChecker ccc = new ClassConstantChecker(clsName);
+        ccc.checkFound(CONSTANT_METHODHANDLE);
+        ccc.checkFound(CONSTANT_METHODTYPE);
+        ccc.checkFound(CONSTANT_INVOKEDYNAMIC);
+
+        // Heart of test: read the class file with the new constant types
+        exerciseClassDefinition();
+        System.out.println("ClassDefinition read without failure.\n");
+   }
+
+    /**
+     * Failure is seen when getClassDefinition causes class read
+     */
+    void exerciseClassDefinition() throws Exception {
+        BatchEnvironment env = new BatchEnvironment(System.out,
+                BatchEnvironment.createClassPath(testClassPath, null, null),
+                null);
+        try {
+            ClassDeclaration decl = env.getClassDeclaration(
+                    Identifier.lookup(testClassName));
+            decl.getClassDefinition(env);
+        } finally {
+            env.flushErrors();
+            env.shutdown();
+        }
+    }
+
+    private class ClassConstantChecker {
+
+        private DataInputStream in;
+        private boolean[] found;
+
+        ClassConstantChecker(String clsName) throws IOException {
+            in = new DataInputStream(new FileInputStream(clsName));
+            found = new boolean[CONSTANT_INVOKEDYNAMIC + 20];
+            try {
+                check();
+            } finally {
+                in.close();
+            }
+        }
+
+        void checkFound(int tag) throws Exception {
+            if (found[tag]) {
+                System.out.printf("Constant pool tag found: %d\n", tag);
+            } else {
+                throw new RuntimeException("Insufficient test, constant pool tag NOT found: " + tag);
+            }
+        }
+
+        private void skip(int n) throws IOException {
+            if (in.skipBytes(n) != n) {
+                throw new EOFException();
+            }
+        }
+
+        private void check() throws IOException {
+            skip(8); // magic, version
+            int count = in.readUnsignedShort();
+            for (int i = 1; i < count; i++) {
+                int j = i;
+                // JVM 4.4 cp_info.tag
+                int tag = in.readByte();
+                found[tag] = true;
+                switch (tag) {
+                    case CONSTANT_UTF8:
+                        in.readUTF();
+                        break;
+                    case CONSTANT_LONG:
+                    case CONSTANT_DOUBLE:
+                        skip(8);
+                        break;
+                    case CONSTANT_CLASS:
+                    case CONSTANT_STRING:
+                        skip(2);
+                        break;
+                    case CONSTANT_INTEGER:
+                    case CONSTANT_FLOAT:
+                    case CONSTANT_FIELD:
+                    case CONSTANT_METHOD:
+                    case CONSTANT_INTERFACEMETHOD:
+                    case CONSTANT_NAMEANDTYPE:
+                        skip(4);
+                        break;
+
+                    case CONSTANT_METHODHANDLE:
+                        skip(3);
+                        break;
+                    case CONSTANT_METHODTYPE:
+                        skip(2);
+                        break;
+                    case CONSTANT_INVOKEDYNAMIC:
+                        skip(4);
+                        break;
+
+                    case 0:
+                    default:
+                        throw new ClassFormatError("invalid constant type: " + tag);
+                }
+            }
+        }
+    }
+}
--- a/test/sun/util/calendar/zi/TestZoneInfo310.java	Wed Apr 17 21:32:11 2013 -0700
+++ b/test/sun/util/calendar/zi/TestZoneInfo310.java	Wed Apr 17 21:48:04 2013 -0700
@@ -68,8 +68,8 @@
         }
         System.out.println("Compiling tz files!");
         Main.main(alist.toArray(new String[alist.size()]));
+
         //////////////////////////////////
-
         System.out.println("testing!");
         ZoneInfoFile.ziDir = zidir;
         long t0, t1;
@@ -97,10 +97,26 @@
         Arrays.sort(zids_old);
 
         t0 = System.nanoTime();
+        String[] alias_old = ZoneInfoOld.getAliasTable()
+                                 .keySet().toArray(new String[0]);
+        t1 = System.nanoTime();
+        System.out.printf("OLD.getAliasTable()=%d, total=%d%n",
+                          (t1 - t0) / 1000, alias_old.length);
+        Arrays.sort(alias_old);
+
+        t0 = System.currentTimeMillis();
+        for (String zid : zids_old) {
+            ZoneInfoOld.getTimeZone(zid);
+        }
+        t1 = System.currentTimeMillis();
+        System.out.printf("OLD.TotalTZ()=%d (ms)%n", t1 - t0);
+
+/*
+        t0 = System.nanoTime();
         ZoneId.of("America/Los_Angeles").getRules();
         t1 = System.nanoTime();
-        System.out.printf("NEW.getTimeZone()[1]=%d%n", (t1 - t0) / 1000);
-
+        System.out.printf("NEW.ZoneId.of()[1]=%d%n", (t1 - t0) / 1000);
+*/
         t0 = System.nanoTime();
         TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles");
         t1 = System.nanoTime();
@@ -123,6 +139,14 @@
                           (t1 - t0) / 1000, zids_new.length);
         Arrays.sort(zids_new);
 
+        t0 = System.nanoTime();
+        String[] alias_new = sun.util.calendar.ZoneInfo.getAliasTable()
+                                 .keySet().toArray(new String[0]);
+        t1 = System.nanoTime();
+        System.out.printf("NEW.getAliasTable()=%d, total=%d%n",
+                          (t1 - t0) / 1000, alias_new.length);
+        Arrays.sort(alias_new);
+
         t0 = System.currentTimeMillis();
         for (String zid : zids_new) {
             TimeZone.getTimeZone(zid);
@@ -130,16 +154,14 @@
         t1 = System.currentTimeMillis();
         System.out.printf("NEW.TotalTZ()=%d (ms)%n", t1 - t0);
 
-        t0 = System.currentTimeMillis();
-        for (String zid : zids_old) {
-            ZoneInfoOld.getTimeZone(zid);
-        }
-        t1 = System.currentTimeMillis();
-        System.out.printf("OLD.TotalTZ()=%d (ms)%n", t1 - t0);
-
         if (!Arrays.equals(zids_old, zids_new)) {
             throw new RuntimeException("  FAILED:  availableIds don't match");
         }
+
+        if (!Arrays.equals(alias_old, alias_new)) {
+            throw new RuntimeException("  FAILED:  aliases don't match");
+        }
+
         for (String zid : zids_new) {
             ZoneInfoOld zi = toZoneInfoOld(TimeZone.getTimeZone(zid));
             ZoneInfoOld ziOLD = (ZoneInfoOld)ZoneInfoOld.getTimeZone(zid);